How to build RPM packages as a regular user

Install the necessary packages as root:
sudo yum install rpmdevtools rpm-build redhat-rpm-config
Initialize the directory hierarchy for your custom build RPM packages as a regular user:
rpmdev-setuptree
Optionally add additional attributes into ~/.rpmmacros, e.g.:
echo '%packager Your Name <your.name@foo.bar>' >> ~/.rpmmacros
Use rpmbuild to build RPM from a source RPM or from a SPEC file:
rpmbuild --rebuild package.src.rpm
rpmbuild -bb package.spec

No comments:

Post a Comment