systemd: refresh musl patches for v255.1
PATCH 1/1 systemd: refresh musl patches for v255.1
From: Chen Qi <[email protected]>
The current patches are refreshed. A new patch is added:
0022-avoid-missing-LOCK_EX-declaration.patch
Signed-off-by Chen Qi <[email protected]>
---
...-missing_type.h-add-comparison_fn_t.patch} | 10 +-
...-parse_printf_format-implementation.patch} | 27 +-
...issing.h-check-for-missing-strndupa.patch} | 157 ++++++-----
...B_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch} | 19 +-
...05-add-missing-FTW_-macros-for-musl.patch} | 10 +-
...6-Use-uintmax_t-for-handling-rlim_t.patch} | 23 +-
..._SYMLINK_NOFOLLOW-flag-to-faccessat.patch} | 10 +-
...atible-basename-for-non-glibc-syste.patch} | 14 +-
...ffering-when-writing-to-oom_score_a.patch} | 10 +-
...ompliant-strerror_r-from-GNU-specif.patch} | 12 +-
...efinition-of-prctl_mm_map-structure.patch} | 8 +-
...not-disable-buffer-in-writing-files.patch} | 255 ++++++++++++++----
...tch => 0013-Handle-__cpu_mask-usage.patch} | 11 +-
...atch => 0014-Handle-missing-gshadow.patch} | 10 +-
....h-Define-MIPS-ABI-defines-for-musl.patch} | 10 +-
...ss-correct-parameters-to-getdents64.patch} | 6 +-
...tch => 0017-Adjust-for-musl-headers.patch} | 92 ++++---
...rerror-is-assumed-to-be-GNU-specifi.patch} | 10 +-
...til-Make-STRERROR-portable-for-musl.patch} | 17 +-
...ke-malloc_trim-conditional-on-glibc.patch} | 18 +-
...ared-Do-not-use-malloc_info-on-musl.patch} | 15 +-
...22-avoid-missing-LOCK_EX-declaration.patch | 43 +++
meta/recipes-core/systemd/systemd_255.1.bb | 43 +--
23 files changed, 559 insertions(+), 271 deletions(-)
rename meta/recipes-core/systemd/systemd/{0009-missing_type.h-add-comparison_fn_t.patch => 0001-missing_type.h-add-comparison_fn_t.patch} (89%)
rename meta/recipes-core/systemd/systemd/{0010-add-fallback-parse_printf_format-implementation.patch => 0002-add-fallback-parse_printf_format-implementation.patch} (93%)
rename meta/recipes-core/systemd/systemd/{0011-src-basic-missing.h-check-for-missing-strndupa.patch => 0003-src-basic-missing.h-check-for-missing-strndupa.patch} (86%)
rename meta/recipes-core/systemd/systemd/{0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch => 0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch} (90%)
rename meta/recipes-core/systemd/systemd/{0013-add-missing-FTW_-macros-for-musl.patch => 0005-add-missing-FTW_-macros-for-musl.patch} (84%)
rename meta/recipes-core/systemd/systemd/{0014-Use-uintmax_t-for-handling-rlim_t.patch => 0006-Use-uintmax_t-for-handling-rlim_t.patch} (83%)
rename meta/recipes-core/systemd/systemd/{0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch => 0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch} (95%)
rename meta/recipes-core/systemd/systemd/{0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch => 0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch} (70%)
rename meta/recipes-core/systemd/systemd/{0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch => 0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch} (82%)
rename meta/recipes-core/systemd/systemd/{0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch => 0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch} (89%)
rename meta/recipes-core/systemd/systemd/{0020-avoid-redefinition-of-prctl_mm_map-structure.patch => 0011-avoid-redefinition-of-prctl_mm_map-structure.patch} (79%)
rename meta/recipes-core/systemd/systemd/{0021-do-not-disable-buffer-in-writing-files.patch => 0012-do-not-disable-buffer-in-writing-files.patch} (55%)
rename meta/recipes-core/systemd/systemd/{0022-Handle-__cpu_mask-usage.patch => 0013-Handle-__cpu_mask-usage.patch} (83%)
rename meta/recipes-core/systemd/systemd/{0023-Handle-missing-gshadow.patch => 0014-Handle-missing-gshadow.patch} (96%)
rename meta/recipes-core/systemd/systemd/{0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch => 0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch} (84%)
rename meta/recipes-core/systemd/systemd/{0005-pass-correct-parameters-to-getdents64.patch => 0016-pass-correct-parameters-to-getdents64.patch} (92%)
rename meta/recipes-core/systemd/systemd/{0001-Adjust-for-musl-headers.patch => 0017-Adjust-for-musl-headers.patch} (89%)
rename meta/recipes-core/systemd/systemd/{0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch => 0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch} (89%)
rename meta/recipes-core/systemd/systemd/{0003-errno-util-Make-STRERROR-portable-for-musl.patch => 0019-errno-util-Make-STRERROR-portable-for-musl.patch} (81%)
rename meta/recipes-core/systemd/systemd/{0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch => 0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch} (85%)
rename meta/recipes-core/systemd/systemd/{0029-shared-Do-not-use-malloc_info-on-musl.patch => 0021-shared-Do-not-use-malloc_info-on-musl.patch} (68%)
create mode 100644 meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patchmeta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch renamed from meta/recipes-core/systemd/systemd/0009-missing_type.h-add-comparison_fn_t.patch +5 -5
@@ -1,7 +1,7 @@ -From 542f999a846dfd49d9373d30fffb2a44168d7b5e Mon Sep 17 00:00:00 2001 +From 01195eb9f7d59139fb45df506ac6b3968c14a57f Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH] missing_type.h: add comparison_fn_t +Subject: [PATCH 01/22] missing_type.h: add comparison_fn_t Make it work with musl where comparison_fn_t and is not provided.
@@ -33,7 +33,7 @@ index f6233090a9..6c0456349d 100644 +typedef int (*comparison_fn_t)(const void *, const void *); +#endif diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index f0bf246aa3..33669c7a75 100644 +index 9c818bd747..ef10c8be2c 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h @@ -4,6 +4,7 @@
@@ -45,7 +45,7 @@ index f0bf246aa3..33669c7a75 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/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c -index 7527abf636..f33383e57f 100644 +index ae91534198..7f67eea38b 100644 --- a/src/libsystemd/sd-journal/catalog.c +++ b/src/libsystemd/sd-journal/catalog.c @@ -28,6 +28,7 @@
@@ -57,5 +57,5 @@ index 7527abf636..f33383e57f 100644 const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch renamed from meta/recipes-core/systemd/systemd/0010-add-fallback-parse_printf_format-implementation.patch +22 -5
@@ -1,7 +1,7 @@ -From 383e85e15f16a46aac925aa439b8b60f58b40aa6 Mon Sep 17 00:00:00 2001 +From 872b72739e62123867ce6c4f82aa37de24cc3f75 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Sat, 22 May 2021 20:26:24 +0200 -Subject: [PATCH] add fallback parse_printf_format implementation +Subject: [PATCH 02/22] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific]
@@ -21,9 +21,11 @@ Signed-off-by: Scott Murray <[email protected]> create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h +diff --git a/meson.build b/meson.build +index 7419e2b0b0..01fd3ffc19 100644 --- a/meson.build +++ b/meson.build -@@ -781,6 +781,7 @@ endif +@@ -725,6 +725,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h',
@@ -31,9 +33,11 @@ Signed-off-by: Scott Murray <[email protected]> 'sys/auxv.h', 'threads.h', 'valgrind/memcheck.h', +diff --git a/src/basic/meson.build b/src/basic/meson.build +index d7450d8b44..c3e3daf4bd 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -179,6 +179,11 @@ endforeach +@@ -183,6 +183,11 @@ endforeach basic_sources += generated_gperf_headers
@@ -45,6 +49,9 @@ Signed-off-by: Scott Murray <[email protected]> ############################################################ arch_list = [ +diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c +new file mode 100644 +index 0000000000..49437e5445 --- /dev/null +++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@
@@ -321,6 +328,9 @@ Signed-off-by: Scott Murray <[email protected]> + + return last; +} +diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h +new file mode 100644 +index 0000000000..47be7522d7 --- /dev/null +++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@
@@ -381,6 +391,8 @@ Signed-off-by: Scott Murray <[email protected]> +size_t parse_printf_format(const char *fmt, size_t n, int *types); + +#endif /* HAVE_PRINTF_H */ +diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h +index 4e93ac90c9..f9deb6f662 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -1,12 +1,12 @@
@@ -397,6 +409,8 @@ Signed-off-by: Scott Murray <[email protected]> _printf_(3, 4) static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) { +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c +index be23b2fe75..69a2eb6404 100644 --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@
@@ -407,7 +421,7 @@ Signed-off-by: Scott Murray <[email protected]> #include <stddef.h> #include <sys/un.h> #include <unistd.h> -@@ -27,6 +26,7 @@ +@@ -28,6 +27,7 @@ #include "stdio-util.h" #include "string-util.h" #include "tmpfile-util.h"
@@ -415,3 +429,6 @@ Signed-off-by: Scott Murray <[email protected]> #define SNDBUF_SIZE (8*1024*1024) +-- +2.34.1 +
meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch renamed from meta/recipes-core/systemd/systemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch +86 -71
485 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch renamed from meta/recipes-core/systemd/systemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +10 -9
@@ -1,7 +1,8 @@ -From 747ff78ecda6afe01c7eab4d7c27aea6af810c86 Mon Sep 17 00:00:00 2001 +From 5325ab5813617f35f03806ec420829dde7104387 Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined +Subject: [PATCH 04/22] 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.
@@ -23,7 +24,7 @@ Signed-off-by: Scott Murray <[email protected]> 3 files changed, 38 insertions(+) diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c -index fd60a6eda2..c73edc41ea 100644 +index 802ca8c655..23818a67c6 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c @@ -12,6 +12,12 @@
@@ -114,7 +115,7 @@ index 9b3e73cce0..3790ba3be5 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index 458aed7054..2cf24b38c0 100644 +index 230ec09b97..2cc5f391d7 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -73,6 +73,12 @@
@@ -130,9 +131,9 @@ index 458aed7054..2cf24b38c0 100644 /* 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 -@@ -2355,7 +2361,9 @@ finish: +@@ -2434,7 +2440,9 @@ finish: - static int glob_item(Item *i, action_t action) { + static int glob_item(Context *c, Item *i, action_t action) { _cleanup_globfree_ glob_t g = { +#ifdef GLOB_ALTDIRFUNC .gl_opendir = (void *(*)(const char *)) opendir_nomod,
@@ -140,9 +141,9 @@ index 458aed7054..2cf24b38c0 100644 }; int r = 0, k; -@@ -2375,7 +2383,9 @@ static int glob_item(Item *i, action_t action) { +@@ -2461,7 +2469,9 @@ static int glob_item_recursively( + fdaction_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,
@@ -151,5 +152,5 @@ index 458aed7054..2cf24b38c0 100644 int r = 0, k; -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch renamed from meta/recipes-core/systemd/systemd/0013-add-missing-FTW_-macros-for-musl.patch +5 -5
@@ -1,7 +1,7 @@ -From efd7b41cf270c7b07ee3b9aec0fedd8e52dd422f Mon Sep 17 00:00:00 2001 +From dad7f897c0de654fa5592fda3e90f874639849f9 Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH] add missing FTW_ macros for musl +Subject: [PATCH 05/22] add missing FTW_ macros for musl This is to avoid build failures like below for musl.
@@ -28,10 +28,10 @@ index 6c0456349d..73a5b90e3c 100644 +#define FTW_CONTINUE 0 +#endif diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c -index 2c2120b136..bc60a178a2 100644 +index 8684d064ec..70fc2b5376 100644 --- a/src/test/test-recurse-dir.c +++ b/src/test/test-recurse-dir.c -@@ -6,6 +6,7 @@ +@@ -8,6 +8,7 @@ #include "recurse-dir.h" #include "strv.h" #include "tests.h"
@@ -40,5 +40,5 @@ index 2c2120b136..bc60a178a2 100644 static char **list_nftw = NULL; -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch renamed from meta/recipes-core/systemd/systemd/0014-Use-uintmax_t-for-handling-rlim_t.patch +16 -7
@@ -1,7 +1,7 @@ -From 60f7d2c62bc3718023df93c01688d3ee1625d64d Mon Sep 17 00:00:00 2001 +From 96e975a2412a20e5f80bd3ab144057d275eb8597 Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH] Use uintmax_t for handling rlim_t +Subject: [PATCH 06/22] Use uintmax_t for handling rlim_t PRIu{32,64} is not right format to represent rlim_t type therefore use %ju and typecast the rlim_t variables to
@@ -26,9 +26,11 @@ Signed-off-by: Chen Qi <[email protected]> src/core/execute.c | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) +diff --git a/src/basic/format-util.h b/src/basic/format-util.h +index 8719df3e29..9becc96066 100644 --- a/src/basic/format-util.h +++ b/src/basic/format-util.h -@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 +@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); # error Unknown timex member size #endif
@@ -43,9 +45,11 @@ Signed-off-by: Chen Qi <[email protected]> #if SIZEOF_DEV_T == 8 # define DEV_FMT "%" PRIu64 +diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c +index c1f0b2b974..61c5412582 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c -@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons +@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { fixed.rlim_max == highest.rlim_max) return 0;
@@ -54,7 +58,7 @@ Signed-off-by: Chen Qi <[email protected]> return RET_NERRNO(setrlimit(resource, &fixed)); } -@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r +@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) r = free_and_strdup(&s, "infinity"); else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -72,7 +76,7 @@ Signed-off-by: Chen Qi <[email protected]> if (r < 0) return -ENOMEM; -@@ -407,7 +407,7 @@ int rlimit_nofile_safe(void) { +@@ -422,7 +422,7 @@ int rlimit_nofile_safe(void) { rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open()); rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max); if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
@@ -81,9 +85,11 @@ Signed-off-by: Chen Qi <[email protected]> return 1; } +diff --git a/src/core/execute.c b/src/core/execute.c +index bd3da0c401..df1870fd2f 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -6707,9 +6707,9 @@ void exec_context_dump(const ExecContext +@@ -1045,9 +1045,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
@@ -95,3 +101,6 @@ Signed-off-by: Chen Qi <[email protected]> } if (c->ioprio_set) { +-- +2.34.1 +
meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch renamed from meta/recipes-core/systemd/systemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +5 -5
@@ -1,7 +1,7 @@ -From 26b02348e39fe72b73dd61bba8a0cefb0352717d Mon Sep 17 00:00:00 2001 +From 4842cff4f1329f0b5034b529d56f8ad1f234ac4c Mon Sep 17 00:00:00 2001 From: Andre McCurdy <[email protected]> Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() +Subject: [PATCH 07/22] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to do and it's not portable (not supported by musl). See:
@@ -31,7 +31,7 @@ Signed-off-by: Andre McCurdy <[email protected]> 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 932d003f19..33215dbf5f 100644 +index 1023ab73ca..c78ff6f27f 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]);
@@ -64,7 +64,7 @@ index 932d003f19..33215dbf5f 100644 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index be6dd1654a..2726dc946a 100644 +index 569ef466c3..7ae921a113 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
@@ -95,5 +95,5 @@ index be6dd1654a..2726dc946a 100644 } -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch renamed from meta/recipes-core/systemd/systemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch +10 -4
@@ -1,7 +1,8 @@ -From fdc7fb940bb41020271b9db41d5608004efdbde5 Mon Sep 17 00:00:00 2001 +From bab07e779ff23d5593bb118efaaa31b60a6dce87 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH] Define glibc compatible basename() for non-glibc systems +Subject: [PATCH 08/22] Define glibc compatible basename() for non-glibc + systems Fixes builds with musl, even though systemd is adamant about using non-posix basename implementation, we have a way out
@@ -10,9 +11,11 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <[email protected]> --- - src/machine/machine-dbus.c | 5 +++++ - 1 file changed, 5 insertions(+) + src/basic/string-util.h | 4 ++++ + 1 file changed, 4 insertions(+) +diff --git a/src/basic/string-util.h b/src/basic/string-util.h +index b6d8be3083..0a29036c4c 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -26,6 +26,10 @@
@@ -26,3 +29,6 @@ Signed-off-by: Khem Raj <[email protected]> static inline char* strstr_ptr(const char *haystack, const char *needle) { if (!haystack || !needle) return NULL; +-- +2.34.1 +
meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch renamed from meta/recipes-core/systemd/systemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +5 -5
@@ -1,7 +1,7 @@ -From 32fd0dc67b6df531f0769dbb099dbe8f30c28514 Mon Sep 17 00:00:00 2001 +From 25093c5017725b8577c444dfea0f42ad85b43522 Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH] Do not disable buffering when writing to oom_score_adj +Subject: [PATCH 09/22] Do not disable buffering when writing to oom_score_adj On musl, disabling buffering when writing to oom_score_adj will cause the following error.
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray <[email protected]> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 0747c14c1c..8d0c5aae92 100644 +index 201c5596ae..ea51595b6c 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1516,7 +1516,7 @@ int set_oom_score_adjust(int value) { +@@ -1716,7 +1716,7 @@ int set_oom_score_adjust(int value) { xsprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t,
@@ -37,5 +37,5 @@ index 0747c14c1c..8d0c5aae92 100644 int get_oom_score_adjust(int *ret) { -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch renamed from meta/recipes-core/systemd/systemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +6 -6
@@ -1,7 +1,7 @@ -From ed46afcbc6bc1f6277a0a54c3db8cf1b056bca1e Mon Sep 17 00:00:00 2001 +From 2adbe9773cd65c48eec9df96868d4a738927c8d9 Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi +Subject: [PATCH 10/22] distinguish XSI-compliant strerror_r from GNU-specifi strerror_r XSI-compliant strerror_r and GNU-specifi strerror_r are different.
@@ -24,7 +24,7 @@ Signed-off-by: Chen Qi <[email protected]> 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index 413e2dd43f..805e5da0c0 100644 +index 77b2e1a0fd..fdba0e0142 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -408,7 +408,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
@@ -55,10 +55,10 @@ index 413e2dd43f..805e5da0c0 100644 static bool map_ok(const sd_bus_error_map *map) { diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index 136ebcb153..8a75ba4ecd 100644 +index 69a2eb6404..1561859650 100644 --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c -@@ -360,7 +360,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove +@@ -361,7 +361,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove char* j; errno = 0;
@@ -72,5 +72,5 @@ index 136ebcb153..8a75ba4ecd 100644 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch renamed from meta/recipes-core/systemd/systemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch +4 -4
@@ -1,7 +1,7 @@ -From 277b680d07a178b8278862b60417052d05c1376f Mon Sep 17 00:00:00 2001 +From 49c446cfb78cf74a909bed8c3798b77a5469866a Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH] avoid redefinition of prctl_mm_map structure +Subject: [PATCH 11/22] avoid redefinition of prctl_mm_map structure Fix the following compile failure: error: redefinition of 'struct prctl_mm_map'
@@ -14,7 +14,7 @@ Signed-off-by: Chen Qi <[email protected]> 1 file changed, 2 insertions(+) diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h -index ab851306ba..5547cad875 100644 +index 7d9e395c92..88c2d7dfac 100644 --- a/src/basic/missing_prctl.h +++ b/src/basic/missing_prctl.h @@ -1,7 +1,9 @@
@@ -28,5 +28,5 @@ index ab851306ba..5547cad875 100644 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ #ifndef PR_CAP_AMBIENT -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch renamed from meta/recipes-core/systemd/systemd/0021-do-not-disable-buffer-in-writing-files.patch +210 -45
495 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch renamed from meta/recipes-core/systemd/systemd/0022-Handle-__cpu_mask-usage.patch +9 -2
@@ -1,7 +1,7 @@ -From a50ec65dbe660421052656dda7499c925005f486 Mon Sep 17 00:00:00 2001 +From 2f90f8463423cfbb7e83fcef42f1071018c3b56e Mon Sep 17 00:00:00 2001 From: Scott Murray <[email protected]> Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH] Handle __cpu_mask usage +Subject: [PATCH 13/22] Handle __cpu_mask usage Fixes errors:
@@ -23,6 +23,8 @@ Signed-off-by: Scott Murray <[email protected]> src/test/test-sizeof.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) +diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h +index 3c63a58826..4c2d4347fc 100644 --- a/src/shared/cpu-set-util.h +++ b/src/shared/cpu-set-util.h @@ -6,6 +6,8 @@
@@ -34,6 +36,8 @@ Signed-off-by: Scott Murray <[email protected]> /* This wraps the libc interface with a variable to keep the allocated size. */ typedef struct CPUSet { cpu_set_t *set; +diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c +index ea0c58770e..b65c0bd370 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -1,6 +1,5 @@
@@ -51,3 +55,6 @@ Signed-off-by: Scott Murray <[email protected]> /* Print information about various types. Useful when diagnosing * gcc diagnostics on an unfamiliar architecture. */ +-- +2.34.1 +
meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch renamed from meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch +5 -5
@@ -1,7 +1,7 @@ -From ebf0f69d8614b8d86a971b97ff0d847d1e5d47c9 Mon Sep 17 00:00:00 2001 +From b7c827bb44edbb6251c9fcdb80aa03982c0e7bf3 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <[email protected]> Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH] Handle missing gshadow +Subject: [PATCH 14/22] Handle missing gshadow gshadow usage is now present in the userdb code. Mask all uses of it to allow compilation on musl
@@ -17,7 +17,7 @@ Signed-off-by: Luca Boccassi <[email protected]> 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c -index 88b8fc2f8f..a819d41bac 100644 +index 414a49331b..1a4e1b628c 100644 --- a/src/shared/user-record-nss.c +++ b/src/shared/user-record-nss.c @@ -329,8 +329,10 @@ int nss_group_to_group_record(
@@ -138,7 +138,7 @@ index 22ab04d6ee..4e52e7a911 100644 #include <shadow.h> diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index a77eff4407..955e361d3a 100644 +index f60d48ace4..e878199a28 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
@@ -169,5 +169,5 @@ index a77eff4407..955e361d3a 100644 return r; -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch renamed from meta/recipes-core/systemd/systemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +5 -5
@@ -1,7 +1,7 @@ -From a2f56a2a6cdd5137bb1e680aa9f6c40540107166 Mon Sep 17 00:00:00 2001 +From 3dc9d9d410bcce54fddfd94f43f7f77f3aa8e281 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Mon, 12 Apr 2021 23:44:53 -0700 -Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl +Subject: [PATCH 15/22] missing_syscall.h: Define MIPS ABI defines for musl musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 unlike glibc where these are provided by libc headers, therefore define
@@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <[email protected]> 2 files changed, 7 insertions(+) diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h -index 98cd037962..ea6a76c2e2 100644 +index d795efd8f2..d6729d3c1d 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h @@ -20,6 +20,12 @@
@@ -33,7 +33,7 @@ index 98cd037962..ea6a76c2e2 100644 #include "missing_keyctl.h" #include "missing_stat.h" diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 2726dc946a..484f63e0b4 100644 +index 7ae921a113..0ef9d1fd39 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -20,6 +20,7 @@
@@ -45,5 +45,5 @@ index 2726dc946a..484f63e0b4 100644 typedef struct BaseFilesystem { const char *dir; /* directory or symlink to create */ -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch renamed from meta/recipes-core/systemd/systemd/0005-pass-correct-parameters-to-getdents64.patch +3 -3
@@ -1,7 +1,7 @@ -From 17766c64ecc7dedf09ed2d361690fc4eda77bf42 Mon Sep 17 00:00:00 2001 +From 0994b59dba9f248ad31cb7087046dc00b72cb4ea Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Fri, 21 Jan 2022 15:15:11 -0800 -Subject: [PATCH] pass correct parameters to getdents64 +Subject: [PATCH 16/22] pass correct parameters to getdents64 Fixes ../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types]
@@ -33,5 +33,5 @@ index 5e98b7a5d8..aef065047b 100644 return -errno; if (n == 0) -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch renamed from meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch +54 -38
298 lines not on this page · raw message
meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch renamed from meta/recipes-core/systemd/systemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch +5 -5
@@ -1,8 +1,8 @@ -From fa598869cca684c001f3dc23ce2198f5a6169e2a Mon Sep 17 00:00:00 2001 +From be02bd0876a061728661535a709d313e39fe1ac3 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Tue, 8 Nov 2022 13:31:34 -0800 -Subject: [PATCH] test-bus-error: strerror() is assumed to be GNU specific - version mark it so +Subject: [PATCH 18/22] test-bus-error: strerror() is assumed to be GNU + specific version mark it so Upstream-Status: Inappropriate [Upstream systemd only supports glibc]
@@ -27,7 +27,7 @@ index a55f3f9856..4123bf3da0 100644 assert_se(sd_bus_error_get_errno(&error) == EBUSY); assert_se(sd_bus_error_is_set(&error)); diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c -index d3d022c33f..74e95c804d 100644 +index 376d532281..967cfd4d67 100644 --- a/src/test/test-errno-util.c +++ b/src/test/test-errno-util.c @@ -4,7 +4,7 @@
@@ -48,5 +48,5 @@ index d3d022c33f..74e95c804d 100644 TEST(PROTECT_ERRNO) { errno = 12; -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch renamed from meta/recipes-core/systemd/systemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch +9 -8
@@ -1,7 +1,7 @@ -From f629a76e0fba300a9d511614160fee38dd4a5e57 Mon Sep 17 00:00:00 2001 +From 46d80840bfe37e67d4f18c37a77751ea1fe63a07 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Mon, 23 Jan 2023 23:39:46 -0800 -Subject: [PATCH] errno-util: Make STRERROR portable for musl +Subject: [PATCH 19/22] errno-util: Make STRERROR portable for musl Sadly, systemd has decided to use yet another GNU extention in a macro lets make this such that we can use XSI compliant strerror_r() for
@@ -11,20 +11,21 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <[email protected]> --- - src/basic/errno-util.h | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) + src/basic/errno-util.h | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h -index 091f99c590..eb5c1f9961 100644 +index 27804e6382..274c1c6ef1 100644 --- a/src/basic/errno-util.h +++ b/src/basic/errno-util.h -@@ -14,8 +14,16 @@ +@@ -15,8 +15,16 @@ * https://stackoverflow.com/questions/34880638/compound-literal-lifetime-and-if-blocks * * Note that we use the GNU variant of strerror_r() here. */ -#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) +- +static inline const char * STRERROR(int errnum); - ++ +static inline const char * STRERROR(int errnum) { +#ifdef __GLIBC__ + return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN);
@@ -37,5 +38,5 @@ index 091f99c590..eb5c1f9961 100644 * Note that we can't use ({ … }) to define a temporary variable, so errnum is * evaluated twice. */ -- -2.39.2 +2.34.1
meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch renamed from meta/recipes-core/systemd/systemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch +9 -9
@@ -1,7 +1,7 @@ -From 148645ba8b62f04c7c5ff5907378663f97880f22 Mon Sep 17 00:00:00 2001 +From 9eb4867b4e2dbdb2484ae854022aff97e2f0feb3 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Wed, 2 Aug 2023 12:06:27 -0700 -Subject: [PATCH 1/4] sd-event: Make malloc_trim() conditional on glibc +Subject: [PATCH 20/22] sd-event: Make malloc_trim() conditional on glibc musl does not have this API
@@ -12,28 +12,28 @@ Signed-off-by: Khem Raj <[email protected]> 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index aba458185b..48c94a7672 100644 +index 288798a0dc..6419a7f216 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1874,7 +1874,7 @@ _public_ int sd_event_add_exit( } - + _public_ int sd_event_trim_memory(void) { - int r; + int r = 0; - + /* A default implementation of a memory pressure callback. Simply releases our own allocation caches * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a @@ -1888,7 +1888,9 @@ _public_ int sd_event_trim_memory(void) { - + usec_t before_timestamp = now(CLOCK_MONOTONIC); hashmap_trim_pools(); +#ifdef __GLIBC__ r = malloc_trim(0); +#endif usec_t after_timestamp = now(CLOCK_MONOTONIC); - + if (r > 0) --- -2.41.0 +-- +2.34.1
meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch renamed from meta/recipes-core/systemd/systemd/0029-shared-Do-not-use-malloc_info-on-musl.patch +11 -4
@@ -1,7 +1,7 @@ -From 9430646e72ea5d260ade300038a6d976fecf7da5 Mon Sep 17 00:00:00 2001 +From 502597b9ddd6b145541b23fadca0b1d3ca9f6367 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Wed, 2 Aug 2023 12:20:40 -0700 -Subject: [PATCH 4/4] shared: Do not use malloc_info on musl +Subject: [PATCH 21/22] shared: Do not use malloc_info on musl Upstream-Status: Inappropriate [musl-specific] Signed-off-by: Khem Raj <[email protected]>
@@ -10,9 +10,11 @@ Signed-off-by: Khem Raj <[email protected]> src/shared/common-signal.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) +diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c +index 74f148c8b4..2d862a123d 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c -@@ -617,15 +617,16 @@ static int method_dump_memory_state_by_f +@@ -611,15 +611,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat _cleanup_close_ int fd = -EBADF; size_t dump_size; FILE *f;
@@ -31,9 +33,11 @@ Signed-off-by: Khem Raj <[email protected]> if (r < 0) return r; +diff --git a/src/shared/common-signal.c b/src/shared/common-signal.c +index 8e70e365dd..9e782caec9 100644 --- a/src/shared/common-signal.c +++ b/src/shared/common-signal.c -@@ -65,12 +65,12 @@ int sigrtmin18_handler(sd_event_source * +@@ -65,12 +65,12 @@ int sigrtmin18_handler(sd_event_source *s, const struct signalfd_siginfo *si, vo log_oom(); break; }
@@ -48,3 +52,6 @@ Signed-off-by: Khem Raj <[email protected]> (void) memstream_dump(LOG_INFO, &m); break; } +-- +2.34.1 +
meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-core/systemd/systemd_255.1.bb +22 -21
49 lines not on this page · raw message
Signature · 1 line
2.34.1