BuildRequires: pkgconfig(foo) vs. foo-devel
Fedora-pakettien, jotka käyttävät pkg-config-komentoa rakentaakseen kirjastoa (esim. 'foo') vasten, PITÄISI ilmaista rakentamisriippuvuutensa oikein muodossa pkgconfig(foo).
Perustelu
The build infrastructure for a given package will often locate and use required libraries by using pkg-config.
Näin ollen pkgconfig(foo) on koontiriippuvuuden todellinen ilmaus, ja näin se tulisi ilmaista spesifikaatiotiedostossa.
For historical reasons, many packages seem to have a hard-coded "BuildRequires: foo-devel", with the name of the package which currently provides the required pkgconfig module. This is fragile and less portable than simply expressing the real dependency. Where package names change, and/or a required pkgconfig module is later provided by a different package, these hard-coded dependencies break.
Note that it shall still be acceptable to require specific packages by name if they are required for some reason other than a pkg-config module that they provide.
Esimerkki
Packages which build against libproxy should contain the following:
BuildRequires: pkgconfig(libproxy-1.0)
-
and not the following:
BuildRequires: libproxy-devel
This way, if the libproxy-1.0.pc pkgconfig module is ever provided from a differently-named package (such as by PacRunner once its integration is complete, or by a ‘libproxy1’ backward-compatibility package as has happened to a number of other libraries in the past), the dependency will continue to be correct.
Want to help? Learn how to contribute to Fedora Docs ›