meson: install libsystemd-shared into rootpkglibdir
authorMichael Biebl <biebl@debian.org>
Wed, 1 Jun 2022 06:23:02 +0000 (08:23 +0200)
committerMichael Biebl <biebl@debian.org>
Sun, 2 Oct 2022 19:23:49 +0000 (20:23 +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 1d8b5dc9d8e61750f2ad1ef2cfbd01adc0e73520..2c5002cacf5236ac19e6ab832259c0ca53ebd859 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'
@@ -1996,7 +1997,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
@@ -2014,7 +2015,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
@@ -2032,7 +2033,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
@@ -2167,7 +2168,7 @@ exe = executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 dbus_programs += exe
@@ -2185,7 +2186,7 @@ public_programs += executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : conf.get('ENABLE_ANALYZE') == 1)
 
 executable(
@@ -2199,7 +2200,7 @@ executable(
                         liblz4,
                         libselinux,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2210,7 +2211,7 @@ public_programs += executable(
         link_with : [libjournal_core,
                      libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -2224,7 +2225,7 @@ public_programs += executable(
                         liblz4,
                         libzstd,
                         libdl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -2233,7 +2234,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)
 
@@ -2242,7 +2243,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)
 
@@ -2251,7 +2252,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)
 
@@ -2260,7 +2261,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)
 
@@ -2278,7 +2279,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)
 
@@ -2293,7 +2294,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)
 
@@ -2302,7 +2303,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
@@ -2314,7 +2315,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)
 
@@ -2323,7 +2324,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
 
@@ -2336,7 +2337,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)
 
@@ -2351,7 +2352,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,
@@ -2372,7 +2373,7 @@ if conf.get('ENABLE_LOGIND') == 1
                              libshared],
                 dependencies : [threads,
                                 libacl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2385,7 +2386,7 @@ if conf.get('ENABLE_LOGIND') == 1
                                 liblz4,
                                 libxz,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 
@@ -2394,7 +2395,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)
 
@@ -2431,7 +2432,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
@@ -2442,7 +2443,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
@@ -2460,7 +2461,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(
@@ -2469,7 +2470,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)
 
@@ -2478,7 +2479,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
@@ -2489,7 +2490,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libblkid],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2499,7 +2500,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 systemctl = executable(
@@ -2513,7 +2514,7 @@ systemctl = executable(
                         libxz,
                         liblz4,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 public_programs += systemctl
@@ -2525,7 +2526,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)
 
@@ -2535,7 +2536,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
@@ -2546,7 +2547,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
@@ -2558,7 +2559,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)
 
@@ -2568,7 +2569,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)
 
@@ -2578,7 +2579,7 @@ if conf.get('ENABLE_USERDB') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2594,7 +2595,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libfdisk,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2607,7 +2608,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libcrypt,
                                 libopenssl,
                                 libm],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2621,7 +2622,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libp11kit,
                                 libdl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         if conf.get('HAVE_PAM') == 1
@@ -2663,7 +2664,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
@@ -2674,7 +2675,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
@@ -2684,7 +2685,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)
 
@@ -2696,7 +2697,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 link_with : [libshared],
                 dependencies : [libcryptsetup,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2705,7 +2706,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)
 
@@ -2715,7 +2716,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)
 
@@ -2724,7 +2725,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)
 
@@ -2737,7 +2738,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                                 libdl,
                                 libopenssl,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         executable(
@@ -2746,7 +2747,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)
 
@@ -2755,7 +2756,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
@@ -2766,7 +2767,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)
 
@@ -2782,7 +2783,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
@@ -2793,7 +2794,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)
 
@@ -2802,7 +2803,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
@@ -2813,7 +2814,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)
 
@@ -2822,7 +2823,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
 
@@ -2841,7 +2842,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)
 
@@ -2850,7 +2851,7 @@ if conf.get('ENABLE_LOCALED') == 1
                 localectl_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2860,7 +2861,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
@@ -2870,7 +2871,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)
@@ -2884,7 +2885,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)
 
@@ -2893,7 +2894,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
@@ -2905,7 +2906,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)
 
@@ -2918,7 +2919,7 @@ if conf.get('ENABLE_MACHINED') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -2930,7 +2931,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)
 
@@ -2946,7 +2947,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2960,7 +2961,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2970,7 +2971,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)
 
@@ -2984,7 +2985,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3004,7 +3005,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
@@ -3022,7 +3023,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)
 
@@ -3037,7 +3038,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
@@ -3054,7 +3055,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3068,7 +3069,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3083,7 +3084,7 @@ if conf.get('ENABLE_PSTORE') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3094,7 +3095,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)
 
@@ -3104,7 +3105,7 @@ if conf.get('ENABLE_OOMD') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3114,7 +3115,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)
 
@@ -3136,7 +3137,7 @@ if conf.get('ENABLE_SYSUPDATE') == 1
                                 libblkid,
                                 libfdisk,
                                 libopenssl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
         public_programs += exe
@@ -3148,7 +3149,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
@@ -3159,7 +3160,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
@@ -3171,7 +3172,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
@@ -3181,7 +3182,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)
 
@@ -3190,7 +3191,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)
 
@@ -3199,7 +3200,7 @@ executable(
         'src/fsck/fsck.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3207,7 +3208,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)
 
@@ -3216,7 +3217,7 @@ executable(
         'src/partition/makefs.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3225,7 +3226,7 @@ executable(
         'src/sleep/sleep.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3239,7 +3240,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)
 
@@ -3248,7 +3249,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)
 
@@ -3257,7 +3258,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(
@@ -3265,7 +3266,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(
@@ -3273,7 +3274,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)
 
@@ -3282,7 +3283,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)
 
@@ -3293,7 +3294,7 @@ public_programs += executable(
         link_with : [libshared],
         dependencies : [threads,
                         libopenssl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3302,7 +3303,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)
 
@@ -3311,7 +3312,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)
 
@@ -3320,7 +3321,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
 
@@ -3337,7 +3338,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(
@@ -3345,7 +3346,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)
 
@@ -3354,7 +3355,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)
 
@@ -3363,7 +3364,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)
 
@@ -3372,7 +3373,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(
@@ -3380,7 +3381,7 @@ public_programs += executable(
         'src/cgtop/cgtop.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 executable(
@@ -3388,7 +3389,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)
 
@@ -3398,7 +3399,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,
@@ -3409,7 +3410,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(
@@ -3418,7 +3419,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3427,7 +3428,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if enable_sysusers
@@ -3436,7 +3437,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
@@ -3478,7 +3479,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
@@ -3540,7 +3541,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
@@ -3551,7 +3552,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3580,7 +3581,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
@@ -3598,7 +3599,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libmount],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3607,7 +3608,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)
 
@@ -3617,7 +3618,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)
 
@@ -3628,7 +3629,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)
 
@@ -3648,7 +3649,7 @@ public_programs += executable(
                      libshared],
         dependencies : [libblkid,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if conf.get('ENABLE_NETWORKD') == 1
@@ -3660,7 +3661,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)
 
@@ -3669,7 +3670,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)
 
@@ -3679,7 +3680,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
@@ -3689,7 +3690,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)
 
@@ -3706,7 +3707,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)
 
@@ -3769,7 +3770,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]