]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: install libsystemd-shared into rootpkglibdir
authorMichael Biebl <biebl@debian.org>
Wed, 1 Jun 2022 06:23:02 +0000 (08:23 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Jun 2022 08:04:43 +0000 (10:04 +0200)
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

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

index dc3cc7f8b64b4c38dffd0f585b9e2c94b2e8a350..ce2d9679b4c35fe5267ae26cf3fca3289cd15ff4 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'
@@ -1982,7 +1983,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
@@ -2000,7 +2001,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
@@ -2018,7 +2019,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
@@ -2153,7 +2154,7 @@ exe = executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 dbus_programs += exe
@@ -2171,7 +2172,7 @@ exe = executable(
                      libshared],
         dependencies : [versiondep,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : conf.get('ENABLE_ANALYZE'))
 public_programs += exe
 
@@ -2192,7 +2193,7 @@ executable(
                         liblz4,
                         libselinux,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2203,7 +2204,7 @@ public_programs += executable(
         link_with : [libjournal_core,
                      libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -2217,7 +2218,7 @@ public_programs += executable(
                         liblz4,
                         libzstd,
                         libdl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -2226,7 +2227,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)
 
@@ -2235,7 +2236,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)
 
@@ -2244,7 +2245,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)
 
@@ -2253,7 +2254,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)
 
@@ -2271,7 +2272,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)
 
@@ -2286,7 +2287,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)
 
@@ -2295,7 +2296,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
@@ -2307,7 +2308,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)
 
@@ -2316,7 +2317,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
 
@@ -2329,7 +2330,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)
 
@@ -2344,7 +2345,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,
@@ -2365,7 +2366,7 @@ if conf.get('ENABLE_LOGIND') == 1
                              libshared],
                 dependencies : [threads,
                                 libacl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2378,7 +2379,7 @@ if conf.get('ENABLE_LOGIND') == 1
                                 liblz4,
                                 libxz,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 
@@ -2387,7 +2388,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)
 
@@ -2424,7 +2425,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
@@ -2435,7 +2436,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
@@ -2453,7 +2454,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(
@@ -2462,7 +2463,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)
 
@@ -2471,7 +2472,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
@@ -2482,7 +2483,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libblkid],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -2492,7 +2493,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 systemctl = executable(
@@ -2506,7 +2507,7 @@ systemctl = executable(
                         libxz,
                         liblz4,
                         libzstd],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 public_programs += systemctl
@@ -2518,7 +2519,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)
 
@@ -2528,7 +2529,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
@@ -2539,7 +2540,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
@@ -2551,7 +2552,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)
 
@@ -2561,7 +2562,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)
 
@@ -2571,7 +2572,7 @@ if conf.get('ENABLE_USERDB') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [threads],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2587,7 +2588,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libfdisk,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2600,7 +2601,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libcrypt,
                                 libopenssl,
                                 libm],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2614,7 +2615,7 @@ if conf.get('ENABLE_HOMED') == 1
                                 libopenssl,
                                 libp11kit,
                                 libdl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         if conf.get('HAVE_PAM') == 1
@@ -2664,7 +2665,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
@@ -2675,7 +2676,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
@@ -2685,7 +2686,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)
 
@@ -2697,7 +2698,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                 link_with : [libshared],
                 dependencies : [libcryptsetup,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2706,7 +2707,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)
 
@@ -2716,7 +2717,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)
 
@@ -2725,7 +2726,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)
 
@@ -2738,7 +2739,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
                                 libdl,
                                 libopenssl,
                                 libp11kit],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 
         executable(
@@ -2747,7 +2748,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)
 
@@ -2756,7 +2757,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
@@ -2767,7 +2768,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)
 
@@ -2783,7 +2784,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
@@ -2794,7 +2795,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)
 
@@ -2803,7 +2804,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
@@ -2814,7 +2815,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)
 
@@ -2823,7 +2824,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
 
@@ -2842,7 +2843,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)
 
@@ -2851,7 +2852,7 @@ if conf.get('ENABLE_LOCALED') == 1
                 localectl_sources,
                 include_directories : includes,
                 link_with : [libshared],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -2861,7 +2862,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
@@ -2871,7 +2872,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)
@@ -2885,7 +2886,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)
 
@@ -2894,7 +2895,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
@@ -2906,7 +2907,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)
 
@@ -2919,7 +2920,7 @@ if conf.get('ENABLE_MACHINED') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootbindir)
 endif
@@ -2931,7 +2932,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)
 
@@ -2947,7 +2948,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2961,7 +2962,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -2971,7 +2972,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)
 
@@ -2985,7 +2986,7 @@ if conf.get('ENABLE_IMPORTD') == 1
                                 libz,
                                 libbzip2,
                                 libxz],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3005,7 +3006,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
@@ -3023,7 +3024,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)
 
@@ -3038,7 +3039,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
@@ -3055,7 +3056,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 
@@ -3069,7 +3070,7 @@ if conf.get('ENABLE_COREDUMP') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3084,7 +3085,7 @@ if conf.get('ENABLE_PSTORE') == 1
                                 libxz,
                                 liblz4,
                                 libzstd],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
 endif
@@ -3095,7 +3096,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)
 
@@ -3105,7 +3106,7 @@ if conf.get('ENABLE_OOMD') == 1
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true)
 endif
 
@@ -3115,7 +3116,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)
 
@@ -3137,7 +3138,7 @@ if conf.get('ENABLE_SYSUPDATE') == 1
                                 libblkid,
                                 libfdisk,
                                 libopenssl],
-                install_rpath : rootlibexecdir,
+                install_rpath : rootpkglibdir,
                 install : true,
                 install_dir : rootlibexecdir)
         public_programs += exe
@@ -3149,7 +3150,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
@@ -3160,7 +3161,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
@@ -3172,7 +3173,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
@@ -3182,7 +3183,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)
 
@@ -3191,7 +3192,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)
 
@@ -3200,7 +3201,7 @@ executable(
         'src/fsck/fsck.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3208,7 +3209,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)
 
@@ -3217,7 +3218,7 @@ executable(
         'src/partition/makefs.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3226,7 +3227,7 @@ executable(
         'src/sleep/sleep.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3240,7 +3241,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)
 
@@ -3249,7 +3250,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)
 
@@ -3258,7 +3259,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(
@@ -3266,7 +3267,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(
@@ -3274,7 +3275,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)
 
@@ -3283,7 +3284,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)
 
@@ -3294,7 +3295,7 @@ public_programs += executable(
         link_with : [libshared],
         dependencies : [threads,
                         libopenssl],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootbindir)
 
@@ -3303,7 +3304,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)
 
@@ -3312,7 +3313,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)
 
@@ -3321,7 +3322,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
 
@@ -3338,7 +3339,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(
@@ -3346,7 +3347,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)
 
@@ -3355,7 +3356,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)
 
@@ -3364,7 +3365,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)
 
@@ -3373,7 +3374,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(
@@ -3381,7 +3382,7 @@ public_programs += executable(
         'src/cgtop/cgtop.c',
         include_directories : includes,
         link_with : [libshared],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 executable(
@@ -3389,7 +3390,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)
 
@@ -3399,7 +3400,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,
@@ -3410,7 +3411,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(
@@ -3419,7 +3420,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 public_programs += executable(
@@ -3428,7 +3429,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [versiondep],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if enable_sysusers
@@ -3437,7 +3438,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
@@ -3479,7 +3480,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
@@ -3541,7 +3542,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
@@ -3552,7 +3553,7 @@ public_programs += executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [threads],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3581,7 +3582,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
@@ -3599,7 +3600,7 @@ executable(
         include_directories : includes,
         link_with : [libshared],
         dependencies : [libmount],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true,
         install_dir : rootlibexecdir)
 
@@ -3608,7 +3609,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)
 
@@ -3618,7 +3619,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)
 
@@ -3629,7 +3630,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)
 
@@ -3649,7 +3650,7 @@ public_programs += executable(
                      libshared],
         dependencies : [libblkid,
                         libseccomp],
-        install_rpath : rootlibexecdir,
+        install_rpath : rootpkglibdir,
         install : true)
 
 if conf.get('ENABLE_NETWORKD') == 1
@@ -3661,7 +3662,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)
 
@@ -3670,7 +3671,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)
 
@@ -3680,7 +3681,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
@@ -3690,7 +3691,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)
 
@@ -3707,7 +3708,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)
 
@@ -3770,7 +3771,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 d7ac4e59a8e6778db3f96f2c2ad996f3790c0471..ac4b8d374c2db7ea5d755527830745e7175c59b4 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 1ddbfac677759ad418e8355c3627d30a1a3eb034..6dc8566d58ba3df8fbeaf588b29e0fe5e1f5c4ab 100644 (file)
@@ -485,4 +485,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]