Problems building puppet 3.x for SLES

689 views
Skip to first unread message

Jagga Soorma

unread,
Dec 26, 2012, 10:53:32 PM12/26/12
to puppet...@googlegroups.com
Hi Guys,

I am new to puppet and have a mix of both RHEL5.x and SLES11.x servers in my environment.  I have been able to build the puppet client with some modifications on RHEL5.x with the spec files just fine but can't seem to build for SLES11.x.  I was wondering if anyone here is using the puppet 3.x client with SLES11 yet?  If so, do you know what the best way is to install all the dependencies and the puppet client for SLES11.x.

Any help would be appreciated.

Thanks,
-J

Matthaus Owens

unread,
Dec 26, 2012, 11:25:18 PM12/26/12
to puppet...@googlegroups.com
Which part isn't working for you? What have you tried? Are you
building locally on a sles box or using something like open build
service?
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/UrZPC54IbswJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.



--
Matthaus Owens
Release Manager, Puppet Labs

Jagga Soorma

unread,
Dec 27, 2012, 12:04:22 AM12/27/12
to puppet...@googlegroups.com
Here are some of the issues I have been running into.  So, I downloaded the puppet-3.0.1.tar.gz package and I am using the ext/suse/puppet.spec file to build puppet.  Here is the error I was getting:

--
..snip..
+ /usr/bin/install -Dp -m0644 '/var/tmp/puppet-3.0.0-1-root-root%{_confdir}/logrotate' /var/tmp/puppet-3.0.0-1-root-root/etc/logrotate.d/puppet
+ /usr/bin/install -Dp -m0755 conf/suse/client.init /var/tmp/puppet-3.0.0-1-root-root/etc/init.d/puppet
/usr/bin/install: cannot stat `conf/suse/client.init': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.43842 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.43842 (%install)
--

So, I got around this by adding to the spec file (don't feel like I should be doing this though):
%{__cp} -a %{pbuild}/ext/suse/client.init %{buildroot}%{_confdir}/client.init
%{__cp} -a %{pbuild}/ext/suse/server.init %{buildroot}%{_confdir}/server.init

Now, I get a bit further but it exits with the following messages:

--
..snip..
+ /bin/mkdir -p /var/tmp/puppet-3.0.1-1-root-root/usr/share/doc/packages/puppet
+ cp -pr COPYING LICENSE README examples /var/tmp/puppet-3.0.1-1-root-root/usr/share/doc/packages/puppet
cp: cannot stat `COPYING': No such file or directory
cp: cannot stat `README': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.26489 (%doc)
Processing files: puppet-server-3.0.1-1
Finding  Provides: /usr/lib/rpm/find-provides puppet
Finding  Requires: /usr/lib/rpm/find-requires puppet
Finding  Supplements: /usr/lib/rpm/find-supplements puppet
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Requires: /bin/bash
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/puppet-3.0.1-1-root-root
error: Installed (but unpackaged) file(s) found:
   /usr/bin/extlookup2hiera


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.26489 (%doc)
    Installed (but unpackaged) file(s) found:
   /usr/bin/extlookup2hiera
--

I was able to build/install facter-1.6.16-0.  However, hiera builds fine but complains about the following dependencies for SLES that I can't find:

--
# rpm -Uvh hiera-1.1.1-1.noarch.rpm
error: Failed dependencies:
    ruby(abi) >= 1.8 is needed by hiera-1.1.1-1.noarch
    rubygem-json is needed by hiera-1.1.1-1.noarch

# rpm -qa | grep -i ruby
ruby-devel-1.8.7.p72-5.21
rubygems-1.3.1-2.10
ruby-doc-ri-1.8.7.p72-5.21
ruby-shadow-1.4.1-2.2
ruby-1.8.7.p72-5.21
--

Regards,
-J

banuchka

unread,
Dec 27, 2012, 1:03:41 AM12/27/12
to puppet...@googlegroups.com

Jagga Soorma

unread,
Dec 27, 2012, 1:36:21 AM12/27/12
to puppet...@googlegroups.com
Thanks for providing that spec file, lead me to add the following to the files section of my spec file:

%{_bindir}/extlookup2hiera

That seems to have solved the problem.  Will continue to build using my spec file with that change and hopefully that will work.

Thanks again for sharing that spec file.

Regards,
-J

Jagga Soorma

unread,
Dec 27, 2012, 1:51:48 AM12/27/12
to puppet...@googlegroups.com
Okay, so now I am running into more problems.  I installed the new puppet rpm without any issues, but when I try to run it I get the following errors:

--
# puppet agent -t
/usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- semver (LoadError)
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/module.rb:2
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser/files.rb:1
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:3
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser/scope.rb:6
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser/functions.rb:2
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser/parser_support.rb:8
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from grammar.ra:796
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/parser.rb:1
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet.rb:148
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib64/ruby/site_ruby/1.8/puppet/util/command_line.rb:12
    from /usr/bin/puppet:3:in `require'
    from /usr/bin/puppet:3
--

Here are the ruby versions and I do have 1.8.7 installed which is needed for puppet 3.x versions:

--

# rpm -qa | grep -i ruby
ruby-devel-1.8.7.p72-5.21
rubygems-1.3.1-2.10
ruby-doc-ri-1.8.7.p72-5.21
ruby-shadow-1.4.1-2.2
rubygem-rake-0.8.3-1.20
ruby-1.8.7.p72-5.21
--

I don't have rubygem-json installed so thought I would build it and run into this issue:

--
# rpmbuild -bb rubygem-json.spec
error: Failed build dependencies:
    rubygem(rake) is needed by rubygem-json-1.4.6-1.x86_64
--

However, rubygem(rake) is installed:

rubygem-rake-0.8.3-1.20

Any help would be greatly appreciated.

Thanks,
-J

Jagga Soorma

unread,
Dec 27, 2012, 2:03:20 AM12/27/12
to puppet...@googlegroups.com
I was able to install rubygems-json as well by making the following changes:

--
# diff rubygem-json.spec rubygem-json.spec.ORIG
35,36c35,36
< BuildRequires:  rubygem-rake
< #Requires:       ruby(abi) = 1.8
---
> BuildRequires:  rubygem(rake)
> Requires:       ruby(abi) = 1.8
--

# rpm -qa | grep -i json
rubygem-json-1.4.6-1

# rpm -qa | grep -i hier
hiera-1.1.1-1

However, puppet still wont work for me:
Not really sure where to go from here.

Regards,
-J

Darin Perusich

unread,
Dec 27, 2012, 8:23:22 AM12/27/12
to puppet...@googlegroups.com
Working packages for SLES, and all current SuSE releases, are available in open build service. These are the packages that feed the distributions.

https://build.opensuse.org/package/show?package=puppet&project=systemsmanagement%3Apuppet

--
Later,
Darin



--
Reply all
Reply to author
Forward
0 new messages