Matthew Palmer
2007-May-20 11:33 UTC
ruby-shadow problems for 0.22.4 on Debian/Ubuntu AMD64
I thought I''d put this out there for anyone to save anyone who''s running 0.22.4 on AMD64 hosts a whole world of hurt. Basically, the libshadow-ruby1.8 package that Puppet (as of 0.22.4) relies on is broken for AMD64 in both Debian (Sarge+) and Ubuntu (all releases). The problem is basically just some non-portable code. I''ve reported the bug into Debian with a patch, so anyone who is having troubles with their Puppet programs segfaulting on AMD64 (it might also occur on other non-i386 architectures) and talking about things failing in shadow.so, then give the patch in http://bugs.debian.org/425234 a go. Now, of course, having gone through that little trial, I''m better equipped to hunt down some of the more vicious segfaults people have been finding for a long time now... As an aside, what are people using to provide the ruby-shadow functionality on other platforms? The standard distribution only provides ''etc'' (for /etc/passwd and /etc/group), not the shadow equivalents, and I can''t find a gem for it in the rubygems system anywhere. It''s all very odd... - Matt -- <liw> hut.fi has or used to have two nfs servers not-responding and still-trying... don''t know if their dns server was not-found... 4o4 would be then a good name for the web server... endless hours of fun <aj> "did you get a response from 4o4?" "nah, it just 404ed"
Kostas Georgiou
2007-May-20 14:53 UTC
Re: ruby-shadow problems for 0.22.4 on Debian/Ubuntu AMD64
On Sun, May 20, 2007 at 09:33:00PM +1000, Matthew Palmer wrote:> I thought I''d put this out there for anyone to save anyone who''s running > 0.22.4 on AMD64 hosts a whole world of hurt. > > Basically, the libshadow-ruby1.8 package that Puppet (as of 0.22.4) relies > on is broken for AMD64 in both Debian (Sarge+) and Ubuntu (all releases). > The problem is basically just some non-portable code. I''ve reported the bug > into Debian with a patch, so anyone who is having troubles with their Puppet > programs segfaulting on AMD64 (it might also occur on other non-i386 > architectures) and talking about things failing in shadow.so, then give the > patch in http://bugs.debian.org/425234 a go. > > Now, of course, having gone through that little trial, I''m better equipped > to hunt down some of the more vicious segfaults people have been finding for > a long time now... > > As an aside, what are people using to provide the ruby-shadow functionality > on other platforms? The standard distribution only provides ''etc'' (for > /etc/passwd and /etc/group), not the shadow equivalents, and I can''t find a > gem for it in the rubygems system anywhere. It''s all very odd...An rpm for it should appear shortly for Fedora[1], it has a similar patch (you need to patch the rb_struct_new calls as well btw), I''ve send the patch to the author but I haven''t got a reply so far. [1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240008 Cheers, Kostas
Luke Kanies
2007-May-20 16:52 UTC
Re: ruby-shadow problems for 0.22.4 on Debian/Ubuntu AMD64
On May 20, 2007, at 7:33 AM, Matthew Palmer wrote:> > As an aside, what are people using to provide the ruby-shadow > functionality > on other platforms? The standard distribution only provides > ''etc'' (for > /etc/passwd and /etc/group), not the shadow equivalents, and I > can''t find a > gem for it in the rubygems system anywhere. It''s all very odd...Just so it''s out in the open... We could pretty easily write a method that just read in the Shadow file and got the password for the user. This would, of course, have its own heinous portability problems, but it wouldn''t be hard to do for those platforms that use an old-style shadow. It''d have to be done in a module, almost as a provider-provider (that is, a portable way of providing the same functionality to different providers), but it''s not that hard. I just preferred to rely on that existing library to start, and it seems to make more sense to use this lower layer whenever possible. -- If a `religion'' is defined to be a system of ideas that contains unprovable statements, then Godel taught us that mathematics is not only a religion, it is the only religion that can prove itself to be one. -- John Barrow --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Matthew Palmer
2007-May-20 20:13 UTC
Re: ruby-shadow problems for 0.22.4 on Debian/Ubuntu AMD64
On Sun, May 20, 2007 at 03:53:20PM +0100, Kostas Georgiou wrote:> On Sun, May 20, 2007 at 09:33:00PM +1000, Matthew Palmer wrote: > > > I thought I''d put this out there for anyone to save anyone who''s running > > 0.22.4 on AMD64 hosts a whole world of hurt. > > > > Basically, the libshadow-ruby1.8 package that Puppet (as of 0.22.4) relies > > on is broken for AMD64 in both Debian (Sarge+) and Ubuntu (all releases). > > The problem is basically just some non-portable code. I''ve reported the bug > > into Debian with a patch, so anyone who is having troubles with their Puppet > > programs segfaulting on AMD64 (it might also occur on other non-i386 > > architectures) and talking about things failing in shadow.so, then give the > > patch in http://bugs.debian.org/425234 a go. > > > > Now, of course, having gone through that little trial, I''m better equipped > > to hunt down some of the more vicious segfaults people have been finding for > > a long time now... > > > > As an aside, what are people using to provide the ruby-shadow functionality > > on other platforms? The standard distribution only provides ''etc'' (for > > /etc/passwd and /etc/group), not the shadow equivalents, and I can''t find a > > gem for it in the rubygems system anywhere. It''s all very odd... > > An rpm for it should appear shortly for Fedora[1], it has a similar patch (you need > to patch the rb_struct_new calls as well btw), I''ve send the patch to the author > but I haven''t got a reply so far.Hmm, thanks for pointing that out. It seems to work (so far) just patching the rb_struct_define calls, but I''ll push your patch to the Debian maintainer as well, for safety. - Matt