How would I unpack and rebuild an RPM package on Fedora?
1 Answer
You probably want to ask this on serverfault, but to answer it quickly:
Download the source rpm (
.SRPM
), not the normal rpm.Create an
.rpmmacros
file in your home directory and put this in it:_topdir /home/${USER}/rpmbuild %_signature gpg %packager Your Name <<[email protected]>> %_gpg_name Your Name <<[email protected]>> %_tmppath /tmp
Create an rpmbuild directory structure in your home directory:
mkdir -p ~/rpmbuild/{SPECS,SOURCES,RPMS,SRPMS,BUILD}
Install the source rpm.
Edit the specfile in
~/rpmbuid/SPECS
.Run
rpmbuild -bb ${your_specfile}
to build a binary rpm from the contents of the source rpm.