/
Private SRPM Builds

Private SRPM Builds

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

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

Create the build environment inside your user directory as follows:

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:

As root:

  • yum install emacs gcc gcc-c++ kernel-devel httpd-devel rpm-build doxygen openssl-devel curl-devel unixODBC-devel chrpath boost-devel stunnel redhat-rpm-config

  • on RHEL/CentOS >= 6, Fedora:

    • yum install groff libidn-devel

  • on RHEL/CentOS >= 7, Fedora:

    • yum install xerces-c xerces-c-devel

    • Do not install these packages on other distributions; traditionally these have been older versions with security issues, such as V2.7.

  • setenforce 0 to take selinux out of the picture

As iay:

  • 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 --nosignature *.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)



 

Related content

SRPMBuild
More like this
NativeSPLinuxSRPMBuild
NativeSPLinuxSRPMBuild
More like this
Building an RPM
Building an RPM
More like this
Building an RPM
Building an RPM
More like this
RPMInstall
More like this
NativeSPLinuxInstall
NativeSPLinuxInstall
More like this