The Shibboleth V1 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only.

SPBuildRPMs

Building the Source RPMs

Original Authors: Brusten Philip & Van der Velpen Jan

The examples shown are for Red Hat Enterprise Linux (which we now have binary RPMs for), but the examples should translate easily enough to other Linux platforms. The commands shown build the RPMs as root. This isn't usually recommended, but the general approach is the same.

If you find SRPM versions that are newer than the ones listed, you should always use those instead. These versions are accurate at the time of writing.

  • you may need to use rpmbuild's -D option to inform it of a specific package version to use for dependencies. For example, xml-security, opensaml and shibboleth have a dependency on xerces-c-devel, but I installed xerces261-c-devel. With the addition of -D 'xercesver 261' to the rpmbuild invocations for xml-security, opensaml and shibboleth, the rpmbuilds succeeded.
  • another case where -D was helpful was on FC6 where I had apache-2.2 installed but the shibboleth-1.3-11 SRPM defaulted to apache-2.0 on FC6. With the addition of -D '_with_apache22 --enable-apache-22', the rpmbuild succeeded.

Download the Shibboleth SRPMs and save them to /usr/src/redhat/SRPMS/ .

You must have the platform's development tools installed.

Building and Installing log4cpp :

root# cd /usr/src/redhat/SRPMS
root# rpmbuild --rebuild log4cpp-0.3.5rc1-1.src.rpm
...
Wrote: /usr/src/redhat/RPMS/i386/log4cpp-0.3.5rc1-1.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/log4cpp-devel-0.3.5rc1-1.i386.rpm
...
root# rpm -ivh /usr/src/redhat/RPMS/i386/log4cpp-0.3.5rc1-1.i386.rpm /usr/src/redhat/RPMS/i386/log4cpp-devel-0.3.5rc1-1.i386.rpm

Building and Installing Xerces-C :

root# rpmbuild --rebuild xerces-c-2.6.1-2.src.rpm
...
Wrote: /usr/src/redhat/RPMS/i386/xerces-c-2.6.1-2.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/xerces-c-samples-2.6.1-2.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/xerces-c-devel-2.6.1-2.i386.rpm
...
root# rpm -ivh /usr/src/redhat/RPMS/i386/xerces-c-2.6.1-2.i386.rpm /usr/src/redhat/RPMS/i386/xerces-c-devel-2.6.1-2.i386.rpm

Building and Installing xml-security-c :

root# rpmbuild --rebuild xml-security-c-1.2.0-1.src.rpm
...
Wrote: /usr/src/redhat/RPMS/i386/xml-security-c-1.2.0-1.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/xml-security-c-devel-1.2.0-1.i386.rpm
...
root# rpm -ivh /usr/src/redhat/RPMS/i386/xml-security-c-1.2.0-1.i386.rpm /usr/src/redhat/RPMS/i386/xml-security-c-devel-1.2.0-1.i386.rpm

Installing cxxtest :

This is a unit testing library that Home depends on.

Sourceforge provides this source-only package in RPM format: http://sourceforge.net/projects/cxxtest

Building and Installing opensaml :

root# rpmbuild --rebuild opensaml-1.1-6.src.rpm
...
Wrote: /usr/src/redhat/RPMS/i386/opensaml-1.1-6.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/opensaml-devel-1.1-6.i386.rpm
...
root# rpm -ivh /usr/src/redhat/RPMS/i386/opensaml-1.1-6.i386.rpm /usr/src/redhat/RPMS/i386/opensaml-devel-1.1-6.i386.rpm

Installing the Apache development files:

You must have the httpd-devel package (or something similar on other distros) installed in order to build the shibboleth package. You can find it on your distribution cd (Package Management -> Web Server -> httpd-devel).
In RHEL AS4 these packages can be found on the CDs. The package httpd-devel has dependency's towards apr-devel, apr-util-devel, pcre-devel. Unfortunately these RPMs are spreadout over the four CDs

Building and Installing Shibboleth:

root# rpmbuild --rebuild /usr/src/redhat/SRPMS/shibboleth-1.3-11.src.rpm
...
Wrote: /usr/src/redhat/RPMS/i386/shibboleth-1.3-11.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/shibboleth-devel-1.3-11.i386.rpm
...
root# rpm -ivh /usr/src/redhat/RPMS/i386/shibboleth-1.3-11.i386.rpm

All the RPMs built in this process can now be found at /usr/src/redhat/RPMS/i386/ .

  • Most RPM build tutorials I've seen around the web say that it's bad practice to build packages as root. Instead, they recommend doing this in the context of a normal user and not going into /usr/src/redhat at all. Is it worth recasting those instructions in these terms, or at least adding something describing how to do that? -- Ian Young - 29 Jun 2006 07:47:56