RFC init: Add s6 as init system
Get series with b4
b4 am 20190211214000.GA5977@itchyVersions newest first
- v1 RFC Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Buildroot] [RFC 0/3] init: Add s6 as init system
Quoted 40 lines · Vadym Kochan
Hi Eric,
Quoted 37 lines · Eric Le Bihan
Hi!
Quoted 24 lines · Vadim Kochan
Add new system init support (
BR2_INIT_S6) based on s6 suite. This is very-very basic support which does not have any setup automation logic (but only getty) but it allows to install custom s6-rc services in a bit easier way by the board. All s6-rc services which were copied by rootfs-overlay or post-build will be compiled as s6-rc db into/etc/s6-rc/compiled-initial, which also has/etc/s6-rc/compiledlink to easy replace it in runtime.In case if such kind of change will be merged, then may be it would be good to think about of some packages integration into s6-rc system.
Vadim Kochan (3):
package/s6-linux-init: Build also for the host package/s6-linux-init: Allow to install as init system package/s6-rc: Allow to integrate s6-rc servicespackage/s6-linux-init/s6-linux-init.mk | 69 +++++++++++++++++++++++++++++++++- package/s6-rc/rc.init | 4 ++ package/s6-rc/rc.shutdown | 3 ++ package/s6-rc/s6-rc.mk | 32 ++++++++++++++++ system/Config.in | 9 ++++- 5 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 package/s6-rc/rc.init create mode 100644 package/s6-rc/rc.shutdownQuoted 3 lines
--
2.14.1I worked on a s6-based init system eons ago [1], but without using a host variant of s6-linux-init.
I'll test your patches.
Quoted 7 lines
Quoted 4 lines
Regards,
--
ELBDo you have any conceptual comments regarding this ? Also I think may be it's better to have
/etc/s6-rcinto/etc/s6/rc.
I tested your series and it works fine. As you are using the file system pre and post command hooks to compile the database services, this is cleaner than using a post-build script as done in my external customization.
I had not used s6-linux-init-maker at that time, but favored a hand-written init. Now this tool does the job, so it is OK to use it.
If this series is applied and a s6-based init option is available to the user, I think that providing kerneld/syslogd via s6-log may be useful. The same may apply to network configuration. The selling point of a s6-based init system is the service supervision and having the basic services available and supervised contribute to it.
But adding support for s6-compliant services is tricky, as unlike systemd, services are not available as files but as directories. So providing some for the basic services in Buildroot may clutter the source tree. My approach was to provide them via dedicated projects (s6-br2-init{skeleton,services}), but there may be a cleaner one. The nosh init system [1] provides a tool to convert systemd services, so may be such a tool for s6 may do the trick.
As for /etc/s6-rc vs. /etc/s6/rc, the later may indeed be better, as there is already /etc/s6/init.
[1] https://jdebp.eu/Softwares/nosh/
Regards,
--
ELB