* [RFC][PATCH] systemd: Remove clearly incorrect musl patches
@ 2019-06-14 7:29 Adrian Bunk
2019-06-14 11:43 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-06-14 7:29 UTC (permalink / raw)
To: openembedded-core
This removes clearly incorrect musl patches and marks
systemd as incompatible with musl until these issues
are fixed.
The previous status quo where systemd was made compiling
with patches that are known to introduce bugs and security
vulnerabilities silently delivered a sub-standard package
to users, this change makes it clear where work is needed
to be done by people interested in systemd on musl.
Patches that are merely questionable or not upstreamable
are not touched.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
...en-secure-versions-are-not-available.patch | 32 ----
...002-don-t-use-glibc-specific-qsort_r.patch | 163 ------------------
...LOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch | 155 -----------------
...008-add-missing-FTW_-macros-for-musl.patch | 47 -----
meta/recipes-core/systemd/systemd_242.bb | 8 +-
5 files changed, 4 insertions(+), 401 deletions(-)
delete mode 100644 meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
diff --git a/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch b/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
deleted file mode 100644
index 37979755d0..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b8055a61b5df6b43b8d3117936587b874b0a339b Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 25 Feb 2019 11:01:18 +0800
-Subject: [PATCH 01/24] 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 implementation
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Denied
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/basic/missing_stdlib.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
-index 188a8d4..c0ffe86 100644
---- a/src/basic/missing_stdlib.h
-+++ b/src/basic/missing_stdlib.h
-@@ -8,6 +8,6 @@
- # if HAVE___SECURE_GETENV
- # define secure_getenv __secure_getenv
- # else
--# error "neither secure_getenv nor __secure_getenv are available"
-+# define secure_getenv getenv
- # endif
- #endif
---
-2.7.4
-
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 c6213ab88e..0000000000
--- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 1eb84534dea05d41afed1d898cba212ad7d310dd 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 02/24] 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>
----
- 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/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;
--
-- 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]), (__compar_d_fn_t) _func_, userdata); \
-- })
-diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
-index c83575c7c8..72f8f3a050 100644
---- a/src/libsystemd/sd-hwdb/hwdb-util.c
-+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
-@@ -128,9 +128,13 @@ static void 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,
-@@ -158,7 +162,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. */
-@@ -184,7 +191,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/src/shared/format-table.c b/src/shared/format-table.c
-index a5c0a99b08..d595cbe372 100644
---- a/src/shared/format-table.c
-+++ b/src/shared/format-table.c
-@@ -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);
- }
-
--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;
- size_t i;
- 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 (i = 0; i < t->n_sort_map; i++) {
-+ for (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 */
-@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) {
- for (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)
-@@ -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;
-
-- 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)
---
-2.11.0
-
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
deleted file mode 100644
index aa2b4cbcf1..0000000000
--- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From f8a239b182158ca0a537ba053cb0e6bad9c3a2fb Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 25 Feb 2019 14:56:21 +0800
-Subject: [PATCH 07/24] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
- defined
-
-If the standard library doesn't provide brace
-expansion users just won't get it.
-
-Dont use GNU GLOB extentions on non-glibc systems
-
-Conditionalize use of GLOB_ALTDIRFUNC
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/basic/glob-util.c | 13 ++++++++++++-
- src/test/test-glob-util.c | 16 ++++++++++++++++
- src/tmpfiles/tmpfiles.c | 10 ++++++++++
- 3 files changed, 38 insertions(+), 1 deletion(-)
-
-diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
-index 32c53f8..ae358d9 100644
---- a/src/basic/glob-util.c
-+++ b/src/basic/glob-util.c
-@@ -13,6 +13,12 @@
- #include "path-util.h"
- #include "strv.h"
-
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- static void closedir_wrapper(void* v) {
- (void) closedir(v);
- }
-@@ -20,6 +26,7 @@ static void closedir_wrapper(void* v) {
- int safe_glob(const char *path, int flags, glob_t *pglob) {
- int k;
-
-+#ifdef GLOB_ALTDIRFUNC
- /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
- assert(!(flags & GLOB_ALTDIRFUNC));
-
-@@ -33,10 +40,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
- pglob->gl_lstat = lstat;
- if (!pglob->gl_stat)
- pglob->gl_stat = stat;
-+#endif
-
- errno = 0;
-+#ifdef GLOB_ALTDIRFUNC
- k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
--
-+#else
-+ k = glob(path, flags, NULL, pglob);
-+#endif
- if (k == GLOB_NOMATCH)
- return -ENOENT;
- if (k == GLOB_NOSPACE)
-diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
-index b4f4144..f0d474e 100644
---- a/src/test/test-glob-util.c
-+++ b/src/test/test-glob-util.c
-@@ -13,6 +13,12 @@
- #include "rm-rf.h"
- #include "tmpfile-util.h"
-
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- static void test_glob_exists(void) {
- char name[] = "/tmp/test-glob_exists.XXXXXX";
- int fd = -1;
-@@ -40,11 +46,13 @@ static void test_glob_no_dot(void) {
- const char *fn;
-
- _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
- .gl_closedir = closedir_wrapper,
- .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
- .gl_opendir = (void *(*)(const char *)) opendir,
- .gl_lstat = lstat,
- .gl_stat = stat,
-+#endif
- };
-
- int r;
-@@ -52,11 +60,19 @@ static void test_glob_no_dot(void) {
- assert_se(mkdtemp(template));
-
- fn = strjoina(template, "/*");
-+#ifdef GLOB_ALTDIRFUNC
- r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
- assert_se(r == GLOB_NOMATCH);
-
- fn = strjoina(template, "/.*");
-+#ifdef GLOB_ALTDIRFUNC
- r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
-+#else
-+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
-+#endif
- assert_se(r == GLOB_NOMATCH);
-
- (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
-diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index d9d1cc1..477d1e3 100644
---- a/src/tmpfiles/tmpfiles.c
-+++ b/src/tmpfiles/tmpfiles.c
-@@ -63,6 +63,12 @@
- #include "umask-util.h"
- #include "user-util.h"
-
-+/* Don't fail if the standard library
-+ * doesn't provide brace expansion */
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
- /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
- * them in the file system. This is intended to be used to create
- * properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -1839,7 +1845,9 @@ finish:
-
- static int glob_item(Item *i, action_t action) {
- _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
- .gl_opendir = (void *(*)(const char *)) opendir_nomod,
-+#endif
- };
- int r = 0, k;
- char **fn;
-@@ -1859,7 +1867,9 @@ static int glob_item(Item *i, action_t action) {
-
- static int glob_item_recursively(Item *i, fdaction_t action) {
- _cleanup_globfree_ glob_t g = {
-+#ifdef GLOB_ALTDIRFUNC
- .gl_opendir = (void *(*)(const char *)) opendir_nomod,
-+#endif
- };
- int r = 0, k;
- char **fn;
---
-2.11.0
-
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
deleted file mode 100644
index d5f2349f2b..0000000000
--- a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 6cd17c753d2c0a90fc791f69bbc694cbc8556a4f Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 25 Feb 2019 15:00:06 +0800
-Subject: [PATCH 08/24] add missing FTW_ macros for musl
-
-This is to avoid build failures like below for musl.
-
- locale-util.c:296:24: error: 'FTW_STOP' undeclared
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/basic/missing_type.h | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index c487e65..23602eb 100644
---- a/src/basic/missing_type.h
-+++ b/src/basic/missing_type.h
-@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *);
- #define __COMPAR_FN_T
- typedef int (*__compar_fn_t)(const void *, const void *);
- #endif
-+
-+#ifndef FTW_ACTIONRETVAL
-+#define FTW_ACTIONRETVAL 16
-+#endif
-+
-+#ifndef FTW_CONTINUE
-+#define FTW_CONTINUE 0
-+#endif
-+
-+#ifndef FTW_STOP
-+#define FTW_STOP 1
-+#endif
-+
-+#ifndef FTW_SKIP_SUBTREE
-+#define FTW_SKIP_SUBTREE 2
-+#endif
-+
-+#ifndef FTW_SKIP_SIBLINGS
-+#define FTW_SKIP_SIBLINGS 3
-+#endif
---
-2.7.4
-
diff --git a/meta/recipes-core/systemd/systemd_242.bb b/meta/recipes-core/systemd/systemd_242.bb
index 90f235be3d..1667e3ead5 100644
--- a/meta/recipes-core/systemd/systemd_242.bb
+++ b/meta/recipes-core/systemd/systemd_242.bb
@@ -28,14 +28,11 @@ SRC_URI += "file://touchscreen.rules \
# patches needed by musl
SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
-SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.patch \
- file://0002-don-t-use-glibc-specific-qsort_r.patch \
+SRC_URI_MUSL = " \
file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
file://0004-add-fallback-parse_printf_format-implementation.patch \
file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
file://0006-Include-netinet-if_ether.h.patch \
- file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
- file://0008-add-missing-FTW_-macros-for-musl.patch \
file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
file://0001-Replace-the-legacy-ULONG_LONG_MAX-with-the-C99-ULLON.patch \
@@ -54,6 +51,9 @@ SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.pa
file://0001-do-not-disable-buffer-in-writing-files.patch \
"
+# Several musl problems do not yet have a correct fix
+COMPATIBLE_HOST_libc-musl = "null"
+
PAM_PLUGINS = " \
pam-plugin-unix \
pam-plugin-loginuid \
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-14 7:29 [RFC][PATCH] systemd: Remove clearly incorrect musl patches Adrian Bunk
@ 2019-06-14 11:43 ` Richard Purdie
2019-06-19 19:59 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2019-06-14 11:43 UTC (permalink / raw)
To: Adrian Bunk, openembedded-core
On Fri, 2019-06-14 at 10:29 +0300, Adrian Bunk wrote:
> This removes clearly incorrect musl patches and marks
> systemd as incompatible with musl until these issues
> are fixed.
>
> The previous status quo where systemd was made compiling
> with patches that are known to introduce bugs and security
> vulnerabilities silently delivered a sub-standard package
> to users, this change makes it clear where work is needed
> to be done by people interested in systemd on musl.
>
> Patches that are merely questionable or not upstreamable
> are not touched.
I'll be interested to see what others think of this, I can't imagine
this move being very popular...
You can make arguments both ways.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-14 11:43 ` Richard Purdie
@ 2019-06-19 19:59 ` Khem Raj
2019-06-20 7:15 ` Adrian Bunk
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2019-06-19 19:59 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Adrian Bunk
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On Fri, Jun 14, 2019 at 4:44 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2019-06-14 at 10:29 +0300, Adrian Bunk wrote:
> > This removes clearly incorrect musl patches and marks
> > systemd as incompatible with musl until these issues
> > are fixed.
> >
> > The previous status quo where systemd was made compiling
> > with patches that are known to introduce bugs and security
> > vulnerabilities silently delivered a sub-standard package
> > to users, this change makes it clear where work is needed
> > to be done by people interested in systemd on musl.
> >
> > Patches that are merely questionable or not upstreamable
> > are not touched.
>
> I'll be interested to see what others think of this, I can't imagine
> this move being very popular...
>
There are real products using this combination
And this is not a good message, eventually we want to either fix or stop
supporting this but I think now is not the time
>
> You can make arguments both ways.
>
> Cheers,
>
> Richard
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 2002 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-19 19:59 ` Khem Raj
@ 2019-06-20 7:15 ` Adrian Bunk
2019-06-20 17:09 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2019-06-20 7:15 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Wed, Jun 19, 2019 at 12:59:05PM -0700, Khem Raj wrote:
> On Fri, Jun 14, 2019 at 4:44 AM Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote:
>
> > On Fri, 2019-06-14 at 10:29 +0300, Adrian Bunk wrote:
> > > This removes clearly incorrect musl patches and marks
> > > systemd as incompatible with musl until these issues
> > > are fixed.
> > >
> > > The previous status quo where systemd was made compiling
> > > with patches that are known to introduce bugs and security
> > > vulnerabilities silently delivered a sub-standard package
> > > to users, this change makes it clear where work is needed
> > > to be done by people interested in systemd on musl.
> > >
> > > Patches that are merely questionable or not upstreamable
> > > are not touched.
> >
> > I'll be interested to see what others think of this, I can't imagine
> > this move being very popular...
>
> There are real products using this combination
An OE-only combination neither upstream supports.
> And this is not a good message, eventually we want to either fix or stop
> supporting this but I think now is not the time
When is the time?
In a month?
Before the Yocto 2.8 branching?
After the Yocto 2.8 branching?
The best solution would be if someone would step up to properly maintain
the systemd/musl combination, but usually such "either fix or stop" only
work with a clear deadline.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-20 7:15 ` Adrian Bunk
@ 2019-06-20 17:09 ` Khem Raj
2019-06-20 17:38 ` Martin Jansa
2019-06-22 9:39 ` Adrian Bunk
0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2019-06-20 17:09 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Patches and discussions about the oe-core layer
On Thu, Jun 20, 2019 at 1:15 AM Adrian Bunk <bunk@stusta.de> wrote:
>
> On Wed, Jun 19, 2019 at 12:59:05PM -0700, Khem Raj wrote:
> > On Fri, Jun 14, 2019 at 4:44 AM Richard Purdie <
> > richard.purdie@linuxfoundation.org> wrote:
> >
> > > On Fri, 2019-06-14 at 10:29 +0300, Adrian Bunk wrote:
> > > > This removes clearly incorrect musl patches and marks
> > > > systemd as incompatible with musl until these issues
> > > > are fixed.
> > > >
> > > > The previous status quo where systemd was made compiling
> > > > with patches that are known to introduce bugs and security
> > > > vulnerabilities silently delivered a sub-standard package
> > > > to users, this change makes it clear where work is needed
> > > > to be done by people interested in systemd on musl.
> > > >
> > > > Patches that are merely questionable or not upstreamable
> > > > are not touched.
> > >
> > > I'll be interested to see what others think of this, I can't imagine
> > > this move being very popular...
> >
> > There are real products using this combination
>
> An OE-only combination neither upstream supports.
>
> > And this is not a good message, eventually we want to either fix or stop
> > supporting this but I think now is not the time
>
> When is the time?
>
> In a month?
> Before the Yocto 2.8 branching?
> After the Yocto 2.8 branching?
>
When users that I know stop using it, and that might be a release or
two. Meanwhile
I think it will be good to address the issues with patches, if they
introduce bugs or secvulns
that I think will help the user community instead of removing the support.
meanwhile, I would think that we can still work slowly towards making
things better
musl has provided a lot of good cleanup patches for systemd so this is
not a wasted
effort even if upstream systemd does not officially support anything
besides glibc.
> The best solution would be if someone would step up to properly maintain
> the systemd/musl combination, but usually such "either fix or stop" only
> work with a clear deadline.
>
> cu
> Adrian
>
> --
>
> "Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
> "Only a promise," Lao Er said.
> Pearl S. Buck - Dragon Seed
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-20 17:09 ` Khem Raj
@ 2019-06-20 17:38 ` Martin Jansa
2019-06-22 9:39 ` Adrian Bunk
1 sibling, 0 replies; 7+ messages in thread
From: Martin Jansa @ 2019-06-20 17:38 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer, Adrian Bunk
[-- Attachment #1: Type: text/plain, Size: 3684 bytes --]
On Thu, Jun 20, 2019 at 11:09:39AM -0600, Khem Raj wrote:
> On Thu, Jun 20, 2019 at 1:15 AM Adrian Bunk <bunk@stusta.de> wrote:
> >
> > On Wed, Jun 19, 2019 at 12:59:05PM -0700, Khem Raj wrote:
> > > On Fri, Jun 14, 2019 at 4:44 AM Richard Purdie <
> > > richard.purdie@linuxfoundation.org> wrote:
> > >
> > > > On Fri, 2019-06-14 at 10:29 +0300, Adrian Bunk wrote:
> > > > > This removes clearly incorrect musl patches and marks
> > > > > systemd as incompatible with musl until these issues
> > > > > are fixed.
> > > > >
> > > > > The previous status quo where systemd was made compiling
> > > > > with patches that are known to introduce bugs and security
> > > > > vulnerabilities silently delivered a sub-standard package
> > > > > to users, this change makes it clear where work is needed
> > > > > to be done by people interested in systemd on musl.
> > > > >
> > > > > Patches that are merely questionable or not upstreamable
> > > > > are not touched.
> > > >
> > > > I'll be interested to see what others think of this, I can't imagine
> > > > this move being very popular...
> > >
> > > There are real products using this combination
> >
> > An OE-only combination neither upstream supports.
> >
> > > And this is not a good message, eventually we want to either fix or stop
> > > supporting this but I think now is not the time
> >
> > When is the time?
> >
> > In a month?
> > Before the Yocto 2.8 branching?
> > After the Yocto 2.8 branching?
> >
>
> When users that I know stop using it, and that might be a release or
> two. Meanwhile
> I think it will be good to address the issues with patches, if they
> introduce bugs or secvulns
> that I think will help the user community instead of removing the support.
>
> meanwhile, I would think that we can still work slowly towards making
> things better
> musl has provided a lot of good cleanup patches for systemd so this is
> not a wasted
> effort even if upstream systemd does not officially support anything
> besides glibc.
I don't use systemd/musl combination myself, but I agree with Khem.
As long as these bad musl related patches are applied to systemd only
when musl is used, then it's no harm to people not using systemd/musl
combo.
We can even PNBLACKLIST systemd when musl is being used with warning
that these patches are wrong and create security issues (more details
would be useful for the user to make educated decisions).
If we just remove them, then people who use this combo (for whatever
reason) will just import them to their layers and either fix them
locally (and never share it back) or use this bad version forever.
Keeping them with blacklist in oe-core will prevent people accidentally
assuming that systemd/musl is well supported combination while allowing
interested people to collaborate on fixing the patches in oe-core.
Regards,
> > The best solution would be if someone would step up to properly maintain
> > the systemd/musl combination, but usually such "either fix or stop" only
> > work with a clear deadline.
> >
>
>
>
> > cu
> > Adrian
> >
> > --
> >
> > "Is there not promise of rain?" Ling Tan asked suddenly out
> > of the darkness. There had been need of rain for many days.
> > "Only a promise," Lao Er said.
> > Pearl S. Buck - Dragon Seed
> >
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC][PATCH] systemd: Remove clearly incorrect musl patches
2019-06-20 17:09 ` Khem Raj
2019-06-20 17:38 ` Martin Jansa
@ 2019-06-22 9:39 ` Adrian Bunk
1 sibling, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2019-06-22 9:39 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On Thu, Jun 20, 2019 at 11:09:39AM -0600, Khem Raj wrote:
>...
> musl has provided a lot of good cleanup patches for systemd so this is
> not a wasted
> effort even if upstream systemd does not officially support anything
> besides glibc.
>...
I have yet to see a patch that provides actual benefits for upstream,
and my overall impression of musl support patches is that they do more
harm than good for everything except making musl build.
Like I have a WTF feeling each time !defined(__GLIBC__) is used instead
of defined(__MUSL__) for musl-only code - as if there were only two
C libraries in the world.
You already did a lot regarding taking code from gnulib to add glibc
functionality on top of musl, and that's the direction that would
have to be followed for more functionality that is missing in musl
or where musl provides the POSIX version instead of the GNU version
of a function (e.g. strerror_r()).
All this is doable, but it's a lot of hacks and workarounds and
not much in generally useful cleanups.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-22 9:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14 7:29 [RFC][PATCH] systemd: Remove clearly incorrect musl patches Adrian Bunk
2019-06-14 11:43 ` Richard Purdie
2019-06-19 19:59 ` Khem Raj
2019-06-20 7:15 ` Adrian Bunk
2019-06-20 17:09 ` Khem Raj
2019-06-20 17:38 ` Martin Jansa
2019-06-22 9:39 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox