Post on 07-Aug-2015
Anish Patil(anishpatil [AT] fedoraproject dot org)Praveen Kumar(kumarpraveen [AT] fedoraproject dot org)
Presented by
GNOME and RPM Packaging - 101
PatchingGit dif
git format-patch --stdout HEAD~1 > ~/myPatch.patch
git bz attach nnnnnn HEAD
git bz apply bug_no
Introduction RPM (RPM Package Manager)
.rpm as file format extension
Developed on the basis of the Linux Standard Base (LSB)
Commonly used format in various Linux distribution like Fedora, Red Hat Linux, CentOS, OpenSUSE
Why RPM?Ease of performing software installation and maintenance
RPM packages can be crypto verified with GPG and MD5
Original source archive(s) are included in SRPMs, making verification easier Ease of updating your software to newer version
Automatic build and install time dependency evaluation.
PrerequisitesPackages to be pre-installed
@development-tools
fedora-packager
Setting up RPM build area
$ rpmdev-setuptree
rpmdev-setuptreeCreates rpmbuild directory in /home/$USER with sub-directories
BUILD: Where software is unpacked and built
BUILDROOT: Where files are installed during the install stage
RPMS: Created rpm during build process
SOURCES : Source tar file, patches
SPECS: Spec file
SRPMS: Source RPM
Building RPM PackagesExecutes %prep stage from the spec file
$ rpmbuild -bp <project>.spec
Executes "%build" stage from the spec file
$ rpmbuild -bc <project>.spec
Executes %install stage from the spec file
$ rpmbuild -bi <project>.spec
Build binary package (after running %prep %build %install)
$ rpmbuild -bb <project>.spec
Cont ...Build binary and source packages (after running %prep %build %install)
$ rpmbuild -ba <project>.spec
Build Only Source Package
$ rpmbuild -bs <project>.spec
ReferenceFedora packaging Guideline - http://fedoraproject.org/wiki/Packaging:Guidelines
Koji Build Url - http://koji.fedoraproject.org
Hello world RPM packaging example -
https://fedoraproject.org/wiki/How_to_create_a_GNU_Hello_RPM_package
Fedora wishlist package -
https://fedoraproject.org/wiki/Package_maintainers_wishlist?rd=ackageMaintainers/WishList
Planet Fedora - http://planet.fedoraproject.org/