RPM packaging in Fedora
Lalatendu Mohanty
Senior Software Engineer @ Red Hat
License statement goes here. See https://fedoraproject.org/wiki/Licensing#Content_Licenses for acceptable licenses.
Bringing It All Together
Today's Topics
1. Why?
2. What?
Koji
Distribution git
Bodhi
COPR
3. How to get involved?
1. Learn RPM Packaging
2. Fedora guidelines
Why?
Source Install
Source Install
Copy source code
Install required dependencies (its repeating the same steps)
Compile (autogen.sh, config, make, make install) if required
Copy the executable and configuration files to required
location.
Steps for upgrade and uninstall will be similar and
complex.
High possibility for human error.
Packaging
The package is typically provided as compiled code, with
additional meta-information such as a package
description, package version, or "dependencies".
Automates the process of installing, upgrading,
configuring, and removing software packages.
Package VS Source install
Huge improvement of user experience for
install/update/uninstall
User does not have to think about dependency
resolution.
Helps maintaining it for different versions of distributions
and for different distributions.
Without package management it would be almost
impossible to create a GNU/Linux distribution.
RPM stands for RPM Package Manager
Red Hat Enterprise Linux, the Fedora Project, SUSE
Linux Enterprise, openSUSE, CentOS, Meego,
Mageia and many others.
RPM
RPM Building in Fedora
Building a RPM
Source code as tar ball
A rpm spec file
rpmbuild command
Rebuilding a Package
Prepare your system for RPM Packaging
# dnf install @development-tools fedora-packager rpmdevtools
# rpmdev-setuptree
Lets get the source RPM
dnf download --source git
Extract the source RPM
rpm2cpio git-2.4.3-6.fc22.src.rpm | cpio -idmv
Install the build dependencies
dnf builddep <package name>
Rpmbuild -ba <specfile> e.g. #rpmbuild -ba git.spec
An example RPM Spec file
# rpmdev-newspec dummy
# vi dummy.spec
Koji
It builds RPM packages.
The installation of Koji used for Fedora is at :
http://koji.fedoraproject.org/koji/
It uses mock internally to build RPMs.
Distribution git repositories
http://pkgs.fedoraproject.org/cgit/
Bodhi
It is a web based work flow to facilitate the process of
publishing package updates for Fedora.
All Fedora package updates goes through Bodhi.
RPM Work flow
COPR
Dnf/yum copr enable user/project
Build RPMs without going through the Fedora package
review process
Build for ELs and different Fedora versions.
Can be accessible anywhere from internet.
How To Get Involved?
Learn RPM Packaging
Start with rebuilding some existing packages on your
laptop/workstation
https://fedoraproject.org/wiki/How_to_create_an_RPM_
package
Contributing to Fedora
Co-maintain packages
https://fedoraproject.org/wiki/How_to_get_sponsored_into_t
he_packager_group
https://admin.fedoraproject.org/pkgdb/
Add new packages
New Package Review Process
https://fedoraproject.org/wiki/Package_Review_Process
Fedora Packaging Guildelines
https://fedoraproject.org/wiki/Packaging:Guidelines
RPM packaging is a very good method of contributing to
Fedora.
Knowing RPM packaging improves your understanding of
operating system.
It is good to have skill for
developers/testers/administrators.
Summary
Questions?
License statement goes here. See https://fedoraproject.org/wiki/Licensing#Content_Licenses for acceptable licenses.
Contact: lalatendu@fedoraproject.org
@lalatenduM

Bringing-it-all-together-overview-of-rpm-packaging-in-fedora

  • 1.
    RPM packaging inFedora Lalatendu Mohanty Senior Software Engineer @ Red Hat License statement goes here. See https://fedoraproject.org/wiki/Licensing#Content_Licenses for acceptable licenses. Bringing It All Together
  • 2.
    Today's Topics 1. Why? 2.What? Koji Distribution git Bodhi COPR 3. How to get involved? 1. Learn RPM Packaging 2. Fedora guidelines
  • 3.
  • 4.
    Source Install Source Install Copysource code Install required dependencies (its repeating the same steps) Compile (autogen.sh, config, make, make install) if required Copy the executable and configuration files to required location. Steps for upgrade and uninstall will be similar and complex. High possibility for human error.
  • 5.
    Packaging The package istypically provided as compiled code, with additional meta-information such as a package description, package version, or "dependencies". Automates the process of installing, upgrading, configuring, and removing software packages.
  • 6.
    Package VS Sourceinstall Huge improvement of user experience for install/update/uninstall User does not have to think about dependency resolution. Helps maintaining it for different versions of distributions and for different distributions. Without package management it would be almost impossible to create a GNU/Linux distribution.
  • 7.
    RPM stands forRPM Package Manager Red Hat Enterprise Linux, the Fedora Project, SUSE Linux Enterprise, openSUSE, CentOS, Meego, Mageia and many others. RPM
  • 8.
  • 9.
    Building a RPM Sourcecode as tar ball A rpm spec file rpmbuild command
  • 10.
    Rebuilding a Package Prepareyour system for RPM Packaging # dnf install @development-tools fedora-packager rpmdevtools # rpmdev-setuptree Lets get the source RPM dnf download --source git Extract the source RPM rpm2cpio git-2.4.3-6.fc22.src.rpm | cpio -idmv Install the build dependencies dnf builddep <package name> Rpmbuild -ba <specfile> e.g. #rpmbuild -ba git.spec
  • 11.
    An example RPMSpec file # rpmdev-newspec dummy # vi dummy.spec
  • 12.
    Koji It builds RPMpackages. The installation of Koji used for Fedora is at : http://koji.fedoraproject.org/koji/ It uses mock internally to build RPMs.
  • 13.
  • 14.
    Bodhi It is aweb based work flow to facilitate the process of publishing package updates for Fedora. All Fedora package updates goes through Bodhi.
  • 15.
  • 16.
    COPR Dnf/yum copr enableuser/project Build RPMs without going through the Fedora package review process Build for ELs and different Fedora versions. Can be accessible anywhere from internet.
  • 17.
    How To GetInvolved?
  • 18.
    Learn RPM Packaging Startwith rebuilding some existing packages on your laptop/workstation https://fedoraproject.org/wiki/How_to_create_an_RPM_ package
  • 19.
    Contributing to Fedora Co-maintainpackages https://fedoraproject.org/wiki/How_to_get_sponsored_into_t he_packager_group https://admin.fedoraproject.org/pkgdb/ Add new packages
  • 20.
    New Package ReviewProcess https://fedoraproject.org/wiki/Package_Review_Process
  • 21.
  • 22.
    RPM packaging isa very good method of contributing to Fedora. Knowing RPM packaging improves your understanding of operating system. It is good to have skill for developers/testers/administrators. Summary
  • 23.
    Questions? License statement goeshere. See https://fedoraproject.org/wiki/Licensing#Content_Licenses for acceptable licenses. Contact: lalatendu@fedoraproject.org @lalatenduM