Skip to content

build: meson: sync locations with autotools

mikhailnov requested to merge mikhailnov/polkit:meson-usr-lib into master

Autotools, probably due to historic reasons, creates the following files:

  • /usr/lib/polkit-1/polkitd
  • /usr/lib/polkit-1/polkit-agent-helper-1

($prefix = /usr)

Before this patch meson used not /usr/lib/ but $libdir, and $libdir is /usr/lib on a few Linux distros, e.g. Arch Linux, but it is /usr/lib64 on many 64-bit Linux distros using biarch, including ROSA, ALT, Fedora, SUSE etc., and is /usr/lib/$arch on multiarch systems (e.g. Debian).

So, switching from autotools to meson relocated /usr/lib/polkit-1/* to /usr/lib64/polkit-1/ on ROSA. This relocation does not make sense to my mind, $libexecdir, which is /usr/libexec on ROSA and Fedora and sometimes is /usr/lib (e.g. in ALT Linux), would be a better place for those executable binaries (and also relocation may require adjusting SELinux policy).

Also, that probably breaks polkit because /usr/lib/polkit-1/ is hardcoded:

src/polkitagent/polkitagentsession.c:599: helper_argv[0] = PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1";

I suspected that some external programs may rely on /usr/lib/polkit-1/, but searching for "lib/polkit-1" on http://codesearch.debian.net did not find such programs.

For now let's just use the old location in meson. Later a switch to $libexecdir can be done.

Signed-off-by: Mikhail Novosyolov m.novosyolov@rosalinux.ru

Edited by mikhailnov

Merge request reports