pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/ruby-shadow Update ruby-shadowt to 2.3.3.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4156ff6718ee
branches: trunk
changeset: 631972:4156ff6718ee
user: taca <taca%pkgsrc.org@localhost>
date: Fri Mar 14 17:55:49 2014 +0000
description:
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@localhost>
Remove sgetspent on implementations using pwd.h
[2013/11/13]
* Version 2.3.0
- Caleb Land<caleb.land%gmail.com@localhost>
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:
security/ruby-shadow/Makefile | 5 +-
security/ruby-shadow/PLIST | 10 +-
security/ruby-shadow/distinfo | 11 +-
security/ruby-shadow/patches/patch-aa | 43 +---
security/ruby-shadow/patches/patch-ab | 309 ----------------------------------
5 files changed, 28 insertions(+), 350 deletions(-)
diffs (truncated from 418 to 300 lines):
diff -r e0b7811ffecf -r 4156ff6718ee security/ruby-shadow/Makefile
--- a/security/ruby-shadow/Makefile Fri Mar 14 17:55:00 2014 +0000
+++ b/security/ruby-shadow/Makefile Fri Mar 14 17:55:49 2014 +0000
@@ -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@localhost
diff -r e0b7811ffecf -r 4156ff6718ee security/ruby-shadow/PLIST
--- a/security/ruby-shadow/PLIST Fri Mar 14 17:55:00 2014 +0000
+++ b/security/ruby-shadow/PLIST Fri Mar 14 17:55:49 2014 +0000
@@ -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 -r e0b7811ffecf -r 4156ff6718ee security/ruby-shadow/distinfo
--- a/security/ruby-shadow/distinfo Fri Mar 14 17:55:00 2014 +0000
+++ b/security/ruby-shadow/distinfo Fri Mar 14 17:55:49 2014 +0000
@@ -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 -r e0b7811ffecf -r 4156ff6718ee security/ruby-shadow/patches/patch-aa
--- a/security/ruby-shadow/patches/patch-aa Fri Mar 14 17:55:00 2014 +0000
+++ b/security/ruby-shadow/patches/patch-aa Fri Mar 14 17:55:49 2014 +0000
@@ -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"
-
- #$LDFLAGS = "-lshadow"
+@@ -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
--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 -r e0b7811ffecf -r 4156ff6718ee security/ruby-shadow/patches/patch-ab
--- a/security/ruby-shadow/patches/patch-ab Fri Mar 14 17:55:00 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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.");
Home |
Main Index |
Thread Index |
Old Index