Skip to contentSkip to conversation

systemd: upgrade to 242

PATCH In review Andrej Valek 3 participants 4 messages Apr 18, 2019 – Apr 26, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: upgrade to 242

PATCH REBASED:
==============
0001-do-not-disable-buffer-in-writing-files.patch 0002-don-t-use-glibc-specific-qsort_r.patch 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch 0004-add-fallback-parse_printf_format-implementation.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch 0021-avoid-redefinition-of-prctl_mm_map-structure.patch 0024-test-json.c-define-M_PIl.patch

PATCH DROPPED:
==============
0001-meson-declare-version.h-as-dep-for-various-targets-t.patch 0001-meson-declare-version.h-as-dependency-for-systemd.patch 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch

PATCH ADDED:
0025-fs-utilh-add-missing-sys-stat-include.patch

---
 .../{systemd-boot_241.bb => systemd-boot_242.bb}   |   0
 .../{systemd-conf_241.bb => systemd-conf_242.bb}   |   0
 meta/recipes-core/systemd/systemd.inc              |   4 +-
 ...01-do-not-disable-buffer-in-writing-files.patch | 208 ++++---------
 ...re-version.h-as-dep-for-various-targets-t.patch | 118 --------
 ...clare-version.h-as-dependency-for-systemd.patch |  32 --
 .../0002-don-t-use-glibc-specific-qsort_r.patch    |  39 ++-
 ...e.h-add-__compare_fn_t-and-comparison_fn_.patch |  32 +-
 ...llback-parse_printf_format-implementation.patch |  22 +-
 ...les-watch-metadata-changes-in-ide-devices.patch |   4 +-
 ...asic-missing.h-check-for-missing-strndupa.patch | 326 +++++++++++++++++++--
 ...-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch |  55 ++--
 ...il-don-t-fail-if-libc-doesn-t-support-IDN.patch |   8 +-
 ...exdecoct.c-Include-missing.h-for-strndupa.patch |  28 --
 ...ble-buffering-when-writing-to-oom_score_a.patch |   9 +-
 ...id-redefinition-of-prctl_mm_map-structure.patch |  19 +-
 .../systemd/0024-test-json.c-define-M_PIl.patch    |   8 +-
 ...025-fs-utilh-add-missing-sys-stat-include.patch |  28 ++
 .../systemd/{systemd_241.bb => systemd_242.bb}     |   4 +-
 19 files changed, 492 insertions(+), 452 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_241.bb => systemd-boot_242.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_241.bb => systemd-conf_242.bb} (100%)
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dep-for-various-targets-t.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dependency-for-systemd.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch
 rename meta/recipes-core/systemd/{systemd_241.bb => systemd_242.bb} (99%)
meta/recipes-core/systemd/systemd-boot_242.bb renamed from meta/recipes-core/systemd/systemd-boot_241.bb +0 -0
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_241.bb
rename to meta/recipes-core/systemd/systemd-boot_242.bb
meta/recipes-core/systemd/systemd-conf_242.bb renamed from meta/recipes-core/systemd/systemd-conf_241.bb +0 -0
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_241.bb
rename to meta/recipes-core/systemd/systemd-conf_242.bb
meta/recipes-core/systemd/systemd.inc +2 -2
index 5bd88ed6ed..193087ab05 100644
@@ -14,8 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "c1f8ff8d0de7e303b8004b02a0a47d4cc103a7f8"
-SRCBRANCH = "v241-stable"
+SRCREV = "1e5d2d656420d0e755dbcf72aeba3c3aba54e956"
+SRCBRANCH = "v242-stable"
 SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
 S = "${WORKDIR}/git"
meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch +62 -146

436 lines not on this page · raw message

meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dep-for-various-targets-t.patch deleted +0 -118

118 lines not on this page · raw message

meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dependency-for-systemd.patch deleted +0 -32
deleted file mode 100644
index 8874dff9a5..0000000000
@@ -1,32 +0,0 @@
-From e14d724a932a255eec4d60b08e128519c33e88ee Mon Sep 17 00:00:00 2001
-From: Michael Olbrich <[email protected]>
-Date: Mon, 25 Feb 2019 11:59:23 +0100
-Subject: [PATCH] meson: declare version.h as dependency for systemd
-
-This is a followup to #11815 and adds the last missing dependency.
-With this #11565 is hopefully really fixed.
-
-Upstream-Status: Backport
-
-Signed-off-by: Chen Qi <[email protected]>
----
- meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 232f3e1..70148be 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1618,7 +1618,8 @@ executable('systemd',
-            include_directories : includes,
-            link_with : [libcore,
-                         libshared],
--           dependencies : [threads,
-+           dependencies : [versiondep,
-+                           threads,
-                            librt,
-                            libseccomp,
-                            libselinux,
--- 
-2.7.4
-
meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +19 -20
index 36e0699da9..c6213ab88e 100644
@@ -8,20 +8,23 @@ Upstream-Status: Inappropriate [musl specific]
 Signed-off-by: Khem Raj <[email protected]>
 [Rebased for v241]
 Signed-off-by: Chen Qi <[email protected]>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <[email protected]>
 ---
- src/basic/util.h                   | 14 --------------
+ src/basic/sort-util.h              | 14 --------------
  src/libsystemd/sd-hwdb/hwdb-util.c | 19 ++++++++++++++-----
  src/shared/format-table.c          | 36 ++++++++++++++++++++++++------------
  3 files changed, 38 insertions(+), 31 deletions(-)
 
-diff --git a/src/basic/util.h b/src/basic/util.h
-index dc33d66..9f6a6ce 100644
---- a/src/basic/util.h
-+++ b/src/basic/util.h
-@@ -116,20 +116,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
+index e029f8646e..27d68b341c 100644
+--- a/src/basic/sort-util.h
++++ b/src/basic/sort-util.h
+@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+                 int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
                  qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
          })
- 
+-
 -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
 -        if (nmemb <= 1)
 -                return;
@@ -35,15 +38,11 @@ index dc33d66..9f6a6ce 100644
 -                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
 -                qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
 -        })
--
- /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */
- static inline void memcpy_safe(void *dst, const void *src, size_t n) {
-         if (n == 0)
 diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
-index f852967..b570ce1 100644
+index c83575c7c8..72f8f3a050 100644
 --- a/src/libsystemd/sd-hwdb/hwdb-util.c
 +++ b/src/libsystemd/sd-hwdb/hwdb-util.c
-@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) {
+@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) {
  
  DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
  
@@ -60,7 +59,7 @@ index f852967..b570ce1 100644
  }
  
  static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
                          .value_off = v,
                  };
  
@@ -72,7 +71,7 @@ index f852967..b570ce1 100644
                  if (val) {
                          /* At this point we have 2 identical properties on the same match-string.
                           * Since we process files in order, we just replace the previous value. */
-@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
                  .line_number = line_number,
          };
          node->values_count++;
@@ -84,10 +83,10 @@ index f852967..b570ce1 100644
  }
  
 diff --git a/src/shared/format-table.c b/src/shared/format-table.c
-index 7d52980..75dbfe1 100644
+index a5c0a99b08..d595cbe372 100644
 --- a/src/shared/format-table.c
 +++ b/src/shared/format-table.c
-@@ -848,31 +848,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
+@@ -850,31 +850,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
          return CMP(index_a, index_b);
  }
  
@@ -131,7 +130,7 @@ index 7d52980..75dbfe1 100644
          }
  
          /* Order identical lines by the order there were originally added in */
-@@ -1105,7 +1107,12 @@ int table_print(Table *t, FILE *f) {
+@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) {
                  for (i = 0; i < n_rows; i++)
                          sorted[i] = i * t->n_columns;
  
@@ -145,7 +144,7 @@ index 7d52980..75dbfe1 100644
          }
  
          if (t->display_map)
-@@ -1532,7 +1539,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
+@@ -1534,7 +1541,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
                  for (i = 0; i < n_rows; i++)
                          sorted[i] = i * t->n_columns;
  
@@ -160,5 +159,5 @@ index 7d52980..75dbfe1 100644
  
          if (t->display_map)
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +17 -15
index 5246b4b26c..2e39f7a2e1 100644
@@ -9,14 +9,16 @@ is not provided.
 Upstream-Status: Inappropriate [musl specific]
 
 Signed-off-by: Chen Qi <[email protected]>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <[email protected]>
 ---
  src/basic/missing_type.h | 9 +++++++++
- src/basic/util.h         | 1 +
+ src/basic/sort-util.h    | 1 +
  src/journal/catalog.c    | 1 +
  3 files changed, 11 insertions(+)
 
 diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index bf8a6ca..c487e65 100644
+index bf8a6caa1b..2134fe5095 100644
 --- a/src/basic/missing_type.h
 +++ b/src/basic/missing_type.h
 @@ -10,3 +10,12 @@
@@ -32,30 +34,30 @@ index bf8a6ca..c487e65 100644
 +#define __COMPAR_FN_T
 +typedef int (*__compar_fn_t)(const void *, const void *);
 +#endif
-diff --git a/src/basic/util.h b/src/basic/util.h
-index 9f6a6ce..2c5dc32 100644
---- a/src/basic/util.h
-+++ b/src/basic/util.h
-@@ -26,6 +26,7 @@
- #include "format-util.h"
+diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
+index e029f86..7247d40 100644
+--- a/src/basic/sort-util.h
++++ b/src/basic/sort-util.h
+@@ -4,6 +4,7 @@
+ #include <stdlib.h>
+ 
  #include "macro.h"
- #include "time-util.h"
 +#include "missing.h"
  
- size_t page_size(void) _pure_;
- #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
+ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+                  __compar_d_fn_t compar, void *arg);
 diff --git a/src/journal/catalog.c b/src/journal/catalog.c
-index 4062f12..034e00c 100644
+index 7beffc1e1a..4818a2e5cc 100644
 --- a/src/journal/catalog.c
 +++ b/src/journal/catalog.c
-@@ -26,6 +26,7 @@
+@@ -29,6 +29,7 @@
+ #include "string-util.h"
  #include "strv.h"
  #include "tmpfile-util.h"
- #include "util.h"
 +#include "missing.h"
  
  const char * const catalog_file_dirs[] = {
          "/usr/local/lib/systemd/catalog/",
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +11 -11
index bb738e22c1..fa8217e3da 100644
@@ -20,10 +20,10 @@ Signed-off-by: Chen Qi <[email protected]>
  create mode 100644 src/basic/parse-printf-format.h
 
 diff --git a/meson.build b/meson.build
-index 3386546..44b24ee 100644
+index 79195c9748..0bffbf29c5 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -667,6 +667,7 @@ foreach header : ['crypt.h',
+@@ -685,6 +685,7 @@ foreach header : ['crypt.h',
                    'linux/memfd.h',
                    'linux/vm_sockets.h',
                    'linux/can/vxcan.h',
@@ -32,10 +32,10 @@ index 3386546..44b24ee 100644
                    'valgrind/memcheck.h',
                    'valgrind/valgrind.h',
 diff --git a/src/basic/meson.build b/src/basic/meson.build
-index e5852f3..2192a0c 100644
+index 91e0df3d2f..a732b554da 100644
 --- a/src/basic/meson.build
 +++ b/src/basic/meson.build
-@@ -284,6 +284,11 @@ foreach item : [['af',     af_list_txt,     'af',         ''],
+@@ -298,6 +298,11 @@ foreach item : [['af',     af_list_txt,     'af',         ''],
  endforeach
  
  basic_sources += generated_gperf_headers
@@ -49,7 +49,7 @@ index e5852f3..2192a0c 100644
          'gcrypt-util.h')
 diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
 new file mode 100644
-index 0000000..49437e5
+index 0000000000..49437e5445
 --- /dev/null
 +++ b/src/basic/parse-printf-format.c
 @@ -0,0 +1,273 @@
@@ -328,7 +328,7 @@ index 0000000..49437e5
 +}
 diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
 new file mode 100644
-index 0000000..47be752
+index 0000000000..47be7522d7
 --- /dev/null
 +++ b/src/basic/parse-printf-format.h
 @@ -0,0 +1,57 @@
@@ -390,7 +390,7 @@ index 0000000..47be752
 +
 +#endif /* HAVE_PRINTF_H */
 diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index dc67b6e..cf8d514 100644
+index c3b9448d4f..2937aa13b1 100644
 --- a/src/basic/stdio-util.h
 +++ b/src/basic/stdio-util.h
 @@ -1,13 +1,13 @@
@@ -403,13 +403,13 @@ index dc67b6e..cf8d514 100644
  #include <sys/types.h>
  
  #include "macro.h"
- #include "util.h"
+ #include "memory-util.h"
 +#include "parse-printf-format.h"
  
  #define snprintf_ok(buf, len, fmt, ...) \
          ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
 diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 8618454..3fea912 100644
+index 5ef11fa1a4..6384ab620c 100644
 --- a/src/journal/journal-send.c
 +++ b/src/journal/journal-send.c
 @@ -2,7 +2,6 @@
@@ -421,13 +421,13 @@ index 8618454..3fea912 100644
  #include <sys/socket.h>
  #include <sys/un.h>
 @@ -21,6 +20,7 @@
+ #include "stdio-util.h"
  #include "string-util.h"
  #include "tmpfile-util.h"
- #include "util.h"
 +#include "parse-printf-format.h"
  
  #define SNDBUF_SIZE (8*1024*1024)
  
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch +2 -2
index 2123052ff6..5312083fdd 100644
@@ -38,8 +38,8 @@ index a1458e9..3ba4b6b4 100644
  ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
  
  # watch metadata changes, caused by tools closing the device node which was opened for writing
--ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*", OPTIONS+="watch"
-+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|hd*", OPTIONS+="watch"
+-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*", OPTIONS+="watch"
++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*|hd*", OPTIONS+="watch"
 -- 
 2.7.4
 
meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +307 -19

382 lines not on this page · raw message

meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch +28 -27

132 lines not on this page · raw message

meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch +4 -4
index 57cb5f3734..1dedbd3b9b 100644
@@ -13,12 +13,12 @@ Signed-off-by: Chen Qi <[email protected]>
  1 file changed, 10 insertions(+)
 
 diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 91bf801..c445fea 100644
+index 904bafb..a7a009d 100644
 --- a/src/basic/socket-util.c
 +++ b/src/basic/socket-util.c
-@@ -33,6 +33,16 @@
+@@ -34,6 +34,16 @@
+ #include "user-util.h"
  #include "utf8.h"
- #include "util.h"
  
 +/* Don't fail if the standard library
 + * doesn't support IDN */
@@ -34,5 +34,5 @@ index 91bf801..c445fea 100644
  #  define IDN_FLAGS NI_IDN
  #else
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch deleted +0 -28
deleted file mode 100644
index 874c17c420..0000000000
@@ -1,28 +0,0 @@
-From e5a48f84db58ffb9128383eaefc123b5829523e5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Mon, 23 Oct 2017 12:33:22 -0700
-Subject: [PATCH 13/24] test-hexdecoct.c: Include missing.h for strndupa
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <[email protected]>
-Signed-off-by: Chen Qi <[email protected]>
----
- src/test/test-hexdecoct.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index 5221742..a05e778 100644
---- a/src/test/test-hexdecoct.c
-+++ b/src/test/test-hexdecoct.c
-@@ -6,6 +6,7 @@
- #include "hexdecoct.h"
- #include "macro.h"
- #include "string-util.h"
-+#include "missing.h"
- 
- static void test_hexchar(void) {
-         assert_se(hexchar(0xa) == 'a');
--- 
-2.7.4
-
meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +5 -4
index 05e6ded71d..b54635e8a9 100644
@@ -22,10 +22,10 @@ Signed-off-by: Chen Qi <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index aec2daf..7b4aabf 100644
+index f773eea..79af915 100644
 --- a/src/basic/process-util.c
 +++ b/src/basic/process-util.c
-@@ -1538,7 +1538,7 @@ int set_oom_score_adjust(int value) {
+@@ -1546,7 +1546,7 @@ int set_oom_score_adjust(int value) {
          sprintf(t, "%i", value);
  
          return write_string_file("/proc/self/oom_score_adj", t,
@@ -33,7 +33,8 @@ index aec2daf..7b4aabf 100644
 +                                 WRITE_STRING_FILE_VERIFY_ON_FAILURE);
  }
  
- static const char *const ioprio_class_table[] = {
+ int cpus_in_affinity_mask(void) {
 -- 
-2.7.4
+2.11.0
+
 
meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch +2 -17
index a8c53c9314..cdddf83890 100644
@@ -11,8 +11,7 @@ Upstream-Status: Inappropriate [musl specific]
 Signed-off-by: Chen Qi <[email protected]>
 ---
  src/basic/missing_prctl.h | 2 ++
- src/basic/util.h          | 3 ++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
+ 1 file changed, 2 insertions(+)
 
 diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h
 index f80cd17..47e4893 100644
@@ -28,20 +27,6 @@ index f80cd17..47e4893 100644
  
  /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */
  #ifndef PR_CAP_AMBIENT
-diff --git a/src/basic/util.h b/src/basic/util.h
-index 2c5dc32..f721184 100644
---- a/src/basic/util.h
-+++ b/src/basic/util.h
-@@ -26,7 +26,8 @@
- #include "format-util.h"
- #include "macro.h"
- #include "time-util.h"
--#include "missing.h"
-+#include "missing_stdlib.h"
-+#include "missing_type.h"
- 
- size_t page_size(void) _pure_;
- #define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch +4 -4
index c2ae2bbb7b..0e5629d37b 100644
@@ -14,11 +14,11 @@ Signed-off-by: Chen Qi <[email protected]>
  1 file changed, 4 insertions(+)
 
 diff --git a/src/test/test-json.c b/src/test/test-json.c
-index fdf1b4f..fa541f8 100644
+index 9b8a2a9..efc746c 100644
 --- a/src/test/test-json.c
 +++ b/src/test/test-json.c
-@@ -10,6 +10,10 @@
- #include "strv.h"
+@@ -11,6 +11,10 @@
+ #include "tests.h"
  #include "util.h"
  
 +#ifndef M_PIl
@@ -29,5 +29,5 @@ index fdf1b4f..fa541f8 100644
          unsigned line = 0, column = 0;
          void *state = NULL;
 -- 
-2.7.4
+2.11.0
 
meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch new file +28 -0
new file mode 100644
index 0000000000..1c6a6f50de
@@ -0,0 +1,28 @@
+From 2560a6b7b9adc5bd5dec0f87c2e3025ced8a2af2 Mon Sep 17 00:00:00 2001
+From: Andrej Valek <[email protected]>
+Date: Thu, 18 Apr 2019 10:47:11 +0200
+Subject: [PATCH] fs-utilh: add missing sys/stat include
+
+fix error:
+| error: passing argument 5 of 'chase_symlinks_and_stat' from incompatible pointer type [-Werror=incompatible-pointer-types]
+
+Signed-off-by: Andrej Valek <[email protected]>
+---
+ src/basic/fs-util.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index b965120..e2fdfff 100644
+--- a/src/basic/fs-util.h
++++ b/src/basic/fs-util.h
+@@ -8,6 +8,7 @@
+ #include <stdint.h>
+ #include <sys/inotify.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <unistd.h>
+ 
+ #include "errno-util.h"
+-- 
+2.11.0
+
meta/recipes-core/systemd/systemd_242.bb renamed from meta/recipes-core/systemd/systemd_241.bb +1 -3
similarity index 99%
rename from meta/recipes-core/systemd/systemd_241.bb
rename to meta/recipes-core/systemd/systemd_242.bb
index 3a58f44a3b..d54076acfc 100644
@@ -22,8 +22,6 @@ SRC_URI += "file://touchscreen.rules \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://0004-rules-whitelist-hd-devices.patch \
            file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
-           file://0001-meson-declare-version.h-as-dep-for-various-targets-t.patch \
-           file://0001-meson-declare-version.h-as-dependency-for-systemd.patch \
            "
 
 # patches needed by musl
@@ -40,7 +38,6 @@ SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.pa
                file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
                file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
                file://0012-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
-               file://0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \
                file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
                file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
                file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
@@ -52,6 +49,7 @@ SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.pa
                file://0022-include-sys-wait.h-to-avoid-compile-failure.patch \
                file://0023-socket-util.h-include-string.h.patch \
                file://0024-test-json.c-define-M_PIl.patch \
+               file://0025-fs-utilh-add-missing-sys-stat-include.patch \
                file://0001-do-not-disable-buffer-in-writing-files.patch \
                "
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 21 lines · Andrej Valek

PATCH REBASED:
==============
0001-do-not-disable-buffer-in-writing-files.patch 0002-don-t-use-glibc-specific-qsort_r.patch 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch 0004-add-fallback-parse_printf_format-implementation.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch 0021-avoid-redefinition-of-prctl_mm_map-structure.patch 0024-test-json.c-define-M_PIl.patch

PATCH DROPPED:
==============
0001-meson-declare-version.h-as-dep-for-various-targets-t.patch 0001-meson-declare-version.h-as-dependency-for-systemd.patch 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch

Quoted 5 lines

PATCH ADDED:
0025-fs-utilh-add-missing-sys-stat-include.patch

---

This change in 242 means I'm no longer getting network up after flashing a new image (I'm flashing the entire eMMC from an image):

* During package installation (with ninja install), we would create symlinks for systemd-networkd.service, systemd-networkd.socket, systemd-resolved.service, remote-cryptsetup.target, remote-fs.target, systemd-networkd-wait-online.service, and systemd-timesyncd.service in /etc, as if systemctl enable was called for those units, to make the system usable immediately after installation. Now this is not done anymore, and instead calling systemctl preset-all is recommended after the first installation of systemd.

I don't know if Jonas is still working on this series:

https://patchwork.openembedded.org/series/15497/

as that looks like it has the kind of machinery we need (though I don't think this problem is specific to read only rootfs now) - I'm looking at the series in case he's not.

The quick-hack fix is to revert 01d2041e41f4 ("meson: stop creating enablement symlinks in /etc during installation"), but clearly that's not sustainable.

--
Alex Kiernan

#2 lore raw

Hi Alex,

Quoted 40 lines · Alex Kiernan
Quoted 21 lines · Andrej Valek

PATCH REBASED:
==============
0001-do-not-disable-buffer-in-writing-files.patch 0002-don-t-use-glibc-specific-qsort_r.patch 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch 0004-add-fallback-parse_printf_format-implementation.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch 0021-avoid-redefinition-of-prctl_mm_map-structure.patch 0024-test-json.c-define-M_PIl.patch

PATCH DROPPED:
==============
0001-meson-declare-version.h-as-dep-for-various-targets-t.patch 0001-meson-declare-version.h-as-dependency-for-systemd.patch 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch

Quoted 5 lines

PATCH ADDED:
0025-fs-utilh-add-missing-sys-stat-include.patch

---

This change in 242 means I'm no longer getting network up after flashing a new image (I'm flashing the entire eMMC from an image):

* During package installation (with ninja install), we would create symlinks for systemd-networkd.service, systemd-networkd.socket, systemd-resolved.service, remote-cryptsetup.target, remote-fs.target, systemd-networkd-wait-online.service, and systemd-timesyncd.service in /etc, as if systemctl enable was called for those units, to make the system usable immediately after installation. Now this is not done anymore, and instead calling systemctl preset-all is recommended after the first installation of systemd.

Quoted 3 lines

I don't know if Jonas is still working on this series:

https://patchwork.openembedded.org/series/15497/

I haven't given up on it, but I had to put it aside for a bit due to more pressing matters.

Quoted 4 lines

as that looks like it has the kind of machinery we need (though I don't think this problem is specific to read only rootfs now) - I'm looking at the series in case he's not.

If you have a writable root, systemd will automatically do the preset-all for you; the catch is, systemd only does this if /etc/machine-id does not exist. OE forces an empty /etc/machine-id onto all root images so this doesn't work; as such, you'll need to do the preset-all magic manually for ALL filesystems irregardless of whether they are read-only or not.

A better solution is drop the /etc/machine-id and let systemd create that automatically; then it will also do the automatic preset-all at first-boot. The problem here is that the OE build farm detects images that stall at boot when /etc/machine-id isn't present; I wasn't able to find the cause of this but that's where you should be looking if you want to pursue this patch series. Aside from that little glitch, I think the rest of it is fine.

And getting this working is also a big step towards making "stateless" systems (using the systemd terminology) work where /etc may be a tmpfs and gets populated at boot.

/Jonas

Quoted 8 lines

The quick-hack fix is to revert 01d2041e41f4 ("meson: stop creating enablement symlinks in /etc during installation"), but clearly that's not sustainable.

--
Alex Kiernan

#3 lore raw
Quoted 44 lines · Jonas Bonn

Hi Alex,

Quoted 40 lines · Alex Kiernan
Quoted 21 lines · Andrej Valek

PATCH REBASED:
==============
0001-do-not-disable-buffer-in-writing-files.patch 0002-don-t-use-glibc-specific-qsort_r.patch 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch 0004-add-fallback-parse_printf_format-implementation.patch 0005-rules-watch-metadata-changes-in-ide-devices.patch 0005-src-basic-missing.h-check-for-missing-strndupa.patch 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch 0021-avoid-redefinition-of-prctl_mm_map-structure.patch 0024-test-json.c-define-M_PIl.patch

PATCH DROPPED:
==============
0001-meson-declare-version.h-as-dep-for-various-targets-t.patch 0001-meson-declare-version.h-as-dependency-for-systemd.patch 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch

Quoted 5 lines

PATCH ADDED:
0025-fs-utilh-add-missing-sys-stat-include.patch

---

This change in 242 means I'm no longer getting network up after flashing a new image (I'm flashing the entire eMMC from an image):

* During package installation (with ninja install), we would create symlinks for systemd-networkd.service, systemd-networkd.socket, systemd-resolved.service, remote-cryptsetup.target, remote-fs.target, systemd-networkd-wait-online.service, and systemd-timesyncd.service in /etc, as if systemctl enable was called for those units, to make the system usable immediately after installation. Now this is not done anymore, and instead calling systemctl preset-all is recommended after the first installation of systemd.

Quoted 7 lines
Quoted 3 lines

I don't know if Jonas is still working on this series:

https://patchwork.openembedded.org/series/15497/

I haven't given up on it, but I had to put it aside for a bit due to more pressing matters.

Don't we all end up in those kind of problems!

Quoted 8 lines
Quoted 4 lines

as that looks like it has the kind of machinery we need (though I don't think this problem is specific to read only rootfs now) - I'm looking at the series in case he's not.

If you have a writable root, systemd will automatically do the preset-all for you; the catch is, systemd only does this if /etc/machine-id does not exist.

Ah... that's useful information that I didn't know.

Whilst I do have a writeable /etc, I'm running under OSTree, so I don't want /etc mutated in the normal use case as I want to ensure that changes in /etc are correctly propagated across upgrades (OSTree does a three way merge of /etc using the current /etc and what was shipped as defaults in the previous deployment and the new deployment).

Quoted 5 lines

OE forces an empty /etc/machine-id onto
all root images so this doesn't work; as such, you'll need to do the preset-all magic manually for ALL filesystems irregardless of whether they are read-only or not.

Quoted 8 lines

A better solution is drop the /etc/machine-id and let systemd create that automatically; then it will also do the automatic preset-all at first-boot. The problem here is that the OE build farm detects images that stall at boot when /etc/machine-id isn't present; I wasn't able to find the cause of this but that's where you should be looking if you want to pursue this patch series. Aside from that little glitch, I think the rest of it is fine.

Thanks, I'll see if I can chase that one down.

Quoted 4 lines

And getting this working is also a big step towards making "stateless" systems (using the systemd terminology) work where /etc may be a tmpfs and gets populated at boot.

Yeah, that's something I'd like to get to.

--
Alex Kiernan