summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/systemd/systemd/0001-define-exp10-if-missing.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch22
-rw-r--r--meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch (renamed from meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0003-Use-getenv-when-secure-versions-are-not-available.patch (renamed from meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch)11
-rw-r--r--meta/recipes-core/systemd/systemd/0004-core-device.c-Change-the-default-device-timeout-to-2.patch (renamed from meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch)22
-rw-r--r--meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch (renamed from meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch)35
-rw-r--r--meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch (renamed from meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch)17
-rw-r--r--meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch96
-rw-r--r--meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch (renamed from meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch)31
-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.patch16
-rw-r--r--meta/recipes-core/systemd/systemd/0009-implment-systemd-sysv-install-for-OE.patch (renamed from meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch)15
-rw-r--r--meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch38
-rw-r--r--meta/recipes-core/systemd/systemd/0011-rules-whitelist-hd-devices.patch (renamed from meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0012-sysv-generator-add-support-for-executing-scripts-und.patch (renamed from meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch)68
-rw-r--r--meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch (renamed from meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch)147
-rw-r--r--meta/recipes-core/systemd/systemd/0014-systemd-user-avoid-using-system-auth.patch (renamed from meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch)25
-rw-r--r--meta/recipes-core/systemd/systemd/0015-Revert-rules-remove-firmware-loading-rules.patch (renamed from meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch (renamed from meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch)132
-rw-r--r--meta/recipes-core/systemd/systemd_228.bb (renamed from meta/recipes-core/systemd/systemd_225.bb)44
20 files changed, 371 insertions, 441 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-define-exp10-if-missing.patch b/meta/recipes-core/systemd/systemd/0001-define-exp10-if-missing.patch
new file mode 100644
index 0000000000..8bb775ffa5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-define-exp10-if-missing.patch
@@ -0,0 +1,33 @@
1From ddad25c809846e08ea39bef49cc668f95d53304a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 14 Dec 2015 00:42:49 +0000
4Subject: [PATCH 01/16] define exp10 if missing
5
6Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
7
8exp10 extension is not part of uClibc, so compute it.
9
10Upstream-Status: Pending
11
12Signed-off-by: Samuel Martin <s.martin49@gmail.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/basic/missing.h | 5 +++++
16 1 file changed, 5 insertions(+)
17
18diff --git a/src/basic/missing.h b/src/basic/missing.h
19index d539ed0..09a233b 100644
20--- a/src/basic/missing.h
21+++ b/src/basic/missing.h
22@@ -1125,3 +1125,8 @@ static inline key_serial_t request_key(const char *type, const char *description
23 #ifndef KEY_SPEC_USER_KEYRING
24 #define KEY_SPEC_USER_KEYRING -4
25 #endif
26+
27+#ifdef __UCLIBC__
28+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
29+#define exp10(x) (exp((x) * log(10)))
30+#endif /* __UCLIBC__ */
31--
322.6.4
33
diff --git a/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch b/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch
deleted file mode 100644
index 76ce4b7813..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
2
3exp10 extension is not part of uClibc, so compute it.
4
5
6Signed-off-by: Samuel Martin <s.martin49@gmail.com>
7
8Upstream-Status: Pending
9
10Index: git/src/basic/missing.h
11===================================================================
12--- git.orig/src/basic/missing.h
13+++ git/src/basic/missing.h
14@@ -1036,3 +1036,8 @@ static inline int kcmp(pid_t pid1, pid_t
15 #ifndef INPUT_PROP_ACCELEROMETER
16 #define INPUT_PROP_ACCELEROMETER 0x06
17 #endif
18+
19+#ifdef __UCLIBC__
20+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
21+#define exp10(x) (exp((x) * log(10)))
22+#endif /* __UCLIBC__ */
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/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
index b6ab5effc2..55ff0ce15f 100644
--- a/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch
+++ b/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
@@ -1,7 +1,7 @@
1From 100e50604efc4032001a2de6a6b47853c0003817 Mon Sep 17 00:00:00 2001 1From bfb6562cdbec73d03765ce707e9e0cac138fd223 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:29:15 +0000 3Date: Fri, 20 Feb 2015 05:29:15 +0000
4Subject: [PATCH 01/11] units: Prefer getty to agetty in console setup systemd 4Subject: [PATCH 02/16] units: Prefer getty to agetty in console setup systemd
5 units 5 units
6 6
7Upstream-Status: Inappropriate [configuration specific] 7Upstream-Status: Inappropriate [configuration specific]
@@ -40,5 +40,5 @@ index 4522d0d..e6d499d 100644
40 Restart=always 40 Restart=always
41 UtmpIdentifier=%I 41 UtmpIdentifier=%I
42-- 42--
432.1.4 432.6.4
44 44
diff --git a/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch b/meta/recipes-core/systemd/systemd/0003-Use-getenv-when-secure-versions-are-not-available.patch
index 5af78d5582..cbf69d109a 100644
--- a/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch
+++ b/meta/recipes-core/systemd/systemd/0003-Use-getenv-when-secure-versions-are-not-available.patch
@@ -1,7 +1,7 @@
1From cb71e4beea3b3b11e5951f95c829cd2eee9fcf7b Mon Sep 17 00:00:00 2001 1From 9e79bb4bea758f25803e9f7ff2c5835ac4204230 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Sep 2015 19:10:04 +0000 3Date: Sat, 12 Sep 2015 19:10:04 +0000
4Subject: [PATCH 22/31] Use getenv when secure versions are not available 4Subject: [PATCH 03/16] Use getenv when secure versions are not available
5 5
6musl doesnt implement secure version, so we default 6musl doesnt implement secure version, so we default
7to it if configure does not detect a secure imeplementation 7to it if configure does not detect a secure imeplementation
@@ -9,15 +9,14 @@ to it if configure does not detect a secure imeplementation
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Upstream-Status: Denied 10Upstream-Status: Denied
11--- 11---
12
13 src/basic/missing.h | 5 +++-- 12 src/basic/missing.h | 5 +++--
14 1 file changed, 3 insertions(+), 2 deletions(-) 13 1 file changed, 3 insertions(+), 2 deletions(-)
15 14
16diff --git a/src/basic/missing.h b/src/basic/missing.h 15diff --git a/src/basic/missing.h b/src/basic/missing.h
17index bf9b490..d6dbc7d 100644 16index 09a233b..3c37466 100644
18--- a/src/basic/missing.h 17--- a/src/basic/missing.h
19+++ b/src/basic/missing.h 18+++ b/src/basic/missing.h
20@@ -584,13 +584,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle 19@@ -582,13 +582,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
21 return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags); 20 return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
22 } 21 }
23 #endif 22 #endif
@@ -35,5 +34,5 @@ index bf9b490..d6dbc7d 100644
35 34
36 #ifndef CIFS_MAGIC_NUMBER 35 #ifndef CIFS_MAGIC_NUMBER
37-- 36--
382.5.2 372.6.4
39 38
diff --git a/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch b/meta/recipes-core/systemd/systemd/0004-core-device.c-Change-the-default-device-timeout-to-2.patch
index c7e171152a..74629fc82a 100644
--- a/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ b/meta/recipes-core/systemd/systemd/0004-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -1,23 +1,25 @@
1Upstream-Status: Inappropriate [Specific case QEMU/AB] 1From ef867afd27e8fed558e82430759d8d2c7efb6608 Mon Sep 17 00:00:00 2001
2 2From: Khem Raj <raj.khem@gmail.com>
3From 7b8c4e0a67a79a75e1bd77df3a452a5497322108 Mon Sep 17 00:00:00 2001 3Date: Mon, 14 Dec 2015 04:09:19 +0000
4From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> 4Subject: [PATCH 04/16] core/device.c: Change the default device timeout to 240
5Date: Thu, 27 Aug 2015 17:58:26 -0500 5 sec.
6Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
7MIME-Version: 1.0 6MIME-Version: 1.0
8Content-Type: text/plain; charset=UTF-8 7Content-Type: text/plain; charset=UTF-8
9Content-Transfer-Encoding: 8bit 8Content-Transfer-Encoding: 8bit
10 9
10Upstream-Status: Inappropriate [Specific case QEMU/AB]
11
11Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> 12Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
12--- 14---
13 src/core/device.c | 2 +- 15 src/core/device.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 16 1 file changed, 1 insertion(+), 1 deletion(-)
15 17
16diff --git a/src/core/device.c b/src/core/device.c 18diff --git a/src/core/device.c b/src/core/device.c
17index e7efcf0..4ed8f08 100644 19index bcd4d11..f41bb54 100644
18--- a/src/core/device.c 20--- a/src/core/device.c
19+++ b/src/core/device.c 21+++ b/src/core/device.c
20@@ -110,7 +110,7 @@ static void device_init(Unit *u) { 22@@ -114,7 +114,7 @@ static void device_init(Unit *u) {
21 * indefinitely for plugged in devices, something which cannot 23 * indefinitely for plugged in devices, something which cannot
22 * happen for the other units since their operations time out 24 * happen for the other units since their operations time out
23 * anyway. */ 25 * anyway. */
@@ -25,7 +27,7 @@ index e7efcf0..4ed8f08 100644
25+ u->job_timeout = (240 * USEC_PER_SEC); 27+ u->job_timeout = (240 * USEC_PER_SEC);
26 28
27 u->ignore_on_isolate = true; 29 u->ignore_on_isolate = true;
28 u->ignore_on_snapshot = true; 30 }
29-- 31--
301.9.1 322.6.4
31 33
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/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 0e20fd0548..0b75facbaa 100644
--- a/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ b/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -1,7 +1,7 @@
1From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001 1From 319873d22a6b1225ae41aa38bc976e723326ba20 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:03:44 +0000 3Date: Fri, 20 Feb 2015 05:03:44 +0000
4Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time 4Subject: [PATCH 05/16] binfmt: Don't install dependency links at install time
5 for the binfmt services 5 for the binfmt services
6 6
7use [Install] blocks so that they get created when the service is enabled 7use [Install] blocks so that they get created when the service is enabled
@@ -23,11 +23,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
23 units/systemd-binfmt.service.in | 5 +++++ 23 units/systemd-binfmt.service.in | 5 +++++
24 3 files changed, 8 insertions(+), 4 deletions(-) 24 3 files changed, 8 insertions(+), 4 deletions(-)
25 25
26Index: git/Makefile.am 26diff --git a/Makefile.am b/Makefile.am
27=================================================================== 27index 00a92e3..4c1143a 100644
28--- git.orig/Makefile.am 28--- a/Makefile.am
29+++ git/Makefile.am 29+++ b/Makefile.am
30@@ -4271,10 +4271,6 @@ INSTALL_DIRS += \ 30@@ -4455,10 +4455,6 @@ INSTALL_DIRS += \
31 $(prefix)/lib/binfmt.d \ 31 $(prefix)/lib/binfmt.d \
32 $(sysconfdir)/binfmt.d 32 $(sysconfdir)/binfmt.d
33 33
@@ -38,10 +38,10 @@ Index: git/Makefile.am
38 endif 38 endif
39 39
40 EXTRA_DIST += \ 40 EXTRA_DIST += \
41Index: git/units/proc-sys-fs-binfmt_misc.automount 41diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
42=================================================================== 42index 6be3893..709adef 100644
43--- git.orig/units/proc-sys-fs-binfmt_misc.automount 43--- a/units/proc-sys-fs-binfmt_misc.automount
44+++ git/units/proc-sys-fs-binfmt_misc.automount 44+++ b/units/proc-sys-fs-binfmt_misc.automount
45@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/ 45@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
46 46
47 [Automount] 47 [Automount]
@@ -49,11 +49,11 @@ Index: git/units/proc-sys-fs-binfmt_misc.automount
49+ 49+
50+[Install] 50+[Install]
51+WantedBy=sysinit.target 51+WantedBy=sysinit.target
52Index: git/units/systemd-binfmt.service.in 52diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
53=================================================================== 53index d53073e..8c57ee0 100644
54--- git.orig/units/systemd-binfmt.service.in 54--- a/units/systemd-binfmt.service.in
55+++ git/units/systemd-binfmt.service.in 55+++ b/units/systemd-binfmt.service.in
56@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service 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 57 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
58 DefaultDependencies=no 58 DefaultDependencies=no
59 Conflicts=shutdown.target 59 Conflicts=shutdown.target
@@ -69,3 +69,6 @@ Index: git/units/systemd-binfmt.service.in
69+ 69+
70+[Install] 70+[Install]
71+WantedBy=sysinit.target 71+WantedBy=sysinit.target
72--
732.6.4
74
diff --git a/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch b/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
index 8078da9bb4..a2c40b55f6 100644
--- a/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch
+++ b/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
@@ -1,7 +1,7 @@
1From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001 1From d1fe5d2dd38cdef984296f453c65ccaebb71d1a9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:05:45 +0000 3Date: Fri, 20 Feb 2015 05:05:45 +0000
4Subject: [PATCH 04/11] configure: Check for additional features that uclibc 4Subject: [PATCH 06/16] configure: Check for additional features that uclibc
5 doesnt support 5 doesnt support
6 6
7This helps in supporting uclibc which does not have all features that 7This helps in supporting uclibc which does not have all features that
@@ -14,11 +14,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 configure.ac | 18 ++++++++++++++++++ 14 configure.ac | 18 ++++++++++++++++++
15 1 file changed, 18 insertions(+) 15 1 file changed, 18 insertions(+)
16 16
17Index: git/configure.ac 17diff --git a/configure.ac b/configure.ac
18=================================================================== 18index 3128ca8..49f73a4 100644
19--- git.orig/configure.ac 19--- a/configure.ac
20+++ git/configure.ac 20+++ b/configure.ac
21@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/ 21@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
22 22
23 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) 23 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
24 24
@@ -43,3 +43,6 @@ Index: git/configure.ac
43 M4_DEFINES= 43 M4_DEFINES=
44 44
45 AC_CHECK_TOOL(OBJCOPY, objcopy) 45 AC_CHECK_TOOL(OBJCOPY, objcopy)
46--
472.6.4
48
diff --git a/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch b/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
deleted file mode 100644
index 631dd77465..0000000000
--- a/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
+++ /dev/null
@@ -1,96 +0,0 @@
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
7
8Upstream-Status: Denied [no desire for uclibc support]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12---
13 src/journal/journal-file.c | 16 +++++++++++++++-
14 src/journal/journald-kmsg.c | 15 ++++++++++++++-
15 2 files changed, 29 insertions(+), 2 deletions(-)
16
17diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
18index 2845e05..9431171 100644
19--- a/src/journal/journal-file.c
20+++ b/src/journal/journal-file.c
21@@ -36,6 +36,8 @@
22 #include "compress.h"
23 #include "fsprg.h"
24
25+#include "config.h"
26+
27 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
28 #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
29
30@@ -354,7 +356,7 @@ static int journal_file_fstat(JournalFile *f) {
31
32 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
33 uint64_t old_size, new_size;
34- int r;
35+ int r = 0;
36
37 assert(f);
38
39@@ -418,9 +420,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
40 /* Note that the glibc fallocate() fallback is very
41 inefficient, hence we try to minimize the allocation area
42 as we can. */
43+#ifdef HAVE_POSIX_FALLOCATE
44 r = posix_fallocate(f->fd, old_size, new_size - old_size);
45 if (r != 0)
46 return -r;
47+#else
48+ /* Write something every 512 bytes to make sure the block is allocated */
49+ uint64_t len = new_size - old_size;
50+ uint64_t offset = old_size;
51+ for (offset += (len-1) % 512; len > 0; offset += 512) {
52+ len -= 512;
53+ if (pwrite(f->fd, "", 1, offset) != 1)
54+ return -errno;
55+ }
56+
57+#endif /* HAVE_POSIX_FALLOCATE */
58
59 f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
60
61diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
62index c4216c4..a998ed5 100644
63--- a/src/journal/journald-kmsg.c
64+++ b/src/journal/journald-kmsg.c
65@@ -436,6 +436,7 @@ fail:
66 int server_open_kernel_seqnum(Server *s) {
67 _cleanup_close_ int fd;
68 uint64_t *p;
69+ int r = 0;
70
71 assert(s);
72
73@@ -449,7 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
74 return 0;
75 }
76
77- if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
78+#ifdef HAVE_POSIX_FALLOCATE
79+ r = posix_fallocate(fd, 0, sizeof(uint64_t));
80+#else
81+ /* Use good old method to write zeros into the journal file
82+ perhaps very inefficient yet working. */
83+ char *buf = alloca(sizeof(uint64_t));
84+ off_t oldpos = lseek(fd, 0, SEEK_CUR);
85+ bzero(buf, sizeof(uint64_t));
86+ lseek(fd, 0, SEEK_SET);
87+ r = write(fd, buf, sizeof(uint64_t));
88+ lseek(fd, oldpos, SEEK_SET);
89+#endif /* HAVE_POSIX_FALLOCATE */
90+ if (r < 0) {
91 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
92 return 0;
93 }
94--
952.1.4
96
diff --git a/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch
index 55a0088c65..85d39078ff 100644
--- a/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
+++ b/meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch
@@ -1,7 +1,7 @@
1From a7417c2e6950d55c22c1b0d15783898b8ff229ef Mon Sep 17 00:00:00 2001 1From 529e7e2f7f6a5dc0e4527ff5c2237b19ece2f112 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:10:37 +0000 3Date: Fri, 20 Feb 2015 05:10:37 +0000
4Subject: [PATCH 05/11] nspawn: Use execvpe only when libc supports it 4Subject: [PATCH 07/16] nspawn: Use execvpe only when libc supports it
5 5
6Upstream-Status: Denied [no desire for uclibc support] 6Upstream-Status: Denied [no desire for uclibc support]
7 7
@@ -10,29 +10,32 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
10 src/nspawn/nspawn.c | 7 +++++++ 10 src/nspawn/nspawn.c | 7 +++++++
11 1 file changed, 7 insertions(+) 11 1 file changed, 7 insertions(+)
12 12
13Index: git/src/nspawn/nspawn.c 13diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
14=================================================================== 14index a4e13bd..4def6ba 100644
15--- git.orig/src/nspawn/nspawn.c 15--- a/src/nspawn/nspawn.c
16+++ git/src/nspawn/nspawn.c 16+++ b/src/nspawn/nspawn.c
17@@ -143,6 +143,8 @@ typedef struct CustomMount { 17@@ -112,6 +112,8 @@ typedef enum LinkJournal {
18 char **lower; 18 LINK_GUEST
19 } CustomMount; 19 } LinkJournal;
20 20
21+#include "config.h" 21+#include "config.h"
22+ 22+
23 static char *arg_directory = NULL; 23 static char *arg_directory = NULL;
24 static char *arg_template = NULL; 24 static char *arg_template = NULL;
25 static char *arg_user = NULL; 25 static char *arg_user = NULL;
26@@ -4238,7 +4240,12 @@ static int inner_child( 26@@ -2595,7 +2597,12 @@ static int inner_child(
27 a[0] = (char*) "/sbin/init"; 27 a[0] = (char*) "/sbin/init";
28 execve(a[0], a, env_use); 28 execve(a[0], a, env_use);
29 } else if (argc > optind) 29 } else if (!strv_isempty(arg_parameters))
30+#ifdef HAVE_EXECVPE 30+#ifdef HAVE_EXECVPE
31 execvpe(argv[optind], argv + optind, env_use); 31 execvpe(arg_parameters[0], arg_parameters, env_use);
32+#else 32+#else
33+ environ = env_use; 33+ environ = env_use;
34+ execvp(argv[optind], argv + optind); 34+ execvp(arg_parameters[0], arg_parameters);
35+#endif /* HAVE_EXECVPE */ 35+#endif /* HAVE_EXECVPE */
36 else { 36 else {
37 chdir(home ? home : "/root"); 37 chdir(home ?: "/root");
38 execle("/bin/bash", "-bash", NULL, env_use); 38 execle("/bin/bash", "-bash", NULL, env_use);
39--
402.6.4
41
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
deleted file mode 100644
index b8ab7c4e70..0000000000
--- a/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
+++ /dev/null
@@ -1,42 +0,0 @@
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/basic/util.c | 8 ++++++++
11 1 file changed, 8 insertions(+)
12
13diff --git a/src/basic/util.c b/src/basic/util.c
14index dc65280..72f4665 100644
15--- a/src/basic/util.c
16+++ b/src/basic/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/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
index 3f4d4de080..8d71ecbc0f 100644
--- a/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
+++ b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
@@ -1,7 +1,7 @@
1From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001 1From 83944758dc0703afea81f3c7aa0ad926bc5df757 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:19:37 +0000 3Date: Mon, 14 Dec 2015 00:47:53 +0000
4Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system 4Subject: [PATCH 08/16] util: bypass unimplemented _SC_PHYS_PAGES system
5 configuration API on uclibc 5 configuration API on uclibc
6 6
7Upstream-Status: Inappropriate [uclibc-specific] 7Upstream-Status: Inappropriate [uclibc-specific]
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 1 file changed, 15 insertions(+) 12 1 file changed, 15 insertions(+)
13 13
14diff --git a/src/basic/util.c b/src/basic/util.c 14diff --git a/src/basic/util.c b/src/basic/util.c
15index 72f4665..cbbe3b1 100644 15index 9e0b576..65f0edf 100644
16--- a/src/basic/util.c 16--- a/src/basic/util.c
17+++ b/src/basic/util.c 17+++ b/src/basic/util.c
18@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) { 18@@ -769,10 +769,25 @@ uint64_t physical_memory(void) {
19 /* 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
20 * process on a 64bit kernel with huge amounts of memory */ 20 * process on a 64bit kernel with huge amounts of memory */
21 21
@@ -25,7 +25,7 @@ index 72f4665..cbbe3b1 100644
25+ if (f == NULL) 25+ if (f == NULL)
26+ return 0; 26+ return 0;
27+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) { 27+ while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
28+ if (sscanf(line, "MemTotal: %l kB", &mem) == 1) { 28+ if (sscanf(line, "MemTotal: %li kB", &mem) == 1) {
29+ mem *= 1024; 29+ mem *= 1024;
30+ break; 30+ break;
31+ } 31+ }
@@ -40,7 +40,7 @@ index 72f4665..cbbe3b1 100644
40+#endif 40+#endif
41 } 41 }
42 42
43 void hexdump(FILE *f, const void *p, size_t s) { 43 int update_reboot_param_file(const char *param) {
44-- 44--
452.1.4 452.6.4
46 46
diff --git a/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0009-implment-systemd-sysv-install-for-OE.patch
index 68b45a9a58..a1396849c4 100644
--- a/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch
+++ b/meta/recipes-core/systemd/systemd/0009-implment-systemd-sysv-install-for-OE.patch
@@ -1,7 +1,7 @@
1From 5f8b9f2d276c0ddbcbf5423733a23f043d688009 Mon Sep 17 00:00:00 2001 1From 81c3d92b5bc5786cbd93b1e5ed82884e8caf2254 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 5 Sep 2015 06:31:47 +0000 3Date: Sat, 5 Sep 2015 06:31:47 +0000
4Subject: [PATCH] implment systemd-sysv-install for OE 4Subject: [PATCH 09/16] implment systemd-sysv-install for OE
5 5
6Use update-rc.d for enabling/disabling and status command 6Use update-rc.d for enabling/disabling and status command
7to check the status of the sysv service 7to check the status of the sysv service
@@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 src/systemctl/systemd-sysv-install.SKELETON | 6 +++--- 13 src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-) 14 1 file changed, 3 insertions(+), 3 deletions(-)
15 15
16Index: git/src/systemctl/systemd-sysv-install.SKELETON 16diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
17=================================================================== 17index a53a3e6..5d877b0 100755
18--- git.orig/src/systemctl/systemd-sysv-install.SKELETON 18--- a/src/systemctl/systemd-sysv-install.SKELETON
19+++ git/src/systemctl/systemd-sysv-install.SKELETON 19+++ b/src/systemctl/systemd-sysv-install.SKELETON
20@@ -30,17 +30,17 @@ case "$1" in 20@@ -30,17 +30,17 @@ case "$1" in
21 enable) 21 enable)
22 # call the command to enable SysV init script $NAME here 22 # call the command to enable SysV init script $NAME here
@@ -38,3 +38,6 @@ Index: git/src/systemctl/systemd-sysv-install.SKELETON
38 ;; 38 ;;
39 *) 39 *)
40 usage ;; 40 usage ;;
41--
422.6.4
43
diff --git a/meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
new file mode 100644
index 0000000000..8cec071244
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
@@ -0,0 +1,38 @@
1From d4b7f9b771a538c2356c4c77461f3b4790043556 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 14 Dec 2015 00:50:01 +0000
4Subject: [PATCH 10/16] nss-mymachines: Build conditionally when
5 HAVE_MYHOSTNAME is set
6
7Fixes build failures when building with --disable-myhostname
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 Makefile.am | 2 ++
14 1 file changed, 2 insertions(+)
15
16diff --git a/Makefile.am b/Makefile.am
17index 4c1143a..cf559be 100644
18--- a/Makefile.am
19+++ b/Makefile.am
20@@ -4961,6 +4961,7 @@ SYSTEM_UNIT_ALIASES += \
21 BUSNAMES_TARGET_WANTS += \
22 org.freedesktop.machine1.busname
23
24+if HAVE_MYHOSTNAME
25 libnss_mymachines_la_SOURCES = \
26 src/nss-mymachines/nss-mymachines.sym \
27 src/nss-mymachines/nss-mymachines.c
28@@ -4981,6 +4982,7 @@ lib_LTLIBRARIES += \
29 libnss_mymachines.la
30
31 endif
32+endif
33
34 polkitpolicy_in_files += \
35 src/machine/org.freedesktop.machine1.policy.in
36--
372.6.4
38
diff --git a/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch b/meta/recipes-core/systemd/systemd/0011-rules-whitelist-hd-devices.patch
index 8975b05e01..03fdbff316 100644
--- a/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch
+++ b/meta/recipes-core/systemd/systemd/0011-rules-whitelist-hd-devices.patch
@@ -1,7 +1,7 @@
1From f77b7e5626e70c3a775e993816a33af5a61dea42 Mon Sep 17 00:00:00 2001 1From ae6c9dcb00919e1dd2793fd1b82125d123f69a90 Mon Sep 17 00:00:00 2001
2From: Patrick Ohly <patrick.ohly@intel.com> 2From: Patrick Ohly <patrick.ohly@intel.com>
3Date: Wed, 16 Sep 2015 13:55:58 +0200 3Date: Wed, 16 Sep 2015 13:55:58 +0200
4Subject: [PATCH] rules: whitelist hd* devices 4Subject: [PATCH 11/16] rules: whitelist hd* devices
5 5
6qemu by default emulates IDE and the linux-yocto kernel(s) use 6qemu by default emulates IDE and the linux-yocto kernel(s) use
7CONFIG_IDE instead of the more modern libsata, so disks appear as 7CONFIG_IDE instead of the more modern libsata, so disks appear as
@@ -28,5 +28,5 @@ index 0b14bb4..1c4d97a 100644
28 # ignore partitions that span the entire disk 28 # ignore partitions that span the entire disk
29 TEST=="whole_disk", GOTO="persistent_storage_end" 29 TEST=="whole_disk", GOTO="persistent_storage_end"
30-- 30--
312.1.4 312.6.4
32 32
diff --git a/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch b/meta/recipes-core/systemd/systemd/0012-sysv-generator-add-support-for-executing-scripts-und.patch
index 9ea3e83e52..82feff0eb9 100644
--- a/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch
+++ b/meta/recipes-core/systemd/systemd/0012-sysv-generator-add-support-for-executing-scripts-und.patch
@@ -1,7 +1,7 @@
1From 8791b5b3934c55694872b6915a67340683ead91b Mon Sep 17 00:00:00 2001 1From 9e6c907ff1f17deb96c66a607653db4c7da34289 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:22:52 +0000 3Date: Mon, 14 Dec 2015 05:09:53 +0000
4Subject: [PATCH 09/11] sysv-generator: add support for executing scripts under 4Subject: [PATCH 12/16] sysv-generator: add support for executing scripts under
5 /etc/rcS.d/ 5 /etc/rcS.d/
6 6
7To 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
@@ -12,14 +12,14 @@ Upstream-Status: Inappropriate [OE specific]
12Signed-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> 13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14--- 14---
15 src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- 15 src/sysv-generator/sysv-generator.c | 50 +++++++++++++++++++++++++++++--------
16 1 file changed, 38 insertions(+), 12 deletions(-) 16 1 file changed, 39 insertions(+), 11 deletions(-)
17 17
18diff --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
19index bd67f32..6756cc6 100644 19index 5075548..32d3687 100644
20--- a/src/sysv-generator/sysv-generator.c 20--- a/src/sysv-generator/sysv-generator.c
21+++ b/src/sysv-generator/sysv-generator.c 21+++ b/src/sysv-generator/sysv-generator.c
22@@ -42,7 +42,8 @@ 22@@ -46,7 +46,8 @@
23 23
24 typedef enum RunlevelType { 24 typedef enum RunlevelType {
25 RUNLEVEL_UP, 25 RUNLEVEL_UP,
@@ -29,7 +29,7 @@ index bd67f32..6756cc6 100644
29 } RunlevelType; 29 } RunlevelType;
30 30
31 static const struct { 31 static const struct {
32@@ -57,6 +58,9 @@ static const struct { 32@@ -61,6 +62,9 @@ static const struct {
33 { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP }, 33 { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
34 { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP }, 34 { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP },
35 35
@@ -39,7 +39,7 @@ index bd67f32..6756cc6 100644
39 /* Standard SysV runlevels for shutdown */ 39 /* Standard SysV runlevels for shutdown */
40 { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, 40 { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN },
41 { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } 41 { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN }
42@@ -65,7 +69,7 @@ static const struct { 42@@ -69,7 +73,7 @@ static const struct {
43 directories in this order, and we want to make sure that 43 directories in this order, and we want to make sure that
44 sysv_start_priority is known when we first load the 44 sysv_start_priority is known when we first load the
45 unit. And that value we only know from S links. Hence 45 unit. And that value we only know from S links. Hence
@@ -47,19 +47,19 @@ index bd67f32..6756cc6 100644
47+ UP/SYSINIT must be read before DOWN */ 47+ UP/SYSINIT must be read before DOWN */
48 }; 48 };
49 49
50 typedef struct SysvStub { 50 const char *arg_dest = "/tmp";
51@@ -81,6 +85,8 @@ typedef struct SysvStub { 51@@ -88,6 +92,8 @@ typedef struct SysvStub {
52 char **conflicts;
53 bool has_lsb; 52 bool has_lsb;
54 bool reload; 53 bool reload;
54 bool loaded;
55+ bool default_dependencies; 55+ bool default_dependencies;
56+ bool from_rcsd; 56+ bool from_rcsd;
57 } SysvStub; 57 } SysvStub;
58 58
59 const char *arg_dest = "/tmp"; 59 static void free_sysvstub(SysvStub *s) {
60@@ -183,6 +189,9 @@ static int generate_unit_file(SysvStub *s) { 60@@ -204,6 +210,9 @@ static int generate_unit_file(SysvStub *s) {
61 "Description=%s\n", 61 if (s->description)
62 s->path, s->description); 62 fprintf(f, "Description=%s\n", s->description);
63 63
64+ if (!s->default_dependencies) 64+ if (!s->default_dependencies)
65+ fprintf(f, "DefaultDependencies=no\n"); 65+ fprintf(f, "DefaultDependencies=no\n");
@@ -67,7 +67,7 @@ index bd67f32..6756cc6 100644
67 if (!isempty(before)) 67 if (!isempty(before))
68 fprintf(f, "Before=%s\n", before); 68 fprintf(f, "Before=%s\n", before);
69 if (!isempty(after)) 69 if (!isempty(after))
70@@ -704,18 +713,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { 70@@ -722,17 +731,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
71 if (s->has_lsb && other->has_lsb) 71 if (s->has_lsb && other->has_lsb)
72 continue; 72 continue;
73 73
@@ -79,15 +79,14 @@ index bd67f32..6756cc6 100644
79+ r = strv_extend(&s->before, other->name); 79+ r = strv_extend(&s->before, other->name);
80 if (r < 0) 80 if (r < 0)
81 return log_oom(); 81 return log_oom();
82- } 82
83- else if (other->sysv_start_priority > s->sysv_start_priority) { 83- } else if (other->sysv_start_priority > s->sysv_start_priority) {
84- r = strv_extend(&s->before, other->name); 84- r = strv_extend(&s->before, other->name);
85+ } else if (other->from_rcsd && !s->from_rcsd) { 85+ } else if (other->from_rcsd && !s->from_rcsd) {
86+ r = strv_extend(&s->after, other->name); 86+ r = strv_extend(&s->after, other->name);
87 if (r < 0) 87 if (r < 0)
88 return log_oom(); 88 return log_oom();
89- } 89- } else
90- else
91- continue; 90- continue;
92+ } else { 91+ } else {
93+ if (other->sysv_start_priority < s->sysv_start_priority) { 92+ if (other->sysv_start_priority < s->sysv_start_priority) {
@@ -102,11 +101,11 @@ index bd67f32..6756cc6 100644
102+ } 101+ }
103+ else 102+ else
104+ continue; 103+ continue;
105+ } 104+ }
106 105
107 /* FIXME: Maybe we should compare the name here lexicographically? */ 106 /* FIXME: Maybe we should compare the name here lexicographically? */
108 } 107 }
109@@ -778,6 +799,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { 108@@ -799,6 +822,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
110 return log_oom(); 109 return log_oom();
111 110
112 service->sysv_start_priority = -1; 111 service->sysv_start_priority = -1;
@@ -114,22 +113,23 @@ index bd67f32..6756cc6 100644
114+ service->from_rcsd = false; 113+ service->from_rcsd = false;
115 service->name = name; 114 service->name = name;
116 service->path = fpath; 115 service->path = fpath;
117 116 name = fpath = NULL;
118@@ -864,9 +887,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { 117@@ -882,9 +907,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
119 118
120 if (de->d_name[0] == 'S') { 119 if (de->d_name[0] == 'S') {
121 120
122- if (rcnd_table[i].type == RUNLEVEL_UP) { 121- if (rcnd_table[i].type == RUNLEVEL_UP)
123+ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) { 122+ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
124 service->sysv_start_priority = 123 service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
125 MAX(a*10 + b, service->sysv_start_priority); 124-
126+ service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true; 125+ service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
127+ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; 126+ service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
128 } 127+ }
129
130 r = set_ensure_allocated(&runlevel_services[i], NULL); 128 r = set_ensure_allocated(&runlevel_services[i], NULL);
131@@ -878,7 +903,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { 129 if (r < 0) {
132 goto finish; 130 log_oom();
131@@ -898,7 +925,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
132 }
133 133
134 } else if (de->d_name[0] == 'K' && 134 } else if (de->d_name[0] == 'K' &&
135- (rcnd_table[i].type == RUNLEVEL_DOWN)) { 135- (rcnd_table[i].type == RUNLEVEL_DOWN)) {
@@ -137,7 +137,7 @@ index bd67f32..6756cc6 100644
137+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) { 137+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
138 138
139 r = set_ensure_allocated(&shutdown_services, NULL); 139 r = set_ensure_allocated(&shutdown_services, NULL);
140 if (r < 0) 140 if (r < 0) {
141-- 141--
1422.1.4 1422.6.4
143 143
diff --git a/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch
index ed7ff5b09c..ea0b3e250f 100644
--- a/meta/recipes-core/systemd/systemd/0010-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 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001 1From 1ba00ff6ed3f0626892f57cdd8d9788692c7bf14 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:24:49 +0000 3Date: Mon, 14 Dec 2015 05:18:20 +0000
4Subject: [PATCH 10/11] Make root's home directory configurable 4Subject: [PATCH 13/16] 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
@@ -17,19 +17,19 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
17--- 17---
18 Makefile.am | 2 ++ 18 Makefile.am | 2 ++
19 configure.ac | 7 +++++++ 19 configure.ac | 7 +++++++
20 src/core/unit-printf.c | 2 +- 20 src/basic/user-util.c | 4 ++--
21 src/core/namespace.c | 2 +-
21 src/nspawn/nspawn.c | 4 ++-- 22 src/nspawn/nspawn.c | 4 ++--
22 src/basic/util.c | 4 ++--
23 units/console-shell.service.m4.in | 4 ++-- 23 units/console-shell.service.m4.in | 4 ++--
24 units/emergency.service.in | 4 ++-- 24 units/emergency.service.in | 4 ++--
25 units/rescue.service.in | 4 ++-- 25 units/rescue.service.in | 4 ++--
26 8 files changed, 20 insertions(+), 11 deletions(-) 26 8 files changed, 20 insertions(+), 11 deletions(-)
27 27
28Index: git/Makefile.am 28diff --git a/Makefile.am b/Makefile.am
29=================================================================== 29index cf559be..a511c3d 100644
30--- git.orig/Makefile.am 30--- a/Makefile.am
31+++ git/Makefile.am 31+++ b/Makefile.am
32@@ -208,6 +208,7 @@ AM_CPPFLAGS = \ 32@@ -210,6 +210,7 @@ AM_CPPFLAGS = \
33 -DLIBDIR=\"$(libdir)\" \ 33 -DLIBDIR=\"$(libdir)\" \
34 -DROOTLIBDIR=\"$(rootlibdir)\" \ 34 -DROOTLIBDIR=\"$(rootlibdir)\" \
35 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ 35 -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
@@ -37,7 +37,7 @@ Index: git/Makefile.am
37 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ 37 -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
38 -I $(top_srcdir)/src \ 38 -I $(top_srcdir)/src \
39 -I $(top_builddir)/src/basic \ 39 -I $(top_builddir)/src/basic \
40@@ -5615,6 +5616,7 @@ EXTRA_DIST += \ 40@@ -5876,6 +5877,7 @@ EXTRA_DIST += \
41 substitutions = \ 41 substitutions = \
42 '|rootlibexecdir=$(rootlibexecdir)|' \ 42 '|rootlibexecdir=$(rootlibexecdir)|' \
43 '|rootbindir=$(rootbindir)|' \ 43 '|rootbindir=$(rootbindir)|' \
@@ -45,11 +45,11 @@ Index: git/Makefile.am
45 '|bindir=$(bindir)|' \ 45 '|bindir=$(bindir)|' \
46 '|SYSTEMCTL=$(rootbindir)/systemctl|' \ 46 '|SYSTEMCTL=$(rootbindir)/systemctl|' \
47 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ 47 '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
48Index: git/configure.ac 48diff --git a/configure.ac b/configure.ac
49=================================================================== 49index 49f73a4..a3e639d 100644
50--- git.orig/configure.ac 50--- a/configure.ac
51+++ git/configure.ac 51+++ b/configure.ac
52@@ -1383,6 +1383,11 @@ AC_ARG_WITH([rootlibdir], 52@@ -1434,6 +1434,11 @@ AC_ARG_WITH([rootlibdir],
53 [with_rootlibdir=${libdir}]) 53 [with_rootlibdir=${libdir}])
54 AX_NORMALIZE_PATH([with_rootlibdir]) 54 AX_NORMALIZE_PATH([with_rootlibdir])
55 55
@@ -61,7 +61,7 @@ Index: git/configure.ac
61 AC_ARG_WITH([pamlibdir], 61 AC_ARG_WITH([pamlibdir],
62 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), 62 AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
63 [], 63 [],
64@@ -1474,6 +1479,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) 64@@ -1517,6 +1522,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
65 AC_SUBST([pamconfdir], [$with_pamconfdir]) 65 AC_SUBST([pamconfdir], [$with_pamconfdir])
66 AC_SUBST([rootprefix], [$with_rootprefix]) 66 AC_SUBST([rootprefix], [$with_rootprefix])
67 AC_SUBST([rootlibdir], [$with_rootlibdir]) 67 AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -69,7 +69,7 @@ Index: git/configure.ac
69 69
70 AC_CONFIG_FILES([ 70 AC_CONFIG_FILES([
71 Makefile 71 Makefile
72@@ -1563,6 +1569,7 @@ AC_MSG_RESULT([ 72@@ -1606,6 +1612,7 @@ AC_MSG_RESULT([
73 includedir: ${includedir} 73 includedir: ${includedir}
74 lib dir: ${libdir} 74 lib dir: ${libdir}
75 rootlib dir: ${with_rootlibdir} 75 rootlib dir: ${with_rootlibdir}
@@ -77,46 +77,11 @@ Index: git/configure.ac
77 SysV init scripts: ${SYSTEM_SYSVINIT_PATH} 77 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
78 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} 78 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
79 Build Python: ${PYTHON} 79 Build Python: ${PYTHON}
80Index: git/src/core/unit-printf.c 80diff --git a/src/basic/user-util.c b/src/basic/user-util.c
81=================================================================== 81index 56e1a3b..c3d0ec3 100644
82--- git.orig/src/core/unit-printf.c 82--- a/src/basic/user-util.c
83+++ git/src/core/unit-printf.c 83+++ b/src/basic/user-util.c
84@@ -237,7 +237,7 @@ static int specifier_user_home(char spec 84@@ -124,7 +124,7 @@ int get_user_creds(
85 * best of it if we can, but fail if we can't */
86
87 if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
88- n = strdup("/root");
89+ n = strdup(ROOTHOMEDIR);
90 else
91 return -EOPNOTSUPP;
92
93Index: git/src/nspawn/nspawn.c
94===================================================================
95--- git.orig/src/nspawn/nspawn.c
96+++ git/src/nspawn/nspawn.c
97@@ -4176,7 +4176,7 @@ static int inner_child(
98 if (envp[n_env])
99 n_env ++;
100
101- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
102+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
103 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
104 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
105 return log_oom();
106@@ -4247,7 +4247,7 @@ static int inner_child(
107 execvp(argv[optind], argv + optind);
108 #endif /* HAVE_EXECVPE */
109 else {
110- chdir(home ? home : "/root");
111+ chdir(home ? home : ROOTHOMEDIR);
112 execle("/bin/bash", "-bash", NULL, env_use);
113 execle("/bin/sh", "-sh", NULL, env_use);
114 }
115Index: git/src/basic/util.c
116===================================================================
117--- git.orig/src/basic/util.c
118+++ git/src/basic/util.c
119@@ -3233,7 +3233,7 @@ int get_user_creds(
120 *gid = 0; 85 *gid = 0;
121 86
122 if (home) 87 if (home)
@@ -125,7 +90,7 @@ Index: git/src/basic/util.c
125 90
126 if (shell) 91 if (shell)
127 *shell = "/bin/sh"; 92 *shell = "/bin/sh";
128@@ -4069,7 +4069,7 @@ int get_home_dir(char **_h) { 93@@ -355,7 +355,7 @@ int get_home_dir(char **_h) {
129 /* Hardcode home directory for root to avoid NSS */ 94 /* Hardcode home directory for root to avoid NSS */
130 u = getuid(); 95 u = getuid();
131 if (u == 0) { 96 if (u == 0) {
@@ -134,10 +99,45 @@ Index: git/src/basic/util.c
134 if (!h) 99 if (!h)
135 return -ENOMEM; 100 return -ENOMEM;
136 101
137Index: git/units/console-shell.service.m4.in 102diff --git a/src/core/namespace.c b/src/core/namespace.c
138=================================================================== 103index 81ba09e..1a1f276 100644
139--- git.orig/units/console-shell.service.m4.in 104--- a/src/core/namespace.c
140+++ git/units/console-shell.service.m4.in 105+++ b/src/core/namespace.c
106@@ -494,7 +494,7 @@ int setup_namespace(
107 home_dir = strjoina("-", home_dir);
108 run_user_dir = prefix_roota(root_directory, "/run/user");
109 run_user_dir = strjoina("-", run_user_dir);
110- root_dir = prefix_roota(root_directory, "/root");
111+ root_dir = prefix_roota(root_directory, ROOTHOMEDIR);
112 root_dir = strjoina("-", root_dir);
113
114 r = append_mounts(&m, STRV_MAKE(home_dir, run_user_dir, root_dir),
115diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
116index 4def6ba..2081953 100644
117--- a/src/nspawn/nspawn.c
118+++ b/src/nspawn/nspawn.c
119@@ -2530,7 +2530,7 @@ static int inner_child(
120 if (envp[n_env])
121 n_env ++;
122
123- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
124+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
125 (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
126 (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
127 return log_oom();
128@@ -2604,7 +2604,7 @@ static int inner_child(
129 execvp(arg_parameters[0], arg_parameters);
130 #endif /* HAVE_EXECVPE */
131 else {
132- chdir(home ?: "/root");
133+ chdir(home ?: ROOTHOMEDIR);
134 execle("/bin/bash", "-bash", NULL, env_use);
135 execle("/bin/sh", "-sh", NULL, env_use);
136 }
137diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
138index 5c80722..efde5f0 100644
139--- a/units/console-shell.service.m4.in
140+++ b/units/console-shell.service.m4.in
141@@ -15,8 +15,8 @@ After=rc-local.service 141@@ -15,8 +15,8 @@ After=rc-local.service
142 Before=getty.target 142 Before=getty.target
143 143
@@ -149,10 +149,10 @@ Index: git/units/console-shell.service.m4.in
149 ExecStart=-@SULOGIN@ 149 ExecStart=-@SULOGIN@
150 ExecStopPost=-@SYSTEMCTL@ poweroff 150 ExecStopPost=-@SYSTEMCTL@ poweroff
151 Type=idle 151 Type=idle
152Index: git/units/emergency.service.in 152diff --git a/units/emergency.service.in b/units/emergency.service.in
153=================================================================== 153index 8dc3cbd..eb046c2 100644
154--- git.orig/units/emergency.service.in 154--- a/units/emergency.service.in
155+++ git/units/emergency.service.in 155+++ b/units/emergency.service.in
156@@ -14,8 +14,8 @@ Conflicts=rescue.service 156@@ -14,8 +14,8 @@ Conflicts=rescue.service
157 Before=shutdown.target 157 Before=shutdown.target
158 158
@@ -164,11 +164,11 @@ Index: git/units/emergency.service.in
164 ExecStartPre=-/bin/plymouth --wait quit 164 ExecStartPre=-/bin/plymouth --wait quit
165 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.' 165 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.'
166 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" 166 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
167Index: git/units/rescue.service.in 167diff --git a/units/rescue.service.in b/units/rescue.service.in
168=================================================================== 168index 432e4f3..afa3e82 100644
169--- git.orig/units/rescue.service.in 169--- a/units/rescue.service.in
170+++ git/units/rescue.service.in 170+++ b/units/rescue.service.in
171@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.serv 171@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
172 Before=shutdown.target 172 Before=shutdown.target
173 173
174 [Service] 174 [Service]
@@ -179,3 +179,6 @@ Index: git/units/rescue.service.in
179 ExecStartPre=-/bin/plymouth quit 179 ExecStartPre=-/bin/plymouth quit
180 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.' 180 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.'
181 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" 181 ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
182--
1832.6.4
184
diff --git a/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0014-systemd-user-avoid-using-system-auth.patch
index e562bca100..11be097661 100644
--- a/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch
+++ b/meta/recipes-core/systemd/systemd/0014-systemd-user-avoid-using-system-auth.patch
@@ -1,7 +1,7 @@
1From 7e202f71785bf5a67c8a4f6b58d3585608fbfdc4 Mon Sep 17 00:00:00 2001 1From 548a8d5d456c531444498b3ce8cec3f3dd374cf8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:26:25 +0000 3Date: Fri, 20 Feb 2015 05:26:25 +0000
4Subject: [PATCH 11/11] systemd-user: avoid using system-auth 4Subject: [PATCH 14/16] systemd-user: avoid using system-auth
5 5
6In 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.
7So modify systemd-user file to use common-* files. 7So modify systemd-user file to use common-* files.
@@ -11,21 +11,26 @@ Upstream-Status: Inappropriate [oe specific]
11Signed-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> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13--- 13---
14 src/login/systemd-user | 4 ++-- 14 src/login/systemd-user.m4 | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-) 15 1 file changed, 2 insertions(+), 2 deletions(-)
16 16
17diff --git a/src/login/systemd-user b/src/login/systemd-user 17diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4
18index 8112d74..99635af 100644 18index 7933508..16b73d2 100644
19--- a/src/login/systemd-user 19--- a/src/login/systemd-user.m4
20+++ b/src/login/systemd-user 20+++ b/src/login/systemd-user.m4
21@@ -2,5 +2,5 @@ 21@@ -2,10 +2,10 @@
22 # 22 #
23 # Used by systemd --user instances. 23 # Used by systemd --user instances.
24 24
25-account include system-auth 25-account include system-auth
26-session include system-auth
27+account include common-account 26+account include common-account
27
28 m4_ifdef(`HAVE_SELINUX',
29 session required pam_selinux.so close
30 session required pam_selinux.so nottys open
31 )m4_dnl
32-session include system-auth
28+session include common-session 33+session include common-session
29-- 34--
302.1.4 352.6.4
31 36
diff --git a/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/meta/recipes-core/systemd/systemd/0015-Revert-rules-remove-firmware-loading-rules.patch
index fe2ba5328d..7cc3922cd9 100644
--- a/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
+++ b/meta/recipes-core/systemd/systemd/0015-Revert-rules-remove-firmware-loading-rules.patch
@@ -1,7 +1,7 @@
1From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001 1From 6b2b8d20f884bd5a3d928175e422023f6c9d056b Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com> 2From: Jonathan Liu <net147@gmail.com>
3Date: Thu, 19 Mar 2015 15:01:29 +1100 3Date: Thu, 19 Mar 2015 15:01:29 +1100
4Subject: [PATCH] Revert "rules: remove firmware loading rules" 4Subject: [PATCH 15/16] Revert "rules: remove firmware loading rules"
5 5
6This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19. 6This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
7Userspace firmware loading support is needed for Linux < 3.7. 7Userspace firmware loading support is needed for Linux < 3.7.
@@ -24,5 +24,5 @@ index 0000000..f0ae684
24+ 24+
25+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware" 25+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
26-- 26--
272.3.3 272.6.4
28 28
diff --git a/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/meta/recipes-core/systemd/systemd/0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch
index 6308cc73ab..03ab0d459e 100644
--- a/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ b/meta/recipes-core/systemd/systemd/0016-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -1,7 +1,8 @@
1From 7f074def4e32045353ba4336d703e17b8de7ec4e Mon Sep 17 00:00:00 2001 1From d3661ec7fb4557c47f001986cbb8a684b8dbae4a Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Mar 2015 15:01:33 +1100 3Date: Mon, 14 Dec 2015 05:33:32 +0000
4Subject: [PATCH] Revert "udev: remove userspace firmware loading support" 4Subject: [PATCH 16/16] Revert "udev: remove userspace firmware loading
5 support"
5 6
6This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca. 7This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
7Userspace firmware loading support is needed for Linux < 3.7. 8Userspace firmware loading support is needed for Linux < 3.7.
@@ -9,23 +10,24 @@ Userspace firmware loading support is needed for Linux < 3.7.
9Upstream-Status: Inappropriate [OE specific] 10Upstream-Status: Inappropriate [OE specific]
10 11
11Signed-off-by: Jonathan Liu <net147@gmail.com> 12Signed-off-by: Jonathan Liu <net147@gmail.com>
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
12--- 14---
13 Makefile.am | 12 +++ 15 Makefile.am | 12 +++
14 README | 9 ++- 16 README | 6 +-
15 TODO | 1 + 17 TODO | 1 +
16 configure.ac | 20 +++++ 18 configure.ac | 25 +++++++
17 src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++ 19 src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
18 src/udev/udev-builtin.c | 3 + 20 src/udev/udev-builtin.c | 3 +
19 src/udev/udev.h | 6 ++ 21 src/udev/udev.h | 6 ++
20 src/udev/udevd.c | 13 ++++ 22 src/udev/udevd.c | 13 ++++
21 8 files changed, 214 insertions(+), 4 deletions(-) 23 8 files changed, 217 insertions(+), 3 deletions(-)
22 create mode 100644 src/udev/udev-builtin-firmware.c 24 create mode 100644 src/udev/udev-builtin-firmware.c
23 25
24Index: git/Makefile.am 26diff --git a/Makefile.am b/Makefile.am
25=================================================================== 27index a511c3d..6181e55 100644
26--- git.orig/Makefile.am 28--- a/Makefile.am
27+++ git/Makefile.am 29+++ b/Makefile.am
28@@ -3470,6 +3470,18 @@ libudev_core_la_LIBADD = \ 30@@ -3650,6 +3650,18 @@ libudev_core_la_LIBADD = \
29 $(BLKID_LIBS) \ 31 $(BLKID_LIBS) \
30 $(KMOD_LIBS) 32 $(KMOD_LIBS)
31 33
@@ -44,21 +46,11 @@ Index: git/Makefile.am
44 if HAVE_KMOD 46 if HAVE_KMOD
45 libudev_core_la_SOURCES += \ 47 libudev_core_la_SOURCES += \
46 src/udev/udev-builtin-kmod.c 48 src/udev/udev-builtin-kmod.c
47Index: git/README 49diff --git a/README b/README
48=================================================================== 50index bf67f8c..87b6f70 100644
49--- git.orig/README 51--- a/README
50+++ git/README 52+++ b/README
51@@ -36,7 +36,8 @@ LICENSE: 53@@ -51,14 +51,14 @@ REQUIREMENTS:
52 - except src/udev/* which is (currently still) GPLv2, GPLv2+
53
54 REQUIREMENTS:
55- Linux kernel >= 3.7
56+ Linux kernel >= 3.0
57+ Linux kernel >= 3.3 for loop device partition support features with nspawn
58 Linux kernel >= 3.8 for Smack support
59
60 Kernel Config Options:
61@@ -51,14 +52,14 @@ REQUIREMENTS:
62 CONFIG_PROC_FS 54 CONFIG_PROC_FS
63 CONFIG_FHANDLE (libudev, mount and bind mount handling) 55 CONFIG_FHANDLE (libudev, mount and bind mount handling)
64 56
@@ -76,24 +68,24 @@ Index: git/README
76 CONFIG_FW_LOADER_USER_HELPER=n 68 CONFIG_FW_LOADER_USER_HELPER=n
77 69
78 Some udev rules and virtualization detection relies on it: 70 Some udev rules and virtualization detection relies on it:
79Index: git/TODO 71diff --git a/TODO b/TODO
80=================================================================== 72index 369805f..ce97674 100644
81--- git.orig/TODO 73--- a/TODO
82+++ git/TODO 74+++ b/TODO
83@@ -754,6 +754,7 @@ Features: 75@@ -635,6 +635,7 @@ Features:
84 * ExecOnFailure=/usr/bin/foo 76 * rename "userspace" to "core-os"
85 77
86 * udev: 78 * udev:
87+ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n) 79+ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
88 - move to LGPL 80 - move to LGPL
89 - kill scsi_id 81 - kill scsi_id
90 - add trigger --subsystem-match=usb/usb_device device 82 - add trigger --subsystem-match=usb/usb_device device
91Index: git/configure.ac 83diff --git a/configure.ac b/configure.ac
92=================================================================== 84index a3e639d..00736f5 100644
93--- git.orig/configure.ac 85--- a/configure.ac
94+++ git/configure.ac 86+++ b/configure.ac
95@@ -1268,6 +1268,26 @@ fi 87@@ -1317,6 +1317,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
96 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) 88 AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
97 89
98 # ------------------------------------------------------------------------------ 90 # ------------------------------------------------------------------------------
99+AC_ARG_WITH(firmware-path, 91+AC_ARG_WITH(firmware-path,
@@ -114,23 +106,28 @@ Index: git/configure.ac
114+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) 106+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
115+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) 107+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
116+ 108+
117+
118+# ------------------------------------------------------------------------------ 109+# ------------------------------------------------------------------------------
119 AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])], 110 have_manpages=no
120 enable_hwdb=$enableval, enable_hwdb=yes) 111 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
121 AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes]) 112 AS_IF([test "x$enable_manpages" != xno], [
122@@ -1574,6 +1594,7 @@ AC_MSG_RESULT([ 113@@ -1616,6 +1635,12 @@ AC_MSG_RESULT([
114 SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
123 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} 115 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
124 Build Python: ${PYTHON} 116 Build Python: ${PYTHON}
125 sphinx binary: ${SPHINX_BUILD} 117+<<<<<<< HEAD
118+=======
119+ Installation Python: ${PYTHON_BINARY}
120+ sphinx binary: ${SPHINX_BUILD}
126+ firmware path: ${FIRMWARE_PATH} 121+ firmware path: ${FIRMWARE_PATH}
122+>>>>>>> parent of be2ea72... udev: remove userspace firmware loading support
127 PAM modules dir: ${with_pamlibdir} 123 PAM modules dir: ${with_pamlibdir}
128 PAM configuration dir: ${with_pamconfdir} 124 PAM configuration dir: ${with_pamconfdir}
129 D-Bus policy dir: ${with_dbuspolicydir} 125 D-Bus policy dir: ${with_dbuspolicydir}
130Index: git/src/udev/udev-builtin-firmware.c 126diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
131=================================================================== 127new file mode 100644
128index 0000000..bd8c2fb
132--- /dev/null 129--- /dev/null
133+++ git/src/udev/udev-builtin-firmware.c 130+++ b/src/udev/udev-builtin-firmware.c
134@@ -0,0 +1,154 @@ 131@@ -0,0 +1,154 @@
135+/* 132+/*
136+ * firmware - Kernel firmware loader 133+ * firmware - Kernel firmware loader
@@ -286,11 +283,11 @@ Index: git/src/udev/udev-builtin-firmware.c
286+ .help = "kernel firmware loader", 283+ .help = "kernel firmware loader",
287+ .run_once = true, 284+ .run_once = true,
288+}; 285+};
289Index: git/src/udev/udev-builtin.c 286diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
290=================================================================== 287index 18fb661..d0280bf 100644
291--- git.orig/src/udev/udev-builtin.c 288--- a/src/udev/udev-builtin.c
292+++ git/src/udev/udev-builtin.c 289+++ b/src/udev/udev-builtin.c
293@@ -30,6 +30,9 @@ static const struct udev_builtin *builti 290@@ -33,6 +33,9 @@ static const struct udev_builtin *builtins[] = {
294 [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, 291 [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
295 #endif 292 #endif
296 [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, 293 [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
@@ -300,11 +297,11 @@ Index: git/src/udev/udev-builtin.c
300 [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, 297 [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
301 [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, 298 [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
302 [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard, 299 [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
303Index: git/src/udev/udev.h 300diff --git a/src/udev/udev.h b/src/udev/udev.h
304=================================================================== 301index 4f40020..8f3560f 100644
305--- git.orig/src/udev/udev.h 302--- a/src/udev/udev.h
306+++ git/src/udev/udev.h 303+++ b/src/udev/udev.h
307@@ -146,6 +146,9 @@ enum udev_builtin_cmd { 304@@ -149,6 +149,9 @@ enum udev_builtin_cmd {
308 UDEV_BUILTIN_BLKID, 305 UDEV_BUILTIN_BLKID,
309 #endif 306 #endif
310 UDEV_BUILTIN_BTRFS, 307 UDEV_BUILTIN_BTRFS,
@@ -314,7 +311,7 @@ Index: git/src/udev/udev.h
314 UDEV_BUILTIN_HWDB, 311 UDEV_BUILTIN_HWDB,
315 UDEV_BUILTIN_INPUT_ID, 312 UDEV_BUILTIN_INPUT_ID,
316 UDEV_BUILTIN_KEYBOARD, 313 UDEV_BUILTIN_KEYBOARD,
317@@ -174,6 +177,9 @@ struct udev_builtin { 314@@ -177,6 +180,9 @@ struct udev_builtin {
318 extern const struct udev_builtin udev_builtin_blkid; 315 extern const struct udev_builtin udev_builtin_blkid;
319 #endif 316 #endif
320 extern const struct udev_builtin udev_builtin_btrfs; 317 extern const struct udev_builtin udev_builtin_btrfs;
@@ -324,11 +321,11 @@ Index: git/src/udev/udev.h
324 extern const struct udev_builtin udev_builtin_hwdb; 321 extern const struct udev_builtin udev_builtin_hwdb;
325 extern const struct udev_builtin udev_builtin_input_id; 322 extern const struct udev_builtin udev_builtin_input_id;
326 extern const struct udev_builtin udev_builtin_keyboard; 323 extern const struct udev_builtin udev_builtin_keyboard;
327Index: git/src/udev/udevd.c 324diff --git a/src/udev/udevd.c b/src/udev/udevd.c
328=================================================================== 325index 366e7fb..7ca1b51 100644
329--- git.orig/src/udev/udevd.c 326--- a/src/udev/udevd.c
330+++ git/src/udev/udevd.c 327+++ b/src/udev/udevd.c
331@@ -116,6 +116,9 @@ struct event { 328@@ -127,6 +127,9 @@ struct event {
332 bool is_block; 329 bool is_block;
333 sd_event_source *timeout_warning; 330 sd_event_source *timeout_warning;
334 sd_event_source *timeout; 331 sd_event_source *timeout;
@@ -338,7 +335,7 @@ Index: git/src/udev/udevd.c
338 }; 335 };
339 336
340 static inline struct event *node_to_event(struct udev_list_node *node) { 337 static inline struct event *node_to_event(struct udev_list_node *node) {
341@@ -607,6 +610,10 @@ static int event_queue_insert(Manager *m 338@@ -615,6 +618,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
342 event->devnum = udev_device_get_devnum(dev); 339 event->devnum = udev_device_get_devnum(dev);
343 event->is_block = streq("block", udev_device_get_subsystem(dev)); 340 event->is_block = streq("block", udev_device_get_subsystem(dev));
344 event->ifindex = udev_device_get_ifindex(dev); 341 event->ifindex = udev_device_get_ifindex(dev);
@@ -349,7 +346,7 @@ Index: git/src/udev/udevd.c
349 346
350 log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), 347 log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
351 udev_device_get_action(dev), udev_device_get_subsystem(dev)); 348 udev_device_get_action(dev), udev_device_get_subsystem(dev));
352@@ -692,6 +699,12 @@ static bool is_devpath_busy(Manager *man 349@@ -700,6 +707,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
353 return true; 350 return true;
354 } 351 }
355 352
@@ -362,3 +359,6 @@ Index: git/src/udev/udevd.c
362 /* parent device event found */ 359 /* parent device event found */
363 if (event->devpath[common] == '/') { 360 if (event->devpath[common] == '/') {
364 event->delaying_seqnum = loop_event->seqnum; 361 event->delaying_seqnum = loop_event->seqnum;
362--
3632.6.4
364
diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_228.bb
index 72bf678e10..0f95390acd 100644
--- a/meta/recipes-core/systemd/systemd_225.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -24,39 +24,38 @@ SECTION = "base/shell"
24 24
25inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext 25inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
26 26
27SRCREV = "e1439a1472c5f691733b8ef10e702beac2496a63" 27SRCREV = "dd050decb6ad131ebdeabb71c4f9ecb4733269c0"
28 28
29PV = "225+git${SRCPV}" 29PV = "228+git${SRCPV}"
30 30
31SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \ 31SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
32 file://0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ 32 file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
33 file://0004-configure-Check-for-additional-features-that-uclibc-.patch \ 33 file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
34 file://0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch \ 34 file://0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
35 file://0006-journal-Use-posix-fallocate-only-if-available.patch \
36 file://0007-util-Use-mkostemp-only-if-libc-supports-it.patch \
37 file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \ 35 file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
38 file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \ 36 file://0009-implment-systemd-sysv-install-for-OE.patch \
39 file://0010-Make-root-s-home-directory-configurable.patch \ 37 file://0010-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
40 file://0011-systemd-user-avoid-using-system-auth.patch \ 38 file://0011-rules-whitelist-hd-devices.patch \
41 file://0012-implment-systemd-sysv-install-for-OE.patch \ 39 file://0012-sysv-generator-add-support-for-executing-scripts-und.patch \
42 file://0014-Revert-rules-remove-firmware-loading-rules.patch \ 40 file://0013-Make-root-s-home-directory-configurable.patch \
43 file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \ 41 file://0014-systemd-user-avoid-using-system-auth.patch \
42 file://0015-Revert-rules-remove-firmware-loading-rules.patch \
43 file://0016-Revert-udev-remove-userspace-firmware-loading-suppor.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 \
47 file://run-ptest \ 47 file://run-ptest \
48 file://rules-whitelist-hd-devices.patch \
49 " 48 "
50SRC_URI_append_qemuall = " file://qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch" 49SRC_URI_append_libc-uclibc = "\
50 file://0001-define-exp10-if-missing.patch \
51 file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
52 file://0003-Use-getenv-when-secure-versions-are-not-available.patch \
53 "
54SRC_URI_append_qemuall = " file://0004-core-device.c-Change-the-default-device-timeout-to-2.patch "
51 55
52S = "${WORKDIR}/git" 56S = "${WORKDIR}/git"
53 57
54SRC_URI_append_libc-uclibc = "\ 58LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
55 file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
56 file://0022-Use-getenv-when-secure-versions-are-not-available.patch \
57 file://0001-fix-build-on-uClibc-exp10.patch \
58 "
59LDFLAGS_append_libc-uclibc = " -lrt"
60 59
61GTKDOC_DOCDIR = "${S}/docs/" 60GTKDOC_DOCDIR = "${S}/docs/"
62 61
@@ -65,7 +64,6 @@ PACKAGECONFIG ??= "xz ldconfig \
65 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ 64 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
66 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ 65 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
67 " 66 "
68
69PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" 67PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
70# Sign the journal for anti-tampering 68# Sign the journal for anti-tampering
71PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" 69PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
@@ -127,7 +125,7 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
127 --with-firmware-path=/lib/firmware \ 125 --with-firmware-path=/lib/firmware \
128 " 126 "
129# uclibc does not have NSS 127# uclibc does not have NSS
130EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " 128EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname --disable-sysusers"
131 129
132# per the systemd README, define VALGRIND=1 to run under valgrind 130# per the systemd README, define VALGRIND=1 to run under valgrind
133CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}" 131CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"