LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-27-2021, 05:30 PM   #1
giomat
Member
 
Registered: Jul 2017
Posts: 337

Rep: Reputation: 238Reputation: 238Reputation: 238
S6 development news


I stumbled across this news of Alpine Linux sponsoring work for an alternative service manager to systemd, and to my surprise they plan to work with the creator of S6 init, which i saw some people tinker with here or on reddit.
Technical details about this evolved S6: https://skarnet.com/projects/service-manager.html
So to anyone who is tikering/using S6, whats your experience with it?
With these new changes could it provide a nice systemd alternative for slackware?
 
Old 04-27-2021, 06:03 PM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,355

Rep: Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067
IMHO, slackware already had a nice init system

Last edited by marav; 04-27-2021 at 06:14 PM.
 
4 members found this post helpful.
Old 04-27-2021, 10:41 PM   #3
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by marav View Post
IMHO, slackware already had a nice init system
Not so much for running services as a user though (services things like syncthing come to mind), that's something I'd like to see.
 
Old 04-28-2021, 01:18 AM   #4
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by drgibbon View Post
Not so much for running services as a user though (services things like syncthing come to mind), that's something I'd like to see.
What did you mean by "running services as a user" ?

On the latest Slackware-current is quite simple to run a program on background as user - started on user login, ensuring that a single instance is started no matter how many user sessions are started, then the program to be automatically quit on user logout.

This is exactly what we do with the PipeWire daemons triad, using the libSlack's daemon supervisor, included on Slackware not so long ago and creating three XDG autostart files.

http://www.libslack.org/daemon/
http://www.libslack.org/daemon/manpages/daemon.1.html

And a XDG autostart file for the pipewire daemon looks like this
Code:
[Desktop Entry]
Version=1.0
Name=PipeWire Media System
Comment=Start the PipeWire Media System
Exec=/usr/bin/daemon -frB --pidfiles=~/.run --name=pipewire /usr/bin/pipewire
Terminal=false
Type=Application
X-GNOME-Autostart-Phase=Initialization
X-KDE-autostart-phase=1
You need a XDG autostart file also for pipewire-mediasession and pipewire-pulse

So, for babysitting your syncthing in the same way, probably is needed a XDG autostart file, like this:
Code:
Desktop Entry]
Name=Start Syncthing
GenericName=File synchronization
Comment=Starts the main syncthing process in the background.
Exec=/usr/bin/daemon -frB --pidfiles=~/.run --name=syncthing --command="/usr/bin/syncthing serve --no-browser --logfile=default"
Icon=syncthing
Terminal=false
Type=Application
Keywords=synchronization;daemon;
Categories=Network;FileTransfer;P2P
This is on starting user services when the user goes on a desktop session, but there also are people who starts VPN services on a Linux console login (which automatically stops on user logout), by putting appropriate commands on ~/.profile

Last edited by LuckyCyborg; 04-28-2021 at 01:48 AM.
 
2 members found this post helpful.
Old 04-28-2021, 01:19 AM   #5
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by marav View Post
IMHO, slackware already had a nice init system
Exactly!

In my humble opinion, we do not need the systemd's little brother.

Probably way more useful would be a discussion regarding the systemd development news, because the applications will start sooner or later those new systemd features, which in the end will affect us, by not working on Slackware for whatever reason.

I believe that for us, right for staying away of systemd, is the best to have a really informed view about systemd and how the applications interact with it.

Last edited by LuckyCyborg; 04-28-2021 at 02:03 AM.
 
2 members found this post helpful.
Old 04-28-2021, 02:07 AM   #6
mishehu
Member
 
Registered: Aug 2014
Location: USA
Distribution: Slackware (where ::1 is), Centos, Debian
Posts: 106

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by LuckyCyborg View Post
Exactly!

In my humble opinion, we do not need the systemd's little brother.

Probably way more useful would be a discussion regarding the systemd development news, because the applications will start sooner or later those new systemd features, which in the end will affect us, by not working on Slackware for whatever reason.

I believe that for us, right for staying away of systemd, is the best to have a really informed view about systemd and how the applications interact with it.
Is s6 really "systemd's little brother" ? With the cursory examination of it that I did, it seems to be more in the vein of runit, which IS what I use for an init system. As good as the default init is in Slackware, I find it lacking in flexibility and for on-the-fly changes. I am also a pretty strong proponent of daemon supervision, and I am annoyed by forking processes to the background instead of just having the init manage them.

So Slackware's system initialization rc scripts? Magnificent. But for using them or sysv for launching daemons (other than dhcpcd)? Not so much. My two cents.
 
Old 04-28-2021, 02:33 AM   #7
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by mishehu View Post
Is s6 really "systemd's little brother" ?
Yes, by the very idea of parallel running of services/units it's a lot like systemd's PID EINZ which everybody hates and fundamentally different of what Slackware do. And I do not care if PID EINZ was inspired from runit, which was inspired from upstart, which was show in a dream vision by Santa Klaus.

However, no matter what, I for one I believe that IF EVER Slackware will have to change fundamentally its init system, the single worth change would be to the systemd adoption.

At least, this way we will get the compatibility with everybody else, excluding probably Alpine, Obarun and few others.

Quote:
Originally Posted by mishehu View Post
With the cursory examination of it that I did, it seems to be more in the vein of runit, which IS what I use for an init system. As good as the default init is in Slackware, I find it lacking in flexibility and for on-the-fly changes. I am also a pretty strong proponent of daemon supervision, and I am annoyed by forking processes to the background instead of just having the init manage them.

So Slackware's system initialization rc scripts? Magnificent. But for using them or sysv for launching daemons (other than dhcpcd)? Not so much. My two cents.
The latest Slackware-current already includes an excellent daemon supervisor, about I already talked. And it was designed originally and literally for supervising services on init systems.

I told you that's also really small and a single binary program?

BUT, how the Slackware init scripts would be adapted in future to use it, or IF there EVEN will be changes of such type, this is another discussion.

However, as "a pretty strong proponent of daemon supervision" as you are, feel free to research ways of using the daemon supervision on Slackware init scripts (using the tools which are already included) and propose them to our BDFL.

I for one, I was interested solely on the user side of running certain services designed for systemd, like are the PipeWire daemons.

Last edited by LuckyCyborg; 04-28-2021 at 03:48 AM.
 
Old 04-28-2021, 03:49 AM   #8
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by LuckyCyborg View Post
What did you mean by "running services as a user" ?
I mean services that come up at boot time, are running as my own user, and can be watched/checked through a daemon supervisor (hopefully firing the service back up again if it goes down). Even better if it had support for putting processes in containers (without involving root), that would be ideal.

Quote:
Originally Posted by LuckyCyborg View Post
On the latest Slackware-current is quite simple to run a program on background as user - started on user login, ensuring that a single instance is started no matter how many user sessions are started, then the program to be automatically quit on user logout.
It's not exactly what I want, but sounds pretty handy to ensure only a single instance. I'll take a look, thanks.
 
Old 04-28-2021, 04:14 AM   #9
mishehu
Member
 
Registered: Aug 2014
Location: USA
Distribution: Slackware (where ::1 is), Centos, Debian
Posts: 106

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by LuckyCyborg View Post
Yes, by the very idea of parallel running of services/units it's a lot like systemd's PID EINZ which everybody hates and fundamentally different of what Slackware do. And I do not care if PID EINZ was inspired from runit, which was inspired from upstart, which was show in a dream vision by Santa Klaus.

However, no matter what, I for one I believe that IF EVER Slackware will have to change fundamentally its init system, the single worth change would be to the systemd adoption.

At least, this way we will get the compatibility with everybody else, excluding probably Alpine, Obarun and few others.



The latest Slackware-current already includes an excellent daemon supervisor, about I already talked. And it was designed originally and literally for supervising services on init systems.

I told you that's also really small and a single binary program?

BUT, how the Slackware init scripts would be adapted in future to use it, or IF there EVEN will be changes of such type, this is another discussion.

However, as "a pretty strong proponent of daemon supervision" as you are, feel free to research ways of using the daemon supervision on Slackware init scripts (using the tools which are already included) and propose them to our BDFL.

I for one, I was interested solely on the user side of running certain services designed for systemd, like are the PipeWire daemons.
runit itself does not derive from upstart. It derives from Daniel J. Bernstein's daemontools. And I'm not aware of s6 deriving from upstart either, but I haven't actually installed it on any machine nor looked at its code in depth.

If your argument is that runit starts processes in parallel, and thus that makes it the "little brother of systemd", that's quite a weak one. They share no code, and only loosely share *some* concepts. And runit doesn't have an equivalent of the worm & apple game which is stuff like 'systemd-fstab-generator'.

Unless you're actually creating entries into /etc/inittab, how are you doing actual daemon supervision without doing it in a terribly ugly and hackish manner? I'd still rather launch most daemons via inittab were I to not be using runit or anything else.

I don't find your arguments here to be very compelling. But the nice thing is that we're free to disagree, and I can freely run runit or s6 as my PID 1 system. :-)
 
Old 04-28-2021, 04:24 AM   #10
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by drgibbon View Post
I mean services that come up at boot time, are running as my own user, and can be watched/checked through a daemon supervisor (hopefully firing the service back up again if it goes down). Even better if it had support for putting processes in containers (without involving root), that would be ideal.
The daemon supervisor included in Slackware-have the ability to run as a different user (if itself is executed as root) on the init scripts, and to --respawn its client program if it goes down.

Like I said already, it is an daemon supervisor designed for usage mainly on init scripts, from what I known. And it offers a quite nice set of features for this.

Only not so long ago (at @ZhaoLin1457's feature request) it got also the ability to communicate with (e)logind, for watching for the user logout, when to quit itself and it's client program.

We wanted this particular feature for properly handling the PipeWire daemons, which does not known how to quit themselves on user logout, like PulseAudio.

BUT, the daemon was from its inception and it is literally even now an init system tool.

Quote:
Originally Posted by drgibbon View Post
It's not exactly what I want, but sounds pretty handy to ensure only a single instance. I'll take a look, thanks.
Like I said, you can can run on init system side a particular service as user. All depends of your imagination.

Last edited by LuckyCyborg; 04-28-2021 at 06:51 AM.
 
Old 04-28-2021, 04:42 AM   #11
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by mishehu View Post
I don't find your arguments here to be very compelling.
Neither me, your arguments that Slackware shall change its init system, because reasons...

In fact, starting a thread saying that whatever is "a nice systemd alternative for slackware" means that there are people who wants systemd, but because reasons they look for alternatives.

BUT, I believe that the Slackers are quite happy with the actual init system and that's WHY the Slackware does not switched to systemd too.

I for one, I do not need either systemd or any other "nice alternative" of it, because simply I am quite satisfied by the actual init system. And apparently like me are many.
 
Old 04-28-2021, 04:44 AM   #12
mumahendras3
Member
 
Registered: Feb 2018
Location: Indonesia
Distribution: Slackware-current + s6 + s6-rc + s6-linux-init (github.com/mumahendras3/sl6ckware)
Posts: 125

Rep: Reputation: Disabled
Quote:
Originally Posted by drgibbon View Post
I mean services that come up at boot time, are running as my own user, and can be watched/checked through a daemon supervisor (hopefully firing the service back up again if it goes down).
FWIW, if you use the combination of s6 + s6-rc + s6-linux-init as your init system, you can create a user supervision sub-tree that is run as your user and make it as one of the system services that should be started at boot time. After that, you can then add your own services to that supervision sub-tree. For example, in my system, here is a snippet of what the process tree looked-like (ignore the additional "runuser" process, that's just for applying resource limits, set by PAM, that are defined in /etc/security/limits.conf and /etc/security/limits.d/*, although I don't really use it for now):
Code:
s6-svscan -X3 -- /run/service
  ├─...
  ...
  ├─s6-supervise mumahendras3-subtree
  │   └─runuser -u mumahendras3 -- s6-svscan -d3 -- /run/mumahendras3-subtree/service
  │       └─s6-svscan -d3 -- /run/mumahendras3-subtree/service
  │           ├─s6-supervise pulseaudio/log
  │           ├─s6-supervise pulseaudio
  │           ├─s6-supervise mpris-proxy/log
  │           ├─s6-supervise mpris-proxy
  │           ├─s6-supervise dbus-session-bus/log
  │           │   └─s6-log -d3 -- n4 s500000 T /home/mumahendras3/.local/share/s6/dbus-session-bus
  │           ├─s6-supervise dbus-session-bus
  │           │   └─dbus-daemon --session --nofork --nopidfile --nosyslog --print-pid=3 --print-address=4
  │           ├─s6-supervise pipewire-media-session/log
  │           │   └─s6-log -d3 -- n4 s500000 T /home/mumahendras3/.local/share/s6/pipewire-media-session
  │           ├─s6-supervise pipewire-media-session
  │           │   └─pipewire-media-
  │           │       └─{pipewire-media-}
  │           ├─s6-supervise ssh-agent/log
  │           │   └─s6-log -d3 -- n4 s500000 T /home/mumahendras3/.local/share/s6/ssh-agent
  │           ├─s6-supervise ssh-agent
  │           │   └─ssh-agent -Da /run/user/1000/ssh-agent.sock
  │           ├─s6-supervise pipewire-pulse/log
  │           │   └─s6-log -d3 -- n4 s500000 T /home/mumahendras3/.local/share/s6/pipewire-pulse
  │           ├─s6-supervise pipewire-pulse
  │           │   └─pipewire-pulse
  │           │       └─{pipewire-pulse}
  │           ├─s6-supervise pipewire/log
  │           │   └─s6-log -d3 -- n4 s500000 T /home/mumahendras3/.local/share/s6/pipewire
  │           └─s6-supervise pipewire
  │               └─pipewire
  │                   └─{pipewire}
  ...
(I don't start my supervision sub-tree at boot time, just when I log in. But, the process tree will probably looked similar like above.)

EDIT:
Actually, you probably don't need to have an s6-based init system to do that, you can probably use /etc/inittab to launch an s6-svscan instance that is run by your user, supervised by Slackware's "init" program.

Last edited by mumahendras3; 04-28-2021 at 04:55 AM. Reason: Additional info
 
Old 04-28-2021, 04:46 AM   #13
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by mumahendras3 View Post
FWIW, if you use the combination of s6 + s6-rc + s6-linux-init as your init system, you can create a user supervision sub-tree that is run as your user and make it as one of the system services that should be started at boot time.
Same we can do on systemd, thought...
 
Old 04-28-2021, 04:53 AM   #14
mishehu
Member
 
Registered: Aug 2014
Location: USA
Distribution: Slackware (where ::1 is), Centos, Debian
Posts: 106

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by LuckyCyborg View Post
Neither me, your arguments that Slackware shall change its init system, because reasons...
I am making no such argument. I am perfectly fine with the default init being shipped, and then being able to replace it with whatever init of my liking is.


Quote:
Originally Posted by LuckyCyborg View Post
In fact, starting a thread saying that whatever is "a nice systemd alternative for slackware" means that there are people who wants systemd, but because reasons they look for alternatives.
That can mean "has some concepts in common with systemd". Systemd itself does have some nice concepts. But it is the actual design and implementation where it fails, in my opinion. I work with systemd at work, and I've had to learn to deal with those shortcomings.

Quote:
Originally Posted by LuckyCyborg View Post
BUT, I believe that the Slackers are quite happy with the actual init system and that's WHY the Slackware does not switched to systemd too.
Maybe, maybe not. Pat tends to be resistant to "change for change's sake". To some extent, so am I. That's why I'm not advocating that Pat replace the default init with runit, s6, systemd, or any other init.

Quote:
Originally Posted by LuckyCyborg View Post
I for one, I do not need either systemd or any other "nice alternative" of it, because simply I am quite satisfied by the actual init system. And apparently like me are many.
I'm perfectly happy that you are happy.
 
Old 04-28-2021, 04:55 AM   #15
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Can someone explain to me why you would want to run daemons in your own name? What would be the advantage of that?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Novell: Good News, Bad News LXer Syndicated Linux News 0 08-28-2009 02:41 AM
LXer: Fedora 9 : Good News. Bad News. LXer Syndicated Linux News 0 04-18-2008 10:10 PM
LXer: What's your favorite news hub for free software news? LXer Syndicated Linux News 0 07-14-2007 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration