summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch44
-rw-r--r--meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch25
-rw-r--r--meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch74
-rw-r--r--meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch (renamed from meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch)26
-rw-r--r--meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch (renamed from meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch)32
-rw-r--r--meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch (renamed from meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch)48
-rw-r--r--meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch42
-rw-r--r--meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch (renamed from meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch)29
-rw-r--r--meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch (renamed from meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch)43
-rw-r--r--meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch (renamed from meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch)108
-rw-r--r--meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch (renamed from meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch)12
-rw-r--r--meta/recipes-core/systemd/systemd/binfmt-install.patch57
-rw-r--r--meta/recipes-core/systemd/systemd/optional_secure_getenv.patch19
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch30
-rw-r--r--meta/recipes-core/systemd/systemd_219.bb (renamed from meta/recipes-core/systemd/systemd_218.bb)37
16 files changed, 384 insertions, 277 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch
new file mode 100644
index 0000000000..b6ab5effc2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch
@@ -0,0 +1,44 @@
1From 100e50604efc4032001a2de6a6b47853c0003817 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:29:15 +0000
4Subject: [PATCH 01/11] units: Prefer getty to agetty in console setup systemd
5 units
6
7Upstream-Status: Inappropriate [configuration specific]
8
9Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 units/getty@.service.m4 | 2 +-
13 units/serial-getty@.service.m4 | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
17index 46164ab..bdf6ec8 100644
18--- a/units/getty@.service.m4
19+++ b/units/getty@.service.m4
20@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
21
22 [Service]
23 # the VT is cleared by TTYVTDisallocate
24-ExecStart=-/sbin/agetty --noclear %I $TERM
25+ExecStart=-/sbin/getty -L %I $TERM
26 Type=idle
27 Restart=always
28 RestartSec=0
29diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
30index 4522d0d..e6d499d 100644
31--- a/units/serial-getty@.service.m4
32+++ b/units/serial-getty@.service.m4
33@@ -22,7 +22,7 @@ Before=getty.target
34 IgnoreOnIsolate=yes
35
36 [Service]
37-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
38+ExecStart=-/sbin/getty -L 115200 %I $TERM
39 Type=idle
40 Restart=always
41 UtmpIdentifier=%I
42--
432.1.4
44
diff --git a/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch b/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch
new file mode 100644
index 0000000000..1cf7840976
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch
@@ -0,0 +1,25 @@
1From 03baade6db2cf83b44a157818ba827d725449bb0 Mon Sep 17 00:00:00 2001
2From: Emil Renner Berthing <systemd@esmil.dk>
3Date: Thu, 18 Sep 2014 15:24:47 +0200
4Subject: [PATCH 02/11] shared/missing.h: fall back to insecure getenv
5
6---
7 src/shared/missing.h | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/src/shared/missing.h b/src/shared/missing.h
11index b33a70c..11cca04 100644
12--- a/src/shared/missing.h
13+++ b/src/shared/missing.h
14@@ -366,7 +366,7 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
15 # ifdef HAVE___SECURE_GETENV
16 # define secure_getenv __secure_getenv
17 # else
18-# error "neither secure_getenv nor __secure_getenv are available"
19+# define secure_getenv getenv
20 # endif
21 #endif
22
23--
242.1.4
25
diff --git a/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000000..c14cc6fdd6
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,74 @@
1From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:03:44 +0000
4Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time
5 for the binfmt services
6
7use [Install] blocks so that they get created when the service is enabled
8like a traditional service.
9
10The [Install] blocks were rejected upstream as they don't have a way to
11"enable"
12it on install without static symlinks which can't be disabled, only
13masked. We
14however can do that in a postinst.
15
16Upstream-Status: Denied
17
18Signed-off-by: Ross Burton <ross.burton@intel.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 Makefile.am | 4 ----
22 units/proc-sys-fs-binfmt_misc.automount | 3 +++
23 units/systemd-binfmt.service.in | 5 +++++
24 3 files changed, 8 insertions(+), 4 deletions(-)
25
26diff --git a/Makefile.am b/Makefile.am
27index ba63f68..0fb3f9f 100644
28--- a/Makefile.am
29+++ b/Makefile.am
30@@ -4838,10 +4838,6 @@ INSTALL_DIRS += \
31 $(prefix)/lib/binfmt.d \
32 $(sysconfdir)/binfmt.d
33
34-SYSINIT_TARGET_WANTS += \
35- systemd-binfmt.service \
36- proc-sys-fs-binfmt_misc.automount
37-
38 endif
39
40 EXTRA_DIST += \
41diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
42index 6be3893..709adef 100644
43--- a/units/proc-sys-fs-binfmt_misc.automount
44+++ b/units/proc-sys-fs-binfmt_misc.automount
45@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
46
47 [Automount]
48 Where=/proc/sys/fs/binfmt_misc
49+
50+[Install]
51+WantedBy=sysinit.target
52diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
53index 34a5d52..617462b 100644
54--- a/units/systemd-binfmt.service.in
55+++ b/units/systemd-binfmt.service.in
56@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
57 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
58 DefaultDependencies=no
59 Conflicts=shutdown.target
60+Wants=proc-sys-fs-binfmt_misc.automount
61+
62 After=proc-sys-fs-binfmt_misc.automount
63 Before=sysinit.target shutdown.target
64 ConditionPathIsReadWrite=/proc/sys/
65@@ -24,3 +26,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
66 Type=oneshot
67 RemainAfterExit=yes
68 ExecStart=@rootlibexecdir@/systemd-binfmt
69+
70+[Install]
71+WantedBy=sysinit.target
72--
732.1.4
74
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch
index 4639532236..dddb7da690 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
+++ b/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch
@@ -1,11 +1,24 @@
1From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:05:45 +0000
4Subject: [PATCH 04/11] configure: Check for additional features that uclibc
5 doesnt support
6
7This helps in supporting uclibc which does not have all features that
8glibc might have
9
1Upstream-Status: Denied [no desire for uclibc support] 10Upstream-Status: Denied [no desire for uclibc support]
11
2Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 configure.ac | 18 ++++++++++++++++++
15 1 file changed, 18 insertions(+)
3 16
4Index: git/configure.ac 17diff --git a/configure.ac b/configure.ac
5=================================================================== 18index 9a2235b..a5b2e6e 100644
6--- git.orig/configure.ac 2014-03-15 17:53:51.756340454 -0700 19--- a/configure.ac
7+++ git/configure.ac 2014-03-15 18:07:34.888355897 -0700 20+++ b/configure.ac
8@@ -78,6 +78,24 @@ 21@@ -103,6 +103,24 @@ AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't s
9 22
10 M4_DEFINES= 23 M4_DEFINES=
11 24
@@ -30,3 +43,6 @@ Index: git/configure.ac
30 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line 43 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
31 m4_ifdef([GTK_DOC_CHECK], [ 44 m4_ifdef([GTK_DOC_CHECK], [
32 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])], 45 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
46--
472.1.4
48
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
index 7170a38af3..85279d68c2 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
+++ b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
@@ -1,20 +1,29 @@
1From a7417c2e6950d55c22c1b0d15783898b8ff229ef Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:10:37 +0000
4Subject: [PATCH 05/11] nspawn: Use execvpe only when libc supports it
5
1Upstream-Status: Denied [no desire for uclibc support] 6Upstream-Status: Denied [no desire for uclibc support]
7
2Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 src/nspawn/nspawn.c | 7 +++++++
11 1 file changed, 7 insertions(+)
3 12
4Index: systemd-209/src/nspawn/nspawn.c 13diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
5=================================================================== 14index 0d8d199..b597edb 100644
6--- systemd-209.orig/src/nspawn/nspawn.c 2014-02-19 15:03:09.000000000 -0800 15--- a/src/nspawn/nspawn.c
7+++ systemd-209/src/nspawn/nspawn.c 2014-02-19 23:20:38.720628627 -0800 16+++ b/src/nspawn/nspawn.c
8@@ -91,6 +91,8 @@ 17@@ -129,6 +129,8 @@ typedef enum Volatile {
9 LINK_GUEST 18 VOLATILE_STATE,
10 } LinkJournal; 19 } Volatile;
11 20
12+#include "config.h" 21+#include "config.h"
13+ 22+
14 static char *arg_directory = NULL; 23 static char *arg_directory = NULL;
24 static char *arg_template = NULL;
15 static char *arg_user = NULL; 25 static char *arg_user = NULL;
16 static sd_id128_t arg_uuid = {}; 26@@ -4257,7 +4259,12 @@ int main(int argc, char *argv[]) {
17@@ -2045,7 +2047,12 @@
18 a[0] = (char*) "/sbin/init"; 27 a[0] = (char*) "/sbin/init";
19 execve(a[0], a, env_use); 28 execve(a[0], a, env_use);
20 } else if (argc > optind) 29 } else if (argc > optind)
@@ -23,7 +32,10 @@ Index: systemd-209/src/nspawn/nspawn.c
23+#else 32+#else
24+ environ = env_use; 33+ environ = env_use;
25+ execvp(argv[optind], argv + optind); 34+ execvp(argv[optind], argv + optind);
26+#endif /* HAVE_EXECVPE */ 35+#endif /* HAVE_EXECVPE */
27 else { 36 else {
28 chdir(home ? home : "/root"); 37 chdir(home ? home : "/root");
29 execle("/bin/bash", "-bash", NULL, env_use); 38 execle("/bin/bash", "-bash", NULL, env_use);
39--
402.1.4
41
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
index 28a9a3491f..631dd77465 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
+++ b/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
@@ -1,19 +1,24 @@
1Upstream-Status: Denied [no desire for uclibc support] 1From 34a61b6c9eed3fad360066fb63132ebc7e0aaaa6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:12:48 +0000
4Subject: [PATCH 06/11] journal: Use posix fallocate only if available
5
6Some architecture ports in uclibc did not support it in past
2 7
3This patch is uclibc specific, thus not suitable for upstream. 8Upstream-Status: Denied [no desire for uclibc support]
4 9
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
7--- 12---
8 src/journal/journal-file.c | 16 +++++++++++++++- 13 src/journal/journal-file.c | 16 +++++++++++++++-
9 src/journal/journald-kmsg.c | 16 ++++++++++++++-- 14 src/journal/journald-kmsg.c | 15 ++++++++++++++-
10 2 files changed, 29 insertions(+), 3 deletions(-) 15 2 files changed, 29 insertions(+), 2 deletions(-)
11 16
12Index: git/src/journal/journal-file.c 17diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
13=================================================================== 18index 2845e05..9431171 100644
14--- git.orig/src/journal/journal-file.c 19--- a/src/journal/journal-file.c
15+++ git/src/journal/journal-file.c 20+++ b/src/journal/journal-file.c
16@@ -35,6 +35,8 @@ 21@@ -36,6 +36,8 @@
17 #include "compress.h" 22 #include "compress.h"
18 #include "fsprg.h" 23 #include "fsprg.h"
19 24
@@ -22,7 +27,7 @@ Index: git/src/journal/journal-file.c
22 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem)) 27 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
23 #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem)) 28 #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
24 29
25@@ -314,7 +316,7 @@ static int journal_file_verify_header(Jo 30@@ -354,7 +356,7 @@ static int journal_file_fstat(JournalFile *f) {
26 31
27 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) { 32 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
28 uint64_t old_size, new_size; 33 uint64_t old_size, new_size;
@@ -31,7 +36,7 @@ Index: git/src/journal/journal-file.c
31 36
32 assert(f); 37 assert(f);
33 38
34@@ -362,9 +364,21 @@ static int journal_file_allocate(Journal 39@@ -418,9 +420,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
35 /* Note that the glibc fallocate() fallback is very 40 /* Note that the glibc fallocate() fallback is very
36 inefficient, hence we try to minimize the allocation area 41 inefficient, hence we try to minimize the allocation area
37 as we can. */ 42 as we can. */
@@ -51,13 +56,13 @@ Index: git/src/journal/journal-file.c
51+ 56+
52+#endif /* HAVE_POSIX_FALLOCATE */ 57+#endif /* HAVE_POSIX_FALLOCATE */
53 58
54 if (fstat(f->fd, &f->last_stat) < 0) 59 f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
55 return -errno; 60
56Index: git/src/journal/journald-kmsg.c 61diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
57=================================================================== 62index c4216c4..a998ed5 100644
58--- git.orig/src/journal/journald-kmsg.c 63--- a/src/journal/journald-kmsg.c
59+++ git/src/journal/journald-kmsg.c 64+++ b/src/journal/journald-kmsg.c
60@@ -437,6 +437,7 @@ fail: 65@@ -436,6 +436,7 @@ fail:
61 int server_open_kernel_seqnum(Server *s) { 66 int server_open_kernel_seqnum(Server *s) {
62 _cleanup_close_ int fd; 67 _cleanup_close_ int fd;
63 uint64_t *p; 68 uint64_t *p;
@@ -65,7 +70,7 @@ Index: git/src/journal/journald-kmsg.c
65 70
66 assert(s); 71 assert(s);
67 72
68@@ -450,7 +451,19 @@ int server_open_kernel_seqnum(Server *s) 73@@ -449,7 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
69 return 0; 74 return 0;
70 } 75 }
71 76
@@ -86,3 +91,6 @@ Index: git/src/journal/journald-kmsg.c
86 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m"); 91 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
87 return 0; 92 return 0;
88 } 93 }
94--
952.1.4
96
diff --git a/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
new file mode 100644
index 0000000000..29c20c010f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
@@ -0,0 +1,42 @@
1From f771407d3e0288ca0c06a894194d3ddad69b9a8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:17:05 +0000
4Subject: [PATCH 07/11] util: Use mkostemp only if libc supports it
5
6Upstream-Status: Denied [no desire for uclibc support]
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 src/shared/util.c | 8 ++++++++
11 1 file changed, 8 insertions(+)
12
13diff --git a/src/shared/util.c b/src/shared/util.c
14index dc65280..72f4665 100644
15--- a/src/shared/util.c
16+++ b/src/shared/util.c
17@@ -97,6 +97,8 @@
18 #include "def.h"
19 #include "sparse-endian.h"
20
21+#include "config.h"
22+
23 int saved_argc = 0;
24 char **saved_argv = NULL;
25
26@@ -6682,7 +6684,13 @@ int mkostemp_safe(char *pattern, int flags) {
27
28 u = umask(077);
29
30+#ifdef HAVE_MKOSTEMP
31 fd = mkostemp(pattern, flags);
32+#else
33+ fd = mkstemp(pattern);
34+ if (fd >= 0) fcntl(fd, F_SETFD, flags);
35+#endif /* HAVE_MKOSTEMP */
36+
37 if (fd < 0)
38 return -errno;
39
40--
412.1.4
42
diff --git a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
index 39dfc9e2ea..5297625c93 100644
--- a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch
+++ b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
@@ -1,18 +1,24 @@
1bypass unimplemented _SC_PHYS_PAGES system configuration API in uclibc 1From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:19:37 +0000
4Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system
5 configuration API on uclibc
2 6
3Upstream-Status: Inappropriate [uclibc-specific] 7Upstream-Status: Inappropriate [uclibc-specific]
4 8
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/shared/util.c | 15 +++++++++++++++
12 1 file changed, 15 insertions(+)
6 13
7Index: git/src/shared/util.c 14diff --git a/src/shared/util.c b/src/shared/util.c
8=================================================================== 15index 72f4665..cbbe3b1 100644
9--- git.orig/src/shared/util.c 2014-03-15 18:09:34.796358146 -0700 16--- a/src/shared/util.c
10+++ git/src/shared/util.c 2014-03-15 20:16:33.836501084 -0700 17+++ b/src/shared/util.c
11@@ -6332,11 +6332,24 @@ 18@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) {
12
13 /* We return this as uint64_t in case we are running as 32bit 19 /* We return this as uint64_t in case we are running as 32bit
14 * process on a 64bit kernel with huge amounts of memory */ 20 * process on a 64bit kernel with huge amounts of memory */
15- 21
16+#ifdef __UCLIBC__ 22+#ifdef __UCLIBC__
17+ char line[128]; 23+ char line[128];
18+ FILE *f = fopen("/proc/meminfo", "r"); 24+ FILE *f = fopen("/proc/meminfo", "r");
@@ -29,9 +35,12 @@ Index: git/src/shared/util.c
29+#else 35+#else
30 mem = sysconf(_SC_PHYS_PAGES); 36 mem = sysconf(_SC_PHYS_PAGES);
31 assert(mem > 0); 37 assert(mem > 0);
32- 38
33 return (uint64_t) mem * (uint64_t) page_size(); 39 return (uint64_t) mem * (uint64_t) page_size();
34+#endif 40+#endif
35 } 41 }
36 42
37 char* mount_test_option(const char *haystack, const char *needle) { 43 void hexdump(FILE *f, const void *p, size_t s) {
44--
452.1.4
46
diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch
index 9aa07c1b10..9ea3e83e52 100644
--- a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch
+++ b/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch
@@ -1,20 +1,25 @@
1Upstream-Status: Inappropriate [OE specific] 1From 8791b5b3934c55694872b6915a67340683ead91b Mon Sep 17 00:00:00 2001
2 2From: Khem Raj <raj.khem@gmail.com>
3Subject: add support for executing scripts under /etc/rcS.d/ 3Date: Fri, 20 Feb 2015 05:22:52 +0000
4Subject: [PATCH 09/11] sysv-generator: add support for executing scripts under
5 /etc/rcS.d/
4 6
5To be compatible, all services translated from scripts under /etc/rcS.d would 7To be compatible, all services translated from scripts under /etc/rcS.d would
6run before services translated from scripts under /etc/rcN.d. 8run before services translated from scripts under /etc/rcN.d.
7 9
10Upstream-Status: Inappropriate [OE specific]
11
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 12Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
9--- 14---
10 src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- 15 src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++---------
11 1 file changed, 38 insertions(+), 12 deletions(-) 16 1 file changed, 38 insertions(+), 12 deletions(-)
12 17
13diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c 18diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
14index 9a869ba..10c55c0 100644 19index bd67f32..6756cc6 100644
15--- a/src/sysv-generator/sysv-generator.c 20--- a/src/sysv-generator/sysv-generator.c
16+++ b/src/sysv-generator/sysv-generator.c 21+++ b/src/sysv-generator/sysv-generator.c
17@@ -43,7 +43,8 @@ 22@@ -42,7 +42,8 @@
18 23
19 typedef enum RunlevelType { 24 typedef enum RunlevelType {
20 RUNLEVEL_UP, 25 RUNLEVEL_UP,
@@ -24,9 +29,9 @@ index 9a869ba..10c55c0 100644
24 } RunlevelType; 29 } RunlevelType;
25 30
26 static const struct { 31 static const struct {
27@@ -58,6 +59,9 @@ static const struct { 32@@ -57,6 +58,9 @@ static const struct {
28 { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP }, 33 { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
29 { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP }, 34 { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP },
30 35
31+ /* Debian style rcS.d, also adopted by OE */ 36+ /* Debian style rcS.d, also adopted by OE */
32+ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT}, 37+ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT},
@@ -34,7 +39,7 @@ index 9a869ba..10c55c0 100644
34 /* Standard SysV runlevels for shutdown */ 39 /* Standard SysV runlevels for shutdown */
35 { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, 40 { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN },
36 { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } 41 { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN }
37@@ -66,7 +70,7 @@ static const struct { 42@@ -65,7 +69,7 @@ static const struct {
38 directories in this order, and we want to make sure that 43 directories in this order, and we want to make sure that
39 sysv_start_priority is known when we first load the 44 sysv_start_priority is known when we first load the
40 unit. And that value we only know from S links. Hence 45 unit. And that value we only know from S links. Hence
@@ -43,7 +48,7 @@ index 9a869ba..10c55c0 100644
43 }; 48 };
44 49
45 typedef struct SysvStub { 50 typedef struct SysvStub {
46@@ -82,6 +86,8 @@ typedef struct SysvStub { 51@@ -81,6 +85,8 @@ typedef struct SysvStub {
47 char **conflicts; 52 char **conflicts;
48 bool has_lsb; 53 bool has_lsb;
49 bool reload; 54 bool reload;
@@ -52,7 +57,7 @@ index 9a869ba..10c55c0 100644
52 } SysvStub; 57 } SysvStub;
53 58
54 const char *arg_dest = "/tmp"; 59 const char *arg_dest = "/tmp";
55@@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) { 60@@ -183,6 +189,9 @@ static int generate_unit_file(SysvStub *s) {
56 "Description=%s\n", 61 "Description=%s\n",
57 s->path, s->description); 62 s->path, s->description);
58 63
@@ -62,7 +67,7 @@ index 9a869ba..10c55c0 100644
62 if (!isempty(before)) 67 if (!isempty(before))
63 fprintf(f, "Before=%s\n", before); 68 fprintf(f, "Before=%s\n", before);
64 if (!isempty(after)) 69 if (!isempty(after))
65@@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { 70@@ -704,18 +713,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
66 if (s->has_lsb && other->has_lsb) 71 if (s->has_lsb && other->has_lsb)
67 continue; 72 continue;
68 73
@@ -101,7 +106,7 @@ index 9a869ba..10c55c0 100644
101 106
102 /* FIXME: Maybe we should compare the name here lexicographically? */ 107 /* FIXME: Maybe we should compare the name here lexicographically? */
103 } 108 }
104@@ -725,6 +746,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { 109@@ -778,6 +799,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
105 return log_oom(); 110 return log_oom();
106 111
107 service->sysv_start_priority = -1; 112 service->sysv_start_priority = -1;
@@ -110,7 +115,7 @@ index 9a869ba..10c55c0 100644
110 service->name = name; 115 service->name = name;
111 service->path = fpath; 116 service->path = fpath;
112 117
113@@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { 118@@ -864,9 +887,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
114 119
115 if (de->d_name[0] == 'S') { 120 if (de->d_name[0] == 'S') {
116 121
@@ -122,8 +127,8 @@ index 9a869ba..10c55c0 100644
122+ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; 127+ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
123 } 128 }
124 129
125 r = set_ensure_allocated(&runlevel_services[i], 130 r = set_ensure_allocated(&runlevel_services[i], NULL);
126@@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { 131@@ -878,7 +903,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
127 goto finish; 132 goto finish;
128 133
129 } else if (de->d_name[0] == 'K' && 134 } else if (de->d_name[0] == 'K' &&
@@ -131,8 +136,8 @@ index 9a869ba..10c55c0 100644
131+ (rcnd_table[i].type == RUNLEVEL_DOWN || 136+ (rcnd_table[i].type == RUNLEVEL_DOWN ||
132+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) { 137+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
133 138
134 r = set_ensure_allocated(&shutdown_services, 139 r = set_ensure_allocated(&shutdown_services, NULL);
135 trivial_hash_func, trivial_compare_func); 140 if (r < 0)
136-- 141--
1371.9.1 1422.1.4
138 143
diff --git a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
index a86c8410df..41b903951e 100644
--- a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch
+++ b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
@@ -1,7 +1,7 @@
1From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001 1From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001
2From: Dan McGregor <dan.mcgregor@usask.ca> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 5 Sep 2014 06:28:58 -0600 3Date: Fri, 20 Feb 2015 05:24:49 +0000
4Subject: [PATCH] Make root's home directory configurable. 4Subject: [PATCH 10/11] 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
@@ -10,6 +10,7 @@ should be.
10Upstream-Status: Pending 10Upstream-Status: Pending
11 11
12Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> 12Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
13--- 14---
14 Makefile.am | 2 ++ 15 Makefile.am | 2 ++
15 configure.ac | 7 +++++++ 16 configure.ac | 7 +++++++
@@ -18,14 +19,14 @@ Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
18 src/shared/util.c | 4 ++-- 19 src/shared/util.c | 4 ++--
19 units/console-shell.service.m4.in | 4 ++-- 20 units/console-shell.service.m4.in | 4 ++--
20 units/emergency.service.in | 4 ++-- 21 units/emergency.service.in | 4 ++--
21 units/rescue.service.m4.in | 4 ++-- 22 units/rescue.service.in | 4 ++--
22 8 files changed, 20 insertions(+), 11 deletions(-) 23 8 files changed, 20 insertions(+), 11 deletions(-)
23 24
24Index: git/Makefile.am 25diff --git a/Makefile.am b/Makefile.am
25=================================================================== 26index 0fb3f9f..4623963 100644
26--- git.orig/Makefile.am 27--- a/Makefile.am
27+++ git/Makefile.am 28+++ b/Makefile.am
28@@ -195,6 +195,7 @@ AM_CPPFLAGS = \ 29@@ -199,6 +199,7 @@ AM_CPPFLAGS = \
29 -DKEXEC=\"$(KEXEC)\" \ 30 -DKEXEC=\"$(KEXEC)\" \
30 -DLIBDIR=\"$(libdir)\" \ 31 -DLIBDIR=\"$(libdir)\" \
31 -DROOTLIBDIR=\"$(rootlibdir)\" \ 32 -DROOTLIBDIR=\"$(rootlibdir)\" \
@@ -33,7 +34,7 @@ Index: git/Makefile.am
33 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ 34 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
34 -I $(top_srcdir)/src \ 35 -I $(top_srcdir)/src \
35 -I $(top_builddir)/src/shared \ 36 -I $(top_builddir)/src/shared \
36@@ -5830,6 +5831,7 @@ EXTRA_DIST += \ 37@@ -6342,6 +6343,7 @@ EXTRA_DIST += \
37 substitutions = \ 38 substitutions = \
38 '|rootlibexecdir=$(rootlibexecdir)|' \ 39 '|rootlibexecdir=$(rootlibexecdir)|' \
39 '|rootbindir=$(rootbindir)|' \ 40 '|rootbindir=$(rootbindir)|' \
@@ -41,11 +42,11 @@ Index: git/Makefile.am
41 '|bindir=$(bindir)|' \ 42 '|bindir=$(bindir)|' \
42 '|SYSTEMCTL=$(rootbindir)/systemctl|' \ 43 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
43 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ 44 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
44Index: git/configure.ac 45diff --git a/configure.ac b/configure.ac
45=================================================================== 46index a5b2e6e..55bb7d8 100644
46--- git.orig/configure.ac 47--- a/configure.ac
47+++ git/configure.ac 48+++ b/configure.ac
48@@ -1310,6 +1310,11 @@ AC_ARG_WITH([rootlibdir], 49@@ -1428,6 +1428,11 @@ AC_ARG_WITH([rootlibdir],
49 [], 50 [],
50 [with_rootlibdir=${libdir}]) 51 [with_rootlibdir=${libdir}])
51 52
@@ -57,7 +58,7 @@ Index: git/configure.ac
57 AC_ARG_WITH([pamlibdir], 58 AC_ARG_WITH([pamlibdir],
58 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), 59 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
59 [], 60 [],
60@@ -1362,6 +1367,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) 61@@ -1518,6 +1523,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
61 AC_SUBST([pamconfdir], [$with_pamconfdir]) 62 AC_SUBST([pamconfdir], [$with_pamconfdir])
62 AC_SUBST([rootprefix], [$with_rootprefix]) 63 AC_SUBST([rootprefix], [$with_rootprefix])
63 AC_SUBST([rootlibdir], [$with_rootlibdir]) 64 AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -65,7 +66,7 @@ Index: git/configure.ac
65 66
66 AC_CONFIG_FILES([ 67 AC_CONFIG_FILES([
67 Makefile po/Makefile.in 68 Makefile po/Makefile.in
68@@ -1446,6 +1452,7 @@ AC_MSG_RESULT([ 69@@ -1617,6 +1623,7 @@ AC_MSG_RESULT([
69 include_prefix: ${INCLUDE_PREFIX} 70 include_prefix: ${INCLUDE_PREFIX}
70 lib dir: ${libdir} 71 lib dir: ${libdir}
71 rootlib dir: ${with_rootlibdir} 72 rootlib dir: ${with_rootlibdir}
@@ -73,11 +74,11 @@ Index: git/configure.ac
73 SysV init scripts: ${SYSTEM_SYSVINIT_PATH} 74 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
74 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} 75 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
75 Build Python: ${PYTHON} 76 Build Python: ${PYTHON}
76Index: git/src/core/unit-printf.c 77diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
77=================================================================== 78index 97135db..14d12f1 100644
78--- git.orig/src/core/unit-printf.c 79--- a/src/core/unit-printf.c
79+++ git/src/core/unit-printf.c 80+++ b/src/core/unit-printf.c
80@@ -259,7 +259,7 @@ static int specifier_user_home(char spec 81@@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char
81 * best of it if we can, but fail if we can't */ 82 * best of it if we can, but fail if we can't */
82 83
83 if (!c->user || streq(c->user, "root") || streq(c->user, "0")) 84 if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
@@ -86,11 +87,11 @@ Index: git/src/core/unit-printf.c
86 else 87 else
87 return -ENOTSUP; 88 return -ENOTSUP;
88 89
89Index: git/src/nspawn/nspawn.c 90diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
90=================================================================== 91index b597edb..0b32673 100644
91--- git.orig/src/nspawn/nspawn.c 92--- a/src/nspawn/nspawn.c
92+++ git/src/nspawn/nspawn.c 93+++ b/src/nspawn/nspawn.c
93@@ -3183,7 +3183,7 @@ int main(int argc, char *argv[]) { 94@@ -4192,7 +4192,7 @@ int main(int argc, char *argv[]) {
94 if (r < 0) 95 if (r < 0)
95 _exit(EXIT_FAILURE); 96 _exit(EXIT_FAILURE);
96 97
@@ -99,20 +100,20 @@ Index: git/src/nspawn/nspawn.c
99 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || 100 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
100 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) { 101 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
101 log_oom(); 102 log_oom();
102@@ -3278,7 +3278,7 @@ int main(int argc, char *argv[]) { 103@@ -4266,7 +4266,7 @@ int main(int argc, char *argv[]) {
103 execvp(argv[optind], argv + optind); 104 execvp(argv[optind], argv + optind);
104 #endif /* HAVE_EXECVPE */ 105 #endif /* HAVE_EXECVPE */
105 else { 106 else {
106- chdir(home ? home : "/root"); 107- chdir(home ? home : "/root");
107+ chdir(home ? home : ROOTHOMEDIR); 108+ chdir(home ? home : ROOTHOMEDIR);
108 execle("/bin/bash", "-bash", NULL, env_use); 109 execle("/bin/bash", "-bash", NULL, env_use);
109 execle("/bin/sh", "-sh", NULL, env_use); 110 execle("/bin/sh", "-sh", NULL, env_use);
110 } 111 }
111Index: git/src/shared/util.c 112diff --git a/src/shared/util.c b/src/shared/util.c
112=================================================================== 113index cbbe3b1..a0e3cc5 100644
113--- git.orig/src/shared/util.c 114--- a/src/shared/util.c
114+++ git/src/shared/util.c 115+++ b/src/shared/util.c
115@@ -4523,7 +4523,7 @@ int get_user_creds( 116@@ -4609,7 +4609,7 @@ int get_user_creds(
116 *gid = 0; 117 *gid = 0;
117 118
118 if (home) 119 if (home)
@@ -121,7 +122,7 @@ Index: git/src/shared/util.c
121 122
122 if (shell) 123 if (shell)
123 *shell = "/bin/sh"; 124 *shell = "/bin/sh";
124@@ -5491,7 +5491,7 @@ int get_home_dir(char **_h) { 125@@ -5611,7 +5611,7 @@ int get_home_dir(char **_h) {
125 /* Hardcode home directory for root to avoid NSS */ 126 /* Hardcode home directory for root to avoid NSS */
126 u = getuid(); 127 u = getuid();
127 if (u == 0) { 128 if (u == 0) {
@@ -130,10 +131,10 @@ Index: git/src/shared/util.c
130 if (!h) 131 if (!h)
131 return -ENOMEM; 132 return -ENOMEM;
132 133
133Index: git/units/console-shell.service.m4.in 134diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
134=================================================================== 135index 5c80722..efde5f0 100644
135--- git.orig/units/console-shell.service.m4.in 136--- a/units/console-shell.service.m4.in
136+++ git/units/console-shell.service.m4.in 137+++ b/units/console-shell.service.m4.in
137@@ -15,8 +15,8 @@ After=rc-local.service 138@@ -15,8 +15,8 @@ After=rc-local.service
138 Before=getty.target 139 Before=getty.target
139 140
@@ -142,13 +143,13 @@ Index: git/units/console-shell.service.m4.in
142-WorkingDirectory=/root 143-WorkingDirectory=/root
143+Environment=HOME=@roothomedir@ 144+Environment=HOME=@roothomedir@
144+WorkingDirectory=@roothomedir@ 145+WorkingDirectory=@roothomedir@
145 ExecStart=-/sbin/sulogin 146 ExecStart=-@SULOGIN@
146 ExecStopPost=-@SYSTEMCTL@ poweroff 147 ExecStopPost=-@SYSTEMCTL@ poweroff
147 Type=idle 148 Type=idle
148Index: git/units/emergency.service.in 149diff --git a/units/emergency.service.in b/units/emergency.service.in
149=================================================================== 150index 2695d7b..7f47b73 100644
150--- git.orig/units/emergency.service.in 151--- a/units/emergency.service.in
151+++ git/units/emergency.service.in 152+++ b/units/emergency.service.in
152@@ -14,8 +14,8 @@ Conflicts=rescue.service 153@@ -14,8 +14,8 @@ Conflicts=rescue.service
153 Before=shutdown.target 154 Before=shutdown.target
154 155
@@ -159,12 +160,12 @@ Index: git/units/emergency.service.in
159+WorkingDirectory=@roothomedir@ 160+WorkingDirectory=@roothomedir@
160 ExecStartPre=-/bin/plymouth quit 161 ExecStartPre=-/bin/plymouth quit
161 ExecStartPre=-/bin/echo -e 'Welcome to 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.' 162 ExecStartPre=-/bin/echo -e 'Welcome to 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.'
162 ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" 163 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
163Index: git/units/rescue.service.in 164diff --git a/units/rescue.service.in b/units/rescue.service.in
164=================================================================== 165index de73fee..47f3593 100644
165--- git.orig/units/rescue.service.in 166--- a/units/rescue.service.in
166+++ git/units/rescue.service.in 167+++ b/units/rescue.service.in
167@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.serv 168@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
168 Before=shutdown.target 169 Before=shutdown.target
169 170
170 [Service] 171 [Service]
@@ -174,4 +175,7 @@ Index: git/units/rescue.service.in
174+WorkingDirectory=@roothomedir@ 175+WorkingDirectory=@roothomedir@
175 ExecStartPre=-/bin/plymouth quit 176 ExecStartPre=-/bin/plymouth quit
176 ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' 177 ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
177 ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" 178 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
179--
1802.1.4
181
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch
index 97701f707c..e562bca100 100644
--- a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch
+++ b/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch
@@ -1,11 +1,15 @@
1Upstream-Status: Inappropriate [oe specific] 1From 7e202f71785bf5a67c8a4f6b58d3585608fbfdc4 Mon Sep 17 00:00:00 2001
2 2From: Khem Raj <raj.khem@gmail.com>
3Subject: systemd-user: avoid using system-auth 3Date: Fri, 20 Feb 2015 05:26:25 +0000
4Subject: [PATCH 11/11] systemd-user: avoid using system-auth
4 5
5In OE, we don't provide system-auth, instead, we use common-* files. 6In OE, we don't provide system-auth, instead, we use common-* files.
6So modify systemd-user file to use common-* files. 7So modify systemd-user file to use common-* files.
7 8
9Upstream-Status: Inappropriate [oe specific]
10
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
9--- 13---
10 src/login/systemd-user | 4 ++-- 14 src/login/systemd-user | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-) 15 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -23,5 +27,5 @@ index 8112d74..99635af 100644
23+account include common-account 27+account include common-account
24+session include common-session 28+session include common-session
25-- 29--
261.9.1 302.1.4
27 31
diff --git a/meta/recipes-core/systemd/systemd/binfmt-install.patch b/meta/recipes-core/systemd/systemd/binfmt-install.patch
deleted file mode 100644
index 93b8e3cf3a..0000000000
--- a/meta/recipes-core/systemd/systemd/binfmt-install.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1Don't install dependency links at install time for the binfmt services, use
2[Install] blocks so that they get created when the service is enabled like a
3traditional service.
4
5The [Install] blocks were rejected upstream as they don't have a way to "enable"
6it on install without static symlinks which can't be disabled, only masked. We
7however can do that in a postinst.
8
9Upstream-Status: Denied
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12Index: git/Makefile.am
13===================================================================
14--- git.orig/Makefile.am
15+++ git/Makefile.am
16@@ -4495,10 +4495,6 @@
17 $(prefix)/lib/binfmt.d \
18 $(sysconfdir)/binfmt.d
19
20-SYSINIT_TARGET_WANTS += \
21- systemd-binfmt.service \
22- proc-sys-fs-binfmt_misc.automount
23-
24 endif
25
26 EXTRA_DIST += \
27Index: git/units/proc-sys-fs-binfmt_misc.automount
28===================================================================
29--- git.orig/units/proc-sys-fs-binfmt_misc.automount
30+++ git/units/proc-sys-fs-binfmt_misc.automount
31@@ -16,3 +16,6 @@
32
33 [Automount]
34 Where=/proc/sys/fs/binfmt_misc
35+
36+[Install]
37+WantedBy=sysinit.target
38Index: git/units/systemd-binfmt.service.in
39===================================================================
40--- git.orig/units/systemd-binfmt.service.in
41+++ git/units/systemd-binfmt.service.in
42@@ -11,6 +11,8 @@
43 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
44 DefaultDependencies=no
45 Conflicts=shutdown.target
46+Wants=proc-sys-fs-binfmt_misc.automount
47+
48 After=proc-sys-fs-binfmt_misc.automount
49 Before=sysinit.target shutdown.target
50 ConditionPathIsReadWrite=/proc/sys/
51@@ -24,3 +26,6 @@
52 Type=oneshot
53 RemainAfterExit=yes
54 ExecStart=@rootlibexecdir@/systemd-binfmt
55+
56+[Install]
57+WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
deleted file mode 100644
index 2063268246..0000000000
--- a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1on uclibc secure_getenv is not available
2therefore default to using getenv instead
3
4Upstream-Status: Denied [no desire for uclibc support]
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: git/src/shared/missing.h
8===================================================================
9--- git.orig/src/shared/missing.h 2012-09-22 18:46:44.141282145 -0700
10+++ git/src/shared/missing.h 2012-09-22 18:48:44.081276570 -0700
11@@ -233,6 +233,8 @@
12 #ifndef HAVE_SECURE_GETENV
13 # ifdef HAVE___SECURE_GETENV
14 # define secure_getenv __secure_getenv
15+# elif defined __UCLIBC__
16+# define secure_getenv getenv
17 # else
18 # error neither secure_getenv nor __secure_getenv are available
19 # endif
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
deleted file mode 100644
index 9b4c940984..0000000000
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Prefer getty to agetty in console setup systemd units
2
3Upstream-Status: Inappropriate [configuration specific]
4Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
5---
6 units/getty@.service.m4 | 2 +-
7 units/serial-getty@.service.m4 | 2 +-
8 2 files changed, 2 insertions(+), 2 deletions(-)
9
10Index: git/units/getty@.service.m4
11===================================================================
12--- git.orig/units/getty@.service.m4 2014-03-15 08:16:17.000000000 -0700
13+++ git/units/getty@.service.m4 2014-03-15 08:21:11.007695825 -0700
14@@ -27,7 +27,7 @@
15
16 [Service]
17 # the VT is cleared by TTYVTDisallocate
18-ExecStart=-/sbin/agetty --noclear %I $TERM
19+ExecStart=-/sbin/getty -L %I $TERM
20 Type=idle
21 Restart=always
22 RestartSec=0
23Index: git/units/serial-getty@.service.m4
24===================================================================
25--- git.orig/units/serial-getty@.service.m4 2014-03-15 08:16:17.000000000 -0700
26+++ git/units/serial-getty@.service.m4 2014-03-15 08:22:31.291697331 -0700
27@@ -22,7 +22,7 @@
28 IgnoreOnIsolate=yes
29
30 [Service]
31-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
32+ExecStart=-/sbin/getty -L 115200 %I $TERM
33 Type=idle
34 Restart=always
35 RestartSec=0
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
deleted file mode 100644
index 8c7aa072da..0000000000
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: git/src/shared/util.c
5===================================================================
6--- git.orig/src/shared/util.c 2014-03-15 15:14:21.368160908 -0700
7+++ git/src/shared/util.c 2014-03-15 15:44:21.988194688 -0700
8@@ -85,6 +85,8 @@
9 #include "def.h"
10 #include "missing.h"
11
12+#include "config.h"
13+
14 int saved_argc = 0;
15 char **saved_argv = NULL;
16
17@@ -6222,7 +6224,13 @@
18
19 u = umask(077);
20
21+#ifdef HAVE_MKOSTEMP
22 fd = mkostemp(pattern, flags);
23+#else
24+ fd = mkstemp(pattern);
25+ if (fd >= 0) fcntl(fd, F_SETFD, flags);
26+#endif /* HAVE_MKOSTEMP */
27+
28 if (fd < 0)
29 return -errno;
30
diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_219.bb
index 221c2cc75a..f45c5e1260 100644
--- a/meta/recipes-core/systemd/systemd_218.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -19,28 +19,28 @@ PROVIDES = "udev"
19 19
20PE = "1" 20PE = "1"
21 21
22DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux" 22DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native"
23DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 23DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
24 24
25SECTION = "base/shell" 25SECTION = "base/shell"
26 26
27inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext 27inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
28 28
29SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf" 29SRCREV = "a88abde72169ddc2df77df3fa5bed30725022253"
30 30
31PV = "218+git${SRCPV}" 31PV = "219+git${SRCPV}"
32 32
33SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \ 33SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \
34 file://binfmt-install.patch \ 34 file://0002-shared-missing.h-fall-back-to-insecure-getenv.patch \
35 file://systemd-pam-configure-check-uclibc.patch \ 35 file://0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
36 file://systemd-pam-fix-execvpe.patch \ 36 file://0004-configure-Check-for-additional-features-that-uclibc-.patch \
37 file://systemd-pam-fix-fallocate.patch \ 37 file://0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
38 file://systemd-pam-fix-mkostemp.patch \ 38 file://0006-journal-Use-posix-fallocate-only-if-available.patch \
39 file://optional_secure_getenv.patch \ 39 file://0007-util-Use-mkostemp-only-if-libc-supports-it.patch \
40 file://uclibc-get-physmem.patch \ 40 file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
41 file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \ 41 file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \
42 file://0001-Make-root-s-home-directory-configurable.patch \ 42 file://0010-Make-root-s-home-directory-configurable.patch \
43 file://0001-systemd-user-avoid-using-system-auth.patch \ 43 file://0011-systemd-user-avoid-using-system-auth.patch \
44 file://touchscreen.rules \ 44 file://touchscreen.rules \
45 file://00-create-volatile.conf \ 45 file://00-create-volatile.conf \
46 file://init \ 46 file://init \
@@ -50,8 +50,8 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
50S = "${WORKDIR}/git" 50S = "${WORKDIR}/git"
51 51
52SRC_URI_append_libc-uclibc = "\ 52SRC_URI_append_libc-uclibc = "\
53 file://systemd-pam-fix-getty-unit.patch \ 53 file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
54 " 54 "
55LDFLAGS_append_libc-uclibc = " -lrt" 55LDFLAGS_append_libc-uclibc = " -lrt"
56 56
57GTKDOC_DOCDIR = "${S}/docs/" 57GTKDOC_DOCDIR = "${S}/docs/"
@@ -127,6 +127,9 @@ do_install() {
127 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable 127 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
128 touch ${D}${sysconfdir}/machine-id 128 touch ${D}${sysconfdir}/machine-id
129 129
130
131 install -d ${D}${sysconfdir}/udev/rules.d/
132 install -d ${D}${sysconfdir}/tmpfiles.d
130 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ 133 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
131 134
132 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ 135 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
@@ -159,7 +162,9 @@ do_install() {
159 sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service 162 sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
160 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it 163 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
161 # for existence else it fails 164 # for existence else it fails
162 ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)} 165 if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
166 ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
167 fi
163} 168}
164 169
165do_install_ptest () { 170do_install_ptest () {