Darin Perusich
2012-May-21 15:39 UTC
[Puppet Users] puppetdb build fails on OpenSUSE systems with undefined method
Hello All, I''m attempting to build puppetdb on opensuse it''s failing with the error "undefined method `downcase'' for nil:NilClass". The Rakefile is setting @plibdir based on "osfamily Facter.value(:osfamily).downcase" and osfamily is not a fact on OpenSUSE/SUSE systems. How should I work around this? Code block from Rakefile: require ''facter'' osfamily = Facter.value(:osfamily).downcase if osfamily.downcase =~ /debian/ and PE_BUILD == '''' @plibdir = ''/usr/lib/ruby/1.8'' elsif osfamily.downcase =~ /debian/ and PE_BUILD.downcase == "true" @plibdir = ''/opt/puppet/lib/ruby/1.8'' elsif osfamily.downcase =~ /redhat/ and PE_BUILD == '''' @plibdir = ''/usr/lib/ruby/site_ruby/1.8'' elsif osfamily.downcase =~ /redhat/ and PE_BUILD.downcase == "true" @plibdir = ''/opt/puppet/lib/ruby/site_ruby/1.8'' end -- Later, Darin -- 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.
Deepak Giridharagopal
2012-May-21 16:28 UTC
Re: [Puppet Users] puppetdb build fails on OpenSUSE systems with undefined method
Hi Darin, On Mon, May 21, 2012 at 9:39 AM, Darin Perusich <darin@darins.net> wrote:> Hello All, > > I''m attempting to build puppetdb on opensuse it''s failing with the > error "undefined method `downcase'' for nil:NilClass". The Rakefile is > setting @plibdir based on "osfamily > Facter.value(:osfamily).downcase" and osfamily is not a fact on > OpenSUSE/SUSE systems. How should I work around this? > > Code block from Rakefile: > > require ''facter'' > osfamily = Facter.value(:osfamily).downcase > if osfamily.downcase =~ /debian/ and PE_BUILD == '''' > @plibdir = ''/usr/lib/ruby/1.8'' > elsif osfamily.downcase =~ /debian/ and PE_BUILD.downcase == "true" > @plibdir = ''/opt/puppet/lib/ruby/1.8'' > elsif osfamily.downcase =~ /redhat/ and PE_BUILD == '''' > @plibdir = ''/usr/lib/ruby/site_ruby/1.8'' > elsif osfamily.downcase =~ /redhat/ and PE_BUILD.downcase == "true" > @plibdir = ''/opt/puppet/lib/ruby/site_ruby/1.8'' > end >That sounds like a bug to me! I''ve file http://projects.puppetlabs.com/issues/14607 to track the issue. A few questions: 1) Is there a different fact we should be using on SUSE that mentions that the box is actually a SUSE system? 2) What is the ruby library path on a SUSE system using the stock ruby packages? Thanks! deepak -- 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.
Darin Perusich
2012-May-21 17:09 UTC
Re: [Puppet Users] puppetdb build fails on OpenSUSE systems with undefined method
Hi Deepak, On Mon, May 21, 2012 at 12:28 PM, Deepak Giridharagopal <deepak@puppetlabs.com> wrote:> Hi Darin, > > On Mon, May 21, 2012 at 9:39 AM, Darin Perusich <darin@darins.net> wrote: >> >> Hello All, >> >> I''m attempting to build puppetdb on opensuse it''s failing with the >> error "undefined method `downcase'' for nil:NilClass". The Rakefile is >> setting @plibdir based on "osfamily >> Facter.value(:osfamily).downcase" and osfamily is not a fact on >> OpenSUSE/SUSE systems. How should I work around this? >> >> Code block from Rakefile: >> >> require ''facter'' >> osfamily = Facter.value(:osfamily).downcase >> if osfamily.downcase =~ /debian/ and PE_BUILD == '''' >> @plibdir = ''/usr/lib/ruby/1.8'' >> elsif osfamily.downcase =~ /debian/ and PE_BUILD.downcase == "true" >> @plibdir = ''/opt/puppet/lib/ruby/1.8'' >> elsif osfamily.downcase =~ /redhat/ and PE_BUILD == '''' >> @plibdir = ''/usr/lib/ruby/site_ruby/1.8'' >> elsif osfamily.downcase =~ /redhat/ and PE_BUILD.downcase == "true" >> @plibdir = ''/opt/puppet/lib/ruby/site_ruby/1.8'' >> end > > > That sounds like a bug to me! I''ve file > http://projects.puppetlabs.com/issues/14607 to track the issue. A few > questions:I''ve updated the ticket with this info already, but for those on the list.> 1) Is there a different fact we should be using on SUSE that mentions that > the box is actually a SUSE system?Here are the facts which mention suse on an OpenSUSE and SLES, and a SLES for vmware system. Looks like OpenSuSE is missing osfamily which seems odd. This is the case on OpenSUSE 11.3 (facter 1.5.7) and 12.1 (facter 1.6.0) using the stock facter. Looks like lsbdistid is the only commonality across the systems. OpenSuSE: facter |grep -i suse lsbdistdescription => openSUSE 12.1 (i586) lsbdistid => SUSE LINUX operatingsystem => OpenSuSE SLES: facter | grep -i suse lsbdistdescription => SUSE Linux Enterprise Server 11 (x86_64) lsbdistid => SUSE LINUX osfamily => Suse SLES for VMWARE: facter |grep -i suse lsbdistdescription => SUSE Linux Enterprise Server 11 (x86_64) lsbdistid => SUSE LINUX> 2) What is the ruby library path on a SUSE system using the stock ruby > packages?The ruby library path from the stock package depends on architecture but will be one of the following: i586: /usr/lib/ruby/site_ruby/1.8/ x86_64: /usr/lib64/ruby/site_ruby/1.8/> Thanks! > deepak > > -- > 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.-- 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.