[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Transition proposal: pkg-config to pkgconf



Hi,

Following a discussion at DebConf, I’d like to officially propose a transition
from pkg-config to pkgconf in Debian.

pkgconf is a newer, actively maintained implementation of pkg-config that
supports more aspects of the pkg-config file specification and provides a
library interface that applications can use to incorporate intelligent
handling of pkg-config files into themselves (such as build file generators,
IDEs, and compilers).

pkgconf is compatible with pkg-config when it is run as "pkg-config", so it
can completely replace the original implementation.

Debian would benefit from switching to pkgconf by utilising a more complete
implementation of pkg-config that handles aspects of .pc files that pkg-config
does not. For example, Provides rules and Cflags.private rules are supported,
and pkgconf has a better (and less costly) dependency resolver for .pc files.

Having a more complete implementation of the pkg-config implementation can
also help convince upstreams like Postgres and LLVM to switch to using
pkg-config instead of their custom scripts like llvm-config.

pkgconf also supports a feature called personalities [1], that can be used to
implement cross-build support without a wrapper script (as currently
implemented in both pkgconf and pkg-config packages).

pkgconf is already used by other major distributions like Fedora, Gentoo and
Arch, so by doing the switch we’ll be aligning ourselves with other
distributions ([2], [3], [4])

Migration plan
==============

I believe that it would in the best interests of Debian to only ship one
pkg-config implementation, so I propose to make pkgconf provide the binary
package pkg-config without a possibility to fall back to the original
implementation. This means that after pkgconf takes over the pkg-config
binary package, all packages depending on pkg-config will be using the pkgconf
implementation without being able to opt out and use the one from
freedesktop.org. While this may seem limiting, it reduces the probability of
some packages staying with the freedesktop.org implementation indefinitely and
missing out on bug fixes or suffering from other differences in implementation
details in future when pkgconf becomes even more widespread.

In preparation for this migration, I ran a rebuild of all packages depending
on pkg-config and found only very few failures [5], which may or may not be
related to the difference in behaviour between pkg-config and pkgconf. I will
perform another rebuild and continue investigating them to provide patches
during the transition period.

[0]: http://pkgconf.org/features.html
[1]: https://manpages.debian.org/unstable/pkgconf/pkgconf-personality.5.en.html
[2]: https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
[3]: https://packages.gentoo.org/packages/virtual/pkgconfig/dependencies
[4]: https://archlinux.org/packages/core/x86_64/pkgconf/
[5]: http://pkgconf-migration.debian.net/failed.html

-- 
Cheers,
  Andrej


Reply to: