Changes

Jump to: navigation, search

RPM Packaging Process

2 bytes removed, 00:27, 11 January 2011
Examining Existing SRPMs
# Download the source code for an existing RPM: <code>yumdownloader --source ''nameofpackage''</code>
# Install that package* Taking a look at existing source RPMS (useful as examples)** Installing *** downloaded SRPM: <code>yumdownloader -rpm -source <i>''nameofpackage</i></code>**''* <code>rpm -i <i>nameofpackage</i>.src.rpm</code>**#* Source will be in <code>~/rpmbuild/SOURCES and specfile </code>#* Spec file will be in <code>~/rpmbuild/SPECS</code>** Examine the specfile: <code>cd ~/rpmbuild/SPECS; less ''nameofpackage''.spec</code>*To build from source using the specfile:* Rebuild on the local machine -- takes a source RPM # Build all (SRPMbinary RPMS plus SRPMS) as input, produces binary and source RPMs as output*** : <code>rpmbuild --rebuild <i>ba ''nameofpackage</i>''.src.rpmspec</code>** Building from # Build just the spec file -- takes a specfile and source code as input, produces binary and source RPMs as output*** : <code>cd ~/rpmbuild/SPECS; rpmbuild -ba <i>bs ''nameofpackage</i>''.spec</code> == Rebuild from SRPMS == Instead of installing an SRPM and building from the spec file, it is possible to build the binary RPMs and SRPM directly from an SRPM:  rpmbuild --rebuild ''nameofpackage''*.src.rpm

Navigation menu