diff options
author | tonnerre <tonnerre> | 2014-01-01 23:46:38 +0000 |
---|---|---|
committer | tonnerre <tonnerre> | 2014-01-01 23:46:38 +0000 |
commit | 2eabee157699f787be213807c38591b55e4dbf53 (patch) | |
tree | 87aa8b28ade50ca409c3d6bde5254ae70aab87ed | |
parent | 89233fc4ea36e73431c3b67e2a377efe33655154 (diff) | |
download | pkgsrc-2eabee157699f787be213807c38591b55e4dbf53.tar.gz |
Fix detection of useradd user management under NetBSD.
NetBSD doesn't have chage but can use the -e and -f flags to passwd to
achieve the same.
Closes PR pkg/48137.
-rw-r--r-- | sysutils/puppet/Makefile | 3 | ||||
-rw-r--r-- | sysutils/puppet/distinfo | 3 | ||||
-rw-r--r-- | sysutils/puppet/patches/patch-ae | 29 |
3 files changed, 33 insertions, 2 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile index 545aa8f76e5..6926c035dcb 100644 --- a/sysutils/puppet/Makefile +++ b/sysutils/puppet/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.15 2013/04/25 12:11:21 joerg Exp $ +# $NetBSD: Makefile,v 1.16 2014/01/01 23:46:38 tonnerre Exp $ DISTNAME= puppet-3.1.1 +PKGREVISION= 1 CATEGORIES= sysutils #MASTER_SITES= http://puppetlabs.com/downloads/puppet/ diff --git a/sysutils/puppet/distinfo b/sysutils/puppet/distinfo index 6ef5ff15c98..dcf45c0c00a 100644 --- a/sysutils/puppet/distinfo +++ b/sysutils/puppet/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2013/04/10 21:10:54 tonnerre Exp $ +$NetBSD: distinfo,v 1.9 2014/01/01 23:46:38 tonnerre Exp $ SHA1 (puppet-3.1.1.gem) = 4f6adf79ab3ff5204178102375e79ca9e486042d RMD160 (puppet-3.1.1.gem) = 59cb6269f5cf0bcb89f643cb9ed211ab1640ff1d @@ -7,3 +7,4 @@ SHA1 (patch-aa) = 153dcff431d6c642872d3aa2118bc2505c996e94 SHA1 (patch-ab) = bc90687cd03181211b6fe3d6f056e653334d96a9 SHA1 (patch-ac) = eda614eeee25b18ab36335fc7147fbe7ab770249 SHA1 (patch-ad) = 7feaab50c3c8ce2ed350dac3222fdf1bd2b34191 +SHA1 (patch-ae) = 2bd3354b9cf0ccc2366e66a6022c341c6a8472de diff --git a/sysutils/puppet/patches/patch-ae b/sysutils/puppet/patches/patch-ae new file mode 100644 index 00000000000..5b2efffd935 --- /dev/null +++ b/sysutils/puppet/patches/patch-ae @@ -0,0 +1,29 @@ +$NetBSD: patch-ae,v 1.3 2014/01/01 23:46:38 tonnerre Exp $ + +Fix detection of useradd user management under NetBSD. + +NetBSD doesn't have chage but can use the -e and -f flags to passwd to +achieve the same. + +--- lib/puppet/provider/user/useradd.rb.orig 2014-01-01 23:22:45.000000000 +0000 ++++ lib/puppet/provider/user/useradd.rb +@@ -5,13 +5,16 @@ Puppet::Type.type(:user).provide :userad + install Ruby's shadow password library (often known as `ruby-libshadow`) + if you wish to manage user passwords." + +- commands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "chage" ++ commands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "chage" unless %w{NetBSD}.include? Facter.value(:operatingsystem) ++ commands :add => "useradd", :delete => "userdel", :modify => "usermod", :password => "passwd" if %w{NetBSD}.include? Facter.value(:operatingsystem) + + options :home, :flag => "-d", :method => :dir + options :comment, :method => :gecos + options :groups, :flag => "-G" +- options :password_min_age, :flag => "-m" +- options :password_max_age, :flag => "-M" ++ options :password_min_age, :flag => "-m" unless %w{NetBSD}.include? Facter.value(:operatingsystem) ++ options :password_max_age, :flag => "-M" unless %w{NetBSD}.include? Facter.value(:operatingsystem) ++ options :password_min_age, :flag => "-e" if %w{NetBSD}.include? Facter.value(:operatingsystem) ++ options :password_max_age, :flag => "-f" if %w{NetBSD}.include? Facter.value(:operatingsystem) + + verify :gid, "GID must be an integer" do |value| + value.is_a? Integer |