]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "meson: drop rootprefix option"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Nov 2017 19:00:10 +0000 (20:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 28 Nov 2017 19:02:53 +0000 (20:02 +0100)
This reverts commit ee4bfa21f62dbf4d8f2be27d3c763c3c16743bfd.

Also add comment so that this doesn't get deleted again by mistake.

Replaces #7461.

meson.build
meson_options.txt

index 6ca506c41f0e1b30634fae06062c9e47d2441f62..052474895d532bb7cff456bd3c22df0b9e4d5079 100644 (file)
@@ -54,8 +54,15 @@ endif
 
 #####################################################################
 
+rootprefixdir = get_option('rootprefix')
 conf.set10('HAVE_SPLIT_USR', get_option('split-usr'))
-rootprefixdir = get_option('split-usr') ? '/' : '/usr'
+# Unusual rootprefixdir values are used by some distros
+# (see https://github.com/systemd/systemd/pull/7461).
+if get_option('split-usr')
+        rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/'
+else
+        rootprefixdir = rootprefixdir != '' ? rootprefixdir : '/usr'
+endif
 
 sysvinit_path = get_option('sysvinit-path')
 sysvrcnd_path = get_option('sysvrcnd-path')
@@ -179,6 +186,7 @@ conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH',                  join_paths(rootlib
 conf.set_quoted('SYSTEMCTL_BINARY_PATH',                      join_paths(rootbindir, 'systemctl'))
 conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
 conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH',           join_paths(bindir, 'systemd-stdio-bridge'))
+conf.set_quoted('ROOTPREFIX',                                 rootprefixdir)
 conf.set_quoted('RANDOM_SEED_DIR',                            randomseeddir)
 conf.set_quoted('RANDOM_SEED',                                join_paths(randomseeddir, 'random-seed'))
 conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH',                    join_paths(rootlibexecdir, 'systemd-cryptsetup'))
index 49ebd6c03662492ae0e2f1b23db34dcf87285b41..498a32ab1171330b29badd5103655f9350e9290b 100644 (file)
@@ -20,6 +20,8 @@ option('split-usr', type : 'boolean', value : false,
        description : '''assume that /bin, /sbin aren't symlinks into /usr''')
 option('rootlibdir', type : 'string',
        description : '''[/usr]/lib/x86_64-linux-gnu or such''')
+option('rootprefix', type : 'string',
+       description : '''override the root prefix''')
 option('link-udev-shared', type : 'boolean',
        description : 'link systemd-udev and its helpers to libsystemd-shared.so')