|
|
Subscribe / Log in / New account

Adding systemd to postmarketOS

Adding systemd to postmarketOS

Posted Mar 8, 2024 11:26 UTC (Fri) by parametricpoly (subscriber, #143903)
In reply to: Adding systemd to postmarketOS by LtWorf
Parent article: Adding systemd to postmarketOS

That makes sense in the context of Python, but systemd is the init system, maybe the first package you'd install on a bare bones distro. Some of those distros wish to be light weight for various reasons. Glibc isn't light. Compared to musl, it's a piece of turd. Glibc won't work at all if you want statically linked binaries. Simply requiring glibc at this stage makes the whole init system unusable for many systems. It would really easy to just provide the missing code as some sort of compatibility library or so. Musl & systemd rocks.


to post comments

Adding systemd to postmarketOS

Posted Mar 8, 2024 13:28 UTC (Fri) by LtWorf (subscriber, #124958) [Link] (3 responses)

If a systemd developer (https://lwn.net/Articles/964676/) said that musl doesn't have API for some syscalls… I think that's a good enough reason.

I presume it just does not compile since the .h file doesn't have the expected definitions…

Perhaps you should consider contributing to musl to implement the missing features.

Adding systemd to postmarketOS

Posted Mar 8, 2024 13:53 UTC (Fri) by parametricpoly (subscriber, #143903) [Link] (2 responses)

I've seen discussions about this both in systemd and musl channels. I also know the musl's author (dalias). He's a great developer but doesn't like systemd at all. The musl channel has been full of people who think even openrc is too "heavy" so they prefer runit and other bsd/plan9 inspired niche init systems nobody uses in practice. I've also built systemd on top of musl with some patches. I don't think the patches were longer than 100 LOC or so. It's just that this was like 10 years ago and nothing has happened. It's becoming evident they don't want it to work.

Adding systemd to postmarketOS

Posted Mar 8, 2024 14:38 UTC (Fri) by calebccff (subscriber, #165861) [Link] (1 responses)

the patches aren't hugely complicated, some OE folks rebase them (see what we're shipping in pmOS here https://gitlab.com/postmarketOS/pmaports/-/tree/systemd/s...)

The impression I've gotten so far is that musl don't want some things (like the printf extensions) for various reasons, POSIX being a motivating factor. Worth noting that systemd isn't explicitly tied to glibc, and for some things like basename() they're unhappy with any existing approach and use their own instead.

We expect that we'll have to carry some stuff in an external library if it's clear that neither project is willing to take it. Lennart has blessed this approach at least (we can have this dependency expressed in systemd). As things go it could certainly be worse, hopefully we can start finding a constructive way forward as frankly this whole situation is just detrimental to the ecosystem as a whole.

Adding systemd to postmarketOS

Posted Mar 8, 2024 20:23 UTC (Fri) by parametricpoly (subscriber, #143903) [Link]

I appreciate your efforts greatly. Thanks!

Adding systemd to postmarketOS

Posted Mar 13, 2024 15:38 UTC (Wed) by zoobab (guest, #9945) [Link]

"Glibc won't work at all if you want statically linked binaries."

Glibc does not document how to make static binaries, and make them difficult to do, because the people behind it don't want static binaries.

The bare minimum would be to write it down in the documentation.

Static linking works like a charm with Musl.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds