Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have a standard set of core services for distros to use #245

Open
q66 opened this issue Sep 13, 2023 · 9 comments
Open

have a standard set of core services for distros to use #245

q66 opened this issue Sep 13, 2023 · 9 comments

Comments

@q66
Copy link
Contributor

q66 commented Sep 13, 2023

dinit comes with a sample service set that can technically result in a bootable system, but it hardly makes full use of dinit's potential nor it provides something that would be useful as a reasonable base for all dinit-using distros to share

that means everybody is sort of doing their own thing, which means software upstreams will not be able to ship distro-independent service files like they can with systemd, which is bad for serious adoption

i've been meaning to make my dinit-chimera https://github.com/chimera-linux/dinit-chimera largely reusable, and i believe it's currently the most advanced core service set that exists for dinit; but it's downstream regardless (and currently it makes some assumptions that might not be viable for everybody, but that will change, the most notable thing right now is usage of systemd-tmpfiles but i plan to have a custom helper come with it later instead), so i wonder if we could put some effort into making a common system? not a mandatory one, but at very least something officially recommended for potential adopters, so that software has something specific to target

@davmac314
Copy link
Owner

Sounds like a great idea to me. We can standardise the set of base services (particularly targets) that can be relied on to be available (eg. the names you have currently for chimera as per link above) and offer your current set as an example implementation, for example.

@q66
Copy link
Contributor Author

q66 commented Sep 13, 2023

having some names available would be a good baseline at least, though sooner or later some things may have to rely on service-manager-related infrastructure beyond dependencies, but we'll see i guess...

@davmac314
Copy link
Owner

yeah, the tmpfiles issue is a good example of that. Let's see if anything else comes up. The service names is a good baseline as you say, we can start with that and build on it as necessary.

@mohamad-supangat
Copy link

see https://wiki.artixlinux.org/Main/Dinit and https://github.com/mohamad-supangat/dinit.d

who knows will help

@adamjonn
Copy link

i second that, rather the moving to Artix rather remove systemd in arch and have a quickest boot possible into a xinit session.
gonna give it a stab some very good starters above, but a very bare minimal boot setup into a xsession would be very handy right handy right now rather then hacking systemd

@notramo
Copy link

notramo commented Dec 26, 2024

I'm working on an unofficial dinit setup for Void Linux, and I want to write an unofficial setup for Alpine Linux too.

Reusability of service files and scripts is probably not possible, because dinit does not provide enough features for it, and provides too much flexibility (less lock-in) compared to systemd. For example, Void Linux uses chpst -u for changing the user/group of the process, which is a Void-specific tool. Other distros might use sudo -u. In systemd, it's solved by having a built-in User= config value, and user/group changing is done inside systemd, but in dinit, it has to be done by external tools.

Some distros might prefix system users with _, e.g. _ntpd-rs instead of ntpd-rs (Void does this), this is another point where reusability is not possible. Standardization could require distros to use unified system user names for the services, however, it would make unofficial setups much more difficult (e.g. Void Linux with dinit).

In Void Linux, many services have some setup commands before starting the service. Maybe it's needed in Alpine too. These are shell scripts. Shell scripts use coreutils. There are many incompatible coreutils implementations: Busybox, Toybox, FreeBSD core utils, uutils, or the most widely used GNU coreutils. The shell scripts can be at least replaced per-distro, e.g. Chimera can supply a certain script based on FreeBSD coreutils and a Busybox-based one can be used in Alpine.

Non-Linux systems use different boot procedures and CLI tools, which introduce even more difference.

However, I think that the names of services and targets can be standardized, and it would be a welcome addition.

@q66
Copy link
Contributor Author

q66 commented Dec 26, 2024

@notramo
Copy link

notramo commented Dec 26, 2024

Thanks for the reminder, I'm quite new to dinit, and didn't know that. Unfortunately, it still can't change the group, only the user (if it's not the primary group of the user). Also, it does not solve the other points mentioned in my comment. But still it's good to know.

@q66
Copy link
Contributor Author

q66 commented Dec 26, 2024

changing the group of the process to something that is different from the user's actual primary group makes no sense

and also you are missing the point of this whole issue, because the issue is about core early-boot services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants