Skip to content
 

How to install Ruby 1.8.6 RPM package on RHEL3

I have to manage a few RHEL3 servers (i386), and since I’m using Puppet in my environment, it would be great to use it in those servers also. However, Puppet requires ruby >= 1.8.1, and RHEL3 ships ruby 1.6.8.

Instead of compiling ruby on the server (quick and dirty), I rebuilt the RPM based on the specs from Fedora 11. The only change I had to make was in the list of build dependencies. Here’s my note in the %changelog section of the specfile:

* Tue Oct 27 2009 Pedro Padron <ppadron@w3p.com.br> - 1.8.6.369-2
- build-deps: XFree86-devel instead of libX11-devel to build in RHEL3

Here’s the source RPM package:

ruby-1.8.6.369-2.src.rpm

To rebuild it:

$ rpmbuild --rebuild --define 'dist .el3' ruby-1.8.6.369-2.src.rpm

Here’s the list of packages that will be generated:

ruby-1.8.6.369-2.el3.i386.rpm
ruby-devel-1.8.6.369-2.el3.i386.rpm
ruby-docs-1.8.6.369-2.el3.i386.rpm
ruby-irb-1.8.6.369-2.el3.i386.rpm
ruby-libs-1.8.6.369-2.el3.i386.rpm
ruby-mode-1.8.6.369-2.el3.i386.rpm
ruby-rdoc-1.8.6.369-2.el3.i386.rpm
ruby-ri-1.8.6.369-2.el3.i386.rpm
ruby-tcltk-1.8.6.369-2.el3.i386.rpm

If you are interested in installing puppet as well, you will also need augeas and it’s ruby bindings:

augeas-0.5.0-2.src.rpm
ruby-augeas-0.3.0-1.src.rpm

And again:

$ rpmbuild --rebuild --define 'dist .el3' augeas-0.5.0-2.src.rpm
$ rpmbuild --rebuild --define 'dist .el3' ruby-augeas-0.3.0-1.src.rpm

2 Comments

  1. Todd Zullinger says:

    You don’t really _need_ augeas for puppet if you don’t want it. The Fedora/EPEL packages (which are essentially what’s included in conf/redhat/puppet.spec in the puppet tarballs) have this right at the top:

    # Augeas and SELinux requirements may be disabled at build time by passing
    # –without augeas and/or –without selinux to rpmbuild or mock

    Whether –without works with the version of rpm on RHEL3 I couldn’t tell you. Thankfully, I don’t have any RHEL3 boxes to maintain.

  2. Adam Reid says:

    Oh, thanks so much for this!

    I’ve been banging my head against puppets ruby requirements on ES4 for half a day. This fixed me up right away!

Leave a Reply