Calimero
2009-Feb-24 14:45 UTC
[Puppet Users] User/managehome with useradd provider on CentOS
Hi, When you set managehome to false on a User ressource, homedir will still be created on a CentOS box as the -M flag is not passed to useradd. $ diff -u /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/ useradd.rb.bak \ /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/useradd.rb --- /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/ useradd.rb.bak 2008-10-23 01:19:07.000000000 +0200 +++ /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/useradd.rb 2009-02-24 15:25:35.000000000 +0100 @@ -31,7 +31,7 @@ cmd = [] if @resource.managehome? cmd << "-m" - elsif %w{Fedora RedHat}.include?(Facter.value ("operatingsystem")) + elsif %w{Fedora RedHat CentOS}.include?(Facter.value ("operatingsystem")) cmd << "-M" end cmd These are source files from the EPEL 0.24.7 package. I cannot report this (minor) bug through Redmine as the system just won''t let me register... Hope it helps. Bye, Calimero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Is there a way to pass parameters to rpm with the package type? I have some rpms that need to be installed with --nodeps Thanks, Steven --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-Feb-24 15:27 UTC
[Puppet Users] Re: User/managehome with useradd provider on CentOS
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Calimero wrote:> Hi, > > When you set managehome to false on a User ressource, homedir will > still be created on a CentOS box as the -M flag is not passed to > useradd. > > $ diff -u /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/ > useradd.rb.bak \ > /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/useradd.rb > --- /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/ > useradd.rb.bak 2008-10-23 01:19:07.000000000 +0200 > +++ /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/useradd.rb > 2009-02-24 15:25:35.000000000 +0100 > @@ -31,7 +31,7 @@ > cmd = [] > if @resource.managehome? > cmd << "-m" > - elsif %w{Fedora RedHat}.include?(Facter.value > ("operatingsystem")) > + elsif %w{Fedora RedHat CentOS}.include?(Facter.value > ("operatingsystem")) > cmd << "-M" > end > cmd > > These are source files from the EPEL 0.24.7 package. I cannot report > this (minor) bug through Redmine as the system just won''t let me > register... Hope it helps. >Thanks for reporting this. I''ve pushed a commit fixing this issue. It''ll be in the forthcoming 0.24.8 release. Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJpBHE9hTGvAxC30ARAgZ3AJ9V2X6bDNL0DFUW6qB8+MkIF4RfNACfQD1l osORC6Q7r22k7XX6Oj/FQDA=UuGK -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Steven Nemetz wrote:> Is there a way to pass parameters to rpm with the package type? > > I have some rpms that need to be installed with --nodepsWhat sort of packages do you need to do this with? It sounds like broken packages (which often come from proprietary vendors that don''t know how to package properly :). There are probably better ways to handle this sort of breakage. For example, create dummy packages that "provide" the dependencies. Of course, I''m just guessing at what you really need to do, so I could be way off. -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Erotic is when you use a feather, kinky is when you use the whole chicken. -- C. Haynes.
The packages are ok (straight CentOS 4), but the OS is our own dialect (modified from CentOS 4). So, I end up with some packages that depend on others only to create a directory or a config file that puppet will be doing anyways. I don''t want to install the dependence because it installs other stuff that I don''t want or need and might interfere with our custom OS. I was hoping not to have to create a either a modified rpm or a dummy one. So far, it sound like creating a dummy package or modifying the puppet rpm provider are my best choices. Thanks, Steven> -----Original Message----- > From: puppet-users@googlegroups.com[mailto:puppet-users@googlegroups.com]> On Behalf Of Todd Zullinger > Sent: Thursday, February 26, 2009 5:18 PM > To: puppet-users@googlegroups.com > Subject: [Puppet Users] Re: Package rpm parameters > > Steven Nemetz wrote: > > Is there a way to pass parameters to rpm with the package type? > > > > I have some rpms that need to be installed with --nodeps > > What sort of packages do you need to do this with? It sounds like > broken packages (which often come from proprietary vendors that don''t > know how to package properly :). > > There are probably better ways to handle this sort of breakage. For > example, create dummy packages that "provide" the dependencies. > > Of course, I''m just guessing at what you really need to do, so I could > be way off. > > -- > Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Erotic is when you use a feather, kinky is when you use the whole > chicken. > -- C. Haynes.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
or just uses an exec to execute it with nodeps.... Ohad On Fri, Feb 27, 2009 at 1:23 PM, Steven Nemetz <snemetz@proofpoint.com>wrote:> > The packages are ok (straight CentOS 4), but the OS is our own dialect > (modified from CentOS 4). So, I end up with some packages that depend on > others only to create a directory or a config file that puppet will be > doing anyways. I don''t want to install the dependence because it > installs other stuff that I don''t want or need and might interfere with > our custom OS. > > I was hoping not to have to create a either a modified rpm or a dummy > one. > > So far, it sound like creating a dummy package or modifying the puppet > rpm provider are my best choices. > > Thanks, > > Steven > > > -----Original Message----- > > From: puppet-users@googlegroups.com > [mailto:puppet-users@googlegroups.com] > > On Behalf Of Todd Zullinger > > Sent: Thursday, February 26, 2009 5:18 PM > > To: puppet-users@googlegroups.com > > Subject: [Puppet Users] Re: Package rpm parameters > > > > Steven Nemetz wrote: > > > Is there a way to pass parameters to rpm with the package type? > > > > > > I have some rpms that need to be installed with --nodeps > > > > What sort of packages do you need to do this with? It sounds like > > broken packages (which often come from proprietary vendors that don''t > > know how to package properly :). > > > > There are probably better ways to handle this sort of breakage. For > > example, create dummy packages that "provide" the dependencies. > > > > Of course, I''m just guessing at what you really need to do, so I could > > be way off. > > > > -- > > Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp<http://www.pobox.com/%7Etmz/pgp> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Erotic is when you use a feather, kinky is when you use the whole > > chicken. > > -- C. Haynes. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Feb 26, 2009 at 09:23:31PM -0800, Steven Nemetz wrote:> I was hoping not to have to create a either a modified rpm or a dummy > one. > > So far, it sound like creating a dummy package or modifying the puppet > rpm provider are my best choices. >I would urge you to go the dummy package root. It is good practice generally, not just for puppet; it keeps your package database consistent and healthy *and* (very importantly) it documents your intent. If you just force --no-deps, how will you (or somebody filling in while you are ill, on holiday, under a bus etc.) know which broken dependencies on a system are evidence of error and breakage and which are deliberate policy? -- Bruce I unfortunately do not know how to turn cheese into gold. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---