summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2014-03-14 17:55:49 +0000
committertaca <taca@pkgsrc.org>2014-03-14 17:55:49 +0000
commitdff52546171c008c4f8529884c13b47e6dc4b5d2 (patch)
tree1583b930e7335235ddaebf637bca6dc0cc430892 /security
parent44c8e68bdd2b45c04cf614426c01a71e80fc99a7 (diff)
downloadpkgsrc-dff52546171c008c4f8529884c13b47e6dc4b5d2.tar.gz
Update ruby-shadowt to 2.3.3.
[2013/12/18] * Version 2.3.2 Fix up compilation issues causing problems with a non-GNU make. [2013/11/13] * Version 2.3.1 - Caleb Land<caleb.land@gmail.com> Remove sgetspent on implementations using pwd.h [2013/11/13] * Version 2.3.0 - Caleb Land<caleb.land@gmail.com> Merge OS X work into main gem. Fix bugs with OS X implementation and tweak support for FreeBSD. See https://github.com/caleb/ruby-shadow/commit/20d98b7d9e3bbbef0b737affd3245590096a316c - Add license file to Manifest.
Diffstat (limited to 'security')
-rw-r--r--security/ruby-shadow/Makefile5
-rw-r--r--security/ruby-shadow/PLIST10
-rw-r--r--security/ruby-shadow/distinfo11
-rw-r--r--security/ruby-shadow/patches/patch-aa43
-rw-r--r--security/ruby-shadow/patches/patch-ab309
5 files changed, 28 insertions, 350 deletions
diff --git a/security/ruby-shadow/Makefile b/security/ruby-shadow/Makefile
index e36eafd9cdf..4cc6f5a73b8 100644
--- a/security/ruby-shadow/Makefile
+++ b/security/ruby-shadow/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2013/08/05 15:00:15 fhajny Exp $
+# $NetBSD: Makefile,v 1.5 2014/03/14 17:55:49 taca Exp $
-SHADOW_VER= 2.2.0
+SHADOW_VER= 2.3.3
DISTNAME= ruby-shadow-${SHADOW_VER}
PKGNAME= ${RUBY_PKGPREFIX}-shadow-${SHADOW_VER}
-PKGREVISION= 1
CATEGORIES= databases security
MAINTAINER= pkgsrc-users@NetBSD.org
diff --git a/security/ruby-shadow/PLIST b/security/ruby-shadow/PLIST
index f1cfe1405e4..6914c685d54 100644
--- a/security/ruby-shadow/PLIST
+++ b/security/ruby-shadow/PLIST
@@ -1,12 +1,16 @@
-@comment $NetBSD: PLIST,v 1.2 2013/07/07 15:32:56 taca Exp $
+@comment $NetBSD: PLIST,v 1.3 2014/03/14 17:55:49 taca Exp $
${GEM_HOME}/cache/${GEM_NAME}.gem
+${GEM_EXTSDIR}/shadow.${RUBY_DLEXT}
${GEM_LIBDIR}/HISTORY
+${GEM_LIBDIR}/LICENSE
${GEM_LIBDIR}/MANIFEST
${GEM_LIBDIR}/README
${GEM_LIBDIR}/README.euc
-${GEM_LIBDIR}/depend
${GEM_LIBDIR}/extconf.rb
${GEM_LIBDIR}/lib/shadow.${RUBY_DLEXT}
+${GEM_LIBDIR}/pwd/depend
+${GEM_LIBDIR}/pwd/shadow.c
${GEM_LIBDIR}/ruby-shadow.gemspec
-${GEM_LIBDIR}/shadow.c
+${GEM_LIBDIR}/shadow/depend
+${GEM_LIBDIR}/shadow/shadow.c
${GEM_HOME}/specifications/${GEM_NAME}.gemspec
diff --git a/security/ruby-shadow/distinfo b/security/ruby-shadow/distinfo
index d7358b152c1..7ff5ed96434 100644
--- a/security/ruby-shadow/distinfo
+++ b/security/ruby-shadow/distinfo
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.2 2013/08/05 15:00:15 fhajny Exp $
+$NetBSD: distinfo,v 1.3 2014/03/14 17:55:49 taca Exp $
-SHA1 (ruby-shadow-2.2.0.gem) = e9b2ee34c2b0b98552e3a6a939cc2dc09cc1a99f
-RMD160 (ruby-shadow-2.2.0.gem) = 03dcc27c75ac76cbb10efc07db9704c89fdc5484
-Size (ruby-shadow-2.2.0.gem) = 9216 bytes
-SHA1 (patch-aa) = 7500e90948f7aada86b45b152bcc346f0ddb04ba
-SHA1 (patch-ab) = 279c6ba165332a0259b50f05d623c673f9125365
+SHA1 (ruby-shadow-2.3.3.gem) = 6c1edfd710e7d2fe82faced572a5aa972a44df42
+RMD160 (ruby-shadow-2.3.3.gem) = 82a403762814d131f05c320cc24792d6447dc321
+Size (ruby-shadow-2.3.3.gem) = 10752 bytes
+SHA1 (patch-aa) = 96e1562d9772f152c312b35c48584f0de8cecb3c
diff --git a/security/ruby-shadow/patches/patch-aa b/security/ruby-shadow/patches/patch-aa
index 308acfcabc4..95c46af65fa 100644
--- a/security/ruby-shadow/patches/patch-aa
+++ b/security/ruby-shadow/patches/patch-aa
@@ -1,33 +1,18 @@
-$NetBSD: patch-aa,v 1.1.1.1 2013/04/10 09:25:21 tonnerre Exp $
+$NetBSD: patch-aa,v 1.2 2014/03/14 17:55:49 taca Exp $
-Do something more sensible if we detect an OSX-like system.
+Relax condition to make more operating system support.
---- extconf.rb
+--- extconf.rb.orig 2014-03-06 16:01:44.000000000 +0000
+++ extconf.rb
-@@ -11,10 +11,11 @@ $CFLAGS = case RUBY_VERSION
- when /^2\./; '-DRUBY19'
- else; ''
- end
-+$CFLAGS += " -Wall -pedantic"
+@@ -16,10 +16,7 @@ $CFLAGS = case RUBY_VERSION
+ implementation = case CONFIG['host_os']
+ when /linux/i; 'shadow'
+ when /sunos|solaris/i; 'shadow'
+- when /freebsd|openbsd/i; 'pwd'
+- when /darwin/i; 'pwd'
+- else; nil
+- "This library works on OS X, FreeBSD, OpenBSD, Solaris and Linux."
++ else; 'pwd'
+ end
- #$LDFLAGS = "-lshadow"
-
--if( ! (ok = have_library("shadow","getspent")) )
-+if !(ok = have_library("shadow","getspent"))
- $LDFLAGS = ""
- ok = have_func("getspent")
- end
-@@ -36,9 +37,10 @@ else
- osx_ok &= have_func( "getpwnam" )
- osx_ok &= have_func( "getpwnam_r" )
- osx_ok &= have_func( "getpwuid" )
-+ #osx_ok &= have_func( "getuid_r" )
- osx_ok &= have_func( "setpassent" )
- osx_ok &= have_func( "setpwent" )
-- if osx_ok
-- raise "It looks like you're on OSX. There is a branch that might help here: https://github.com/apalmblad/ruby-shadow/tree/osx"
-- end
-+ $CFLAGS += ' -DOSX'
-+ create_makefile("shadow") if osx_ok
- end
-+
+ ok = true
diff --git a/security/ruby-shadow/patches/patch-ab b/security/ruby-shadow/patches/patch-ab
deleted file mode 100644
index 9ae64cb52e0..00000000000
--- a/security/ruby-shadow/patches/patch-ab
+++ /dev/null
@@ -1,309 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2013/08/05 15:00:15 fhajny Exp $
-
-Handle OSX-like password APIs.
-
---- shadow.c
-+++ shadow.c
-@@ -7,8 +7,16 @@
- * License: Free for any use with your own risk!
- * Modified at: <1999/8/19 06:48:18 by ttate>
- */
--
-+#ifndef OSX
- #include <shadow.h>
-+#define PWTYPE struct spwd
-+#else
-+#include <sys/types.h>
-+#include <pwd.h>
-+#include <time.h>
-+#include <uuid/uuid.h>
-+#define PWTYPE struct passwd
-+#endif
- #include "ruby.h"
- #ifdef RUBY19
- #include <ruby/io.h>
-@@ -33,54 +41,84 @@ static VALUE rb_eFileLock;
- static VALUE
- rb_shadow_setspent(VALUE self)
- {
-+ #ifdef OSX
-+ setpassent(1);
-+ #else
- setspent();
-+ #endif
- return Qnil;
--};
-+}
-
-
- static VALUE
- rb_shadow_endspent(VALUE self)
- {
-+ #ifdef OSX
-+ endpwent();
-+ #else
- endspent();
-+ #endif
- return Qnil;
--};
--
--
-+}
-+#ifdef OSX
-+static VALUE convert_pw_struct( struct passwd *entry )
-+{
-+ return rb_struct_new(rb_sPasswdEntry,
-+ rb_tainted_str_new2(entry->pw_name),
-+ rb_tainted_str_new2(entry->pw_passwd ),
-+ difftime( entry->pw_change, 0 ) / 24*60*60,
-+ Qnil, /* days that password must stay same */
-+ Qnil, /* days until passwor changes. */
-+ Qnil, /* days before expiration where user is warned */
-+ Qnil, /* days after password expiration that account becomes inactive */
-+ difftime( entry->pw_expire, 0 ) / 24*60*60,
-+ Qnil,
-+ NULL);
-+}
-+#else
-+static VALUE convert_pw_struct( struct spwd *entry )
-+{
-+ VALUE result = rb_struct_new(rb_sPasswdEntry,
-+ rb_tainted_str_new2(entry->sp_namp),
-+ rb_tainted_str_new2(entry->sp_pwdp),
-+ INT2FIX(entry->sp_lstchg),
-+ INT2FIX(entry->sp_min),
-+ INT2FIX(entry->sp_max),
-+ INT2FIX(entry->sp_warn),
-+ INT2FIX(entry->sp_inact),
-+ INT2FIX(entry->sp_expire),
-+ INT2FIX(entry->sp_flag),
-+ NULL);
-+}
-+#endif
- #ifndef SOLARIS
- static VALUE
- rb_shadow_sgetspent(VALUE self, VALUE str)
- {
-- struct spwd *entry;
-+ PWTYPE *entry;
- VALUE result;
-
- if( TYPE(str) != T_STRING )
- rb_raise(rb_eException,"argument must be a string.");
-
-+ #ifdef OSX
-+ entry = getpwnam( StringValuePtr(str) );
-+ #else
- entry = sgetspent(StringValuePtr(str));
--
-+ #endif
- if( entry == NULL )
- return Qnil;
-+ result = convert_pw_struct( entry );
-
-- result = rb_struct_new(rb_sPasswdEntry,
-- rb_tainted_str_new2(entry->sp_namp),
-- rb_tainted_str_new2(entry->sp_pwdp),
-- INT2FIX(entry->sp_lstchg),
-- INT2FIX(entry->sp_min),
-- INT2FIX(entry->sp_max),
-- INT2FIX(entry->sp_warn),
-- INT2FIX(entry->sp_inact),
-- INT2FIX(entry->sp_expire),
-- INT2FIX(entry->sp_flag),
-- NULL);
- free(entry);
- return result;
--};
-+}
- #endif
--
-+#ifndef OSX
- static VALUE
- rb_shadow_fgetspent(VALUE self, VALUE file)
- {
-- struct spwd *entry;
-+ PWTYPE *entry;
- VALUE result;
-
- if( TYPE(file) != T_FILE )
-@@ -91,85 +129,62 @@ rb_shadow_fgetspent(VALUE self, VALUE file)
- if( entry == NULL )
- return Qnil;
-
-- result = rb_struct_new(rb_sPasswdEntry,
-- rb_tainted_str_new2(entry->sp_namp),
-- rb_tainted_str_new2(entry->sp_pwdp),
-- INT2FIX(entry->sp_lstchg),
-- INT2FIX(entry->sp_min),
-- INT2FIX(entry->sp_max),
-- INT2FIX(entry->sp_warn),
-- INT2FIX(entry->sp_inact),
-- INT2FIX(entry->sp_expire),
-- INT2FIX(entry->sp_flag),
-- NULL);
-+ result = convert_pw_struct( entry );
- return result;
--};
-+}
-+#endif
-
- static VALUE
- rb_shadow_getspent(VALUE self)
- {
-- struct spwd *entry;
-+ PWTYPE *entry;
- VALUE result;
--
-+ #ifdef OSX
-+ entry = getpwent();
-+ #else
- entry = getspent();
-+ #endif
-
- if( entry == NULL )
- return Qnil;
-
-- result = rb_struct_new(rb_sPasswdEntry,
-- rb_tainted_str_new2(entry->sp_namp),
-- rb_tainted_str_new2(entry->sp_pwdp),
-- INT2FIX(entry->sp_lstchg),
-- INT2FIX(entry->sp_min),
-- INT2FIX(entry->sp_max),
-- INT2FIX(entry->sp_warn),
-- INT2FIX(entry->sp_inact),
-- INT2FIX(entry->sp_expire),
-- INT2FIX(entry->sp_flag),
-- NULL);
-+ result = convert_pw_struct( entry );
- return result;
--};
-+}
-
- static VALUE
- rb_shadow_getspnam(VALUE self, VALUE name)
- {
-- struct spwd *entry;
-+ PWTYPE *entry;
- VALUE result;
-
- if( TYPE(name) != T_STRING )
- rb_raise(rb_eException,"argument must be a string.");
--
-+ #ifdef OSX
-+ entry = getpwnam(StringValuePtr(name));
-+ #else
- entry = getspnam(StringValuePtr(name));
-+ #endif
-
- if( entry == NULL )
- return Qnil;
-
-- result = rb_struct_new(rb_sPasswdEntry,
-- rb_tainted_str_new2(entry->sp_namp),
-- rb_tainted_str_new2(entry->sp_pwdp),
-- INT2FIX(entry->sp_lstchg),
-- INT2FIX(entry->sp_min),
-- INT2FIX(entry->sp_max),
-- INT2FIX(entry->sp_warn),
-- INT2FIX(entry->sp_inact),
-- INT2FIX(entry->sp_expire),
-- INT2FIX(entry->sp_flag),
-- NULL);
-+ result = convert_pw_struct( entry );
- return result;
--};
--
-+}
-
-+#ifndef OSX
- static VALUE
- rb_shadow_putspent(VALUE self, VALUE entry, VALUE file)
- {
-- struct spwd centry;
-+ PWTYPE centry;
- FILE* cfile;
- VALUE val[9];
- int i;
- int result;
-
- for(i=0; i<=8; i++)
-- val[i] = RSTRUCT_PTR( entry )[i]; //val[i] = RSTRUCT(entry)->ptr[i];
-+ val[i] = RSTRUCT_PTR( entry )[i]; /* val[i] = RSTRUCT(entry)->ptr[i]; */
- cfile = file_ptr( RFILE(file)->fptr );
-
- centry.sp_namp = StringValuePtr(val[0]);
-@@ -188,7 +203,7 @@ rb_shadow_putspent(VALUE self, VALUE entry, VALUE file)
- rb_raise(rb_eStandardError,"can't change password");
-
- return Qtrue;
--};
-+}
-
-
- static VALUE
-@@ -200,7 +215,7 @@ rb_shadow_lckpwdf(VALUE self)
- rb_raise(rb_eFileLock,"password file was locked");
- else
- return Qtrue;
--};
-+}
-
- static int in_lock;
-
-@@ -225,7 +240,7 @@ rb_shadow_lock(VALUE self)
- else{
- return rb_shadow_lckpwdf(self);
- };
--};
-+}
-
-
- static VALUE
-@@ -236,13 +251,13 @@ rb_shadow_ulckpwdf(VALUE self)
- };
- ulckpwdf();
- return Qtrue;
--};
-+}
-
- static VALUE
- rb_shadow_unlock(VALUE self)
- {
- return rb_shadow_ulckpwdf(self);
--};
-+}
-
- static VALUE
- rb_shadow_lock_p(VALUE self)
-@@ -256,8 +271,9 @@ rb_shadow_lock_p(VALUE self)
- else{
- ulckpwdf();
- return Qfalse;
-- };
--};
-+ }
-+}
-+#endif
-
-
- void
-@@ -283,13 +299,17 @@ Init_shadow()
- #ifndef SOLARIS
- rb_define_module_function(rb_mPasswd,"sgetspent",rb_shadow_sgetspent,1);
- #endif
-+ #ifndef OSX
- rb_define_module_function(rb_mPasswd,"fgetspent",rb_shadow_fgetspent,1);
-+ #endif
- rb_define_module_function(rb_mPasswd,"getspent",rb_shadow_getspent,0);
- rb_define_module_function(rb_mPasswd,"getspnam",rb_shadow_getspnam,1);
-+ #ifndef OSX
- rb_define_module_function(rb_mPasswd,"putspent",rb_shadow_putspent,2);
- rb_define_module_function(rb_mPasswd,"lckpwdf",rb_shadow_lckpwdf,0);
- rb_define_module_function(rb_mPasswd,"lock",rb_shadow_lock,0);
- rb_define_module_function(rb_mPasswd,"ulckpwdf",rb_shadow_ulckpwdf,0);
- rb_define_module_function(rb_mPasswd,"unlock",rb_shadow_unlock,0);
- rb_define_module_function(rb_mPasswd,"lock?",rb_shadow_lock_p,0);
--};
-+ #endif
-+}