this post was submitted on 05 Sep 2024
115 points (97.5% liked)

Linux

48316 readers
716 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I have completed an initial new port of systemd to musl. This patch set does not share much in common with the existing OpenEmbedded patchset. I wanted to make a fully updated patch series targeting more current releases of systemd and musl, taking advantage of the latest features and updates in both. I also took a focus on writing patches that could be sent for consideration of inclusion upstream.

The final result is a system that appears to be surprisingly reliable considering the newness of the port, and very fast to boot.

...

And that is how I became the first person alive to see systemd passing its entire test suite on a big-endian 64-bit PowerPC musl libc system.

...

While the system works really well, and boots in 1/3rd the time of OpenRC on the same system, it isn’t ready for prime time just yet.

...

There aren’t any service unit files written or packaged yet, other than OpenSSH and utmps. We are working with our sponsor on an effort to add -systemd split packages to any of the packages with -openrc splits. We should be able to rely on upstream units where present, and lean on Gentoo and Fedora’s systemd experts to have good base files to reference when needed. I’ve already landed support for this in abuild.

This work is part of Adélie Linux

all 28 comments
sorted by: hot top controversial new old
[–] aport@programming.dev 20 points 2 months ago

This is awesome work, I'm happy to see systemd on musl getting more attention. Poor Khem was doing it all by himself for years.

[–] hornedfiend@sopuli.xyz 5 points 2 months ago

Very very nice work. Thanks for your effort and willingness to experiment with new stuff. i would definitely be interested in trying it out once it reaches "production".

[–] khorovodoved@lemm.ee 3 points 2 months ago (5 children)

While I do appreciate the effort, I cannot understand, who in their right mind would use musl and systemd together. For what purpose? If a person was already willing to manage a musl system, why wouldn't he also prefer sysVinit or runit or whatever?

[–] tiny@midwest.social 18 points 2 months ago (1 children)

I want to try alpine out but the lack of systemd support is a blocker since I don't want to add openrc support to all my Ansible playbooks that rely on systemd services and timers

[–] OhYeah@lemmy.dbzer0.com 3 points 2 months ago

It seems like postmarketOS is porting systemd to alpine for their next stable version, just something to keep an eye on

[–] DarkMetatron 13 points 2 months ago (1 children)

Maybe because that person uses systemd everywhere else and just doesn't want the overhead of maintaining two different init systems.

[–] khorovodoved@lemm.ee 1 points 2 months ago (1 children)

He already has the overhead of maintaining to C libraries, which is a lot bigger problem.

[–] DarkMetatron 1 points 2 months ago

Well then the answer will most likely be: because they can and want to do it.

[–] PureTryOut@lemmy.kde.social 11 points 2 months ago

The reasons for choosing Musl over glibc are largely unrelated for choosing a service manager. You can want one without the other just fine.

[–] intelisense@lemm.ee 8 points 2 months ago (3 children)

My understanding is that it boots faster. That's a nice thing to have on a container that spins up on demand.

[–] khorovodoved@lemm.ee 5 points 2 months ago* (last edited 2 months ago) (1 children)

It boots faster than openRC (which is painfully slow). But runit is a lot faster than systemd, and there are init systems even faster than runit. And they all already work with musl. There is even dinit system specifically designed for containers.

[–] LeFantome@programming.dev 1 points 2 months ago (1 children)

What is the name of the dinit system designed for containers?

[–] khorovodoved@lemm.ee 3 points 2 months ago
[–] PureTryOut@lemmy.kde.social 4 points 2 months ago

In general (there are exceptions) containers do not use service managers at all. They start 1 command and that's it.

[–] corsicanguppy@lemmy.ca 1 points 2 months ago

My understanding is that it boots faster.

I tested this with EL6 and EL7. There was no discernible difference. It was all theories and brochureware.

[–] Zucca@sopuli.xyz 2 points 2 months ago (1 children)

I would say "finally", but I've given up already.

I don't see systems booting with systemd in any near future of any dimension. Instead I now run "terribly slow" OpenRC on my systems. Poor me.

[–] corsicanguppy@lemmy.ca 1 points 2 months ago

Instead I now run “terribly slow” OpenRC on my systems.

I suspect you're entirely free of init problems where you raise your fists to the heavens and ask WHAT ARE YOU DOING as if it'll tell you why systemd is on holiday now.

[–] MigratingtoLemmy@lemmy.world 1 points 2 months ago (2 children)

What is the aim of this project? Is there a reason why we want to port systemd to distributions which do not want to use glibc?

[–] markstos@lemmy.world 1 points 2 months ago (1 children)

For all the cases where musk might have advantages.

https://www.reddit.com/r/voidlinux/comments/muoqis/what_are_the_advantages_of_using_musl_in_place_of/

I like that musl helps build smaller containers. And sometimes I need systemd in a container.

[–] khorovodoved@lemm.ee 6 points 2 months ago (1 children)

Systemd bloats the container a lot more than glibc.

[–] markstos@lemmy.world 4 points 2 months ago (2 children)

If I need systemd for a specific use, like testing systemd services, that’s essential, not bloat.

[–] corsicanguppy@lemmy.ca 3 points 2 months ago (1 children)

If I need systemd for a specific use, like testing systemd services

So you're hoping to test systemd in this theoretical test environment, but your prod isn't built like this? Tell us why you're ignoring the first rule of testing and deploying internal software?

[–] markstos@lemmy.world 1 points 2 months ago

The same containers can be used for dev, test and production.

[–] khorovodoved@lemm.ee 2 points 2 months ago

I wouldn't recomend testing any software for glibc system on a musl system.

[–] possiblylinux127@lemmy.zip 0 points 2 months ago

Libc has more overhead and attack surface