diff options
Diffstat (limited to 'yocto-poky/meta/recipes-core/systemd/systemd')
28 files changed, 780 insertions, 467 deletions
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch index c7e171152..f7ef7a321 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch @@ -1,23 +1,25 @@ -Upstream-Status: Inappropriate [Specific case QEMU/AB] - -From 7b8c4e0a67a79a75e1bd77df3a452a5497322108 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> -Date: Thu, 27 Aug 2015 17:58:26 -0500 -Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec. +From 3bc4552117879f57522b5972b724729ca993f1ea Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 14 Dec 2015 04:09:19 +0000 +Subject: [PATCH 01/36] core/device.c: Change the default device timeout to 240 + sec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Upstream-Status: Inappropriate [Specific case QEMU/AB] + Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- src/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/device.c b/src/core/device.c -index e7efcf0..4ed8f08 100644 +index d201dc5..340d62a 100644 --- a/src/core/device.c +++ b/src/core/device.c -@@ -110,7 +110,7 @@ static void device_init(Unit *u) { +@@ -112,7 +112,7 @@ static void device_init(Unit *u) { * indefinitely for plugged in devices, something which cannot * happen for the other units since their operations time out * anyway. */ @@ -25,7 +27,7 @@ index e7efcf0..4ed8f08 100644 + u->job_timeout = (240 * USEC_PER_SEC); u->ignore_on_isolate = true; - u->ignore_on_snapshot = true; + } -- -1.9.1 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch deleted file mode 100644 index 76ce4b781..000000000 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch +++ /dev/null @@ -1,22 +0,0 @@ -Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch - -exp10 extension is not part of uClibc, so compute it. - - -Signed-off-by: Samuel Martin <s.martin49@gmail.com> - -Upstream-Status: Pending - -Index: git/src/basic/missing.h -=================================================================== ---- git.orig/src/basic/missing.h -+++ git/src/basic/missing.h -@@ -1036,3 +1036,8 @@ static inline int kcmp(pid_t pid1, pid_t - #ifndef INPUT_PROP_ACCELEROMETER - #define INPUT_PROP_ACCELEROMETER 0x06 - #endif -+ -+#ifdef __UCLIBC__ -+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ -+#define exp10(x) (exp((x) * log(10))) -+#endif /* __UCLIBC__ */ diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch index b6ab5effc..28939eb02 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch @@ -1,7 +1,7 @@ -From 100e50604efc4032001a2de6a6b47853c0003817 Mon Sep 17 00:00:00 2001 +From e5f405aba347d216e7f2b73d7dd681b13be442e3 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 20 Feb 2015 05:29:15 +0000 -Subject: [PATCH 01/11] units: Prefer getty to agetty in console setup systemd +Subject: [PATCH 02/36] units: Prefer getty to agetty in console setup systemd units Upstream-Status: Inappropriate [configuration specific] @@ -40,5 +40,5 @@ index 4522d0d..e6d499d 100644 Restart=always UtmpIdentifier=%I -- -2.1.4 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch new file mode 100644 index 000000000..f183261c8 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch @@ -0,0 +1,33 @@ +From 699893a05edac5194f9670529bacfaeb67252edb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 14 Dec 2015 00:42:49 +0000 +Subject: [PATCH 03/36] define exp10 if missing + +Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch + +exp10 extension is not part of uClibc, so compute it. + +Upstream-Status: Pending + +Signed-off-by: Samuel Martin <s.martin49@gmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/basic/missing.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index f3d3236..ee7e7ea 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -1169,3 +1169,8 @@ static inline key_serial_t request_key(const char *type, const char *description + #endif + + #endif ++ ++#ifdef __UCLIBC__ ++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ ++#define exp10(x) (exp((x) * log(10))) ++#endif /* __UCLIBC__ */ +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch index 30e38173e..989a1fa1d 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch @@ -1,39 +1,35 @@ -From cb71e4beea3b3b11e5951f95c829cd2eee9fcf7b Mon Sep 17 00:00:00 2001 +From bb8d8148b16572ae17d3c308552cf73915386b05 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 12 Sep 2015 19:10:04 +0000 -Subject: [PATCH 22/31] Use getenv when secure versions are not available +Subject: [PATCH 04/36] Use getenv when secure versions are not available musl doesnt implement secure version, so we default to it if configure does not detect a secure imeplementation Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Denied --- -Upstream-Status: Rejected - - src/basic/missing.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + src/basic/missing.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/missing.h b/src/basic/missing.h -index bf9b490..d6dbc7d 100644 +index ee7e7ea..3170429 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h -@@ -584,13 +584,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle +@@ -585,12 +585,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags); } #endif - --#ifndef HAVE_SECURE_GETENV -+#ifdef HAVE_SECURE_GETENV + #ifndef HAVE_SECURE_GETENV # ifdef HAVE___SECURE_GETENV # define secure_getenv __secure_getenv # else - # error "neither secure_getenv nor __secure_getenv are available" +-# error "neither secure_getenv nor __secure_getenv are available" ++# define secure_getenv getenv # endif -+#else -+# define secure_getenv getenv #endif - #ifndef CIFS_MAGIC_NUMBER -- -2.5.2 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch index 0e20fd054..f69e26ec5 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -1,7 +1,7 @@ -From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001 +From 3436b12d40bf4f4ab7e3e16600e5f6c35a470da4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 20 Feb 2015 05:03:44 +0000 -Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time +Subject: [PATCH 05/36] binfmt: Don't install dependency links at install time for the binfmt services use [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> units/systemd-binfmt.service.in | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am -+++ git/Makefile.am -@@ -4271,10 +4271,6 @@ INSTALL_DIRS += \ +diff --git a/Makefile.am b/Makefile.am +index 03341fc..629740f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4387,10 +4387,6 @@ INSTALL_DIRS += \ $(prefix)/lib/binfmt.d \ $(sysconfdir)/binfmt.d @@ -38,10 +38,10 @@ Index: git/Makefile.am endif EXTRA_DIST += \ -Index: git/units/proc-sys-fs-binfmt_misc.automount -=================================================================== ---- git.orig/units/proc-sys-fs-binfmt_misc.automount -+++ git/units/proc-sys-fs-binfmt_misc.automount +diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount +index 6be3893..709adef 100644 +--- a/units/proc-sys-fs-binfmt_misc.automount ++++ b/units/proc-sys-fs-binfmt_misc.automount @@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/ [Automount] @@ -49,11 +49,11 @@ Index: git/units/proc-sys-fs-binfmt_misc.automount + +[Install] +WantedBy=sysinit.target -Index: git/units/systemd-binfmt.service.in -=================================================================== ---- git.orig/units/systemd-binfmt.service.in -+++ git/units/systemd-binfmt.service.in -@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service +diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in +index d53073e..8c57ee0 100644 +--- a/units/systemd-binfmt.service.in ++++ b/units/systemd-binfmt.service.in +@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt DefaultDependencies=no Conflicts=shutdown.target @@ -69,3 +69,6 @@ Index: git/units/systemd-binfmt.service.in + +[Install] +WantedBy=sysinit.target +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch deleted file mode 100644 index 55a0088c6..000000000 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a7417c2e6950d55c22c1b0d15783898b8ff229ef Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:10:37 +0000 -Subject: [PATCH 05/11] nspawn: Use execvpe only when libc supports it - -Upstream-Status: Denied [no desire for uclibc support] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/nspawn/nspawn.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -Index: git/src/nspawn/nspawn.c -=================================================================== ---- git.orig/src/nspawn/nspawn.c -+++ git/src/nspawn/nspawn.c -@@ -143,6 +143,8 @@ typedef struct CustomMount { - char **lower; - } CustomMount; - -+#include "config.h" -+ - static char *arg_directory = NULL; - static char *arg_template = NULL; - static char *arg_user = NULL; -@@ -4238,7 +4240,12 @@ static int inner_child( - a[0] = (char*) "/sbin/init"; - execve(a[0], a, env_use); - } else if (argc > optind) -+#ifdef HAVE_EXECVPE - execvpe(argv[optind], argv + optind, env_use); -+#else -+ environ = env_use; -+ execvp(argv[optind], argv + optind); -+#endif /* HAVE_EXECVPE */ - else { - chdir(home ? home : "/root"); - execle("/bin/bash", "-bash", NULL, env_use); diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch index 8078da9bb..0d6375573 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch @@ -1,7 +1,7 @@ -From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001 +From bb6f1d8a000b337280541afde7cccdcfe03cdeb1 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 20 Feb 2015 05:05:45 +0000 -Subject: [PATCH 04/11] configure: Check for additional features that uclibc +Subject: [PATCH 06/36] configure: Check for additional features that uclibc doesnt support This helps in supporting uclibc which does not have all features that @@ -14,11 +14,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/ +diff --git a/configure.ac b/configure.ac +index f51533c..0239fd0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin] AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) @@ -43,3 +43,6 @@ Index: git/configure.ac M4_DEFINES= AC_CHECK_TOOL(OBJCOPY, objcopy) +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch deleted file mode 100644 index 631dd7746..000000000 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 34a61b6c9eed3fad360066fb63132ebc7e0aaaa6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:12:48 +0000 -Subject: [PATCH 06/11] journal: Use posix fallocate only if available - -Some architecture ports in uclibc did not support it in past - -Upstream-Status: Denied [no desire for uclibc support] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/journal/journal-file.c | 16 +++++++++++++++- - src/journal/journald-kmsg.c | 15 ++++++++++++++- - 2 files changed, 29 insertions(+), 2 deletions(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index 2845e05..9431171 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -36,6 +36,8 @@ - #include "compress.h" - #include "fsprg.h" - -+#include "config.h" -+ - #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem)) - #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem)) - -@@ -354,7 +356,7 @@ static int journal_file_fstat(JournalFile *f) { - - static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) { - uint64_t old_size, new_size; -- int r; -+ int r = 0; - - assert(f); - -@@ -418,9 +420,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) - /* Note that the glibc fallocate() fallback is very - inefficient, hence we try to minimize the allocation area - as we can. */ -+#ifdef HAVE_POSIX_FALLOCATE - r = posix_fallocate(f->fd, old_size, new_size - old_size); - if (r != 0) - return -r; -+#else -+ /* Write something every 512 bytes to make sure the block is allocated */ -+ uint64_t len = new_size - old_size; -+ uint64_t offset = old_size; -+ for (offset += (len-1) % 512; len > 0; offset += 512) { -+ len -= 512; -+ if (pwrite(f->fd, "", 1, offset) != 1) -+ return -errno; -+ } -+ -+#endif /* HAVE_POSIX_FALLOCATE */ - - f->header->arena_size = htole64(new_size - le64toh(f->header->header_size)); - -diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c -index c4216c4..a998ed5 100644 ---- a/src/journal/journald-kmsg.c -+++ b/src/journal/journald-kmsg.c -@@ -436,6 +436,7 @@ fail: - int server_open_kernel_seqnum(Server *s) { - _cleanup_close_ int fd; - uint64_t *p; -+ int r = 0; - - assert(s); - -@@ -449,7 +450,19 @@ int server_open_kernel_seqnum(Server *s) { - return 0; - } - -- if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) { -+#ifdef HAVE_POSIX_FALLOCATE -+ r = posix_fallocate(fd, 0, sizeof(uint64_t)); -+#else -+ /* Use good old method to write zeros into the journal file -+ perhaps very inefficient yet working. */ -+ char *buf = alloca(sizeof(uint64_t)); -+ off_t oldpos = lseek(fd, 0, SEEK_CUR); -+ bzero(buf, sizeof(uint64_t)); -+ lseek(fd, 0, SEEK_SET); -+ r = write(fd, buf, sizeof(uint64_t)); -+ lseek(fd, oldpos, SEEK_SET); -+#endif /* HAVE_POSIX_FALLOCATE */ -+ if (r < 0) { - log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m"); - return 0; - } --- -2.1.4 - diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch new file mode 100644 index 000000000..12f6ace93 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch @@ -0,0 +1,61 @@ +From fa5e137fbd2fb081ae897575377d718ee8cb6349 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 20 Dec 2015 04:20:28 +0000 +Subject: [PATCH 07/36] use lnr wrapper instead of looking for --relative + option for ln + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 6 +++--- + configure.ac | 2 -- + 2 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 629740f..82b6553 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -243,7 +243,7 @@ define move-to-rootlibdir + $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ + so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \ + rm -f $(DESTDIR)$(libdir)/$$libname && \ +- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ ++ lnr $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ + mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \ + fi + endef +@@ -317,7 +317,7 @@ define install-relative-aliases + while [ -n "$$1" ]; do \ + $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \ + rm -f $(DESTDIR)$$dir/$$2 && \ +- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \ ++ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \ + shift 2 || exit $$?; \ + done + endef +@@ -2781,7 +2781,7 @@ systemd_dbus1_generator_LDADD = \ + dbus1-generator-install-hook: + $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir) + $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator +- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator ++ $(AM_V_LN)lnr $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator + + dbus1-generator-uninstall-hook: + rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator +diff --git a/configure.ac b/configure.ac +index 0239fd0..c5ab9d0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin]) + AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin]) + AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]) + +-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) +- + # check for few functions not implemented in uClibc + + AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate) +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch deleted file mode 100644 index b8ab7c4e7..000000000 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f771407d3e0288ca0c06a894194d3ddad69b9a8e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:17:05 +0000 -Subject: [PATCH 07/11] util: Use mkostemp only if libc supports it - -Upstream-Status: Denied [no desire for uclibc support] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/basic/util.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/basic/util.c b/src/basic/util.c -index dc65280..72f4665 100644 ---- a/src/basic/util.c -+++ b/src/basic/util.c -@@ -97,6 +97,8 @@ - #include "def.h" - #include "sparse-endian.h" - -+#include "config.h" -+ - int saved_argc = 0; - char **saved_argv = NULL; - -@@ -6682,7 +6684,13 @@ int mkostemp_safe(char *pattern, int flags) { - - u = umask(077); - -+#ifdef HAVE_MKOSTEMP - fd = mkostemp(pattern, flags); -+#else -+ fd = mkstemp(pattern); -+ if (fd >= 0) fcntl(fd, F_SETFD, flags); -+#endif /* HAVE_MKOSTEMP */ -+ - if (fd < 0) - return -errno; - --- -2.1.4 - diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch new file mode 100644 index 000000000..6e6f199ef --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch @@ -0,0 +1,41 @@ +From ae999ff50efb9cc82537adef7696c6f732afcfc8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:10:37 +0000 +Subject: [PATCH 08/36] nspawn: Use execvpe only when libc supports it + +Upstream-Status: Denied [no desire for uclibc support] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/nspawn/nspawn.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 5a68fec..65e65ec 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -111,6 +111,8 @@ typedef enum LinkJournal { + LINK_GUEST + } LinkJournal; + ++#include "config.h" ++ + static char *arg_directory = NULL; + static char *arg_template = NULL; + static char *arg_chdir = NULL; +@@ -2637,7 +2639,12 @@ static int inner_child( + a[0] = (char*) "/sbin/init"; + execve(a[0], a, env_use); + } else if (!strv_isempty(arg_parameters)) ++#ifdef HAVE_EXECVPE + execvpe(arg_parameters[0], arg_parameters, env_use); ++#else ++ environ = env_use; ++ execvp(arg_parameters[0], arg_parameters); ++#endif /* HAVE_EXECVPE */ + else { + if (!arg_chdir) + chdir(home ?: "/root"); +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch index 3f4d4de08..116f3d4de 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch @@ -1,7 +1,7 @@ -From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001 +From 3498f488b27f90398d7c8d1d06aac5ab684370e8 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:19:37 +0000 -Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system +Date: Mon, 14 Dec 2015 00:47:53 +0000 +Subject: [PATCH 09/36] util: bypass unimplemented _SC_PHYS_PAGES system configuration API on uclibc Upstream-Status: Inappropriate [uclibc-specific] @@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 15 insertions(+) diff --git a/src/basic/util.c b/src/basic/util.c -index 72f4665..cbbe3b1 100644 +index ea1bed7..fdaf340 100644 --- a/src/basic/util.c +++ b/src/basic/util.c -@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) { +@@ -767,10 +767,25 @@ uint64_t physical_memory(void) { /* We return this as uint64_t in case we are running as 32bit * process on a 64bit kernel with huge amounts of memory */ @@ -25,7 +25,7 @@ index 72f4665..cbbe3b1 100644 + if (f == NULL) + return 0; + while (!feof(f) && fgets(line, sizeof(line)-1, f)) { -+ if (sscanf(line, "MemTotal: %l kB", &mem) == 1) { ++ if (sscanf(line, "MemTotal: %li kB", &mem) == 1) { + mem *= 1024; + break; + } @@ -40,7 +40,7 @@ index 72f4665..cbbe3b1 100644 +#endif } - void hexdump(FILE *f, const void *p, size_t s) { + int update_reboot_param_file(const char *param) { -- -2.1.4 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch index 68b45a9a5..75fa3a54e 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch @@ -1,7 +1,7 @@ -From 5f8b9f2d276c0ddbcbf5423733a23f043d688009 Mon Sep 17 00:00:00 2001 +From 5f94f5ad46c1ded54c3797979d384e4c1eb77bb0 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 5 Sep 2015 06:31:47 +0000 -Subject: [PATCH] implment systemd-sysv-install for OE +Subject: [PATCH 10/36] implment systemd-sysv-install for OE Use update-rc.d for enabling/disabling and status command to check the status of the sysv service @@ -13,10 +13,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src/systemctl/systemd-sysv-install.SKELETON | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -Index: git/src/systemctl/systemd-sysv-install.SKELETON -=================================================================== ---- git.orig/src/systemctl/systemd-sysv-install.SKELETON -+++ git/src/systemctl/systemd-sysv-install.SKELETON +diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON +index a53a3e6..5d877b0 100755 +--- a/src/systemctl/systemd-sysv-install.SKELETON ++++ b/src/systemctl/systemd-sysv-install.SKELETON @@ -30,17 +30,17 @@ case "$1" in enable) # call the command to enable SysV init script $NAME here @@ -38,3 +38,6 @@ Index: git/src/systemctl/systemd-sysv-install.SKELETON ;; *) usage ;; +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch new file mode 100644 index 000000000..34ae64535 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch @@ -0,0 +1,38 @@ +From 2b2450f6b7197bff4637c0283e8784500471d083 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 14 Dec 2015 00:50:01 +0000 +Subject: [PATCH 11/36] nss-mymachines: Build conditionally when + HAVE_MYHOSTNAME is set + +Fixes build failures when building with --disable-myhostname + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index 82b6553..b3f3343 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4876,6 +4876,7 @@ SYSTEM_UNIT_ALIASES += \ + BUSNAMES_TARGET_WANTS += \ + org.freedesktop.machine1.busname + ++if HAVE_MYHOSTNAME + libnss_mymachines_la_SOURCES = \ + src/nss-mymachines/nss-mymachines.sym \ + src/nss-mymachines/nss-mymachines.c +@@ -4896,6 +4897,7 @@ lib_LTLIBRARIES += \ + libnss_mymachines.la + + endif ++endif + + polkitpolicy_in_files += \ + src/machine/org.freedesktop.machine1.policy.in +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch index 8975b05e0..6143088e8 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch @@ -1,7 +1,7 @@ -From f77b7e5626e70c3a775e993816a33af5a61dea42 Mon Sep 17 00:00:00 2001 +From 5ebc0d87565a73710dea602c00b1586d5a1364e5 Mon Sep 17 00:00:00 2001 From: Patrick Ohly <patrick.ohly@intel.com> Date: Wed, 16 Sep 2015 13:55:58 +0200 -Subject: [PATCH] rules: whitelist hd* devices +Subject: [PATCH 12/36] rules: whitelist hd* devices qemu by default emulates IDE and the linux-yocto kernel(s) use CONFIG_IDE instead of the more modern libsata, so disks appear as @@ -28,5 +28,5 @@ index 0b14bb4..1c4d97a 100644 # ignore partitions that span the entire disk TEST=="whole_disk", GOTO="persistent_storage_end" -- -2.1.4 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch index 9ea3e83e5..ac67f6568 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch @@ -1,7 +1,7 @@ -From 8791b5b3934c55694872b6915a67340683ead91b Mon Sep 17 00:00:00 2001 +From 6736de4a3caf9a0b3c888c6cc05103ab1b86907d Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:22:52 +0000 -Subject: [PATCH 09/11] sysv-generator: add support for executing scripts under +Date: Mon, 14 Dec 2015 05:09:53 +0000 +Subject: [PATCH 13/36] sysv-generator: add support for executing scripts under /etc/rcS.d/ To be compatible, all services translated from scripts under /etc/rcS.d would @@ -12,14 +12,14 @@ Upstream-Status: Inappropriate [OE specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- - 1 file changed, 38 insertions(+), 12 deletions(-) + src/sysv-generator/sysv-generator.c | 47 ++++++++++++++++++++++++++++--------- + 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c -index bd67f32..6756cc6 100644 +index b5925a4..ea06d6a 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c -@@ -42,7 +42,8 @@ +@@ -44,7 +44,8 @@ typedef enum RunlevelType { RUNLEVEL_UP, @@ -29,7 +29,7 @@ index bd67f32..6756cc6 100644 } RunlevelType; static const struct { -@@ -57,6 +58,9 @@ static const struct { +@@ -59,6 +60,9 @@ static const struct { { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP }, { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP }, @@ -39,7 +39,7 @@ index bd67f32..6756cc6 100644 /* Standard SysV runlevels for shutdown */ { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } -@@ -65,7 +69,7 @@ static const struct { +@@ -67,7 +71,7 @@ static const struct { directories in this order, and we want to make sure that sysv_start_priority is known when we first load the unit. And that value we only know from S links. Hence @@ -47,27 +47,17 @@ index bd67f32..6756cc6 100644 + UP/SYSINIT must be read before DOWN */ }; - typedef struct SysvStub { -@@ -81,6 +85,8 @@ typedef struct SysvStub { - char **conflicts; + static const char *arg_dest = "/tmp"; +@@ -86,6 +90,8 @@ typedef struct SysvStub { bool has_lsb; bool reload; + bool loaded; + bool default_dependencies; + bool from_rcsd; } SysvStub; - const char *arg_dest = "/tmp"; -@@ -183,6 +189,9 @@ static int generate_unit_file(SysvStub *s) { - "Description=%s\n", - s->path, s->description); - -+ if (!s->default_dependencies) -+ fprintf(f, "DefaultDependencies=no\n"); -+ - if (!isempty(before)) - fprintf(f, "Before=%s\n", before); - if (!isempty(after)) -@@ -704,18 +713,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { + static void free_sysvstub(SysvStub *s) { +@@ -711,17 +717,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { if (s->has_lsb && other->has_lsb) continue; @@ -79,15 +69,14 @@ index bd67f32..6756cc6 100644 + r = strv_extend(&s->before, other->name); if (r < 0) return log_oom(); -- } -- else if (other->sysv_start_priority > s->sysv_start_priority) { + +- } else if (other->sysv_start_priority > s->sysv_start_priority) { - r = strv_extend(&s->before, other->name); + } else if (other->from_rcsd && !s->from_rcsd) { + r = strv_extend(&s->after, other->name); if (r < 0) return log_oom(); -- } -- else +- } else - continue; + } else { + if (other->sysv_start_priority < s->sysv_start_priority) { @@ -102,11 +91,11 @@ index bd67f32..6756cc6 100644 + } + else + continue; -+ } ++ } /* FIXME: Maybe we should compare the name here lexicographically? */ } -@@ -778,6 +799,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { +@@ -788,6 +808,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) { return log_oom(); service->sysv_start_priority = -1; @@ -114,22 +103,23 @@ index bd67f32..6756cc6 100644 + service->from_rcsd = false; service->name = name; service->path = fpath; - -@@ -864,9 +887,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { + name = fpath = NULL; +@@ -871,9 +893,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic if (de->d_name[0] == 'S') { -- if (rcnd_table[i].type == RUNLEVEL_UP) { +- if (rcnd_table[i].type == RUNLEVEL_UP) + if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) { - service->sysv_start_priority = - MAX(a*10 + b, service->sysv_start_priority); + service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority); +- + service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true; + service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; - } - ++ } r = set_ensure_allocated(&runlevel_services[i], NULL); -@@ -878,7 +903,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { - goto finish; + if (r < 0) { + log_oom(); +@@ -887,7 +911,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic + } } else if (de->d_name[0] == 'K' && - (rcnd_table[i].type == RUNLEVEL_DOWN)) { @@ -137,7 +127,7 @@ index bd67f32..6756cc6 100644 + rcnd_table[i].type == RUNLEVEL_SYSINIT)) { r = set_ensure_allocated(&shutdown_services, NULL); - if (r < 0) + if (r < 0) { -- -2.1.4 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch index ed7ff5b09..4a576aa7d 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch @@ -1,7 +1,7 @@ -From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001 +From 786883cfa13e21f060ee6da6cabb94845f4349a0 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 20 Feb 2015 05:24:49 +0000 -Subject: [PATCH 10/11] Make root's home directory configurable +Date: Mon, 14 Dec 2015 05:18:20 +0000 +Subject: [PATCH 14/36] Make root's home directory configurable OpenEmbedded has a configurable home directory for root. Allow systemd 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> --- Makefile.am | 2 ++ configure.ac | 7 +++++++ - src/core/unit-printf.c | 2 +- + src/basic/user-util.c | 4 ++-- + src/core/namespace.c | 2 +- src/nspawn/nspawn.c | 4 ++-- - src/basic/util.c | 4 ++-- units/console-shell.service.m4.in | 4 ++-- units/emergency.service.in | 4 ++-- units/rescue.service.in | 4 ++-- 8 files changed, 20 insertions(+), 11 deletions(-) -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am -+++ git/Makefile.am -@@ -208,6 +208,7 @@ AM_CPPFLAGS = \ +diff --git a/Makefile.am b/Makefile.am +index b3f3343..a99e8eb 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -202,6 +202,7 @@ AM_CPPFLAGS = \ -DLIBDIR=\"$(libdir)\" \ -DROOTLIBDIR=\"$(rootlibdir)\" \ -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ @@ -37,7 +37,7 @@ Index: git/Makefile.am -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ -I $(top_srcdir)/src \ -I $(top_builddir)/src/basic \ -@@ -5615,6 +5616,7 @@ EXTRA_DIST += \ +@@ -5713,6 +5714,7 @@ EXTRA_DIST += \ substitutions = \ '|rootlibexecdir=$(rootlibexecdir)|' \ '|rootbindir=$(rootbindir)|' \ @@ -45,11 +45,11 @@ Index: git/Makefile.am '|bindir=$(bindir)|' \ '|SYSTEMCTL=$(rootbindir)/systemctl|' \ '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -1383,6 +1383,11 @@ AC_ARG_WITH([rootlibdir], +diff --git a/configure.ac b/configure.ac +index c5ab9d0..16c83bb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1470,6 +1470,11 @@ AC_ARG_WITH([rootlibdir], [with_rootlibdir=${libdir}]) AX_NORMALIZE_PATH([with_rootlibdir]) @@ -61,7 +61,7 @@ Index: git/configure.ac AC_ARG_WITH([pamlibdir], AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), [], -@@ -1474,6 +1479,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) +@@ -1553,6 +1558,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) AC_SUBST([pamconfdir], [$with_pamconfdir]) AC_SUBST([rootprefix], [$with_rootprefix]) AC_SUBST([rootlibdir], [$with_rootlibdir]) @@ -69,7 +69,7 @@ Index: git/configure.ac AC_CONFIG_FILES([ Makefile -@@ -1563,6 +1569,7 @@ AC_MSG_RESULT([ +@@ -1643,6 +1649,7 @@ AC_MSG_RESULT([ includedir: ${includedir} lib dir: ${libdir} rootlib dir: ${with_rootlibdir} @@ -77,46 +77,11 @@ Index: git/configure.ac SysV init scripts: ${SYSTEM_SYSVINIT_PATH} SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} Build Python: ${PYTHON} -Index: git/src/core/unit-printf.c -=================================================================== ---- git.orig/src/core/unit-printf.c -+++ git/src/core/unit-printf.c -@@ -237,7 +237,7 @@ static int specifier_user_home(char spec - * best of it if we can, but fail if we can't */ - - if (!c->user || streq(c->user, "root") || streq(c->user, "0")) -- n = strdup("/root"); -+ n = strdup(ROOTHOMEDIR); - else - return -EOPNOTSUPP; - -Index: git/src/nspawn/nspawn.c -=================================================================== ---- git.orig/src/nspawn/nspawn.c -+++ git/src/nspawn/nspawn.c -@@ -4176,7 +4176,7 @@ static int inner_child( - if (envp[n_env]) - n_env ++; - -- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) || -+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) || - (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || - (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) - return log_oom(); -@@ -4247,7 +4247,7 @@ static int inner_child( - execvp(argv[optind], argv + optind); - #endif /* HAVE_EXECVPE */ - else { -- chdir(home ? home : "/root"); -+ chdir(home ? home : ROOTHOMEDIR); - execle("/bin/bash", "-bash", NULL, env_use); - execle("/bin/sh", "-sh", NULL, env_use); - } -Index: git/src/basic/util.c -=================================================================== ---- git.orig/src/basic/util.c -+++ git/src/basic/util.c -@@ -3233,7 +3233,7 @@ int get_user_creds( +diff --git a/src/basic/user-util.c b/src/basic/user-util.c +index 19155bc..55672b3 100644 +--- a/src/basic/user-util.c ++++ b/src/basic/user-util.c +@@ -122,7 +122,7 @@ int get_user_creds( *gid = 0; if (home) @@ -125,7 +90,7 @@ Index: git/src/basic/util.c if (shell) *shell = "/bin/sh"; -@@ -4069,7 +4069,7 @@ int get_home_dir(char **_h) { +@@ -353,7 +353,7 @@ int get_home_dir(char **_h) { /* Hardcode home directory for root to avoid NSS */ u = getuid(); if (u == 0) { @@ -134,48 +99,86 @@ Index: git/src/basic/util.c if (!h) return -ENOMEM; -Index: git/units/console-shell.service.m4.in -=================================================================== ---- git.orig/units/console-shell.service.m4.in -+++ git/units/console-shell.service.m4.in +diff --git a/src/core/namespace.c b/src/core/namespace.c +index b573f00..0f70b14 100644 +--- a/src/core/namespace.c ++++ b/src/core/namespace.c +@@ -409,7 +409,7 @@ int setup_namespace( + home_dir = strjoina("-", home_dir); + run_user_dir = prefix_roota(root_directory, "/run/user"); + run_user_dir = strjoina("-", run_user_dir); +- root_dir = prefix_roota(root_directory, "/root"); ++ root_dir = prefix_roota(root_directory, ROOTHOMEDIR); + root_dir = strjoina("-", root_dir); + + r = append_mounts(&m, STRV_MAKE(home_dir, run_user_dir, root_dir), +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 65e65ec..12f0ee8 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -2564,7 +2564,7 @@ static int inner_child( + if (envp[n_env]) + n_env ++; + +- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) || ++ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) || + (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || + (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) + return log_oom(); +@@ -2647,7 +2647,7 @@ static int inner_child( + #endif /* HAVE_EXECVPE */ + else { + if (!arg_chdir) +- chdir(home ?: "/root"); ++ chdir(home ?: ROOTHOMEDIR); + + execle("/bin/bash", "-bash", NULL, env_use); + execle("/bin/sh", "-sh", NULL, env_use); +diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in +index a345ec2..3caae7d 100644 +--- a/units/console-shell.service.m4.in ++++ b/units/console-shell.service.m4.in @@ -15,8 +15,8 @@ After=rc-local.service Before=getty.target [Service] -Environment=HOME=/root --WorkingDirectory=/root +-WorkingDirectory=-/root +Environment=HOME=@roothomedir@ -+WorkingDirectory=@roothomedir@ ++WorkingDirectory=-@roothomedir@ ExecStart=-@SULOGIN@ ExecStopPost=-@SYSTEMCTL@ poweroff Type=idle -Index: git/units/emergency.service.in -=================================================================== ---- git.orig/units/emergency.service.in -+++ git/units/emergency.service.in +diff --git a/units/emergency.service.in b/units/emergency.service.in +index fb390ea..5623a57 100644 +--- a/units/emergency.service.in ++++ b/units/emergency.service.in @@ -14,8 +14,8 @@ Conflicts=rescue.service Before=shutdown.target [Service] -Environment=HOME=/root --WorkingDirectory=/root +-WorkingDirectory=-/root +Environment=HOME=@roothomedir@ -+WorkingDirectory=@roothomedir@ ++WorkingDirectory=-@roothomedir@ ExecStartPre=-/bin/plymouth --wait quit 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.' ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" -Index: git/units/rescue.service.in -=================================================================== ---- git.orig/units/rescue.service.in -+++ git/units/rescue.service.in -@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.serv +diff --git a/units/rescue.service.in b/units/rescue.service.in +index 92553f6..590ae17 100644 +--- a/units/rescue.service.in ++++ b/units/rescue.service.in +@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service Before=shutdown.target [Service] -Environment=HOME=/root --WorkingDirectory=/root +-WorkingDirectory=-/root +Environment=HOME=@roothomedir@ -+WorkingDirectory=@roothomedir@ ++WorkingDirectory=-@roothomedir@ ExecStartPre=-/bin/plymouth quit - 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.' + ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch index e562bca10..a35123733 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch @@ -1,7 +1,7 @@ -From 7e202f71785bf5a67c8a4f6b58d3585608fbfdc4 Mon Sep 17 00:00:00 2001 +From f70a1a9605cd3adac450c49a5a69da6e9acda517 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 20 Feb 2015 05:26:25 +0000 -Subject: [PATCH 11/11] systemd-user: avoid using system-auth +Subject: [PATCH 15/36] systemd-user: avoid using system-auth In OE, we don't provide system-auth, instead, we use common-* files. So modify systemd-user file to use common-* files. @@ -11,21 +11,26 @@ Upstream-Status: Inappropriate [oe specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - src/login/systemd-user | 4 ++-- + src/login/systemd-user.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/login/systemd-user b/src/login/systemd-user -index 8112d74..99635af 100644 ---- a/src/login/systemd-user -+++ b/src/login/systemd-user -@@ -2,5 +2,5 @@ +diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4 +index 7933508..16b73d2 100644 +--- a/src/login/systemd-user.m4 ++++ b/src/login/systemd-user.m4 +@@ -2,10 +2,10 @@ # # Used by systemd --user instances. -account include system-auth --session include system-auth +account include common-account + + m4_ifdef(`HAVE_SELINUX', + session required pam_selinux.so close + session required pam_selinux.so nottys open + )m4_dnl +-session include system-auth +session include common-session -- -2.1.4 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch index fe2ba5328..66905b5c5 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch @@ -1,7 +1,7 @@ -From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001 +From 7311ecc745c17d6ed9fd9cf43039648483a87605 Mon Sep 17 00:00:00 2001 From: Jonathan Liu <net147@gmail.com> Date: Thu, 19 Mar 2015 15:01:29 +1100 -Subject: [PATCH] Revert "rules: remove firmware loading rules" +Subject: [PATCH 16/36] Revert "rules: remove firmware loading rules" This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19. Userspace firmware loading support is needed for Linux < 3.7. @@ -24,5 +24,5 @@ index 0000000..f0ae684 + +SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware" -- -2.3.3 +1.8.3.1 diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch index 6308cc73a..8e6289d4a 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch @@ -1,7 +1,8 @@ -From 7f074def4e32045353ba4336d703e17b8de7ec4e Mon Sep 17 00:00:00 2001 -From: Jonathan Liu <net147@gmail.com> -Date: Thu, 19 Mar 2015 15:01:33 +1100 -Subject: [PATCH] Revert "udev: remove userspace firmware loading support" +From 9a3a4e16b36e762291cd1574ec71d7954f8b5363 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 14 Dec 2015 05:33:32 +0000 +Subject: [PATCH 17/36] Revert "udev: remove userspace firmware loading + support" This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca. Userspace firmware loading support is needed for Linux < 3.7. @@ -9,23 +10,24 @@ Userspace firmware loading support is needed for Linux < 3.7. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Jonathan Liu <net147@gmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- Makefile.am | 12 +++ - README | 9 ++- + README | 6 +- TODO | 1 + - configure.ac | 20 +++++ + configure.ac | 22 ++++++ src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++ src/udev/udev-builtin.c | 3 + src/udev/udev.h | 6 ++ src/udev/udevd.c | 13 ++++ - 8 files changed, 214 insertions(+), 4 deletions(-) + 8 files changed, 214 insertions(+), 3 deletions(-) create mode 100644 src/udev/udev-builtin-firmware.c -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am -+++ git/Makefile.am -@@ -3470,6 +3470,18 @@ libudev_core_la_LIBADD = \ +diff --git a/Makefile.am b/Makefile.am +index a99e8eb..b5c6ba7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3573,6 +3573,18 @@ libudev_core_la_LIBADD = \ $(BLKID_LIBS) \ $(KMOD_LIBS) @@ -44,21 +46,11 @@ Index: git/Makefile.am if HAVE_KMOD libudev_core_la_SOURCES += \ src/udev/udev-builtin-kmod.c -Index: git/README -=================================================================== ---- git.orig/README -+++ git/README -@@ -36,7 +36,8 @@ LICENSE: - - except src/udev/* which is (currently still) GPLv2, GPLv2+ - - REQUIREMENTS: -- Linux kernel >= 3.7 -+ Linux kernel >= 3.0 -+ Linux kernel >= 3.3 for loop device partition support features with nspawn - Linux kernel >= 3.8 for Smack support - - Kernel Config Options: -@@ -51,14 +52,14 @@ REQUIREMENTS: +diff --git a/README b/README +index 41fb07a..10230ac 100644 +--- a/README ++++ b/README +@@ -50,14 +50,14 @@ REQUIREMENTS: CONFIG_PROC_FS CONFIG_FHANDLE (libudev, mount and bind mount handling) @@ -76,24 +68,24 @@ Index: git/README CONFIG_FW_LOADER_USER_HELPER=n Some udev rules and virtualization detection relies on it: -Index: git/TODO -=================================================================== ---- git.orig/TODO -+++ git/TODO -@@ -754,6 +754,7 @@ Features: - * ExecOnFailure=/usr/bin/foo +diff --git a/TODO b/TODO +index 92cc8cc..25f6849 100644 +--- a/TODO ++++ b/TODO +@@ -628,6 +628,7 @@ Features: + * rename "userspace" to "core-os" * udev: + - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n) - move to LGPL - kill scsi_id - add trigger --subsystem-match=usb/usb_device device -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -1268,6 +1268,26 @@ fi - AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) +diff --git a/configure.ac b/configure.ac +index 16c83bb..36d20b5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1353,6 +1353,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database + AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes]) # ------------------------------------------------------------------------------ +AC_ARG_WITH(firmware-path, @@ -114,23 +106,25 @@ Index: git/configure.ac +AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) +AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) + -+ +# ------------------------------------------------------------------------------ - AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])], - enable_hwdb=$enableval, enable_hwdb=yes) - AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes]) -@@ -1574,6 +1594,7 @@ AC_MSG_RESULT([ + have_manpages=no + AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) + AC_PATH_PROG([XSLTPROC], [xsltproc]) +@@ -1653,6 +1672,9 @@ AC_MSG_RESULT([ + SysV init scripts: ${SYSTEM_SYSVINIT_PATH} SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} Build Python: ${PYTHON} - sphinx binary: ${SPHINX_BUILD} ++ Installation Python: ${PYTHON_BINARY} ++ sphinx binary: ${SPHINX_BUILD} + firmware path: ${FIRMWARE_PATH} PAM modules dir: ${with_pamlibdir} PAM configuration dir: ${with_pamconfdir} D-Bus policy dir: ${with_dbuspolicydir} -Index: git/src/udev/udev-builtin-firmware.c -=================================================================== +diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c +new file mode 100644 +index 0000000..bd8c2fb --- /dev/null -+++ git/src/udev/udev-builtin-firmware.c ++++ b/src/udev/udev-builtin-firmware.c @@ -0,0 +1,154 @@ +/* + * firmware - Kernel firmware loader @@ -286,11 +280,11 @@ Index: git/src/udev/udev-builtin-firmware.c + .help = "kernel firmware loader", + .run_once = true, +}; -Index: git/src/udev/udev-builtin.c -=================================================================== ---- git.orig/src/udev/udev-builtin.c -+++ git/src/udev/udev-builtin.c -@@ -30,6 +30,9 @@ static const struct udev_builtin *builti +diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c +index e6b36f1..cd9947e 100644 +--- a/src/udev/udev-builtin.c ++++ b/src/udev/udev-builtin.c +@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = { [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, #endif [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, @@ -300,11 +294,11 @@ Index: git/src/udev/udev-builtin.c [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard, -Index: git/src/udev/udev.h -=================================================================== ---- git.orig/src/udev/udev.h -+++ git/src/udev/udev.h -@@ -146,6 +146,9 @@ enum udev_builtin_cmd { +diff --git a/src/udev/udev.h b/src/udev/udev.h +index 1f9c812..fa35a88 100644 +--- a/src/udev/udev.h ++++ b/src/udev/udev.h +@@ -147,6 +147,9 @@ enum udev_builtin_cmd { UDEV_BUILTIN_BLKID, #endif UDEV_BUILTIN_BTRFS, @@ -314,7 +308,7 @@ Index: git/src/udev/udev.h UDEV_BUILTIN_HWDB, UDEV_BUILTIN_INPUT_ID, UDEV_BUILTIN_KEYBOARD, -@@ -174,6 +177,9 @@ struct udev_builtin { +@@ -175,6 +178,9 @@ struct udev_builtin { extern const struct udev_builtin udev_builtin_blkid; #endif extern const struct udev_builtin udev_builtin_btrfs; @@ -324,11 +318,11 @@ Index: git/src/udev/udev.h extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_input_id; extern const struct udev_builtin udev_builtin_keyboard; -Index: git/src/udev/udevd.c -=================================================================== ---- git.orig/src/udev/udevd.c -+++ git/src/udev/udevd.c -@@ -116,6 +116,9 @@ struct event { +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index bb92f16..84024ac 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -125,6 +125,9 @@ struct event { bool is_block; sd_event_source *timeout_warning; sd_event_source *timeout; @@ -338,7 +332,7 @@ Index: git/src/udev/udevd.c }; static inline struct event *node_to_event(struct udev_list_node *node) { -@@ -607,6 +610,10 @@ static int event_queue_insert(Manager *m +@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) { event->devnum = udev_device_get_devnum(dev); event->is_block = streq("block", udev_device_get_subsystem(dev)); event->ifindex = udev_device_get_ifindex(dev); @@ -349,7 +343,7 @@ Index: git/src/udev/udevd.c log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), udev_device_get_action(dev), udev_device_get_subsystem(dev)); -@@ -692,6 +699,12 @@ static bool is_devpath_busy(Manager *man +@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) { return true; } @@ -362,3 +356,6 @@ Index: git/src/udev/udevd.c /* parent device event found */ if (event->devpath[common] == '/') { event->delaying_seqnum = loop_event->seqnum; +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch new file mode 100644 index 000000000..5f3f2e8a5 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch @@ -0,0 +1,64 @@ +From 569cd3cf9806a02226d26c4104dbe44262f93d33 Mon Sep 17 00:00:00 2001 +From: Roy Li <rongqing.li@windriver.com> +Date: Fri, 22 Jan 2016 16:44:11 +0800 +Subject: [PATCH 18/36] make test dir configurable + +Upstream-Status: Pending + +test maybe be run on target in cross-compile environment, and test dir +is not the compilation dir, so make it configurable + +Signed-off-by: Roy Li <rongqing.li@windriver.com> +--- + Makefile.am | 2 +- + configure.ac | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index b5c6ba7..d3cd961 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -203,7 +203,7 @@ AM_CPPFLAGS = \ + -DROOTLIBDIR=\"$(rootlibdir)\" \ + -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ + -DROOTHOMEDIR=\"$(roothomedir)\" \ +- -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ ++ -DTEST_DIR=\"$(testdir)/test\" \ + -I $(top_srcdir)/src \ + -I $(top_builddir)/src/basic \ + -I $(top_srcdir)/src/basic \ +diff --git a/configure.ac b/configure.ac +index 36d20b5..d96dc5a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1494,6 +1494,11 @@ AC_ARG_WITH([roothomedir], + [], + [with_roothomedir=/root]) + ++AC_ARG_WITH([testdir], ++ AS_HELP_STRING([--with-testdir=DIR], [test file directory]), ++ [], ++ [with_testdir=${abs_top_srcdir}]) ++ + AC_ARG_WITH([pamlibdir], + AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), + [], +@@ -1578,6 +1583,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir]) + AC_SUBST([rootprefix], [$with_rootprefix]) + AC_SUBST([rootlibdir], [$with_rootlibdir]) + AC_SUBST([roothomedir], [$with_roothomedir]) ++AC_SUBST([testdir], [$with_testdir]) + + AC_CONFIG_FILES([ + Makefile +@@ -1669,6 +1675,7 @@ AC_MSG_RESULT([ + lib dir: ${libdir} + rootlib dir: ${with_rootlibdir} + root home dir: ${with_roothomedir} ++ test dir: ${with_testdir} + SysV init scripts: ${SYSTEM_SYSVINIT_PATH} + SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} + Build Python: ${PYTHON} +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch new file mode 100644 index 000000000..17592f8aa --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch @@ -0,0 +1,42 @@ +From 3ca534935460647fed66e31aaa90b364e29eab5c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 22 Feb 2016 05:59:01 +0000 +Subject: [PATCH 1/2] remove duplicate include uchar.h + +missing.h already includes it + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/basic/escape.h | 1 - + src/basic/utf8.h | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/src/basic/escape.h b/src/basic/escape.h +index deaa4de..36d437c 100644 +--- a/src/basic/escape.h ++++ b/src/basic/escape.h +@@ -23,7 +23,6 @@ + #include <stddef.h> + #include <stdint.h> + #include <sys/types.h> +-#include <uchar.h> + + #include "string-util.h" + #include "missing.h" +diff --git a/src/basic/utf8.h b/src/basic/utf8.h +index 12c272d..bea93a6 100644 +--- a/src/basic/utf8.h ++++ b/src/basic/utf8.h +@@ -22,7 +22,6 @@ + #include <stdbool.h> + #include <stddef.h> + #include <stdint.h> +-#include <uchar.h> + + #include "macro.h" + #include "missing.h" +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch new file mode 100644 index 000000000..a027fad1d --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch @@ -0,0 +1,44 @@ +From e06eec89a22719c38e257fe07afff18e359114cb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 22 Feb 2016 06:02:38 +0000 +Subject: [PATCH 2/2] check for uchar.h in configure + +Use ifdef to include uchar.h + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + configure.ac | 1 + + src/basic/missing.h | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index ecc3e6b..62f934e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -297,6 +297,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) + + # ------------------------------------------------------------------------------ + ++AC_CHECK_HEADERS([uchar.h], [], []) + AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) + AC_CHECK_HEADERS([linux/btrfs.h], [], []) + AC_CHECK_HEADERS([linux/memfd.h], [], []) +diff --git a/src/basic/missing.h b/src/basic/missing.h +index f704422..a1baa95 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -34,7 +34,9 @@ + #include <stdlib.h> + #include <sys/resource.h> + #include <sys/syscall.h> ++#ifdef HAVE_UCHAR_H + #include <uchar.h> ++#endif + #include <unistd.h> + + #ifdef HAVE_AUDIT +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch new file mode 100644 index 000000000..5797a29e6 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch @@ -0,0 +1,27 @@ +From 6cedbaee7964f6a6c61b9f2c8f0b87cef9370424 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 15 Dec 2015 22:51:55 +0000 +Subject: [PATCH 26/38] include missing.h for getting secure_getenv definition + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/basic/user-util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/user-util.c b/src/basic/user-util.c +index 55672b3..22c4a23 100644 +--- a/src/basic/user-util.c ++++ b/src/basic/user-util.c +@@ -38,6 +38,7 @@ + #include "path-util.h" + #include "string-util.h" + #include "user-util.h" ++#include "missing.h" + + bool uid_is_valid(uid_t uid) { + +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch new file mode 100644 index 000000000..96fc3d844 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch @@ -0,0 +1,36 @@ +From 71e710a6c8a3879af7d50c4cb995e0615deba5c3 Mon Sep 17 00:00:00 2001 +From: Emil Renner Berthing <systemd@esmil.dk> +Date: Sat, 12 Sep 2015 19:56:52 +0000 +Subject: [PATCH 29/38] socket-util: don't fail if libc doesn't support IDN + +Signed-off-by: Emil Renner Berthing <systemd@esmil.dk> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/basic/socket-util.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c +index 5851268..aefaca5 100644 +--- a/src/basic/socket-util.c ++++ b/src/basic/socket-util.c +@@ -44,6 +44,15 @@ + #include "string-util.h" + #include "user-util.h" + #include "util.h" ++/* Don't fail if the standard library ++ * doesn't support IDN */ ++#ifndef NI_IDN ++#define NI_IDN 0 ++#endif ++ ++#ifndef NI_IDN_USE_STD3_ASCII_RULES ++#define NI_IDN_USE_STD3_ASCII_RULES 0 ++#endif + + int socket_address_parse(SocketAddress *a, const char *s) { + char *e, *n; +-- +1.8.3.1 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch new file mode 100644 index 000000000..1ae3d66c7 --- /dev/null +++ b/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch @@ -0,0 +1,122 @@ +From b68f10bf1f7519e012da5e35fab3a57da7dc46d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Sun, 27 Mar 2016 17:33:54 -0400 +Subject: [PATCH] build-sys: fix build with libgrcypt disabled + +- Move gcrypt.h include inside grcrypt-util.h. +- Allow gcrypt-util.[ch] to be compiled even without gcrypt. +This allows the logic in files using gcrypt to be simplified. + +- Fix compilation of systemd-resolve without gcrypt. +systemd-resolved already supported that. + +Upstream-Status: Backport [ https://github.com/systemd/systemd/pull/2905 ] + +Fixes [YOCTO #9219] + +Signed-off-by: Maxin B. John <maxin.john@intel.com> +--- + Makefile.am | 8 ++++---- + src/resolve/resolve-tool.c | 3 +-- + src/shared/gcrypt-util.c | 4 +++- + src/shared/gcrypt-util.h | 14 ++++++++++++++ + 4 files changed, 22 insertions(+), 7 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 2b72a53..95eaa9a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4262,7 +4262,9 @@ libsystemd_journal_internal_la_SOURCES = \ + src/journal/mmap-cache.h \ + src/journal/compress.c \ + src/journal/audit-type.h \ +- src/journal/audit-type.c ++ src/journal/audit-type.c \ ++ src/shared/gcrypt-util.h \ ++ src/shared/gcrypt-util.c + + nodist_libsystemd_journal_internal_la_SOURCES = \ + src/journal/audit_type-to-name.h +@@ -4294,9 +4296,7 @@ libsystemd_journal_internal_la_SOURCES += \ + src/journal/journal-authenticate.c \ + src/journal/journal-authenticate.h \ + src/journal/fsprg.c \ +- src/journal/fsprg.h \ +- src/shared/gcrypt-util.c \ +- src/shared/gcrypt-util.h ++ src/journal/fsprg.h + + libsystemd_journal_internal_la_LIBADD += \ + $(GCRYPT_LIBS) +diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c +index 009cc73..14ee01c 100644 +--- a/src/resolve/resolve-tool.c ++++ b/src/resolve/resolve-tool.c +@@ -17,7 +17,6 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + +-#include <gcrypt.h> + #include <getopt.h> + #include <net/if.h> + +@@ -863,7 +862,7 @@ static int resolve_openpgp(sd_bus *bus, const char *address) { + } + domain++; + +- r = string_hashsum(address, domain - 1 - address, GCRY_MD_SHA224, &hashed); ++ r = string_hashsum_sha224(address, domain - 1 - address, &hashed); + if (r < 0) + return log_error_errno(r, "Hashing failed: %m"); + +diff --git a/src/shared/gcrypt-util.c b/src/shared/gcrypt-util.c +index 4ff9452..39b544b 100644 +--- a/src/shared/gcrypt-util.c ++++ b/src/shared/gcrypt-util.c +@@ -19,10 +19,11 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#ifdef HAVE_GCRYPT + #include <gcrypt.h> + +-#include "hexdecoct.h" + #include "gcrypt-util.h" ++#include "hexdecoct.h" + + void initialize_libgcrypt(bool secmem) { + const char *p; +@@ -67,3 +68,4 @@ int string_hashsum(const char *s, size_t len, int md_algorithm, char **out) { + *out = enc; + return 0; + } ++#endif +diff --git a/src/shared/gcrypt-util.h b/src/shared/gcrypt-util.h +index c7652c2..cf33b3c 100644 +--- a/src/shared/gcrypt-util.h ++++ b/src/shared/gcrypt-util.h +@@ -19,7 +19,21 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#include <errno.h> + #include <stdbool.h> ++#include <stddef.h> ++ ++#ifdef HAVE_GCRYPT ++#include <gcrypt.h> + + void initialize_libgcrypt(bool secmem); + int string_hashsum(const char *s, size_t len, int md_algorithm, char **out); ++#endif ++ ++static inline int string_hashsum_sha224(const char *s, size_t len, char **out) { ++#ifdef HAVE_GCRYPT ++ return string_hashsum(s, len, GCRY_MD_SHA224, out); ++#else ++ return -EOPNOTSUPP; ++#endif ++} +-- +2.4.0 + diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest b/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest index a2d61c289..2ae76ffaf 100644 --- a/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest +++ b/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest @@ -1,5 +1,6 @@ #!/bin/sh +cd tests tar -C test -xJf test/sys.tar.xz -make test/rules-test.sh.log -make test/udev-test.pl.log +make check-TESTS +cd .. |