Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] runit-void: split package into main package and init controls
@ 2021-02-28  7:23 heliocat
  2021-02-28  7:26 ` heliocat
                   ` (47 more replies)
  0 siblings, 48 replies; 49+ messages in thread
From: heliocat @ 2021-02-28  7:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3195 bytes --]

There is a new pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to better allow experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 5198 bytes --]

From c442d0a1b20c3055bdf001050fdf3de6d8da07d0 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: split package into main package and init controls

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.
---
 etc/defaults.virtual                       |  1 +
 srcpkgs/runit-void-init                    |  1 +
 srcpkgs/runit-void/INSTALL                 |  6 ------
 srcpkgs/runit-void/runit-void-init.INSTALL | 10 ++++++++++
 srcpkgs/runit-void/template                | 23 +++++++++++++++++++---
 5 files changed, 32 insertions(+), 9 deletions(-)
 create mode 120000 srcpkgs/runit-void-init
 create mode 100644 srcpkgs/runit-void/runit-void-init.INSTALL

diff --git a/etc/defaults.virtual b/etc/defaults.virtual
index 083ab6349ea..3e517fa25ba 100644
--- a/etc/defaults.virtual
+++ b/etc/defaults.virtual
@@ -36,3 +36,4 @@ xserver-abi-video xorg-server
 libGL libglvnd
 libEGL libglvnd
 libGLES libglvnd
+void-init runit-void-init
diff --git a/srcpkgs/runit-void-init b/srcpkgs/runit-void-init
new file mode 120000
index 00000000000..56af4340f73
--- /dev/null
+++ b/srcpkgs/runit-void-init
@@ -0,0 +1 @@
+runit-void
\ No newline at end of file
diff --git a/srcpkgs/runit-void/INSTALL b/srcpkgs/runit-void/INSTALL
index 5a998f22549..276bf80d350 100644
--- a/srcpkgs/runit-void/INSTALL
+++ b/srcpkgs/runit-void/INSTALL
@@ -15,11 +15,5 @@ post)
 		[ -e /etc/sv/agetty-tty${f}/down ] || ln -sf /etc/sv/agetty-tty$f etc/runit/runsvdir/default
 	done
 	[ -e etc/sv/udevd/run ] && ln -sf /etc/sv/udevd etc/runit/runsvdir/default
-
-	if [ -d usr/sbin -a ! -L usr/sbin ]; then
-		for f in init shutdown halt reboot poweroff; do
-			ln -sr ../bin/$f usr/sbin/$f
-		done
-	fi
 	;;
 esac
diff --git a/srcpkgs/runit-void/runit-void-init.INSTALL b/srcpkgs/runit-void/runit-void-init.INSTALL
new file mode 100644
index 00000000000..c4c383805fa
--- /dev/null
+++ b/srcpkgs/runit-void/runit-void-init.INSTALL
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+post)
+    # install init and shutdown files
+    if [ -d usr/sbin -a ! -L usr/sbin ]; then
+        for f in init shutdown halt reboot poweroff; do
+            ln -sr ../bin/$f usr/sbin/$f
+        done
+    fi
+    ;;
+esac
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3de..9c566821773 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20200720
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -11,7 +11,7 @@ homepage="https://github.com/void-linux/void-runit"
 distfiles="https://github.com/void-linux/void-runit/archive/${version}.tar.gz"
 checksum=706ed491315bd75b4b4ca07bc04af97369f8ef8820e9fa1931dae6939ea2e2db
 
-depends="virtual?awk procps-ng runit"
+depends="virtual?awk procps-ng runit virtual?void-init"
 conf_files="
  /etc/hostname
  /etc/locale.conf
@@ -40,7 +40,6 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
 }
 
 runit-void-apparmor_package() {
@@ -52,3 +51,21 @@ runit-void-apparmor_package() {
 		vmove etc/runit/core-services/09-apparmor.sh
 	}
 }
+
+runit-void-init_package() {
+	short_desc+=" - init interface"
+	depends="runit runit-void"
+	provides="void-init-0_1"
+	replaces="void-init>=0"
+	pkg_install() {
+		vmove usr/bin/halt
+		vmove usr/bin/poweroff
+		vmove usr/bin/reboot
+		vmove usr/bin/shutdown
+		vmove usr/share/man/man8/halt.8
+		vmove usr/share/man/man8/poweroff.8
+		vmove usr/share/man/man8/reboot.8
+		vmove usr/share/man/man8/shutdown.8
+		ln -s runit-init ${PKGDESTDIR}/usr/bin/init
+	}
+}

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
@ 2021-02-28  7:26 ` heliocat
  2021-02-28  9:14 ` st3r4g
                   ` (46 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-02-28  7:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787410230

Comment:
@Gottox @ericonr (plus whoever else wants in on this action).

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
  2021-02-28  7:26 ` heliocat
@ 2021-02-28  9:14 ` st3r4g
  2021-02-28 10:23 ` st3r4g
                   ` (45 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28  9:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787421214

Comment:
In my opinion this would be most cleanly solved by xbps-alternatives. But if https://github.com/void-linux/xbps/pull/185 (xbps can't replace a real file with a symlink) is still a problem and no work is being done to solve it, then we're stuck with virtual packages.

That said, I'm interested to try this out.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
  2021-02-28  7:26 ` heliocat
  2021-02-28  9:14 ` st3r4g
@ 2021-02-28 10:23 ` st3r4g
  2021-02-28 11:13 ` st3r4g
                   ` (44 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 10:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787429396

Comment:
Looks like this works (tested on a fakeroot for now):
```
diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3d..86b0cc58e3 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20200720
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -28,9 +28,21 @@ make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit
+"
+
 post_install() {
        vmkdir usr/bin
        mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+       mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+       mv ${DESTDIR}/usr/bin/poweroff ${DESTDIR}/usr/bin/poweroff-runit
+       mv ${DESTDIR}/usr/bin/reboot ${DESTDIR}/usr/bin/reboot-runit
+       mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
        vconf ${FILESDIR}/hostname
        vconf ${FILESDIR}/os-release
        vconf ${FILESDIR}/locale.conf
@@ -40,7 +52,6 @@ post_install() {
        rm -f ${DESTDIR}/etc/runit/runsvdir/current
        rm -rf ${DESTDIR}/etc/runit/runsvdir/default
        rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-       ln -s runit-init ${DESTDIR}/usr/bin/init
 }
 
 runit-void-apparmor_package() {
```
the files are being replaced by symlinks correctly.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (2 preceding siblings ...)
  2021-02-28 10:23 ` st3r4g
@ 2021-02-28 11:13 ` st3r4g
  2021-02-28 11:16 ` st3r4g
                   ` (43 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 11:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787435387

Comment:
Also, a virtual package approach would remove the other init's `poweroff` file, which you still need to shutdown the running system...

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (3 preceding siblings ...)
  2021-02-28 11:13 ` st3r4g
@ 2021-02-28 11:16 ` st3r4g
  2021-02-28 12:52 ` teldra
                   ` (42 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 11:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787435387

Comment:
Also, a virtual package approach would remove the other init's `poweroff` file, which you still need once to shutdown the running system...

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (4 preceding siblings ...)
  2021-02-28 11:16 ` st3r4g
@ 2021-02-28 12:52 ` teldra
  2021-02-28 13:30 ` mobinmob
                   ` (41 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: teldra @ 2021-02-28 12:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

New comment by teldra on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787447632

Comment:
@mobinmob might be intrested

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (5 preceding siblings ...)
  2021-02-28 12:52 ` teldra
@ 2021-02-28 13:30 ` mobinmob
  2021-02-28 15:53 ` ahesford
                   ` (40 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: mobinmob @ 2021-02-28 13:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787452567

Comment:
Thanks @teldra! 
@heliocat has spoken a little about this solution in #s6.  I will test it. Handling the switch in the packages/package manager is nice, especially if it is gets serious consideration from the void team. 
Currently I am using a slightly altered version of your switch-initutils in the [boot-66serv PR](https://github.com/void-linux/void-packages/pull/25743)  ;)

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (6 preceding siblings ...)
  2021-02-28 13:30 ` mobinmob
@ 2021-02-28 15:53 ` ahesford
  2021-02-28 19:50 ` heliocat
                   ` (39 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: ahesford @ 2021-02-28 15:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787473473

Comment:
This is the wrong solution to a problem I'm not even sure exists. Almost everything in `runit-void` is tied to the assumption that runit is bringing up the system. The services in `/etc/sv` are only useful if `runsvdir` is used to manage system services, which is done by the scripts in `/etc/runit`. So keeping those separate from the init bits doesn't make sense. The same is true for the startup and teardown scripts in `/etc/runit`, which exist to be invoked by `runit` as PID 1.

About the only bits which might apply to alternatives to runit are `/etc/hostname`, `/etc/locale.conf`, `/etc/os-release`, `/usr/lib/dracut/dracut.conf.d/10-runit-void.conf` and, assuming alternatives like s6 are configured to invoke them, the trio of `/etc/rc.*` scripts. All you need to do here is move those files to another package. Maybe some of these belong in `base-files`; the Dracut configuration probably belongs in `dracut`.

Replacing runit with an alternative is a fine thing to do, but I don't think Void has the resources to provide any official support for swappable service management and init systems. Alternatives and virtual packages each cause problems that we probably don't want. To go down the path of runit altneratives, `ignorepkg` runit-void, install and configure what you want.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (7 preceding siblings ...)
  2021-02-28 15:53 ` ahesford
@ 2021-02-28 19:50 ` heliocat
  2021-02-28 22:07 ` st3r4g
                   ` (38 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-02-28 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787511147

Comment:
@st3r4g I hadn't gone with the alternatives route for a couple of reasons but it is definitely the cleaner approach. First, someone (it might have even been you) had mentioned in IRC that xbps-alternatives was buggy and so I didn't want to put something as critical as startup and shutdown on that. The second is that I don't know at what point alternatives become available in the life of a new system and I didn't want to break off the extra work to guarantee that /sbin/init was available on bootstrap and otherwise very minimal systems at every point in the lifecycle. I'd assumed that was the reason that runit-init was explicitly symlinked to init in the first place.

As for poweroff that's a very good point. I'm thinking that a hybrid approach might make the most sense: alternatives for halt, poweroff, reboot, and shutdown, and an explicit link for init. That way system boot will continue to work using the plumbing as it exists but everything else takes the more flexible route. That would still require there to be a subpackage for init itself which is kind of lame but it would make everything else pretty straight forward. Thoughts?

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (8 preceding siblings ...)
  2021-02-28 19:50 ` heliocat
@ 2021-02-28 22:07 ` st3r4g
  2021-02-28 22:07 ` st3r4g
                   ` (37 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 22:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787531910

Comment:
> First, someone (it might have even been you) had mentioned in IRC that xbps-alternatives was buggy and so I didn't want to put something as critical as startup and shutdown on that.

Yes it was me. But virtual packages have similar issues too, and are generally avoided when possible. So I understand that committers do not want to take responsibilities for this.

> The second is that I don't know at what point alternatives become available in the life of a new system
The symlink should be there as soon as it is installed, so I don't see the issue here... but maybe I'm missing something.

As a start it would be good to do what ahesford said and move away from `runit-void` things that should be elsewhere. The `ignorepkg` approach is better than nothing... 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (9 preceding siblings ...)
  2021-02-28 22:07 ` st3r4g
@ 2021-02-28 22:07 ` st3r4g
  2021-02-28 23:05 ` st3r4g
                   ` (36 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 22:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787531910

Comment:
> First, someone (it might have even been you) had mentioned in IRC that xbps-alternatives was buggy and so I didn't want to put something as critical as startup and shutdown on that.

Yes it was me. But virtual packages have similar issues too, and are generally avoided when possible. So I understand that committers do not want to take responsibilities for this.

> The second is that I don't know at what point alternatives become available in the life of a new system

The symlink should be there as soon as it is installed, so I don't see the issue here... but maybe I'm missing something.

As a start it would be good to do what ahesford said and move away from `runit-void` things that should be elsewhere. The `ignorepkg` approach is better than nothing... 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (10 preceding siblings ...)
  2021-02-28 22:07 ` st3r4g
@ 2021-02-28 23:05 ` st3r4g
  2021-03-01  2:02 ` heliocat
                   ` (35 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-02-28 23:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787531910

Comment:
> First, someone (it might have even been you) had mentioned in IRC that xbps-alternatives was buggy and so I didn't want to put something as critical as startup and shutdown on that.

Yes it was me. But virtual packages have similar issues too, and are generally avoided when possible. So I understand that committers would not want to take responsibilities for this.

> The second is that I don't know at what point alternatives become available in the life of a new system

The symlink should be there as soon as it is installed, so I don't see the issue here... but maybe I'm missing something.

As a start it would be good to do what ahesford said and move away from `runit-void` things that should be elsewhere. The `ignorepkg` approach is better than nothing... 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (11 preceding siblings ...)
  2021-02-28 23:05 ` st3r4g
@ 2021-03-01  2:02 ` heliocat
  2021-03-01 17:04 ` st3r4g
                   ` (34 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-01  2:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-787584309

Comment:
> > First, someone (it might have even been you) had mentioned in IRC that xbps-alternatives was buggy and so I didn't want to put something as critical as startup and shutdown on that.
> 
> Yes it was me. But virtual packages have similar issues too, and are generally avoided when possible. So I understand that committers would not want to take responsibilities for this.
> 
> > The second is that I don't know at what point alternatives become available in the life of a new system
> 
> The symlink should be there as soon as it is installed, so I don't see the issue here... but maybe I'm missing something.
> 
> As a start it would be good to do what ahesford said and move away from `runit-void` things that should be elsewhere. The `ignorepkg` approach is better than nothing...

I've got a half written reply to aheford vis-a-vis moving away from runit-void but the gist of is that I agree but didn't want to break that work off as part of this, at least not as part of the initial PR. As for the symlink presence, the concern is really about the guarantees around when alternatives symlinks are present. The dependency graph guarantees that packages, and by extension binaries, will be present but I don't know if alternatives provide those same guarantees in all circumstances. 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (12 preceding siblings ...)
  2021-03-01  2:02 ` heliocat
@ 2021-03-01 17:04 ` st3r4g
  2021-03-02  1:00 ` heliocat
                   ` (33 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-01 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-788111562

Comment:
> As for the symlink presence, the concern is really about the guarantees around when alternatives symlinks are present. The dependency graph guarantees that packages, and by extension binaries, will be present but I don't know if alternatives provide those same guarantees in all circumstances.

Pretty sure they do. The alternative is registered (and the symlink created) in the unpack phase, right after package files are unpacked:
https://github.com/void-linux/xbps/blob/01180f9cb60893c4a57935fda106b1d5f77e2b49/lib/package_unpack.c#L663

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (13 preceding siblings ...)
  2021-03-01 17:04 ` st3r4g
@ 2021-03-02  1:00 ` heliocat
  2021-03-02 23:17 ` [PR PATCH] [Updated] " heliocat
                   ` (32 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-02  1:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2370 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-788467977

Comment:
@ahesford, thanks for the reply. From a high-level standpoint a decent chunk of void-runit seems generic enough to be reused, only `2`, `crtlaltdel`, `halt.*`, `runsvdir`, `services`, and `shutdown*` directly depend on runit. `3` relies on runit by default but the calls to `sv` can be elided in rc.conf pretty easily. Obviously the calling semantics are rooted in runit conventions but that's it. In a larger overhaul or future follow-on work if something like this was embraced I could see making an argument for moving a lot of the contents of void-runit into base-files (core-services, vlogger, zzz,  etc) though it would probably make sense to make base-files a distinct package as opposed to part of void-packages. 

Something that I've been trying hard to avoid is accidentally making a fork of the distribution. I know that there are other people using Void as a baseline for various supervision-based init alternatives and it's a management and maintenance overhead for each person to backport upstream changes into their bespoke derivatives. My goal with this PR (in whatever form it finally ends up taking) is to add just enough flexibility into the core distribution to facilitate letting people do these experiments and system drifts without having to fork or hold core parts of the distribution. That isn't to say it'll work perfectly without a shim, but managing a compatibility shim is a lot easier when you aren't fighting the package manager. Also, I'm not advocating that Void take on any support burden for people using these knobs, just just there isn't an expectation of support if someone uses alternatives to switch in a magical rust implementation of awk, and in making these knobs I've been trying to make sure to not add additional management overhead for the distro maintainers or the core system.

If there's a place with the documented pitfalls of alternatives and virtual packages that would be great. I did just find void-linux/xbps#318 which seems mildly terrifying but I am definitely interested in seeing what else there is. At the end of the day I'd like to get this merged, but I'd like to get it merged in the best format I can, and one that impacts the core Void maintainers the least.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (14 preceding siblings ...)
  2021-03-02  1:00 ` heliocat
@ 2021-03-02 23:17 ` heliocat
  2021-03-03  8:54 ` heliocat
                   ` (31 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-02 23:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 2935 bytes --]

From 82505de64ace5965c49abeeb4b281903f485f592 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: use alternatives for init and power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3de..761fc0b3c4a 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20200720
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/poweroff ${DESTDIR}/usr/bin/poweroff-runit
+	mv ${DESTDIR}/usr/bin/reboot ${DESTDIR}/usr/bin/reboot-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,6 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (15 preceding siblings ...)
  2021-03-02 23:17 ` [PR PATCH] [Updated] " heliocat
@ 2021-03-03  8:54 ` heliocat
  2021-03-03 15:01 ` leahneukirchen
                   ` (30 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-03  8:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-789549792

Comment:
Updated to use an alternatives-based approach since that seems generally less disastrous at least in local testing. It's got some gotchas that I'm still working through, though I think most of those are fixable at the xlint and documentation level.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (16 preceding siblings ...)
  2021-03-03  8:54 ` heliocat
@ 2021-03-03 15:01 ` leahneukirchen
  2021-03-07 13:32 ` st3r4g
                   ` (29 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: leahneukirchen @ 2021-03-03 15:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-789777828

Comment:
I think this is a useful feature in general, and while I'm not in support of maintaining multiple init systems as is, it will allow experimentation with s6-based systems more easily, and may provide a path forward for Void in this way.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (17 preceding siblings ...)
  2021-03-03 15:01 ` leahneukirchen
@ 2021-03-07 13:32 ` st3r4g
  2021-03-07 20:06 ` heliocat
                   ` (28 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-07 13:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792280270

Comment:
maybe it would be better to rename `x-runit` to `runit-x` for consistency with `runit-init`

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (18 preceding siblings ...)
  2021-03-07 13:32 ` st3r4g
@ 2021-03-07 20:06 ` heliocat
  2021-03-08  1:08 ` st3r4g
                   ` (27 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-07 20:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792343451

Comment:
I considered namespacing the commands with the general init scheme name as a prefix (runit-shutdown, runit-halt, etc) originally for the same reason you suggested but decided that using the package name as a suffix was probably more user friendly. This way people can type shut<tab><tab> to get all in-path shutdown providers (for example). It also means that there won't be a name collision in the future if runit-void picks up an "init" executable in the future. The other possibility I saw was to use the full package name as the identifier but `runit-void-halt` is pretty awkward with very little gain in usability.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (19 preceding siblings ...)
  2021-03-07 20:06 ` heliocat
@ 2021-03-08  1:08 ` st3r4g
  2021-03-08  1:31 ` heliocat
                   ` (26 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-08  1:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792396917

Comment:
yeah, I actually like it more as a suffix. Also, s6-{init,poweroff,...} would be bad because it would give the impression that they are actual members of the s6 suite. I wonder if we can rename runit-init to init-runit to fix this little inconsistency. Or maybe just leave as it is, since init is not even executed manually.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (20 preceding siblings ...)
  2021-03-08  1:08 ` st3r4g
@ 2021-03-08  1:31 ` heliocat
  2021-03-08 17:57 ` st3r4g
                   ` (25 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-08  1:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792402365

Comment:
I'd leave it as is. `runit-init` is the expected name for the original init process as shipped by runit and changing that name would involve quite a lot of documentation fixup and maybe a spot of patching as well.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (21 preceding siblings ...)
  2021-03-08  1:31 ` heliocat
@ 2021-03-08 17:57 ` st3r4g
  2021-03-08 18:02 ` st3r4g
                   ` (24 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-08 17:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792951912

Comment:
So, I gave this a try and didn't encounter any xbps-alternative bugs. However there is an issue when trying to shutdown with runit after switching the alternative to s6, because `poweroff-runit` doesn't work as is.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (22 preceding siblings ...)
  2021-03-08 17:57 ` st3r4g
@ 2021-03-08 18:02 ` st3r4g
  2021-03-08 18:03 ` st3r4g
                   ` (23 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-08 18:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792951912

Comment:
So, I gave this a try and didn't encounter any xbps-alternative bugs. However there is an issue when trying to shutdown with runit after switching the alternative to s6, because `poweroff-runit` doesn't work as is:
1) It should be a symlink to halt-runit instead of halt
2) halt should be instructed to reboot/poweroff when invoked through reboot/poweroff-runit

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (23 preceding siblings ...)
  2021-03-08 18:02 ` st3r4g
@ 2021-03-08 18:03 ` st3r4g
  2021-03-09  1:12 ` heliocat
                   ` (22 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-08 18:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-792951912

Comment:
So, I gave this a try and didn't encounter any xbps-alternative bugs. However there is an issue when trying to shutdown with runit after switching the alternative to s6, because `poweroff-runit` doesn't work as is:
1) It should be a symlink to halt-runit instead of halt
2) halt-runit should be instructed to reboot/poweroff when invoked through reboot/poweroff-runit

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (24 preceding siblings ...)
  2021-03-08 18:03 ` st3r4g
@ 2021-03-09  1:12 ` heliocat
  2021-03-09  6:34 ` [PR PATCH] [Updated] " heliocat
                   ` (21 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-09  1:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-793231904

Comment:
Fixing the first is easy, the second will most likely involve patching the source to accept additional command names. I want to think on it a bit before making that change though since I'm not particularly keen on adding a patch and I'm hoping inspiration strikes.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (25 preceding siblings ...)
  2021-03-09  1:12 ` heliocat
@ 2021-03-09  6:34 ` heliocat
  2021-03-09  6:34 ` heliocat
                   ` (20 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-09  6:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3015 bytes --]

From d65904b6454ecbe07efc636df9760ba04a466d79 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: use alternatives for init and power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3de..6d93bb70ba4 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20200720
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (26 preceding siblings ...)
  2021-03-09  6:34 ` [PR PATCH] [Updated] " heliocat
@ 2021-03-09  6:34 ` heliocat
  2021-03-09  6:35 ` heliocat
                   ` (19 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-09  6:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-793454832

Comment:
I was hoping this could all be done in the template but it looks like no. This pull request now depends on https://github.com/void-linux/void-runit/pull/70

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (27 preceding siblings ...)
  2021-03-09  6:34 ` heliocat
@ 2021-03-09  6:35 ` heliocat
  2021-03-09  6:35 ` heliocat
                   ` (18 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-09  6:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-793454832

Comment:
I was hoping this could all be done in the template but it looks like no. This pull request now depends on https://github.com/void-linux/void-runit/pull/70

Once that merges I'll update the template here with the new release version.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (28 preceding siblings ...)
  2021-03-09  6:35 ` heliocat
@ 2021-03-09  6:35 ` heliocat
  2021-03-12 17:41 ` st3r4g
                   ` (17 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-09  6:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-793454832

Comment:
I was hoping this could all be done in the template but it looks like no. This pull request now depends on https://github.com/void-linux/void-runit/pull/70

Once that merges I'll update the template here with the new release version of void-runit.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (29 preceding siblings ...)
  2021-03-09  6:35 ` heliocat
@ 2021-03-12 17:41 ` st3r4g
  2021-03-12 17:45 ` st3r4g
                   ` (16 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-12 17:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-797648216

Comment:
Trying again with void-runit master and it looks pretty nice. The issues above are solved.
I'll give an overview how it works.
Suppose you have a package for s6-l-i:
```
xbps-install s6-linux-init
```
Installing it will add an alternative for `void-init`:
```
$ xbps-alternatives -g void-init -l
void-init
 - runit-void (current)
  - init:/usr/bin/runit-init
  - halt:/usr/bin/halt-runit
  - poweroff:/usr/bin/poweroff-runit
  - reboot:/usr/bin/reboot-runit
  - shutdown:/usr/bin/shutdown-runit
 - s6-linux-init
  - init:/usr/bin/init-s6
  - halt:/usr/bin/halt-s6
  - poweroff:/usr/bin/poweroff-s6
  - reboot:/usr/bin/reboot-s6
  - shutdown:/usr/bin/shutdown-s6
```
To boot into s6:
```
xbps-alternatives -s s6-linux-init void-init
reboot-runit
```
And to boot back to runit:
```
xbps-alternatives -s runit-void void-init
reboot-s6
```

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (30 preceding siblings ...)
  2021-03-12 17:41 ` st3r4g
@ 2021-03-12 17:45 ` st3r4g
  2021-03-12 22:36 ` heliocat
                   ` (15 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: st3r4g @ 2021-03-12 17:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-797648216

Comment:
Trying again with void-runit master and it looks pretty nice. The issues above are solved.
I'll give an overview how it works.
Suppose you have a package for s6-l-i:
```
xbps-install s6-linux-init
```
Installing it will add an alternative for `void-init`:
```
$ xbps-alternatives -g void-init -l
void-init
 - runit-void (current)
  - init:/usr/bin/runit-init
  - halt:/usr/bin/halt-runit
  - poweroff:/usr/bin/poweroff-runit
  - reboot:/usr/bin/reboot-runit
  - shutdown:/usr/bin/shutdown-runit
 - s6-linux-init
  - init:/usr/bin/init-s6
  - halt:/usr/bin/halt-s6
  - poweroff:/usr/bin/poweroff-s6
  - reboot:/usr/bin/reboot-s6
  - shutdown:/usr/bin/shutdown-s6
```
To boot into s6:
```
xbps-alternatives -s s6-linux-init void-init
reboot-runit
```
And to boot back to runit:
```
xbps-alternatives -s runit-void void-init
reboot-s6
```
In case init breaks, `runit-void` is always there so you can always `init=/sbin/runit-init`

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (31 preceding siblings ...)
  2021-03-12 17:45 ` st3r4g
@ 2021-03-12 22:36 ` heliocat
  2021-03-14  0:41 ` [PR PATCH] [Updated] " heliocat
                   ` (14 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-12 22:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-797795345

Comment:
Thanks for the independent check @st3r4g!

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (32 preceding siblings ...)
  2021-03-12 22:36 ` heliocat
@ 2021-03-14  0:41 ` heliocat
  2021-03-14  0:44 ` heliocat
                   ` (13 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14  0:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 2999 bytes --]

From 726d00c05e68261f3df8ec0997fe3350166ffbf2 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3de..a41e1b109db 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,6 +1,6 @@
 # Template file for 'runit-void'
 pkgname=runit-void
-version=20200720
+version=20210313
 revision=1
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (33 preceding siblings ...)
  2021-03-14  0:41 ` [PR PATCH] [Updated] " heliocat
@ 2021-03-14  0:44 ` heliocat
  2021-03-14  0:45 ` heliocat
                   ` (12 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14  0:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-798809067

Comment:
Assuming void-runit will be tagged with today's date.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (34 preceding siblings ...)
  2021-03-14  0:44 ` heliocat
@ 2021-03-14  0:45 ` heliocat
  2021-03-14  4:14 ` [PR PATCH] [Updated] " heliocat
                   ` (11 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-798809067

Comment:
I'm updating the PR with the assumption that void-runit will be tagged with today's date. Hence the giant failure.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (35 preceding siblings ...)
  2021-03-14  0:45 ` heliocat
@ 2021-03-14  4:14 ` heliocat
  2021-03-14 18:49 ` heliocat
                   ` (10 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14  4:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3001 bytes --]

From 7e9c69d65970f10b12d1a87e1be968d6f785cef4 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3def..37b14617a5f1 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,6 +1,6 @@
 # Template file for 'runit-void'
 pkgname=runit-void
-version=20200720
+version=20210314
 revision=1
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (36 preceding siblings ...)
  2021-03-14  4:14 ` [PR PATCH] [Updated] " heliocat
@ 2021-03-14 18:49 ` heliocat
  2021-03-14 18:54 ` heliocat
                   ` (9 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14 18:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3054 bytes --]

From d762d0834f539e522cceb8a8b2f0fb4fbc9b4ea2 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3def..a68774dd49b9 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
-version=20200720
-revision=1
+version=20210314
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: split package into main package and init controls
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (37 preceding siblings ...)
  2021-03-14 18:49 ` heliocat
@ 2021-03-14 18:54 ` heliocat
  2021-03-17 17:08 ` [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching heliocat
                   ` (8 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-14 18:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: split package into main package and init controls
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3477 bytes --]

From 429852eda07e09a50a683d5c07673be3975bc46e Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index c495a45a3def..5fa1b404d5fd 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
-version=20200720
-revision=1
+version=20210314
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -9,7 +9,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="CC0-1.0"
 homepage="https://github.com/void-linux/void-runit"
 distfiles="https://github.com/void-linux/void-runit/archive/${version}.tar.gz"
-checksum=706ed491315bd75b4b4ca07bc04af97369f8ef8820e9fa1931dae6939ea2e2db
+checksum=9ac95a14b5e1aedfcf0b093b8992b08316448ac1afb7fd26501ac43c4ebf3847
 
 depends="virtual?awk procps-ng runit"
 conf_files="
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (38 preceding siblings ...)
  2021-03-14 18:54 ` heliocat
@ 2021-03-17 17:08 ` heliocat
  2021-03-17 18:04 ` heliocat
                   ` (7 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-17 17:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: add alternatives to runit-void to facilitate fast init switching
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3034 bytes --]

From ebfd01c73f464e40df33c8c06738823e4f58f47a Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 2ac215c253f1..5fa1b404d5fd 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20210314
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (39 preceding siblings ...)
  2021-03-17 17:08 ` [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching heliocat
@ 2021-03-17 18:04 ` heliocat
  2021-03-20  7:28 ` heliocat
                   ` (6 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-17 18:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-801296687

Comment:
Updated to not conflict with the recent 20210314 release version.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (40 preceding siblings ...)
  2021-03-17 18:04 ` heliocat
@ 2021-03-20  7:28 ` heliocat
  2021-04-03 22:09 ` [PR PATCH] [Updated] " heliocat
                   ` (5 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-03-20  7:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-803265613

Comment:
Pinging on merge or NAK of this PR. Locally everything works as expected without any alternatives messes or what have you:

Before installing 20210314_2:
```carbon:~/src/void-linux/void-packages/hostdir/binpkgs/runit-void-init$ xbps-query -s runit-void
[*] runit-void-20210314_1 Void Linux runit scripts
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/runit-void-init$ file /usr/bin/{init,halt,poweroff,reboot,shutdown}*
/usr/bin/init:     symbolic link to runit-init
/usr/bin/halt:     ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=5ade3fa87e2766f5e9f58454c4d8b76576bd4599, for GNU/Linux 3.2.0, stripped
/usr/bin/poweroff: symbolic link to halt
/usr/bin/reboot:   symbolic link to halt
/usr/bin/shutdown: POSIX shell script, ASCII text executable
```

After installing 20210314_2:
```carbon:~/src/void-linux/void-packages/hostdir/binpkgs/runit-void-init$ xbps-query -s runit-void
[*] runit-void-20210314_2 Void Linux runit scripts
cathexis@carbon:~/src/void-linux/void-packages/hostdir/binpkgs/runit-void-init$ file /usr/bin/{init,halt,poweroff,reboot,shutdown}*
/usr/bin/init:           symbolic link to runit-init
/usr/bin/halt:           symbolic link to halt-runit
/usr/bin/halt-runit:     ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f928eb0e2d3306e5d82cbd37a6f6ab2f5ab6e98e, for GNU/Linux 3.2.0, stripped
/usr/bin/poweroff:       symbolic link to poweroff-runit
/usr/bin/poweroff-runit: symbolic link to halt-runit
/usr/bin/reboot:         symbolic link to reboot-runit
/usr/bin/reboot-runit:   symbolic link to halt-runit
/usr/bin/shutdown:       symbolic link to shutdown-runit
/usr/bin/shutdown-runit: POSIX shell script, ASCII text executable
```

Since there aren't any other packages currently providing alternatives for halt, init, poweroff, reboot, or shutdown, the problems noted in xbps#185, xbps#253, or void-packages#15836 are not blocking issues.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (41 preceding siblings ...)
  2021-03-20  7:28 ` heliocat
@ 2021-04-03 22:09 ` heliocat
  2021-04-10 17:11 ` Gottox
                   ` (4 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-04-03 22:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: add alternatives to runit-void to facilitate fast init switching
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3034 bytes --]

From cd3b1fdf1c94b3c80e1d6d3bfefd1fdff5713509 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 2ac215c253f1..5fa1b404d5fd 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20210314
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (42 preceding siblings ...)
  2021-04-03 22:09 ` [PR PATCH] [Updated] " heliocat
@ 2021-04-10 17:11 ` Gottox
  2021-04-13  7:11 ` heliocat
                   ` (3 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: Gottox @ 2021-04-10 17:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

New comment by Gottox on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-817172763

Comment:
My 2 cents:

* I have a love/hate relationship to the current alternatives implementation.
* That said, alternatives are more for programs that make sense to be installed at the same time (think of `vim` vs `neovim` for example, or nvidia vs mesa) and you need to choose the default one. For init systems, this doesn't make sense, at least for me.
* While I'm in favor of having the option to switch to other init systems, I'm strongly opposed to support more than one at a time. I disagree with @leahneukirchen, that alternatives bring any benefit when experimenting with alternatives to runit and instead just introduce more indirection.
* for tinkering, `replaces=runit...` might be the better option here.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (43 preceding siblings ...)
  2021-04-10 17:11 ` Gottox
@ 2021-04-13  7:11 ` heliocat
  2021-06-23 18:09 ` [PR PATCH] [Updated] " heliocat
                   ` (2 subsequent siblings)
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-04-13  7:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2691 bytes --]

New comment by heliocat on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-818499781

Comment:
> * That said, alternatives are more for programs that make sense to be installed at the same time (think of `vim` vs `neovim` for example, or nvidia vs mesa) and you need to choose the default one. For init systems, this doesn't make sense, at least for me.

I'd argue that alternatives is the only mechanism that allows for safe replacement of the shutdown handlers while still leaving a recovery path if something goes wrong. Specifically in the case of runit-void vs s6-linux-init, the runit-void `halt` program primarily serves as a wrapper around calling runit-init with the correct arguments whereas `s6-linux-init-hpr` (intended to be symlinked as halt/poweroff/reboot) primarily functions as a mechanism to signal the shutdown service. Both have a force option that bypasses any handling, which allows runit-void's halt to shut down a s6-linux-init system (and vice versa), but down that road lies sadness and dataloss so I'd prefer to avoid it if at all possible.

> * While I'm in favor of having the option to switch to other init systems, I'm strongly opposed to support more than one at a time. I disagree with @leahneukirchen, that alternatives bring any benefit when experimenting with alternatives to runit and instead just introduce more indirection.

> * for tinkering, `replaces=runit...` might be the better option here.

I'm inclined to agree with the dislike of having more than one init but short of a hefty realignment of package contents there is a problem with that solution and that perspective. Specifically, runit (the suite) is two things: a process supervisor and half an init system (primarily pid 1). Similarly, runit-void is all of the low-level initialization policy mechanisms for Void and half of an init system (primarily the shutdown part). The initial form of this PR separated the runit-void shutdown programs into a subpackage but as @st3r4g mentioned that breaks the rollback guarantee of having the official binaries present in some form, as well as forcing users to use the `-f` options to bypass clean shutdown and instead directly signalling the kernel.

Regardless of what handles system lifecycle duties replacing the runit package isn't an option. First, it doesn't solve the halt, poweroff, reboot, or shutdown name collisions. But more importantly there are several packages with runtime dependencies on `chpst`, `svlogd`, or `sv` (mostly in the form of privilege dropping via chpst or calling `sv check some_other_service`) and replacing runit would instantly break those run scripts. 

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (44 preceding siblings ...)
  2021-04-13  7:11 ` heliocat
@ 2021-06-23 18:09 ` heliocat
  2022-05-05  2:09 ` github-actions
  2022-05-19  2:15 ` [PR PATCH] [Closed]: " github-actions
  47 siblings, 0 replies; 49+ messages in thread
From: heliocat @ 2021-06-23 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

There is an updated pull request by heliocat against master on the void-packages repository

https://github.com/heliocat/void-packages runit-void-init
https://github.com/void-linux/void-packages/pull/29115

runit-void: add alternatives to runit-void to facilitate fast init switching
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

A patch file from https://github.com/void-linux/void-packages/pull/29115.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-void-init-29115.patch --]
[-- Type: text/x-diff, Size: 3034 bytes --]

From 92536dba57c5e72414389cc58132308b31b227b7 Mon Sep 17 00:00:00 2001
From: Colin Booth <colin@heliocat.net>
Date: Sun, 14 Feb 2021 16:47:01 -0800
Subject: [PATCH] runit-void: update version, use alternatives for init and
 power commands

The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
do one of: put their init control elsewhere, hold runit-void,  or clean
up after any reloads of runit-void.

This change adds the suffix `-runit` to shutdown, halt, poweroff, and
reboot and then registers shutdown, halt, poweroff, reboot, and init
names with alternatives under the void-init group. This will allow other
inits to take over for runit-void in a non-destructive fashion and
allows for easy rollbacks even in the face of disaster.

Thanks to st3r4g for pointing me towards xbps-alternatives instead of
using a virtual package to handle the ownership flip-flop. It is a much
cleaner method with significantly more straightforward semantics, though
not without its pitfalls.
---
 srcpkgs/runit-void/template | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/runit-void/template b/srcpkgs/runit-void/template
index 2ac215c253f1..5fa1b404d5fd 100644
--- a/srcpkgs/runit-void/template
+++ b/srcpkgs/runit-void/template
@@ -1,7 +1,7 @@
 # Template file for 'runit-void'
 pkgname=runit-void
 version=20210314
-revision=1
+revision=2
 wrksrc="void-runit-${version}"
 build_style=gnu-makefile
 short_desc="Void Linux runit scripts"
@@ -24,6 +24,13 @@ conf_files="
  /etc/sv/agetty-hvc0/conf
  /etc/sv/agetty-hvsi0/conf"
 
+alternatives="
+ void-init:init:/usr/bin/runit-init
+ void-init:halt:/usr/bin/halt-runit
+ void-init:poweroff:/usr/bin/poweroff-runit
+ void-init:reboot:/usr/bin/reboot-runit
+ void-init:shutdown:/usr/bin/shutdown-runit"
+
 make_dirs="
  /etc/zzz.d/suspend 0755 root root
  /etc/zzz.d/resume 0755 root root"
@@ -31,6 +38,10 @@ make_dirs="
 post_install() {
 	vmkdir usr/bin
 	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
+	mv ${DESTDIR}/usr/bin/halt ${DESTDIR}/usr/bin/halt-runit
+	mv ${DESTDIR}/usr/bin/shutdown ${DESTDIR}/usr/bin/shutdown-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/poweroff-runit
+	ln -sf halt-runit ${DESTDIR}/usr/bin/reboot-runit
 	vconf ${FILESDIR}/hostname
 	vconf ${FILESDIR}/os-release
 	vconf ${FILESDIR}/locale.conf
@@ -40,7 +51,9 @@ post_install() {
 	rm -f ${DESTDIR}/etc/runit/runsvdir/current
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/default
 	rm -rf ${DESTDIR}/etc/runit/runsvdir/single
-	ln -s runit-init ${DESTDIR}/usr/bin/init
+	# Remove extraneous power symlinks
+	rm ${DESTDIR}/usr/bin/poweroff
+	rm ${DESTDIR}/usr/bin/reboot
 }
 
 runit-void-apparmor_package() {

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (45 preceding siblings ...)
  2021-06-23 18:09 ` [PR PATCH] [Updated] " heliocat
@ 2022-05-05  2:09 ` github-actions
  2022-05-19  2:15 ` [PR PATCH] [Closed]: " github-actions
  47 siblings, 0 replies; 49+ messages in thread
From: github-actions @ 2022-05-05  2:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/29115#issuecomment-1118098302

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PR PATCH] [Closed]: runit-void: add alternatives to runit-void to facilitate fast init switching
  2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
                   ` (46 preceding siblings ...)
  2022-05-05  2:09 ` github-actions
@ 2022-05-19  2:15 ` github-actions
  47 siblings, 0 replies; 49+ messages in thread
From: github-actions @ 2022-05-19  2:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]

There's a closed pull request on the void-packages repository

runit-void: add alternatives to runit-void to facilitate fast init switching
https://github.com/void-linux/void-packages/pull/29115

Description:
The runit-void package handles multiple duties. Th first is being the
base system configuration for all mainline void linux installs. The
second is handling the population of ownership of the init and power
controls (/usr/bin/halt, /usr/bin/shutdown, and the init, poweroff, and
reboot symlinks). Since those commands are required to manage a system,
anybody who wants to experiment with an alternate init scheme needs to
either put their init control elsewhere or clean up after any reloads of
runit-void.

The structure here is to split the commands required to start or stop a
system away from the configuration and services that make up the core of
Void. Core functionality continues to be provided by runit-void but it
is adjusted to depend on a virutal package called "void-init" for the
init and power commands.  In mainline Void systems "void-init" is
provided by runit-void-init, a subpackage built alongside runit-void,
however this change allows any package to provide that functionality
without breaking the core distribution configuration.

From a package management perspective runit-void-init provides void-init
and replaces void-init. This allows for a single-pass replacement of any
other void-init providers simply by installing runit-void-init.
Similarly, an alternative init package can be installed in a single pass
via the same mechanisms without explicitly defining all packages that it
needs to override.

<!-- Mark items with [x] where applicable -->

#### General
- [X] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
It's technically a new package but mostly a rearrangement of functionality to allow for better experimentation.

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2022-05-19  2:15 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28  7:23 [PR PATCH] runit-void: split package into main package and init controls heliocat
2021-02-28  7:26 ` heliocat
2021-02-28  9:14 ` st3r4g
2021-02-28 10:23 ` st3r4g
2021-02-28 11:13 ` st3r4g
2021-02-28 11:16 ` st3r4g
2021-02-28 12:52 ` teldra
2021-02-28 13:30 ` mobinmob
2021-02-28 15:53 ` ahesford
2021-02-28 19:50 ` heliocat
2021-02-28 22:07 ` st3r4g
2021-02-28 22:07 ` st3r4g
2021-02-28 23:05 ` st3r4g
2021-03-01  2:02 ` heliocat
2021-03-01 17:04 ` st3r4g
2021-03-02  1:00 ` heliocat
2021-03-02 23:17 ` [PR PATCH] [Updated] " heliocat
2021-03-03  8:54 ` heliocat
2021-03-03 15:01 ` leahneukirchen
2021-03-07 13:32 ` st3r4g
2021-03-07 20:06 ` heliocat
2021-03-08  1:08 ` st3r4g
2021-03-08  1:31 ` heliocat
2021-03-08 17:57 ` st3r4g
2021-03-08 18:02 ` st3r4g
2021-03-08 18:03 ` st3r4g
2021-03-09  1:12 ` heliocat
2021-03-09  6:34 ` [PR PATCH] [Updated] " heliocat
2021-03-09  6:34 ` heliocat
2021-03-09  6:35 ` heliocat
2021-03-09  6:35 ` heliocat
2021-03-12 17:41 ` st3r4g
2021-03-12 17:45 ` st3r4g
2021-03-12 22:36 ` heliocat
2021-03-14  0:41 ` [PR PATCH] [Updated] " heliocat
2021-03-14  0:44 ` heliocat
2021-03-14  0:45 ` heliocat
2021-03-14  4:14 ` [PR PATCH] [Updated] " heliocat
2021-03-14 18:49 ` heliocat
2021-03-14 18:54 ` heliocat
2021-03-17 17:08 ` [PR PATCH] [Updated] runit-void: add alternatives to runit-void to facilitate fast init switching heliocat
2021-03-17 18:04 ` heliocat
2021-03-20  7:28 ` heliocat
2021-04-03 22:09 ` [PR PATCH] [Updated] " heliocat
2021-04-10 17:11 ` Gottox
2021-04-13  7:11 ` heliocat
2021-06-23 18:09 ` [PR PATCH] [Updated] " heliocat
2022-05-05  2:09 ` github-actions
2022-05-19  2:15 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).