Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To build RPMs without being logged in as root, first create a file ~/.rpmmacros along the following lines:

Code Block
%_topdir        /home/iay/rpm
%packager       Ian Young <ian@iay.org.uk>

Create the build environment inside your user directory as follows:

Code Block
mkdir -p ~/rpm/{BUILD,RPMS/{i386,i686,noarch},SOURCES,SPECS,SRPMS}

Building from SRPMs is a cycle of using rpmbuild --rebuild in the user directory and then rpm -ivh as root, either in a separate terminal window or using sudo.  My standard SP "smoke test" goes like this:

...

  • disable screen saver and screen lock

  • create private RPM build environment as above

  • copy across SRPMs from old machine, or download from latest SRPMs

  • rpm -i *.src.rpm

  • cd ~/rpm/SPECS

  • rpmbuild -ba log4shib.spec

  • (root installs log4shib and log4shib-devel)

  • except on RHEL/CentOS >= 7 or Fedora:

    • rpmbuild -ba xerces-c.spec

    • (root installs xerces-c and xerces-c-devel)

  • rpmbuild -ba xml-security-c.spec

  • (root installs xml-security-c and xml-security-c-devel)

  • on RHEL/CentOS >= 6, Fedora:

    • rpmbuild -ba curl-openssl.spec

    • (root installs libcurl-openssl and libcurl-openssl-devel)

  • rpmbuild -ba xmltooling.spec

  • (root installs libxmltooling, libxmltooling-devel and xmltooling-schemas)

  • rpmbuild -ba opensaml.spec

  • (root installs opensaml and opensaml-devel)

  • rpmbuild -ba shibboleth.spec

  • (root installs shibboleth)

...