[OE-core] Should systemd be marked as incompatible with musl?
Adrian Bunk
bunk at stusta.de
Thu May 23 10:33:52 UTC 2019
systemd is fundamentally Linux-only and not portable to other kernels.
systemd upstream is using glibc extensions not present in other
C libraries.
systemd upstream is accepting technically correct patches that help
building with musl, but there is no interest upstream in keeping systemd
working with non-glibc C libraries.
The way things currently go, systemd/musl will require an ever-growing
amount of not upstreamable patches - and this is not sustainable.
It is also not clear where the systemd/musl combination makes sense:
If an embedded system is so size limited that the size of glibc matters,
then systemd is unlikely to be an option.
Other musl-using distribution also seem to favour more lightweight
init systems.
If someone has important usecases for using systemd with musl it might
be possible to solve find solutions in an upstreamable way, but this
would require a significant longterm commitment.
The current state is rather bad, some examples:
0001-Use-getenv-when-secure-versions-are-not-available.patch
looks like waiting for a CVE number.
0008-add-missing-FTW_-macros-for-musl.patch seems to break code in areas
(rng, smack, selinux) where breakages can have security implications.
0002-don-t-use-glibc-specific-qsort_r.patch might introduce race
conditions that cause data corruption.
0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch makes
some functions behave different from what is expected by callers.
0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch and
0001-do-not-disable-buffer-in-writing-files.patch seems like an issue
that would require debugging the root cause and then addressing it.
All this looks bad, and is expected to become worse.
In this situation it would be better to not claim that using systemd
with musl would be a supported option.
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
More information about the Openembedded-core
mailing list