Changes

Jump to: navigation, search

RPM Packaging Process

386 bytes added, 13:18, 17 July 2017
Setting up the Packaging Environment
== Needed Packages ==
Install with ''dnf'' (or ''yum''on older versions of Fedora):* "Fedora Packager" (this is a group of packages - use "yum dnf groupinstall" or put an @ sign in front of the group name)
* rpmdevtools
* rpmlint
# 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 installing 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>

Navigation menu