systemd: fix musl compilation
PATCH 1/1 systemd: fix musl compilation
musl compilation has been broken since systemd: fix CVE-2018-6954. Fixing this by placing #ifdef for glob definition.
--- .../systemd/0036-Fix-musl-compilation.patch | 27 +++++++++++++++++++ meta/recipes-core/systemd/systemd_237.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0036-Fix-musl-compilation.patch
meta/recipes-core/systemd/systemd/0036-Fix-musl-compilation.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 8795fe183a92e6bc6a1221a5aad4103eaca13823 Mon Sep 17 00:00:00 2001 +From: Sinan Kaya <[email protected]> +Date: Tue, 26 Mar 2019 02:45:53 +0000 +Subject: [PATCH] Fix musl compilation + +Signed-off-by: Sinan Kaya <[email protected]> +--- + src/tmpfiles/tmpfiles.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index d59ccbaa3..8d1ab0767 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -1899,7 +1899,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.21.0 +
meta/recipes-core/systemd/systemd_237.bb +1 -0
@@ -65,6 +65,7 @@ SRC_URI += "file://touchscreen.rules \ file://0002-Make-tmpfiles-safe.patch \ file://CVE-2019-6454.patch \ file://sd-bus-if-we-receive-an-invalid-dbus-message-ignore-.patch \ + file://0036-Fix-musl-compilation.patch \ " SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
Signature · 1 line
2.21.0
Quoted 4 lines · Sinan Kaya
musl compilation has been broken since systemd: fix CVE-2018-6954. Fixing this by placing #ifdef for glob definition.
Signed-off-by Sinan Kaya<[email protected]>
I didn't see any comments here but I wanted to let everyone know that sumo-next branch is currently broken with MUSL unless this patch is applied.
Quoted 10 lines · Sinan Kaya
Quoted 5 lines · Sinan Kaya
musl compilation has been broken since systemd: fix CVE-2018-6954. Fixing this
by placing #ifdef for glob definition.Signed-off-by Sinan Kaya<[email protected]>I didn't see any comments here but I wanted to let everyone know that sumo-next branch is currently broken with MUSL unless this patch is applied.
Thanks for the reminder. it will be in my next merge series.
- armin
Quoted 10 lines · Sinan Kaya
Quoted 5 lines · Sinan Kaya
musl compilation has been broken since systemd: fix CVE-2018-6954. Fixing this
by placing #ifdef for glob definition.Signed-off-by Sinan Kaya<[email protected]>I didn't see any comments here but I wanted to let everyone know that sumo-next branch is currently broken with MUSL unless this patch is applied.
After closer look, I don't the "Upstream-Status:" nor a signoff in the patch being added in the bb file.
Does this issue affect later branches ?
- armin
Quoted 4 lines · akuster
After closer look, I don't the "Upstream-Status:" nor a signoff in the patch being added in the bb file.
Does this issue affect later branches ?
I can fix this. The issue was introduced while backporting a CVE patch from debian.
So, we are fixing a problem by patching "the patch".
We'd squash this into the original CVE under normal circumstances but original patch has been already checked in.
Can I assume that upstream status would be "inappropriate"?
I can add these tags once we reach to an agreement.
Quoted 10 lines · Sinan Kaya
Quoted 4 lines · akuster
After closer look, I don't the "Upstream-Status:" nor a signoff in the patch being added in the bb file.
Does this issue affect later branches ?
I can fix this. The issue was introduced while backporting a CVE patch from debian.
So, we are fixing a problem by patching "the patch".
Ah, sorry that didn't register.
Quoted 5 lines
We'd squash this into the original CVE under normal circumstances but original patch has been already checked in.
Can I assume that upstream status would be "inappropriate"?
Its not applicable in this case.
Maybe a note for the patch and your signoff seems more than enough unless the broader community has an issue with that. .
thanks,
Armin
Quoted 2 lines
I can add these tags once we reach to an agreement.