meson: install libsystemd-shared into rootpkglibdir
authorMichael Biebl <biebl@debian.org>
Wed, 1 Jun 2022 06:23:02 +0000 (08:23 +0200)
committerLuca Boccassi <bluca@debian.org>
Sat, 27 Aug 2022 21:39:04 +0000 (22:39 +0100)
Introduce rootpkglibdir for installing libsystemd-{shared,core}.so.
The benefit over using rootlibexecdir is that this path can be
multiarch aware, i.e. this path can be architecture qualified.

This is something we'd like to make use of in Debian/Ubuntu to make
libsystemd-shared co-installable, e.g. for i386 the path would be
/usr/lib/i386-linux-gnu/systemd/libsystemd-shared-*.so and for amd64
/usr/lib/x86_64-linux-gnu/systemd/libsystemd-shared-*.so.
This will allow for example to install and run systemd-boot/i386 on an
amd64 host. It also simplifies/enables cross-building/bootstrapping.

For more infos about Multi-Arch see https://wiki.debian.org/Multiarch.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990547

(cherry picked from commit 5fb225615bf751b97644bed7aae44f69ba03cc84)

Gbp-Pq: Name meson-install-libsystemd-shared-into-rootpkglibdir.patch

meson.build
src/core/meson.build
src/nspawn/nspawn-util.c
src/shared/meson.build
src/udev/meson.build

index ecc5533685251f4140b47464806958c37b3a143d..f73c7ffb5384ea7d79ce68c1db1bd81de4d2f5bc 100644 (file)
@@ -146,6 +146,7 @@ rootlibdir = get_option('rootlibdir')
 if rootlibdir == ''
         rootlibdir = rootprefixdir / libdir.split('/')[-1]
 endif
+rootpkglibdir = rootlibdir / 'systemd'
 
 install_sysconfdir = get_option('install-sysconfdir') != 'false'
 install_sysconfdir_samples = get_option('install-sysconfdir') == 'true'
@@ -1994,7 +1995,7 @@ if conf.get('HAVE_LIBCRYPTSETUP_PLUGINS') == 1
                                         tpm2,
                                         versiondep],
                         link_depends : cryptsetup_token_sym,
-                        install_rpath : rootlibexecdir,
+                        install_rpath : rootpkglibdir,
                         install : true,
                         install_dir : libcryptsetup_plugins_dir)
         endif
@@ -2012,7 +2013,7 @@ if conf.get('HAVE_LIBCRYPTSETUP_PLUGINS') == 1
                                         libfido2,
                                         versiondep],
                         link_depends : cryptsetup_token_sym,
-                        install_rpath : rootlibexecdir,
+                        install_rpath : rootpkglibdir,
                         install : true,
                         install_dir : libcryptsetup_plugins_dir)
         endif
@@ -2030,7 +2031,7 @@ if conf.get('HAVE_LIBCRYPTSETUP_PLUGINS') == 1
                                         libp11kit,
                                         versiondep],
                         link_depends : cryptsetup_token_sym,
-                        install_rpath : rootlibexecdir,
+                        install_rpath : rootpkglibdir,
                         install : true,
                         install_dir : libcryptsetup_plugins_dir)
         endif
@@ -2165,7 +2166,7 @@ exe = executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 dbus_programs += exe
@@ -2183,7 +2184,7 @@ public_programs += executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : conf.get('ENABLE_ANALYZE') == 1)
 
 executable(
@@ -2197,7 +2198,7 @@ executable(
                         liblz4,
                         libselinux,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2208,7 +2209,7 @@ public_programs += executable(
         link_with : [libjournal_core,
                      libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -2222,7 +2223,7 @@ public_programs += executable(
                         liblz4,
                         libzstd,
                         libdl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -2231,7 +2232,7 @@ executable(
         'src/getty-generator/getty-generator.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : systemgeneratordir)
 
@@ -2240,7 +2241,7 @@ executable(
         'src/debug-generator/debug-generator.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : systemgeneratordir)
 
@@ -2249,7 +2250,7 @@ executable(
         'src/run-generator/run-generator.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : systemgeneratordir)
 
@@ -2258,7 +2259,7 @@ exe = executable(
         'src/fstab-generator/fstab-generator.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : systemgeneratordir)
 
@@ -2276,7 +2277,7 @@ if conf.get('ENABLE_ENVIRONMENT_D') == 1
                 'src/environment-d-generator/environment-d-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : userenvgeneratordir)
 
@@ -2291,7 +2292,7 @@ if conf.get('ENABLE_HIBERNATE') == 1
                 'src/hibernate-resume/hibernate-resume-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 
@@ -2300,7 +2301,7 @@ if conf.get('ENABLE_HIBERNATE') == 1
                 'src/hibernate-resume/hibernate-resume.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2312,7 +2313,7 @@ if conf.get('HAVE_BLKID') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : libblkid,
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 
@@ -2321,7 +2322,7 @@ if conf.get('HAVE_BLKID') == 1
                 'src/dissect/dissect.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2334,7 +2335,7 @@ if conf.get('ENABLE_RESOLVE') == 1
                              libbasic_gcrypt,
                              libsystemd_resolve_core],
                 dependencies : systemd_resolved_dependencies,
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2349,7 +2350,7 @@ if conf.get('ENABLE_RESOLVE') == 1
                                 lib_openssl_or_gcrypt,
                                 libm,
                                 libidn],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         meson.add_install_script(meson_make_symlink,
@@ -2370,7 +2371,7 @@ if conf.get('ENABLE_LOGIND') == 1
                              libshared],
                 dependencies : [threads,
                                 libacl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2383,7 +2384,7 @@ if conf.get('ENABLE_LOGIND') == 1
                                 liblz4,
                                 libxz,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 
@@ -2392,7 +2393,7 @@ if conf.get('ENABLE_LOGIND') == 1
                 'src/login/inhibit.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 
@@ -2429,7 +2430,7 @@ if conf.get('ENABLE_LOGIND') == 1
                 user_runtime_dir_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2440,7 +2441,7 @@ if conf.get('HAVE_PAM') == 1
                 'src/user-sessions/user-sessions.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2458,7 +2459,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
                 include_directories : includes,
                 link_with : [boot_link_with],
                 dependencies : [libblkid],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         public_programs += executable(
@@ -2467,7 +2468,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
                 include_directories : includes,
                 link_with : [boot_link_with],
                 dependencies : [libblkid],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2476,7 +2477,7 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('HAVE_GNU_EFI') == 1
                 'src/boot/bless-boot-generator.c',
                 include_directories : includes,
                 link_with : [boot_link_with],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 endif
@@ -2487,7 +2488,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libblkid],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2497,7 +2498,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 systemctl = executable(
@@ -2511,7 +2512,7 @@ systemctl = executable(
                         libxz,
                         liblz4,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 public_programs += systemctl
@@ -2523,7 +2524,7 @@ if conf.get('ENABLE_PORTABLED') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads, libselinux],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2533,7 +2534,7 @@ if conf.get('ENABLE_PORTABLED') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -2544,7 +2545,7 @@ if conf.get('ENABLE_SYSEXT') == 1
                 systemd_sysext_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -2556,7 +2557,7 @@ if conf.get('ENABLE_USERDB') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2566,7 +2567,7 @@ if conf.get('ENABLE_USERDB') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2576,7 +2577,7 @@ if conf.get('ENABLE_USERDB') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2592,7 +2593,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libfdisk,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2605,7 +2606,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libcrypt,
                                 libopenssl,
                                 libm],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2619,7 +2620,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libp11kit,
                                 libdl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         if conf.get('HAVE_PAM') == 1
@@ -2661,7 +2662,7 @@ if conf.get('ENABLE_BACKLIGHT') == 1
                 'src/backlight/backlight.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2672,7 +2673,7 @@ if conf.get('ENABLE_RFKILL') == 1
                 'src/rfkill/rfkill.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2682,7 +2683,7 @@ executable(
         'src/system-update-generator/system-update-generator.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : systemgeneratordir)
 
@@ -2694,7 +2695,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 link_with : [libshared],
                 dependencies : [libcryptsetup,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2703,7 +2704,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 'src/cryptsetup/cryptsetup-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 
@@ -2713,7 +2714,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libcryptsetup],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2722,7 +2723,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 'src/veritysetup/veritysetup-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 
@@ -2735,7 +2736,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                                 libdl,
                                 libopenssl,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         executable(
@@ -2744,7 +2745,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libcryptsetup],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2753,7 +2754,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 ['src/integritysetup/integritysetup-generator.c', 'src/integritysetup/integrity-util.c'],
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 endif
@@ -2764,7 +2765,7 @@ if conf.get('HAVE_SYSV_COMPAT') == 1
                 'src/sysv-generator/sysv-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 
@@ -2780,7 +2781,7 @@ if conf.get('HAVE_SYSV_COMPAT') == 1
                 'src/rc-local-generator/rc-local-generator.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : systemgeneratordir)
 endif
@@ -2791,7 +2792,7 @@ if conf.get('ENABLE_XDG_AUTOSTART') == 1
                 systemd_xdg_autostart_generator_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : usergeneratordir)
 
@@ -2800,7 +2801,7 @@ if conf.get('ENABLE_XDG_AUTOSTART') == 1
                 'src/xdg-autostart-generator/xdg-autostart-condition.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2811,7 +2812,7 @@ if conf.get('ENABLE_HOSTNAMED') == 1
                 'src/hostname/hostnamed.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2820,7 +2821,7 @@ if conf.get('ENABLE_HOSTNAMED') == 1
                 'src/hostname/hostnamectl.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2839,7 +2840,7 @@ if conf.get('ENABLE_LOCALED') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : deps,
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2848,7 +2849,7 @@ if conf.get('ENABLE_LOCALED') == 1
                 localectl_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2858,7 +2859,7 @@ if conf.get('ENABLE_TIMEDATED') == 1
                 'src/timedate/timedated.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2868,7 +2869,7 @@ if conf.get('ENABLE_TIMEDATECTL') == 1
                 'timedatectl',
                 'src/timedate/timedatectl.c',
                 include_directories : includes,
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 link_with : [libshared],
                 dependencies : [libm],
                 install : true)
@@ -2882,7 +2883,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
                 link_with : [libtimesyncd_core],
                 dependencies : [threads,
                                 libm],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2891,7 +2892,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
                 'src/timesync/wait-sync.c',
                 include_directories : includes,
                 link_with : [libtimesyncd_core],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -2903,7 +2904,7 @@ if conf.get('ENABLE_MACHINED') == 1
                 include_directories : includes,
                 link_with : [libmachine_core,
                              libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2916,7 +2917,7 @@ if conf.get('ENABLE_MACHINED') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -2928,7 +2929,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2944,7 +2945,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2958,7 +2959,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2968,7 +2969,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                 include_directories : includes,
                 link_with : [libshared,
                              lib_import_common],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2982,7 +2983,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3002,7 +3003,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3020,7 +3021,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3035,7 +3036,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3052,7 +3053,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3066,7 +3067,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3081,7 +3082,7 @@ if conf.get('ENABLE_PSTORE') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3092,7 +3093,7 @@ if conf.get('ENABLE_OOMD') == 1
                    include_directories : includes,
                    link_with : [libshared],
                    dependencies : [],
-                   install_rpath : rootlibexecdir,
+                   install_rpath : rootpkglibdir,
                    install : true,
                    install_dir : rootlibexecdir)
 
@@ -3102,7 +3103,7 @@ if conf.get('ENABLE_OOMD') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3112,7 +3113,7 @@ if conf.get('ENABLE_BINFMT') == 1
                 'src/binfmt/binfmt.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3134,7 +3135,7 @@ if conf.get('ENABLE_SYSUPDATE') == 1
                                 libblkid,
                                 libfdisk,
                                 libopenssl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
         public_programs += exe
@@ -3146,7 +3147,7 @@ if conf.get('ENABLE_VCONSOLE') == 1
                 'src/vconsole/vconsole-setup.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3157,7 +3158,7 @@ if conf.get('ENABLE_RANDOMSEED') == 1
                 'src/random-seed/random-seed.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3169,7 +3170,7 @@ if conf.get('ENABLE_FIRSTBOOT') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libcrypt],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -3179,7 +3180,7 @@ executable(
         'src/remount-fs/remount-fs.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3188,7 +3189,7 @@ executable(
         'src/machine-id-setup/machine-id-setup-main.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3197,7 +3198,7 @@ executable(
         'src/fsck/fsck.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3205,7 +3206,7 @@ executable('systemd-growfs',
            'src/partition/growfs.c',
            include_directories : includes,
            link_with : [libshared],
-           install_rpath : rootlibexecdir,
+           install_rpath : rootpkglibdir,
            install : true,
            install_dir : rootlibexecdir)
 
@@ -3214,7 +3215,7 @@ executable(
         'src/partition/makefs.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3223,7 +3224,7 @@ executable(
         'src/sleep/sleep.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3237,7 +3238,7 @@ public_programs += executable(
         'src/sysctl/sysctl.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3246,7 +3247,7 @@ executable(
         'src/ac-power/ac-power.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3255,7 +3256,7 @@ public_programs += executable(
         'src/detect-virt/detect-virt.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3263,7 +3264,7 @@ public_programs += executable(
         'src/delta/delta.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3271,7 +3272,7 @@ public_programs += executable(
         'src/escape/escape.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3280,7 +3281,7 @@ public_programs += executable(
         'src/notify/notify.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3291,7 +3292,7 @@ public_programs += executable(
         link_with : [libshared],
         dependencies : [threads,
                         libopenssl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3300,7 +3301,7 @@ executable(
         'src/volatile-root/volatile-root.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : conf.get('ENABLE_INITRD') == 1,
         install_dir : rootlibexecdir)
 
@@ -3309,7 +3310,7 @@ executable(
         'src/cgroups-agent/cgroups-agent.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3318,7 +3319,7 @@ systemd_id128 = executable(
         'src/id128/id128.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 public_programs += systemd_id128
 
@@ -3335,7 +3336,7 @@ public_programs += executable(
         'src/path/path.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3343,7 +3344,7 @@ public_programs += executable(
         'src/ask-password/ask-password.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3352,7 +3353,7 @@ executable(
         'src/reply-password/reply-password.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3361,7 +3362,7 @@ public_programs += executable(
         'src/tty-ask-password-agent/tty-ask-password-agent.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3370,7 +3371,7 @@ public_programs += executable(
         'src/cgls/cgls.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3378,7 +3379,7 @@ public_programs += executable(
         'src/cgtop/cgtop.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 executable(
@@ -3386,7 +3387,7 @@ executable(
         'src/initctl/initctl.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : (conf.get('HAVE_SYSV_COMPAT') == 1),
         install_dir : rootlibexecdir)
 
@@ -3396,7 +3397,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies: [libmount],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 meson.add_install_script(meson_make_symlink,
@@ -3407,7 +3408,7 @@ public_programs += executable(
         'src/run/run.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3416,7 +3417,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3425,7 +3426,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if enable_sysusers
@@ -3434,7 +3435,7 @@ if enable_sysusers
                 'src/sysusers/sysusers.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
         public_programs += exe
@@ -3476,7 +3477,7 @@ if conf.get('ENABLE_TMPFILES') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libacl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
         public_programs += exe
@@ -3538,7 +3539,7 @@ if conf.get('ENABLE_QUOTACHECK') == 1
                 'src/quotacheck/quotacheck.c',
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3549,7 +3550,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3578,7 +3579,7 @@ if conf.get('ENABLE_REPART') == 1
                 dependencies : [threads,
                                 libblkid,
                                 libfdisk],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
         public_programs += exe
@@ -3596,7 +3597,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libmount],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3605,7 +3606,7 @@ executable(
         'src/update-done/update-done.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3615,7 +3616,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libaudit],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : (conf.get('ENABLE_UTMP') == 1),
         install_dir : rootlibexecdir)
 
@@ -3626,7 +3627,7 @@ if conf.get('HAVE_KMOD') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libkmod],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3646,7 +3647,7 @@ public_programs += executable(
                      libshared],
         dependencies : [libblkid,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if conf.get('ENABLE_NETWORKD') == 1
@@ -3658,7 +3659,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                              libsystemd_network,
                              networkd_link_with],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3667,7 +3668,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                 systemd_networkd_wait_online_sources,
                 include_directories : includes,
                 link_with : [networkd_link_with],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3677,7 +3678,7 @@ if conf.get('ENABLE_NETWORKD') == 1
                 include_directories : libsystemd_network_includes,
                 link_with : [libsystemd_network,
                              networkd_link_with],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -3687,7 +3688,7 @@ exe = executable(
         network_generator_sources,
         include_directories : includes,
         link_with : [networkd_link_with],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3704,7 +3705,7 @@ executable(
         'src/sulogin-shell/sulogin-shell.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3767,7 +3768,7 @@ foreach tuple : tests
                                         dependencies],
                         c_args : defs,
                         build_by_default : want_tests != 'false',
-                        install_rpath : rootlibexecdir,
+                        install_rpath : rootpkglibdir,
                         install : install_tests,
                         install_dir : testsdir / type,
                         link_depends : runtest_env)
index 9efa542acb328f99143c0d109edc539a47d4f47d..162090a139127888a7cb3fc332cda3fc60c40982 100644 (file)
@@ -202,7 +202,7 @@ libcore = shared_library(
                         libblkid,
                         libacl],
         install : true,
-        install_dir : rootlibexecdir)
+        install_dir : rootpkglibdir)
 
 core_includes = [includes, include_directories('.')]
 
index 402554fa385056352aa071b062b1a5e11a772250..830ac39e73ff04234900860074a2d6a44e9993cb 100644 (file)
@@ -20,9 +20,12 @@ int systemd_installation_has_version(const char *root, const char *minimal_versi
                        /* /lib works for systems without usr-merge, and for systems with a sane
                         * usr-merge, where /lib is a symlink to /usr/lib. /usr/lib is necessary
                         * for Gentoo which does a merge without making /lib a symlink.
+                        * Also support multiarch paths von Debian/Ubuntu; *-linux-* is a small
+                        * optimization based on the naming scheme of existing multiarch tuples.
                         */
                        "/lib/systemd/libsystemd-shared-*.so",
                        "/lib64/systemd/libsystemd-shared-*.so",
+                       "/usr/lib/*-linux-*/systemd/libsystemd-shared-*.so",
                        "/usr/lib/systemd/libsystemd-shared-*.so",
                        "/usr/lib64/systemd/libsystemd-shared-*.so") {
 
@@ -47,7 +50,7 @@ int systemd_installation_has_version(const char *root, const char *minimal_versi
                         /* This is most likely to run only once, hence let's not optimize anything. */
                         char *t, *t2;
 
-                        t = startswith(*name, path);
+                        t = startswith(basename(*name), "libsystemd-shared-");
                         if (!t)
                                 continue;
 
index 1d4e4a07c04a53039f45b265281e469165838461..363693d52dec4c5b10a8c8ec08f0683f65c5d039 100644 (file)
@@ -483,4 +483,4 @@ libshared = shared_library(
                       libsystemd_static],
         dependencies : libshared_deps,
         install : true,
-        install_dir : rootlibexecdir)
+        install_dir : rootpkglibdir)
index 79964a7d8e9f90d6a254e805b19311857bbd6b3b..c6711beb5a2d8d566e3f204c4ed4296e5677f432 100644 (file)
@@ -100,7 +100,7 @@ link_config_gperf_c = custom_target(
 
 if get_option('link-udev-shared')
         udev_link_with = [libshared]
-        udev_rpath = rootlibexecdir
+        udev_rpath = rootpkglibdir
 else
         udev_link_with = [libshared_static,
                           libsystemd_static]