Open main menu

CDOT Wiki β

Changes

RPM Packaging Process

345 bytes added, 17:44, 7 February 2014
Examining Existing SRPMs
# Download the source code for an existing RPM: <code>yumdownloader --source ''nameofpackage''</code>
# Install that downloaded SRPM(this does not require root access): <code>rpm -i ''nameofpackage''*.src.rpm</code>
#* Source will be in <code>~/rpmbuild/SOURCES</code>
#* Spec file will be in <code>~/rpmbuild/SPECS</code>
 
After installint the SRPM you can:
 
* Examine the specfile: <code>cd ~/rpmbuild/SPECS; less ''nameofpackage''.spec</code>
* To build Prep the sources (unpack tarballs, apply patches) to see the source code as it will be built: <code>rpmbuild -bp ''nameofpackage''.spec</code> # Results will be in <code>~/rpmbuild/BUILD/</code> (usually in a subdirectory named <code>''nameofpackage''-''version''</code>).* Build from source using the specfile:
*# Build all (binary RPMS plus SRPMS): <code>rpmbuild -ba ''nameofpackage''.spec</code>
*# Build just the spec file: <code>rpmbuild -bs ''nameofpackage''.spec</code>