This document discusses RPM packaging in Fedora. It begins by explaining why packaging is important, noting that it automates software installation and management while preventing errors. It then describes RPM, the package format used in Fedora and other distributions. The document outlines the RPM build process using tools like rpmbuild and spec files. It also introduces services like Koji, which builds RPMs, distribution git repositories for packages, Bodhi for release management, and COPR for alternative builds. It concludes by recommending ways for readers to get involved in Fedora packaging.
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
RPM Packaging in Fedora
1. 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
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
4. 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.
5. 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.
6. 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.
7. RPM stands for RPM Package Manager
Red Hat Enterprise Linux, the Fedora Project, SUSE
Linux Enterprise, openSUSE, CentOS, Meego,
Mageia and many others.
RPM
10. 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
11. An example RPM Spec file
# rpmdev-newspec dummy
# vi dummy.spec
12. 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.
14. 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.
16. 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.
18. Learn RPM Packaging
Start with rebuilding some existing packages on your
laptop/workstation
https://fedoraproject.org/wiki/How_to_create_an_RPM_
package
19. 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
20. New Package Review Process
https://fedoraproject.org/wiki/Package_Review_Process
22. 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
23. Questions?
License statement goes here. See https://fedoraproject.org/wiki/Licensing#Content_Licenses for acceptable licenses.
Contact: lalatendu@fedoraproject.org
@lalatenduM