All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core] [PATCH 0/4] systemd: Update patches
@ 2022-05-22 17:31 Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 1/4] systemd: Drop 0001-test-parse-argument-Include-signal.h.patch Jiaqing Zhao
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-22 17:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jiaqing Zhao

This patchset updates the existing systemd patches, these patches are
upstreamed, no longer needed or fix needed. Update these patches before
bumping to v251.

Jiaqing Zhao (4):
  systemd: Drop 0001-test-parse-argument-Include-signal.h.patch
  systemd: Remove __compare_fn_t type in musl-specific patch
  systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch
  systemd: Fix path returned in sd_path_lookup()

 ...sysctl.d-binfmt.d-modules-load.d-to-.patch |  73 ++++++++
 ...se-ROOTPREFIX-without-suffixed-slash.patch |  42 -----
 ...test-parse-argument-Include-signal.h.patch |  27 ---
 ...002-don-t-use-glibc-specific-qsort_r.patch | 163 ------------------
 ...-missing_type.h-add-comparison_fn_t.patch} |  44 ++---
 ...missing.h-check-for-missing-strndupa.patch |  14 +-
 meta/recipes-core/systemd/systemd_250.5.bb    |   6 +-
 7 files changed, 96 insertions(+), 273 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
 rename meta/recipes-core/systemd/systemd/{0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch => 0003-missing_type.h-add-comparison_fn_t.patch} (61%)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [oe-core] [PATCH 1/4] systemd: Drop 0001-test-parse-argument-Include-signal.h.patch
  2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
@ 2022-05-22 17:31 ` Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 2/4] systemd: Remove __compare_fn_t type in musl-specific patch Jiaqing Zhao
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-22 17:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jiaqing Zhao

This patch has already been upstreamed in commit systemd/850f0008bff7
("test-parse-argument: Include signal.h") since v249 stable release.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
 ...test-parse-argument-Include-signal.h.patch | 27 -------------------
 meta/recipes-core/systemd/systemd_250.5.bb    |  1 -
 2 files changed, 28 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch b/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
deleted file mode 100644
index 898e8af904..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 93c7e482d39cf7765974b3c729d29c1b120a60e3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 24 May 2021 18:26:27 -0700
-Subject: [PATCH] test-parse-argument: Include signal.h
-
-Fixes
-src/test/test-parse-argument.c:49:29: error: use of undeclared identifier 'SIGABRT'
-
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19718]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/test/test-parse-argument.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/test/test-parse-argument.c b/src/test/test-parse-argument.c
-index cf3d54288a..15104e5282 100644
---- a/src/test/test-parse-argument.c
-+++ b/src/test/test-parse-argument.c
-@@ -5,6 +5,7 @@
- #include "parse-argument.h"
- #include "stdio-util.h"
- #include "tests.h"
-+#include <signal.h>
- 
- TEST(parse_json_argument) {
-         JsonFormatFlags flags = JSON_FORMAT_PRETTY;
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb
index c121fb763e..aca140d4d4 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_250.5.bb
@@ -24,7 +24,6 @@ SRC_URI += "file://touchscreen.rules \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
-           file://0001-test-parse-argument-Include-signal.h.patch \
            file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \
            "
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [oe-core] [PATCH 2/4] systemd: Remove __compare_fn_t type in musl-specific patch
  2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 1/4] systemd: Drop 0001-test-parse-argument-Include-signal.h.patch Jiaqing Zhao
@ 2022-05-22 17:31 ` Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 3/4] systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch Jiaqing Zhao
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-22 17:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jiaqing Zhao

Since systemd v250, commit d8f16737005e ("sort-util: avoid using
glibc's internal __compar_d_fn_t type"), __compare_fn_t type is no
longer used. This patch removes that type in the musl-specific patch.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
 ...-missing_type.h-add-comparison_fn_t.patch} | 44 ++++++-------------
 ...missing.h-check-for-missing-strndupa.patch | 14 +++---
 meta/recipes-core/systemd/systemd_250.5.bb    |  2 +-
 3 files changed, 22 insertions(+), 38 deletions(-)
 rename meta/recipes-core/systemd/systemd/{0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch => 0003-missing_type.h-add-comparison_fn_t.patch} (61%)

diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch
similarity index 61%
rename from meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
rename to meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch
index dfe4164900..c28c8381e8 100644
--- a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
+++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch
@@ -1,13 +1,9 @@
-From a4f51ef07375466f79cb148ff1178ed11f808f0a Mon Sep 17 00:00:00 2001
+From 5513b918d02900a3a78fd0e0300a118b163edfef Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 13:55:12 +0800
-Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t
+Subject: [PATCH] missing_type.h: add comparison_fn_t
 
-Make it work with musl where comparison_fn_t and __compare_fn_t
-is not provided.
-
-Revisit this when upgrading to 251+ systemd since systemd does not need
-__compare_fn_t anymore
+Make it work with musl where comparison_fn_t and is not provided.
 
 Upstream-Status: Inappropriate [musl specific]
 
@@ -16,19 +12,19 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
 Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 [Rebased for v242]
 Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-
+[Rebased for v250, Drop __compare_fn_t]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
 ---
- src/basic/missing_type.h            | 9 +++++++++
+ src/basic/missing_type.h            | 4 ++++
  src/basic/sort-util.h               | 1 +
- src/core/kmod-setup.c               | 1 +
  src/libsystemd/sd-journal/catalog.c | 1 +
- 4 files changed, 12 insertions(+)
+ 3 files changed, 6 insertions(+)
 
 diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index f6233090a9..aeaf6ad5ec 100644
+index f6233090a9..6c0456349d 100644
 --- a/src/basic/missing_type.h
 +++ b/src/basic/missing_type.h
-@@ -10,3 +10,12 @@
+@@ -10,3 +10,7 @@
  #if !HAVE_CHAR16_T
  #define char16_t uint16_t
  #endif
@@ -36,13 +32,8 @@ index f6233090a9..aeaf6ad5ec 100644
 +#ifndef __GLIBC__
 +typedef int (*comparison_fn_t)(const void *, const void *);
 +#endif
-+
-+#ifndef __COMPAR_FN_T
-+#define __COMPAR_FN_T
-+typedef int (*__compar_fn_t)(const void *, const void *);
-+#endif
 diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index cb448df109..fd738a65ab 100644
+index 02a6784d99..0b33c83d59 100644
 --- a/src/basic/sort-util.h
 +++ b/src/basic/sort-util.h
 @@ -4,6 +4,7 @@
@@ -53,18 +44,6 @@ index cb448df109..fd738a65ab 100644
  
  /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
   * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
-diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index d054668b8e..d3bf55acbe 100644
---- a/src/core/kmod-setup.c
-+++ b/src/core/kmod-setup.c
-@@ -10,6 +10,7 @@
- #include "macro.h"
- #include "recurse-dir.h"
- #include "string-util.h"
-+#include "missing_type.h"
- 
- #if HAVE_KMOD
- #include "module-util.h"
 diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
 index 8fc87b131a..36a6efdbd8 100644
 --- a/src/libsystemd/sd-journal/catalog.c
@@ -77,3 +56,6 @@ index 8fc87b131a..36a6efdbd8 100644
  
  const char * const catalog_file_dirs[] = {
          "/usr/local/lib/systemd/catalog/",
+-- 
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index 4b1fac06b5..680930ca3c 100644
--- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -1,4 +1,4 @@
-From 55d48dd81e57add5b2d4b5a7d697c575a0f37ef5 Mon Sep 17 00:00:00 2001
+From 106b7bd7186c9d6c1dcd72bd4ca6457d3fa72d0b Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 14:18:21 +0800
 Subject: [PATCH] src/basic/missing.h: check for missing strndupa
@@ -17,7 +17,6 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
 [rebased for systemd 244]
 [Rebased for v247]
 Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
-
 ---
  meson.build                                |  1 +
  src/backlight/backlight.c                  |  1 +
@@ -74,7 +73,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
  52 files changed, 63 insertions(+)
 
 diff --git a/meson.build b/meson.build
-index ae53345260..8c8a6c9bdf 100644
+index cb9936ee8b..7ab201c6d9 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__secure_getenv']
@@ -310,13 +309,13 @@ index 0b20d386d3..fccfb9268c 100644
  #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
  #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
 diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index d3bf55acbe..63dd807b8a 100644
+index d054668b8e..9b4caa7651 100644
 --- a/src/core/kmod-setup.c
 +++ b/src/core/kmod-setup.c
-@@ -11,6 +11,7 @@
+@@ -10,6 +10,7 @@
+ #include "macro.h"
  #include "recurse-dir.h"
  #include "string-util.h"
- #include "missing_type.h"
 +#include "missing_stdlib.h"
  
  #if HAVE_KMOD
@@ -705,3 +704,6 @@ index 1a384d6b38..0089833e3f 100644
  
  #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
  
+-- 
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb
index aca140d4d4..6d6b3f2ded 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_250.5.bb
@@ -31,7 +31,7 @@ SRC_URI += "file://touchscreen.rules \
 SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
 SRC_URI_MUSL = "\
                file://0002-don-t-use-glibc-specific-qsort_r.patch \
-               file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
+               file://0003-missing_type.h-add-comparison_fn_t.patch \
                file://0004-add-fallback-parse_printf_format-implementation.patch \
                file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
                file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [oe-core] [PATCH 3/4] systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch
  2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 1/4] systemd: Drop 0001-test-parse-argument-Include-signal.h.patch Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 2/4] systemd: Remove __compare_fn_t type in musl-specific patch Jiaqing Zhao
@ 2022-05-22 17:31 ` Jiaqing Zhao
  2022-05-22 17:31 ` [oe-core] [PATCH 4/4] systemd: Fix path returned in sd_path_lookup() Jiaqing Zhao
  2022-05-23  0:17 ` [oe-core] [PATCH 0/4] systemd: Update patches Khem Raj
  4 siblings, 0 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-22 17:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jiaqing Zhao

musl 1.2.3 implements qsort_r function.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
 ...002-don-t-use-glibc-specific-qsort_r.patch | 163 ------------------
 meta/recipes-core/systemd/systemd_250.5.bb    |   1 -
 2 files changed, 164 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch

diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
deleted file mode 100644
index d109860e1a..0000000000
--- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From c542d2d93cf536e91d4edb8791fdc0de732b0a52 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 25 Feb 2019 13:41:41 +0800
-Subject: [PATCH] don't use glibc-specific qsort_r
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-[Rebased for v241]
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-[Rebased for v242]
-Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-[Rebased for v247]
-Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
-
----
- src/basic/sort-util.h     | 14 --------------
- src/shared/format-table.c | 36 ++++++++++++++++++++++++------------
- src/shared/hwdb-util.c    | 19 ++++++++++++++-----
- 3 files changed, 38 insertions(+), 31 deletions(-)
-
-diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index 02a6784d99..cb448df109 100644
---- a/src/basic/sort-util.h
-+++ b/src/basic/sort-util.h
-@@ -61,18 +61,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, comparison
-                 _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \
-         })
- 
--static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) {
--        if (nmemb <= 1)
--                return;
--
--        assert(base);
--        qsort_r(base, nmemb, size, compar, userdata);
--}
--
--#define typesafe_qsort_r(p, n, func, userdata)                          \
--        ({                                                              \
--                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
--                qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \
--        })
--
- int cmp_int(const int *a, const int *b);
-diff --git a/src/shared/format-table.c b/src/shared/format-table.c
-index b95680b365..5ffa208615 100644
---- a/src/shared/format-table.c
-+++ b/src/shared/format-table.c
-@@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
-         return CMP(index_a, index_b);
- }
- 
--static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
-+static Table *user_table;
-+static int table_data_compare(const void *x, const void *y) {
-+        const size_t *a = x, *b=y;
-         int r;
- 
--        assert(t);
--        assert(t->sort_map);
-+        assert(user_table);
-+        assert(user_table->sort_map);
- 
-         /* Make sure the header stays at the beginning */
--        if (*a < t->n_columns && *b < t->n_columns)
-+        if (*a < user_table->n_columns && *b < user_table->n_columns)
-                 return 0;
--        if (*a < t->n_columns)
-+        if (*a < user_table->n_columns)
-                 return -1;
--        if (*b < t->n_columns)
-+        if (*b < user_table->n_columns)
-                 return 1;
- 
-         /* Order other lines by the sorting map */
--        for (size_t i = 0; i < t->n_sort_map; i++) {
-+        for (size_t i = 0; i < user_table->n_sort_map; i++) {
-                 TableData *d, *dd;
- 
--                d = t->data[*a + t->sort_map[i]];
--                dd = t->data[*b + t->sort_map[i]];
-+                d = user_table->data[*a + user_table->sort_map[i]];
-+                dd = user_table->data[*b + user_table->sort_map[i]];
- 
-                 r = cell_data_compare(d, *a, dd, *b);
-                 if (r != 0)
--                        return t->reverse_map && t->reverse_map[t->sort_map[i]] ? -r : r;
-+                        return user_table->reverse_map && user_table->reverse_map[user_table->sort_map[i]] ? -r : r;
-         }
- 
-         /* Order identical lines by the order there were originally added in */
-@@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) {
-                 for (size_t i = 0; i < n_rows; i++)
-                         sorted[i] = i * t->n_columns;
- 
--                typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
-+                if (n_rows <= 1)
-+                        return 0;
-+                assert(sorted);
-+                user_table = t;
-+                qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
-+                user_table = NULL;
-         }
- 
-         if (t->display_map)
-@@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
-                 for (size_t i = 0; i < n_rows; i++)
-                         sorted[i] = i * t->n_columns;
- 
--                typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
-+                if (n_rows <= 1)
-+                        return 0;
-+                assert(sorted);
-+                user_table = t;
-+                qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
-+                user_table = NULL;
-         }
- 
-         if (t->display_map)
-diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c
-index fe4785f3e5..827e1639c3 100644
---- a/src/shared/hwdb-util.c
-+++ b/src/shared/hwdb-util.c
-@@ -127,9 +127,13 @@ static struct trie* trie_free(struct trie *trie) {
- 
- DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
- 
--static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
--        return strcmp(trie->strings->buf + a->key_off,
--                      trie->strings->buf + b->key_off);
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
-+        const struct trie_value_entry *a = v1;
-+        const struct trie_value_entry *b = v2;
-+
-+        return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
-+                      trie_node_add_value_trie->strings->buf + b->key_off);
- }
- 
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -157,7 +161,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-                         .value_off = v,
-                 };
- 
--                val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
-+                trie_node_add_value_trie = trie;
-+                val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+                trie_node_add_value_trie = NULL;
-+
-                 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. */
-@@ -183,7 +190,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-                 .line_number = line_number,
-         };
-         node->values_count++;
--        typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
-+        trie_node_add_value_trie = trie;
-+        qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+        trie_node_add_value_trie = NULL;
-         return 0;
- }
- 
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb
index 6d6b3f2ded..81fe0c88e0 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_250.5.bb
@@ -30,7 +30,6 @@ SRC_URI += "file://touchscreen.rules \
 # patches needed by musl
 SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
 SRC_URI_MUSL = "\
-               file://0002-don-t-use-glibc-specific-qsort_r.patch \
                file://0003-missing_type.h-add-comparison_fn_t.patch \
                file://0004-add-fallback-parse_printf_format-implementation.patch \
                file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [oe-core] [PATCH 4/4] systemd: Fix path returned in sd_path_lookup()
  2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
                   ` (2 preceding siblings ...)
  2022-05-22 17:31 ` [oe-core] [PATCH 3/4] systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch Jiaqing Zhao
@ 2022-05-22 17:31 ` Jiaqing Zhao
  2022-05-23  0:17 ` [oe-core] [PATCH 0/4] systemd: Update patches Khem Raj
  4 siblings, 0 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-22 17:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jiaqing Zhao

In oe-core, sysusers.d/sysctl.d/binfmt.d/modules-load.d are still kept
under /usr/lib instead of /lib changed in systemd v246. This patch
changes the SD_PATH_{SYSUSERS,SYSCTL,BINFMT,MODULES_LOAD} returned in
sd_path_lookup() back to the /usr/lib ones.

Also updates the patch description and upstream status.

Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
 ...sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 +++++++++++++++++++
 ...se-ROOTPREFIX-without-suffixed-slash.patch | 42 -----------
 meta/recipes-core/systemd/systemd_250.5.bb    |  2 +-
 3 files changed, 74 insertions(+), 43 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
new file mode 100644
index 0000000000..31efc4cc4b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
@@ -0,0 +1,73 @@
+From beb0219b71510bc63aed81d2a970a04349d6c616 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 29 Sep 2020 18:01:41 -0700
+Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr
+
+These directories are moved to /lib since systemd v246, commit
+4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto,
+the old /usr/lib is still being used.
+
+Upstream-Status: Inappropriate (OE-specific)
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
+---
+ src/core/systemd.pc.in           | 8 ++++----
+ src/libsystemd/sd-path/sd-path.c | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index fc0f8c34fa..65996bbed8 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
+ tmpfiles_dir=${prefix}/lib/tmpfiles.d
+ tmpfilesdir=${tmpfiles_dir}
+ 
+-sysusers_dir=${rootprefix}/lib/sysusers.d
++sysusers_dir=${prefix}/lib/sysusers.d
+ sysusersdir=${sysusers_dir}
+ 
+-sysctl_dir=${rootprefix}/lib/sysctl.d
++sysctl_dir=${prefix}/lib/sysctl.d
+ sysctldir=${sysctl_dir}
+ 
+-binfmt_dir=${rootprefix}/lib/binfmt.d
++binfmt_dir=${prefix}/lib/binfmt.d
+ binfmtdir=${binfmt_dir}
+ 
+-modules_load_dir=${rootprefix}/lib/modules-load.d
++modules_load_dir=${prefix}/lib/modules-load.d
+ modulesloaddir=${modules_load_dir}
+ 
+ catalog_dir=${prefix}/lib/systemd/catalog
+diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c
+index ff1e0d5f8e..19a001f47e 100644
+--- a/src/libsystemd/sd-path/sd-path.c
++++ b/src/libsystemd/sd-path/sd-path.c
+@@ -362,19 +362,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
+                 return 0;
+ 
+         case SD_PATH_SYSUSERS:
+-                *ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d";
++                *ret = "/usr/lib/sysusers.d";
+                 return 0;
+ 
+         case SD_PATH_SYSCTL:
+-                *ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d";
++                *ret = "/usr/lib/sysctl.d";
+                 return 0;
+ 
+         case SD_PATH_BINFMT:
+-                *ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d";
++                *ret = "/usr/lib/binfmt.d";
+                 return 0;
+ 
+         case SD_PATH_MODULES_LOAD:
+-                *ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d";
++                *ret = "/usr/lib/modules-load.d";
+                 return 0;
+ 
+         case SD_PATH_CATALOG:
+-- 
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch b/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
deleted file mode 100644
index 752824688f..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 58860e0f248576a80ff2af256ba42713c186ae93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 29 Sep 2020 18:01:41 -0700
-Subject: [PATCH] systemd.pc.in: use ROOTPREFIX without suffixed slash
-
-This complements the commit
-https://github.com/poettering/systemd/commit/b612c26ceb9f56af0271fc9f07c1724d2d260a8a
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/core/systemd.pc.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
-index b5cc8f9..21dbf30 100644
---- a/src/core/systemd.pc.in
-+++ b/src/core/systemd.pc.in
-@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
- tmpfiles_dir=${prefix}/lib/tmpfiles.d
- tmpfilesdir=${tmpfiles_dir}
- 
--sysusers_dir=${rootprefix}/lib/sysusers.d
-+sysusers_dir=${prefix}/lib/sysusers.d
- sysusersdir=${sysusers_dir}
- 
--sysctl_dir=${rootprefix}/lib/sysctl.d
-+sysctl_dir=${prefix}/lib/sysctl.d
- sysctldir=${sysctl_dir}
- 
--binfmt_dir=${rootprefix}/lib/binfmt.d
-+binfmt_dir=${prefix}/lib/binfmt.d
- binfmtdir=${binfmt_dir}
- 
--modules_load_dir=${rootprefix}/lib/modules-load.d
-+modules_load_dir=${prefix}/lib/modules-load.d
- modulesloaddir=${modules_load_dir}
- 
- catalog_dir=${prefix}/lib/systemd/catalog
--- 
-2.25.1
-
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb
index 81fe0c88e0..006b2f86ea 100644
--- a/meta/recipes-core/systemd/systemd_250.5.bb
+++ b/meta/recipes-core/systemd/systemd_250.5.bb
@@ -23,7 +23,7 @@ SRC_URI += "file://touchscreen.rules \
            file://systemd-pager.sh \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
-           file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
+           file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \
            file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \
            "
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [oe-core] [PATCH 0/4] systemd: Update patches
  2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
                   ` (3 preceding siblings ...)
  2022-05-22 17:31 ` [oe-core] [PATCH 4/4] systemd: Fix path returned in sd_path_lookup() Jiaqing Zhao
@ 2022-05-23  0:17 ` Khem Raj
  2022-05-23  2:21   ` Jiaqing Zhao
  4 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2022-05-23  0:17 UTC (permalink / raw)
  To: Jiaqing Zhao; +Cc: Patches and discussions about the oe-core layer

I have sent patches to remove the obsolete patches few days ago some
of which are listed here. Please rebase your patch on top of master
and resend rebased patchset

On Sun, May 22, 2022 at 10:32 AM Jiaqing Zhao
<jiaqing.zhao@linux.intel.com> wrote:
>
> This patchset updates the existing systemd patches, these patches are
> upstreamed, no longer needed or fix needed. Update these patches before
> bumping to v251.
>
> Jiaqing Zhao (4):
>   systemd: Drop 0001-test-parse-argument-Include-signal.h.patch
>   systemd: Remove __compare_fn_t type in musl-specific patch
>   systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch
>   systemd: Fix path returned in sd_path_lookup()
>
>  ...sysctl.d-binfmt.d-modules-load.d-to-.patch |  73 ++++++++
>  ...se-ROOTPREFIX-without-suffixed-slash.patch |  42 -----
>  ...test-parse-argument-Include-signal.h.patch |  27 ---
>  ...002-don-t-use-glibc-specific-qsort_r.patch | 163 ------------------
>  ...-missing_type.h-add-comparison_fn_t.patch} |  44 ++---
>  ...missing.h-check-for-missing-strndupa.patch |  14 +-
>  meta/recipes-core/systemd/systemd_250.5.bb    |   6 +-
>  7 files changed, 96 insertions(+), 273 deletions(-)
>  create mode 100644 meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
>  delete mode 100644 meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
>  delete mode 100644 meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
>  delete mode 100644 meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
>  rename meta/recipes-core/systemd/systemd/{0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch => 0003-missing_type.h-add-comparison_fn_t.patch} (61%)
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#165982): https://lists.openembedded.org/g/openembedded-core/message/165982
> Mute This Topic: https://lists.openembedded.org/mt/91272623/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe-core] [PATCH 0/4] systemd: Update patches
  2022-05-23  0:17 ` [oe-core] [PATCH 0/4] systemd: Update patches Khem Raj
@ 2022-05-23  2:21   ` Jiaqing Zhao
  0 siblings, 0 replies; 7+ messages in thread
From: Jiaqing Zhao @ 2022-05-23  2:21 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

Hi, Raj

The patchset I sent is based on 2b9bb4c07d where your patches has already been merged.

I also checked the git log

$ git log --oneline | grep systemd
7d5c480d2b systemd: Fix path returned in sd_path_lookup()
3fd081967d systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch
c6d3f721a4 systemd: Remove __compare_fn_t type in musl-specific patch
66361f908e systemd: Drop 0001-test-parse-argument-Include-signal.h.patch
↑ My patches
↓ Your patches
2cdfc505ce systemd: Update patch status
e57707e820 systemd: Drop 0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
433d51c384 systemd: Document future actions needed for set of musl patches
216fe2b8e5 systemd: Drop redundant musl patches

In your commit 216fe2b8e5, you removed 0017-missing_type.h-add-__compar_d_fn_t-definition.patch
for __compar_d_fn_t, but there is another one (possibly duplicate) named
0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch

Though I send out patchset v2, it only improves the description.

Jiaqing

On 2022-05-23 08:17, Khem Raj wrote:
> I have sent patches to remove the obsolete patches few days ago some
> of which are listed here. Please rebase your patch on top of master
> and resend rebased patchset
> 
> On Sun, May 22, 2022 at 10:32 AM Jiaqing Zhao
> <jiaqing.zhao@linux.intel.com> wrote:
>>
>> This patchset updates the existing systemd patches, these patches are
>> upstreamed, no longer needed or fix needed. Update these patches before
>> bumping to v251.
>>
>> Jiaqing Zhao (4):
>>   systemd: Drop 0001-test-parse-argument-Include-signal.h.patch
>>   systemd: Remove __compare_fn_t type in musl-specific patch
>>   systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch
>>   systemd: Fix path returned in sd_path_lookup()
>>
>>  ...sysctl.d-binfmt.d-modules-load.d-to-.patch |  73 ++++++++
>>  ...se-ROOTPREFIX-without-suffixed-slash.patch |  42 -----
>>  ...test-parse-argument-Include-signal.h.patch |  27 ---
>>  ...002-don-t-use-glibc-specific-qsort_r.patch | 163 ------------------
>>  ...-missing_type.h-add-comparison_fn_t.patch} |  44 ++---
>>  ...missing.h-check-for-missing-strndupa.patch |  14 +-
>>  meta/recipes-core/systemd/systemd_250.5.bb    |   6 +-
>>  7 files changed, 96 insertions(+), 273 deletions(-)
>>  create mode 100644 meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
>>  delete mode 100644 meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
>>  delete mode 100644 meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
>>  delete mode 100644 meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
>>  rename meta/recipes-core/systemd/systemd/{0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch => 0003-missing_type.h-add-comparison_fn_t.patch} (61%)
>>
>> --
>> 2.34.1
>>
>>
>>
>>
>>
>>
>> 
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-23  2:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 17:31 [oe-core] [PATCH 0/4] systemd: Update patches Jiaqing Zhao
2022-05-22 17:31 ` [oe-core] [PATCH 1/4] systemd: Drop 0001-test-parse-argument-Include-signal.h.patch Jiaqing Zhao
2022-05-22 17:31 ` [oe-core] [PATCH 2/4] systemd: Remove __compare_fn_t type in musl-specific patch Jiaqing Zhao
2022-05-22 17:31 ` [oe-core] [PATCH 3/4] systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch Jiaqing Zhao
2022-05-22 17:31 ` [oe-core] [PATCH 4/4] systemd: Fix path returned in sd_path_lookup() Jiaqing Zhao
2022-05-23  0:17 ` [oe-core] [PATCH 0/4] systemd: Update patches Khem Raj
2022-05-23  2:21   ` Jiaqing Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.