Extras/Schedule/RpathCheckBuildsys

From FedoraProject

Jump to: navigation, search

Dynamic library loaders are having a feature called RPATH which is used to search libraries being outside of standard paths. They are given to the linker at buildtime of a binary and can be inspected e.g. by readelf -a binary | grep RPATH. Wrongly used, they can cause just unneeded work, break functionality or are a security risk. Citing from /usr/lib/rpm/check-rpaths-worker, the following issues are possible:

The fedora-rpmdevtools package provides scripts which check automatically for the issues above while building a package. When an issue will be detected, the build will fail or an warning will be issued; the exact behavior can be configured by an environment variable.

It should be easy to do this test on every build made on the Fedora Extras buildsystem. This requires adding the
%__arch_install_post            \
/usr/lib/rpm/check-rpaths     \
/usr/lib/rpm/check-buildroot

lines either to /etc/rpm/macros or to ~/.rpmmacros of the builduser.


PROs


CONs


Alternatives

There are more automatic tests possible to check the quality of a package and to detect critical issues. E.g. 'rpmlint' or checking for orphaned directories. So using 'check-rpaths' (which is just one possible tools and can produce false positives) at buildtime is just a kludge. It would be better to create a separate system which must be passed by all built packages. There the checks will be executed and the results be told to the signing people.

This would need significantly more work than using the existing script from 'fedora-rpmdevtools'...