blob: 5ba966168a200ca1271edc2db2baa0546245c56b [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 9d63227420f0c4f093c1c2066eafe2b6152070cf Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 23 Feb 2018 13:47:37 +0800
4Subject: [PATCH 06/31] Make root's home directory configurable
5
6OpenEmbedded has a configurable home directory for root. Allow
7systemd to be built using its idea of what root's home directory
8should be.
9
10Upstream-Status: Denied
11Upstream wants to have a unified hierarchy where everyone is
12using the same root folder.
13https://github.com/systemd/systemd/issues/541
14
15Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18---
19 meson.build | 8 ++++++++
20 meson_options.txt | 2 ++
21 2 files changed, 10 insertions(+)
22
23diff --git a/meson.build b/meson.build
24index 7347ea880..918101d6b 100644
25--- a/meson.build
26+++ b/meson.build
27@@ -94,6 +94,11 @@ if rootlibdir == ''
28 rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1])
29 endif
30
31+roothomedir = get_option('roothomedir')
32+if roothomedir == ''
33+ roothomedir = '/root'
34+endif
35+
36 # Dirs of external packages
37 pkgconfigdatadir = join_paths(datadir, 'pkgconfig')
38 pkgconfiglibdir = join_paths(libdir, 'pkgconfig')
39@@ -205,6 +210,7 @@ conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
40 conf.set_quoted('POLKIT_AGENT_BINARY_PATH', join_paths(bindir, 'pkttyagent'))
41 conf.set_quoted('LIBDIR', libdir)
42 conf.set_quoted('ROOTLIBDIR', rootlibdir)
43+conf.set_quoted('ROOTHOMEDIR', roothomedir)
44 conf.set_quoted('ROOTLIBEXECDIR', rootlibexecdir)
45 conf.set_quoted('BOOTLIBDIR', bootlibdir)
46 conf.set_quoted('SYSTEMD_PULL_PATH', join_paths(rootlibexecdir, 'systemd-pull'))
47@@ -221,6 +227,7 @@ substs.set('prefix', prefixdir)
48 substs.set('exec_prefix', prefixdir)
49 substs.set('libdir', libdir)
50 substs.set('rootlibdir', rootlibdir)
51+substs.set('roothomedir', roothomedir)
52 substs.set('includedir', includedir)
53 substs.set('pkgsysconfdir', pkgsysconfdir)
54 substs.set('bindir', bindir)
55@@ -2705,6 +2712,7 @@ status = [
56 'include directory: @0@'.format(includedir),
57 'lib directory: @0@'.format(libdir),
58 'rootlib directory: @0@'.format(rootlibdir),
59+ 'roothome directory: @0@'.format(roothomedir),
60 'SysV init scripts: @0@'.format(sysvinit_path),
61 'SysV rc?.d directories: @0@'.format(sysvrcnd_path),
62 'PAM modules directory: @0@'.format(pamlibdir),
63diff --git a/meson_options.txt b/meson_options.txt
64index 39822d6cd..0b24f0e0f 100644
65--- a/meson_options.txt
66+++ b/meson_options.txt
67@@ -22,6 +22,8 @@ option('rootlibdir', type : 'string',
68 description : '''[/usr]/lib/x86_64-linux-gnu or such''')
69 option('rootprefix', type : 'string',
70 description : '''override the root prefix''')
71+option('roothomedir', type : 'string',
72+ description : '''override the root home directory''')
73 option('link-udev-shared', type : 'boolean',
74 description : 'link systemd-udev and its helpers to libsystemd-shared.so')
75
76--
772.13.0
78