Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 9d63227420f0c4f093c1c2066eafe2b6152070cf Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Fri, 23 Feb 2018 13:47:37 +0800 |
| 4 | Subject: [PATCH 06/31] Make root's home directory configurable |
| 5 | |
| 6 | OpenEmbedded has a configurable home directory for root. Allow |
| 7 | systemd to be built using its idea of what root's home directory |
| 8 | should be. |
| 9 | |
| 10 | Upstream-Status: Denied |
| 11 | Upstream wants to have a unified hierarchy where everyone is |
| 12 | using the same root folder. |
| 13 | https://github.com/systemd/systemd/issues/541 |
| 14 | |
| 15 | Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> |
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 17 | Signed-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 | |
| 23 | diff --git a/meson.build b/meson.build |
| 24 | index 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), |
| 63 | diff --git a/meson_options.txt b/meson_options.txt |
| 64 | index 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 | -- |
| 77 | 2.13.0 |
| 78 | |