Version 0.18 m. d. B. u. Ktn. u. z. w. V.

Lecture: Effortless RPM packaging with CPack

CMake+CPack support a surprisingly robust build environment for building RPM packages. Building for any RPM-based distribution from the source tree with no or very minimal tweaking, building RPM packages on non-RPM-based distribution, auto-adapting to changes in the source code, optional RPM packages - this and many more is possible with CPack. And the best part? Once configured it just works, it adapts to your evolving project automatically. Even for very big project with complex packaging requirements. Why not give it a try?

MariaDB Server is a big project with complex packaging. We build RPM packages anywhere from CentOS 7 to Fedora 38, to SLES 15, to Rocky9 on Aarch64. With different dependencies and different sets of packages on different distributions. Everything from one .cmake file with very few distribution-specific checks.

Summarizing eight years of building MariaDB, this talk will show how to use CMake and CPack to create RPM packages. How to let CPack automatically generate all .spec files for you, for the correct set of packages (that may vary between builds), correct set of files (that may vary too), different versions, vendors, licenses, scriptlets, dependencies. How to build debuginfo RPMs and source RPM with automatically determined build dependencies. It will guide you from a basic setup to fairly advanced CPack hacking. It works very well for MariaDB Server — it will probably work for your project even better.

Info

Day: 2023-08-05
Start time: 14:00
Duration: 01:00
Room: HS3
Track: System Administration
Language: en

Links:

Concurrent Events