summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-08-02 18:27:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-13 09:27:37 +0100
commitf06f9f3c893db8485bd4e6a76d4fb8cd51b38ec9 (patch)
tree4c446d468d01ce58e4799b3260d020442a6b7e38 /meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
parent42ffbda12430a29f6778d6626e9defd75783f85d (diff)
downloadpoky-f06f9f3c893db8485bd4e6a76d4fb8cd51b38ec9.tar.gz
systemd: update to 234
The new version fixes gperf 3.1 issues, so the update is included in this patchset. Modified patches are all rebases to the new version. Deleted patches are backports, except 0016-make-test-dir-configurable.patch which is obsolete in the new version (TEST_DIR define is no longer used anywhere). --with-testdir is removed from configure for the same reason. (From OE-Core rev: 34afb46f75d6c356f23f70c5ece96e45594e1546) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch59
1 files changed, 30 insertions, 29 deletions
diff --git a/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
index 2b333375bb..aeebbfb8fe 100644
--- a/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
+++ b/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
@@ -1,7 +1,7 @@
1From 79e64a07840e0d97d66e46111f1c086bf83981b7 Mon Sep 17 00:00:00 2001 1From 479e1f4aa2b9f1c911a4d0dd18e222d241a978ea Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Nov 2016 20:35:30 -0800 3Date: Wed, 9 Nov 2016 20:35:30 -0800
4Subject: [PATCH 13/19] Make root's home directory configurable 4Subject: [PATCH 42/48] Make root's home directory configurable
5 5
6OpenEmbedded has a configurable home directory for root. Allow 6OpenEmbedded has a configurable home directory for root. Allow
7systemd to be built using its idea of what root's home directory 7systemd to be built using its idea of what root's home directory
@@ -14,6 +14,7 @@ https://github.com/systemd/systemd/issues/541
14 14
15Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> 15Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17
17--- 18---
18 Makefile.am | 2 ++ 19 Makefile.am | 2 ++
19 configure.ac | 7 +++++++ 20 configure.ac | 7 +++++++
@@ -24,18 +25,18 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 6 files changed, 17 insertions(+), 8 deletions(-) 25 6 files changed, 17 insertions(+), 8 deletions(-)
25 26
26diff --git a/Makefile.am b/Makefile.am 27diff --git a/Makefile.am b/Makefile.am
27index 420e0e0..3010b01 100644 28index 1bcd932c2..c2b4a99d2 100644
28--- a/Makefile.am 29--- a/Makefile.am
29+++ b/Makefile.am 30+++ b/Makefile.am
30@@ -213,6 +213,7 @@ AM_CPPFLAGS = \ 31@@ -226,6 +226,7 @@ AM_CPPFLAGS = \
31 -DLIBDIR=\"$(libdir)\" \ 32 -DLIBDIR=\"$(libdir)\" \
32 -DROOTLIBDIR=\"$(rootlibdir)\" \ 33 -DROOTLIBDIR=\"$(rootlibdir)\" \
33 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ 34 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
34+ -DROOTHOMEDIR=\"$(roothomedir)\" \ 35+ -DROOTHOMEDIR=\"$(roothomedir)\" \
35 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
36 -I $(top_srcdir)/src \ 36 -I $(top_srcdir)/src \
37 -I $(top_builddir)/src/basic \ 37 -I $(top_builddir)/src/basic \
38@@ -6057,6 +6058,7 @@ substitutions = \ 38 -I $(top_srcdir)/src/basic \
39@@ -6356,6 +6357,7 @@ substitutions = \
39 '|rootlibdir=$(rootlibdir)|' \ 40 '|rootlibdir=$(rootlibdir)|' \
40 '|rootlibexecdir=$(rootlibexecdir)|' \ 41 '|rootlibexecdir=$(rootlibexecdir)|' \
41 '|rootbindir=$(rootbindir)|' \ 42 '|rootbindir=$(rootbindir)|' \
@@ -44,10 +45,10 @@ index 420e0e0..3010b01 100644
44 '|SYSTEMCTL=$(rootbindir)/systemctl|' \ 45 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
45 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ 46 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
46diff --git a/configure.ac b/configure.ac 47diff --git a/configure.ac b/configure.ac
47index b10c952..dfc0bd3 100644 48index 0354ffe6a..b53ca1f1a 100644
48--- a/configure.ac 49--- a/configure.ac
49+++ b/configure.ac 50+++ b/configure.ac
50@@ -1513,6 +1513,11 @@ AC_ARG_WITH([rootlibdir], 51@@ -1641,6 +1641,11 @@ AC_ARG_WITH([rootlibdir],
51 [with_rootlibdir=${libdir}]) 52 [with_rootlibdir=${libdir}])
52 AX_NORMALIZE_PATH([with_rootlibdir]) 53 AX_NORMALIZE_PATH([with_rootlibdir])
53 54
@@ -57,29 +58,29 @@ index b10c952..dfc0bd3 100644
57+ [with_roothomedir=/root]) 58+ [with_roothomedir=/root])
58+ 59+
59 AC_ARG_WITH([pamlibdir], 60 AC_ARG_WITH([pamlibdir],
60 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), 61 AS_HELP_STRING([--with-pamlibdir=DIR], [directory for PAM modules]),
61 [], 62 [],
62@@ -1598,6 +1603,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) 63@@ -1733,6 +1738,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
63 AC_SUBST([pamconfdir], [$with_pamconfdir]) 64 AC_SUBST([rpmmacrosdir], [$with_rpmmacrosdir])
64 AC_SUBST([rootprefix], [$with_rootprefix]) 65 AC_SUBST([rootprefix], [$with_rootprefix])
65 AC_SUBST([rootlibdir], [$with_rootlibdir]) 66 AC_SUBST([rootlibdir], [$with_rootlibdir])
66+AC_SUBST([roothomedir], [$with_roothomedir]) 67+AC_SUBST([roothomedir], [$with_roothomedir])
67 68
68 AC_CONFIG_FILES([ 69 AC_CONFIG_FILES([
69 Makefile 70 Makefile
70@@ -1688,6 +1694,7 @@ AC_MSG_RESULT([ 71@@ -1829,6 +1835,7 @@ AC_MSG_RESULT([
71 includedir: ${includedir} 72 includedir: ${includedir}
72 lib dir: ${libdir} 73 lib dir: ${libdir}
73 rootlib dir: ${with_rootlibdir} 74 rootlib dir: ${with_rootlibdir}
74+ root home dir: ${with_roothomedir} 75+ root home dir: ${with_roothomedir}
75 SysV init scripts: ${SYSTEM_SYSVINIT_PATH} 76 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
76 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} 77 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
77 Build Python: ${PYTHON} 78 build Python: ${PYTHON}
78diff --git a/src/basic/user-util.c b/src/basic/user-util.c 79diff --git a/src/basic/user-util.c b/src/basic/user-util.c
79index 938533d..3f9fdc4 100644 80index c619dad52..662682adf 100644
80--- a/src/basic/user-util.c 81--- a/src/basic/user-util.c
81+++ b/src/basic/user-util.c 82+++ b/src/basic/user-util.c
82@@ -127,7 +127,7 @@ int get_user_creds( 83@@ -129,7 +129,7 @@ int get_user_creds(
83 *gid = 0; 84 *gid = 0;
84 85
85 if (home) 86 if (home)
@@ -88,7 +89,7 @@ index 938533d..3f9fdc4 100644
88 89
89 if (shell) 90 if (shell)
90 *shell = "/bin/sh"; 91 *shell = "/bin/sh";
91@@ -387,7 +387,7 @@ int get_home_dir(char **_h) { 92@@ -389,7 +389,7 @@ int get_home_dir(char **_h) {
92 /* Hardcode home directory for root to avoid NSS */ 93 /* Hardcode home directory for root to avoid NSS */
93 u = getuid(); 94 u = getuid();
94 if (u == 0) { 95 if (u == 0) {
@@ -98,10 +99,10 @@ index 938533d..3f9fdc4 100644
98 return -ENOMEM; 99 return -ENOMEM;
99 100
100diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 101diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
101index 19b47cd..e42bf19 100644 102index 8a5fedd4b..7b01ec078 100644
102--- a/src/nspawn/nspawn.c 103--- a/src/nspawn/nspawn.c
103+++ b/src/nspawn/nspawn.c 104+++ b/src/nspawn/nspawn.c
104@@ -2798,7 +2798,7 @@ static int inner_child( 105@@ -2291,7 +2291,7 @@ static int inner_child(
105 if (envp[n_env]) 106 if (envp[n_env])
106 n_env++; 107 n_env++;
107 108
@@ -110,8 +111,8 @@ index 19b47cd..e42bf19 100644
110 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || 111 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
111 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) 112 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
112 return log_oom(); 113 return log_oom();
113@@ -2882,7 +2882,7 @@ static int inner_child( 114@@ -2373,7 +2373,7 @@ static int inner_child(
114 else { 115 } else {
115 if (!arg_chdir) 116 if (!arg_chdir)
116 /* If we cannot change the directory, we'll end up in /, that is expected. */ 117 /* If we cannot change the directory, we'll end up in /, that is expected. */
117- (void) chdir(home ?: "/root"); 118- (void) chdir(home ?: "/root");
@@ -120,7 +121,7 @@ index 19b47cd..e42bf19 100644
120 execle("/bin/bash", "-bash", NULL, env_use); 121 execle("/bin/bash", "-bash", NULL, env_use);
121 execle("/bin/sh", "-sh", NULL, env_use); 122 execle("/bin/sh", "-sh", NULL, env_use);
122diff --git a/units/emergency.service.in b/units/emergency.service.in 123diff --git a/units/emergency.service.in b/units/emergency.service.in
123index da68eb8..e25f879 100644 124index e9eb238b9..32588e48a 100644
124--- a/units/emergency.service.in 125--- a/units/emergency.service.in
125+++ b/units/emergency.service.in 126+++ b/units/emergency.service.in
126@@ -15,8 +15,8 @@ Conflicts=syslog.socket 127@@ -15,8 +15,8 @@ Conflicts=syslog.socket
@@ -131,11 +132,11 @@ index da68eb8..e25f879 100644
131-WorkingDirectory=-/root 132-WorkingDirectory=-/root
132+Environment=HOME=@roothomedir@ 133+Environment=HOME=@roothomedir@
133+WorkingDirectory=-@roothomedir@ 134+WorkingDirectory=-@roothomedir@
134 ExecStartPre=-/bin/plymouth --wait quit 135 ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
135 ExecStartPre=-/bin/echo -e 'You are in emergency mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.' 136 Type=idle
136 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" 137 StandardInput=tty-force
137diff --git a/units/rescue.service.in b/units/rescue.service.in 138diff --git a/units/rescue.service.in b/units/rescue.service.in
138index 5feff69..a83439e 100644 139index 4ab66f485..bd9898f2c 100644
139--- a/units/rescue.service.in 140--- a/units/rescue.service.in
140+++ b/units/rescue.service.in 141+++ b/units/rescue.service.in
141@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service 142@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
@@ -146,9 +147,9 @@ index 5feff69..a83439e 100644
146-WorkingDirectory=-/root 147-WorkingDirectory=-/root
147+Environment=HOME=@roothomedir@ 148+Environment=HOME=@roothomedir@
148+WorkingDirectory=-@roothomedir@ 149+WorkingDirectory=-@roothomedir@
149 ExecStartPre=-/bin/plymouth --wait quit 150 ExecStart=-@rootlibexecdir@/systemd-sulogin-shell rescue
150 ExecStartPre=-/bin/echo -e 'You are in rescue mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' 151 Type=idle
151 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" 152 StandardInput=tty-force
152-- 153--
1532.10.2 1542.13.2
154 155