Here is a little roadmap I created to port the boot services from openrc to 66.
1. Don't make a module first. I would recommend to simply rewrite all the boot services from openrc to 66.
You can find the basic set of services you need to boot alpine by installing alpine (running setup-alpine
, setup-disk
etc...) then running rc-update
to see the runlevels and the set of services included there by default.
Here's what appear for me:
Aas you can see you have only a few services to port to make a bootable copy of alpine: only about 14.
2. Don't try porting everything to execline first
When you start porting from openrc to 66, I would advise you to copy the sh
scripts directly as much as possible, and adjust as needed. Don't worry about porting everything to execline first, that can be done later gradually.
Remember to add the shebang first to the Exec
lines if you choose to do this way.
It's also not that easy to write execline scripts when you're starting out, and some init scripts can be very very complex, so they might need you to ask other people to figure out the execline scripts.
3. After the system boots, port other services
Now you can start porting the other services that are not needed for boot, but pre-included in the install ISO. You can find a list of them by running find /etc/init.d
, and at the time of writing this, they are 51.
Next, you can port other services as the need arrives, for example for applications, mail servers, mail clients, networmanager... As an indication of size, on my (bloated) system I currently have 132 services.
4. Create user services
For pipewire, touchegg, orca, etc... Alpine currently misuses /etc/xdg/autostart
for this, since openrc doesn't support user services.
We will need to create something that launches a 66 scandir for the user after they login, analogous to running a systemd --user
instance. I would recommend creating a PAM module, but there are numerous other ways to approach this.
It would also be nice to have socket activation at this point, so that the user never needs to explicitly enable pipewire
, but it will be started automatically if needed by something like GNOME
.
More steps to follow...