Skip to main content
Topic: s6: Major s6-scripts upgrade and new features (Read 2259 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

s6: Major s6-scripts upgrade and new features

After quite a bit of refactoring and work, I'm happy to announce that the upcoming s6-base 2.0-1 and s6-scripts 20210921-1 packages support a couple of major new features for users.

1. /etc/s6/adminsv is now supported for custom services and user-editable services.
I've gotten a few reasonable requests to better support custom services and user editing in Artix. Before, the policy barely allowed for any user edits and custom services were just thrown in the same directory (/etc/s6/sv) as everything else. With this refactor, we now separate the services into these directories.

  • /etc/s6/sv: the default directory for script packages from Artix - these are not to be touched
  • /etc/s6/adminsv: the directory for custom user services as well as script packages from Artix that allow for editing (e.g. the new network bundle)
  • /etc/s6/fallbacksv: this is an emergency fallback that is used if the s6-rc-compile of sv and adminsv fails - never touch these

If you have written any custom services, it is highly recommended that you move them to /etc/s6/adminsv after this upgrade.

The location of the default bundle was originally going to be moved to /etc/s6/adminsv, but unfortunately the s6-rc-db-update-hook had a pretty awful bug that caused the entire default bundle to be shutdown. This has been fixed since s6-base 1.9, but clearly it is far, far too soon to make that move (not until the next stable iso release at the very least). Apologizes for those who wanted to manually edit the default bundle. This will be coming in the future when I am more confident we won't break people's setups.

Sidenote: For the sake of clarity, editing the conf files in /etc/s6/config still apply as always and work for any service. These are just a place to parse some environment variables. They do not affect the function of the service itself like what would happen if someone changed dependencies or bundle contents.

2. Network detection support
One major thing s6-scripts lacked was a way to wait on the network. This has now been implemented. How it works is that on startup, a network-detection oneshot script is run in the background. Backgrounding it is necessary so that the script doesn't block you from reaching tty. network-detection simply loops on a timer (the default is 60 seconds; this can be configured) until it finds a working internet connection. Once it has been found, the script tells s6-rc to bring up the network bundle and exits the loop.

Anything in the network bundle is, of course, started. If you have services that require a network to run, the recommended workflow is to remove them from the default bundle and edit them into /etc/s6/adminsv/network/contents. After a database recompilation (sh /usr/share/libalpm/scripts/s6-rc-db-update-hook), these services should be automatically started on boot when you have a working network connection.

Repo Status: System
Because this is a big update with a lot of moving parts, I'm going to slow walk it through the repos. Ideally this hits core at the end of the week. Adventurous people are encouraged to test and make sure the upgrade goes smoothly.

Update: I have just now moved this to the system repos.

Enjoy administering your system!

Re: s6: Major s6-scripts upgrade and new features

Reply #1
I have now moved the new s6-base and s6-scripts to gremlins (testing).

 

Re: s6: Major s6-scripts upgrade and new features

Reply #2
The update has now moved to system (core) repos.