PortaLinux Init System - Release Archive
The PortaLinux Init System, mainly known for the PortaLinux Service Supervisor, is the init system utilized by PortaLinux. It consists of a very minimal init program, pl-init, and a service supervisor, pl-srv, with the supervisor being the most crucial part of this subproject.
The init program is a very cut-down version of the original pl-init introduced in PortaLinux Build System release 0.09. pl-init went from an incomplete sysvinit clone to a simple init program that would do some housekeeping prior to handing off service startup to pl-srv, which itself was introduced in PortaLinux Build System release 0.10.1 prior to getting its own repo.
The PortaLinux Init System, more specifically the service service supervisor, was heavily inspired by Systemd's systemd-init, with pl-srv only being able to be configured with unit files. In terms of features, the service supervisor is a subset of the s6 init system's service supervisor, having dependency-based service initialization and service logging. Despite all of these features, it's still much lighter than either of them, with it only taking up around 64KiB in storage and less than 1MiB of RAM overall on a system with around 20 services running.
Here are the releases of this project repo:
- v0.01: Initial release
- v0.02: libsrv and a new build system
- v0.03: Service restart and soft reboot
- v0.04: Ported to pl-rt
- v0.04.1: Small temporary bandaid fix
- v0.04.2: Fix for the fix
- v0.04.3: Fix for the Fix for the Fix
- v0.05: Basic dependency-based startup
- v0.05.1: Typo fix
- v0.06: Basic supervisor logging support
- v0.07: Proper dependency-based init, pl-init improvements
- v0.08: Meson Build System and Full Logging support
- v0.08.1: Minor bugfix
- v1.00-rc1: User mode and Run system services as user
v0.01: Initial release
Released on 2023/3/17 by CinnamonWolfy
First release. Here are the features:
- Imported source code from pocketlinux32/portalinux
- Imported build system from pocketlinux32/pl32lib-ng and hacked it into compiling executables instead of libraries
v0.02: libsrv and a new build system
Released on 2023/4/17 by CinnamonWolfy
Second release. Here are the changes:
- libsrv has been created for memory optimizations when forking to start a supervisor. It contains parts of pl-init and most of pl-srv
- compile has been properly extended to compile libraries and executables. It can currently compile multiple libraries or one library and multiple executables. I will eventually properly make it so that it can compile multiple libraries and multiple executable at the same time
v0.03: Service restart and soft reboot
Released on 2023/8/2 by CinnamonWolfy
After almost 4 months, pl-srv finally gets an update :3
Third release. Here are the changes:
- Added restart command
- It restarts (stops, then starts again) a service
- Added soft-reboot command
- It stops all services and then starts them again. This is the equivalent of calling halt and then init. It basically goes through a normal shutdown procedure and then through a normal initialization procedure right after without shutting down, thus soft/warm rebooting the system
Dev Notes:
systemd has yet to implement soft rebooting (they plan to at some point), and runit is never gonna get it, while my runit clone that's still in pre-release has it, and i find that really neat ^w^
then again, pl-srv was designed to be simple and easy to expand from the start :3
v0.04: Ported to pl-rt
Released on 2023/11/12 by CinnamonWolfy
Fourth release. Here are the changes:
- libsrv has been fully ported over to pl-rt, the new PortaLinux Runtime
- Proper soft reboot support added
v0.04.1: Small temporary bandaid fix
Released on 2023/11/13 by CinnamonWolfy
Fifth release. Here are the changes:
- Added bandaid that should make pl-init more stable
- It now forks before executing plSrvInitHalt, as that call can result in a pl-rt panic, which would cause a kernel panic if it were to happen on PID 1
Developer note: i plan on making pl-srv less panicky in v0.05. i just needed to get a bandaid fix out so that portalinux 0.11-rc1 can be released
v0.04.2: Fix for the fix
Released on 2023/11/13 by CinnamonWolfy
Sixth release. Here are the changes:
- Fixed pl-init PID check after fork call
Developer's note: i fucked up, sowwy >~<
v0.04.3: Fix for the Fix for the Fix
Released on 2023/11/20 by CinnamonWolfy
Seventh release. Here are the changes:
- Fixed pl-init once again
- I need to stop re-releasing this version and just making shitty patch releases
v0.05: Basic dependency-based startup
Released on 2023/12/6 by CinnamonWolfy
Eighth release. Here are the changes:
- Basic dependency-based startup implemented
- Not a proper dependency-based init system yet (services can be stopped, regardless of whether another service depends on it)
- Changed service directory to /etc/pl-srv/srv and /var/pl-srv/srv
Future goals:
- Add proper dependency-based startup
- Add logging
v0.05.1: Typo fix
Released on 2023/12/6 by CinnamonWolfy
Ninth release. Here are the changes:
- pl-srv init and pl-srv halt work again
- I had forgotten to update the paths there
v0.06: Basic supervisor logging support
Released on 2024/1/2 by CinnamonWolfy
Tenth release. Here are the changes:
- Added basic logging support for the supervisor
- Process logging will be done eventually
- Moved all non-pl-srv-specific code to pl-rt
v0.07: Proper dependency-based init, pl-init improvements
Released on 2024/4/16 by CinnamonWolfy
Eleventh release. Here are the changes:
- Finished dependency system. pl-srv is officially a proper dependency-based service supervisor
- pl-init now polls for and clears zombie processes
- pl-init also opens on tty1 now
v0.08: Meson Build System and Full Logging support
Released on 2024/7/16 by CinnamonWolfy
Twelfth release. Here are the changes:
- Added service logging support
- Hasn't been tested yet. This release was mainly done for PortaLinux 0.11
- Added Meson Build System
- Updated pl-rt file calls to work on post-1.02.1 releases
v0.08.1: Minor bugfix
Released on 2024/7/22 by CinnamonWolfy
Thirteenth release. Here are the changes:
- Fixed a bug within the soft-reboot mechanism that was introduced in version 0.04
- Hasn't been tested yet. This release was mainly done for PortaLinux 0.11
v1.00-rc1: User mode and Run system services as user
Released on 2025/6/20 by CinnamonWolfy
Fourteenth release. Here are the changes:
- Added User mode
- A user other than root can now start their own services, as long as they install the unit files to ~/.local/share/pl-srv
- System mode services still require root priviledges to start
- Added Run-as-user
- A System mode service can be ran with the permissions of another user. Enhances security
- This works differently to User mode
- Refactored libsrv components
- libsrv-error is now libsrv-misc
- Merged plSrvCheckExist and plSrvStat
- Removed plSrvStrtonum and plSrvIsServiceRunning
- Moved plSrvInfraTest to pl-srv.c
- All other libsrv components updated to accomodate changes in libsrv-misc