Flock to Fedora 2025

specfile library + norpm
2025-06-06 , Quartz

specfile library

Have you ever wanted to make changes in an RPM spec file programmatically?
specfile library has been created for that very purpose. It is a pure Python library that allows you to conveniently edit different parts of a spec file while trying its best to keep the resulting changeset minimal.

In this talk we will take a look at the basic concepts of the library, we will go through
usage examples, from simple (version/release bumping, adding changelog entries, manipulating section content) to more advanced (forced parsing, making modifications less obstructive), and we will discuss macro expansion and condition evaluation, for which the library relies on RPM.

norpm

RPM specfile parser is a very powerful tool, we all know. Did you know though that you should not just blindly trust all the specfiles out there, and be very careful when executing basic tools like fedpkg verrel or fedpkg srpm? These could potentially break your system!

In this part of the talk we’d like to describe elementary requirements of RPM build system related to RPM spec file parsing, the hidden risks, things that complicate our life - and how to (maybe?) make the topic a lot simpler (and safer) in the future.

Software Engineer at Red Hat

Engineer @ Red Hat