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
andlog4shib-devel
)except on RHEL/CentOS >= 7 or Fedora:
rpmbuild -ba xerces-c.spec
(root installs
xerces-c
andxerces-c-devel
)
rpmbuild -ba xml-security-c.spec
(root installs
xml-security-c
andxml-security-c-devel
)on RHEL/CentOS >= 6, Fedora:
rpmbuild -ba curl-openssl.spec
(root installs
libcurl-openssl
andlibcurl-openssl-devel
)
rpmbuild -ba xmltooling.spec
(root installs
libxmltooling, libxmltooling-devel
andxmltooling-schemas
)rpmbuild -ba opensaml.spec
(root installs
opensaml
andopensaml-devel
)rpmbuild -ba shibboleth.spec
(root installs
shibboleth
)