Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] New package: boot-66serv-2.2.0
@ 2020-10-19 19:14 mobinmob
  2020-10-19 19:16 ` mobinmob
                   ` (171 more replies)
  0 siblings, 172 replies; 173+ messages in thread
From: mobinmob @ 2020-10-19 19:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have both done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the fontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 4327 bytes --]

From 16b94c32aa607be909a970a068c5d794edb66f15 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH] New package: boot-66serv-2.2.0

based on https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

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

* Re: [WIP] New package: boot-66serv-2.2.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
@ 2020-10-19 19:16 ` mobinmob
  2020-10-19 19:18 ` [PR PATCH] [Updated] " mobinmob
                   ` (170 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-10-19 19:16 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-712387362

Comment:
Version 2.2.1 is a minor update with nice documentation fixes.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
  2020-10-19 19:16 ` mobinmob
@ 2020-10-19 19:18 ` mobinmob
  2020-11-08 15:10 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1 mobinmob
                   ` (169 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-10-19 19:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have both done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 4383 bytes --]

From 5d81a7208d481b61b13564cdf5d9d7fc4fbbc7d7 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
  2020-10-19 19:16 ` mobinmob
  2020-10-19 19:18 ` [PR PATCH] [Updated] " mobinmob
@ 2020-11-08 15:10 ` mobinmob
  2020-11-08 15:24 ` mobinmob
                   ` (168 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-08 15:10 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 6527 bytes --]

From 87a55434476814ea20d2e2254938c1b2ae743bb2 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/2] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 5a5109c14203d22fb8f01edd1b5ef9e08fef8693 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/2] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (2 preceding siblings ...)
  2020-11-08 15:10 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1 mobinmob
@ 2020-11-08 15:24 ` mobinmob
  2020-11-08 15:26 ` mobinmob
                   ` (167 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-08 15:24 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-723592502

Comment:
Improvements in the runit service which not does not execute /etc/runit/2 anymore:

- The service uses now its own dedicated runlevel  "66" and not the "default" runlevel, which has services that are handled by the boot@ module service (aggety-*).
- It does not try to execute /etc/rc.local if present - that is handled by the services in the boot@ module.
- It does not try to match a word in the kernel commandline to a runlevel and use it.

The above make easier to switch between 66 and runit as the collections of services are seperate. It sould be totaly transparrent for the new user. Existing users that have the runit service enabled should reenable it by:

```
66-disable -S runit
66-enable -S -F -C runit
```
 in order to use the new service frontend. They will also have to reenable the runit services they use the normal way - by symlinking to /var/service.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (3 preceding siblings ...)
  2020-11-08 15:24 ` mobinmob
@ 2020-11-08 15:26 ` mobinmob
  2020-11-08 15:27 ` mobinmob
                   ` (166 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-08 15:26 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-723592502

Comment:
Improvements in the runit service which not does not execute /etc/runit/2 anymore:

- The service uses now its own dedicated runlevel  "66" and not the "default" runlevel, which has services that are handled by the boot@ module service (aggety-*).
- It does not try to execute /etc/rc.local if present - that is handled by the services in the boot@ module.
- It does not try to match a word in the kernel commandline to a runlevel and use it.

The above make easier to switch between 66 and runit as the collections of services are seperate. It sould be totaly transparrent for the new user. Existing users that have the runit service enabled should reenable it by:

```
66-disable -S runit
66-enable -S -F -C runit
```
 in order to use the new service frontend. They will also have to reenable the runit services they use the normal way - by symlinking to /var/service.

The runit service continues to have an issue, as it does not terminate the supervised services when it is stopped.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (4 preceding siblings ...)
  2020-11-08 15:26 ` mobinmob
@ 2020-11-08 15:27 ` mobinmob
  2020-11-08 15:31 ` mobinmob
                   ` (165 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-08 15:27 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-723592502

Comment:
Improvements in the runit service which not does not execute /etc/runit/2 anymore:

- The service uses now its own dedicated runlevel  "66" and not the "default" runlevel, which has services that are handled by the boot@ module service (aggety-*).
- It does not try to execute /etc/rc.local if present - that is handled by the services in the boot@ module.
- It does not try to match a word in the kernel commandline to a runlevel and use it.

The above make easier to switch between 66 and runit as the collections of (runit) services are seperate. It sould be totaly transparrent for the new user. Existing users that have the runit service enabled should reenable it by:

```
66-disable -S runit
66-enable -S -F -C runit
```
 in order to use the new service frontend. They will also have to reenable the runit services they use the normal way - by symlinking to /var/service.

The runit service continues to have an issue, as it does not terminate the supervised services when stopped.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (5 preceding siblings ...)
  2020-11-08 15:27 ` mobinmob
@ 2020-11-08 15:31 ` mobinmob
  2020-11-23 23:55 ` [PR PATCH] [Updated] " mobinmob
                   ` (164 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-08 15:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-723592502

Comment:
Improvements in the runit service which not does not execute /etc/runit/2 anymore:

- The service uses now its own dedicated "66" runlevel  and not the "default" runlevel, which has services that are handled by the boot@ module service (aggety-*).
- It does not try to execute /etc/rc.local if present - that is handled by the services in the boot@ module.
- It does not try to match a word in the kernel commandline to a runlevel and use it.

The above make easier to switch between 66 and runit as the collections of (runit) services are seperate. It sould be totaly transparrent for the new user. Existing users that have the runit service enabled should reenable it by:

```
66-disable -S runit
66-enable -S -F -C runit
```
 in order to use the new service frontend. They will also have to reenable the runit services they use the normal way - by symlinking to /var/service.

The runit service continues to have an issue, as it does not terminate the supervised services when stopped.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (6 preceding siblings ...)
  2020-11-08 15:31 ` mobinmob
@ 2020-11-23 23:55 ` mobinmob
  2020-11-23 23:58 ` mobinmob
                   ` (163 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-23 23:55 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 7302 bytes --]

From c31e985c8ee43b691a389bea995b35a5b8b5f5c3 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/3] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 9ded679e0460c642e43b786c9cef4b51a3cb032b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/3] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 232978a14db458e141310901f45fc82f6e11ab34 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/3] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (7 preceding siblings ...)
  2020-11-23 23:55 ` [PR PATCH] [Updated] " mobinmob
@ 2020-11-23 23:58 ` mobinmob
  2020-11-25 19:25 ` [PR PATCH] [Updated] " mobinmob
                   ` (162 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-23 23:58 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-732494532

Comment:
`@execute` in [stop] is written now in shell and works as it should. 

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (8 preceding siblings ...)
  2020-11-23 23:58 ` mobinmob
@ 2020-11-25 19:25 ` mobinmob
  2020-11-25 19:29 ` mobinmob
                   ` (161 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-25 19:25 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 9143 bytes --]

From c31e985c8ee43b691a389bea995b35a5b8b5f5c3 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/4] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 9ded679e0460c642e43b786c9cef4b51a3cb032b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/4] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 232978a14db458e141310901f45fc82f6e11ab34 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/4] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From cb8885de537e8f093b19a074239be7f667853703 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/4] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..c2b5f852c9d 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init systems they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (9 preceding siblings ...)
  2020-11-25 19:25 ` [PR PATCH] [Updated] " mobinmob
@ 2020-11-25 19:29 ` mobinmob
  2020-12-15 21:54 ` mobinmob
                   ` (160 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-11-25 19:29 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 9142 bytes --]

From c31e985c8ee43b691a389bea995b35a5b8b5f5c3 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/4] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 9ded679e0460c642e43b786c9cef4b51a3cb032b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/4] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 232978a14db458e141310901f45fc82f6e11ab34 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/4] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 89d18a8b4d4339f8e9f3a857bb4ba83db07c3f3b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/4] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (10 preceding siblings ...)
  2020-11-25 19:29 ` mobinmob
@ 2020-12-15 21:54 ` mobinmob
  2020-12-15 22:01 ` mobinmob
                   ` (159 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-15 21:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 12108 bytes --]

From edefccbf64dcbede82cf18ca1d837558221964ea Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/6] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From eb58b343669e8b03152e76b33533c0545cb25279 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/6] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From a0785e868bf6c9acc82e511cf8bcd844d43e1042 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/6] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 90062c4d10a1b2916a44c08ed01f889c0864ad3b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/6] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 621f2619d171c45825cfbf7066a7e4f5e7e959f5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 5/6] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From bde7daea41b39abbe00f7dd7622c5d4daeadf09c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 6/6] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (11 preceding siblings ...)
  2020-12-15 21:54 ` mobinmob
@ 2020-12-15 22:01 ` mobinmob
  2020-12-28 21:58 ` [PR PATCH] [Updated] " mobinmob
                   ` (158 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-15 22:01 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-745594899

Comment:
- The switch-initutils service frontend file now resides  in this package instead of the void-66-services repo. The service is needed regardless of the use of other 66 services. A user can choose to use 66 with runit services and they will still need to have the proper init utilities...
- The '@version' value is set now seperately for each frontend. If a frontend changes than only its '@version' should be incremented. boot@ is of couse an exception.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (12 preceding siblings ...)
  2020-12-15 22:01 ` mobinmob
@ 2020-12-28 21:58 ` mobinmob
  2020-12-28 22:00 ` mobinmob
                   ` (157 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-28 21:58 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 13207 bytes --]

From 947f539ef1e6fbd86df6948aaad4367d8254ba80 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/7] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 51dd91c9aac9d5ae3bc7085dc61c5e4464985212 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/7] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e9d83712680160640dc31aa78c51cf183942cac4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/7] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 177cdf3b5be536961998e4490eb77585a04f4afa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/7] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 8a555ae16cabfb2f753262931fce202e8c28da79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 5/7] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From cc4dff0315df926f77f237324fd5717c0f1557e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 6/7] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 4a033415174870ff4cf72f0deb7d092633848bc7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 7/7] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (13 preceding siblings ...)
  2020-12-28 21:58 ` [PR PATCH] [Updated] " mobinmob
@ 2020-12-28 22:00 ` mobinmob
  2020-12-29  7:47 ` travankor
                   ` (156 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-28 22:00 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-751877434

Comment:
There is now a template for the first release of void-66-services. It contains 77 services. 

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (14 preceding siblings ...)
  2020-12-28 22:00 ` mobinmob
@ 2020-12-29  7:47 ` travankor
  2020-12-29  9:54 ` mobinmob
                   ` (155 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: travankor @ 2020-12-29  7:47 UTC (permalink / raw)
  To: ml

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

New comment by travankor on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-751984246

Comment:
Can we add this to void docs as well?

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (15 preceding siblings ...)
  2020-12-29  7:47 ` travankor
@ 2020-12-29  9:54 ` mobinmob
  2020-12-29  9:55 ` mobinmob
                   ` (154 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-29  9:54 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-752017184

Comment:
> Can we add this to void docs as well?

@teldra has written the[ first docs](https://github.com/teldra/void-docs/blob/66-docs/src/config/services/66/index.md) in his void-docs branch. I am revising them since certain things have improved substantially (handling switching poweroff/halt etc transparently and automatically). I will add the doc in this PR and install it with vdoc in the package. I think sending a PR to void-docs is a bit premature at this stage - Ι want to improve certain things first and get rid of [WIP] :)

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (16 preceding siblings ...)
  2020-12-29  9:54 ` mobinmob
@ 2020-12-29  9:55 ` mobinmob
  2020-12-29 10:03 ` mobinmob
                   ` (153 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-29  9:55 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-752017184

Comment:
> Can we add this to void docs as well?

@teldra has written the[ first docs](https://github.com/teldra/void-docs/blob/66-docs/src/config/services/66/index.md) in his void-docs branch. I am revising them because certain things have improved substantially (handling switching poweroff/halt etc transparently and automatically). I will add the doc in this PR and install it with vdoc in the package. I think sending a PR to void-docs is a bit premature at this stage - Ι want to improve certain things first and get rid of [WIP] :)

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (17 preceding siblings ...)
  2020-12-29  9:55 ` mobinmob
@ 2020-12-29 10:03 ` mobinmob
  2021-01-03 14:24 ` [PR PATCH] [Updated] " mobinmob
                   ` (152 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2020-12-29 10:03 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-752017184

Comment:
> Can we add this to void docs as well?

@teldra has written the[ first doc](https://github.com/teldra/void-docs/blob/66-docs/src/config/services/66/index.md) in his void-docs fork. I am revising it because certain things have improved substantially (handling switching poweroff/halt etc transparently and automatically). I will add the doc in this PR and install it with vdoc in the package. I think sending a PR to void-docs is a bit premature at this stage - Ι want to improve certain things first and get rid of [WIP] :)

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (18 preceding siblings ...)
  2020-12-29 10:03 ` mobinmob
@ 2021-01-03 14:24 ` mobinmob
  2021-01-03 14:30 ` mobinmob
                   ` (151 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:24 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 14871 bytes --]

From 947f539ef1e6fbd86df6948aaad4367d8254ba80 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/8] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 51dd91c9aac9d5ae3bc7085dc61c5e4464985212 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/8] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e9d83712680160640dc31aa78c51cf183942cac4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/8] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 177cdf3b5be536961998e4490eb77585a04f4afa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/8] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 8a555ae16cabfb2f753262931fce202e8c28da79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 5/8] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From cc4dff0315df926f77f237324fd5717c0f1557e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 6/8] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 4a033415174870ff4cf72f0deb7d092633848bc7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 7/8] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 571cb3b5d1a9efdbcad52428359b3b6a1eb2a928 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 8/8] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (19 preceding siblings ...)
  2021-01-03 14:24 ` [PR PATCH] [Updated] " mobinmob
@ 2021-01-03 14:30 ` mobinmob
  2021-01-03 14:31 ` mobinmob
                   ` (150 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:30 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-753626098

Comment:
More work on the runit service:

- Remove the log argument for runsvdir.
- Replace  some utilities (env, mkdir, ln) with their alternatives from s6-portable-utils.
- Change the service` @type` from longrun to classic. That required disabling and re-enabling the service for the current users.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (20 preceding siblings ...)
  2021-01-03 14:30 ` mobinmob
@ 2021-01-03 14:31 ` mobinmob
  2021-01-03 14:32 ` mobinmob
                   ` (149 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-753626098

Comment:
More work on the runit service:

- Remove the log argument for runsvdir.
- Replace  some utilities (env, mkdir, ln) with their alternatives from s6-portable-utils.
- Change the service` @type` from longrun to classic. The change required disabling and re-enabling the service for the current users.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (21 preceding siblings ...)
  2021-01-03 14:31 ` mobinmob
@ 2021-01-03 14:32 ` mobinmob
  2021-01-03 14:32 ` mobinmob
                   ` (148 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:32 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-753626098

Comment:
More work on the runit service:

- Removed the log argument for runsvdir.
- Replaced some utilities (env, mkdir, ln) with their alternatives from s6-portable-utils.
- Changed the service` @type` from longrun to classic. The change required disabling and re-enabling the service for the current users.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (22 preceding siblings ...)
  2021-01-03 14:32 ` mobinmob
@ 2021-01-03 14:32 ` mobinmob
  2021-01-03 14:35 ` mobinmob
                   ` (147 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:32 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-753626098

Comment:
More work on the runit service:

- Removed the log argument for runsvdir.
- Replaced some utilities (env, mkdir, ln) with their alternatives from s6-portable-utils.
- Changed the service` @type` from longrun to classic. The change requires disabling and re-enabling the service for the current users.

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (23 preceding siblings ...)
  2021-01-03 14:32 ` mobinmob
@ 2021-01-03 14:35 ` mobinmob
  2021-01-03 15:14 ` [PR PATCH] [Updated] " mobinmob
                   ` (146 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 14:35 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-745594899

Comment:
- The switch-initutils service frontend file now resides  in this package instead of the void-66-services repo. The service is needed regardless of the use of other 66 services. A user can choose to use 66 with runit services and they will still need to have the proper init utilities...
- The '@version' value is set now seperately for each frontend. If a frontend changes  only its '@version' should be incremented. boot@ is of couse an exception.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (24 preceding siblings ...)
  2021-01-03 14:35 ` mobinmob
@ 2021-01-03 15:14 ` mobinmob
  2021-01-23 20:07 ` mobinmob
                   ` (145 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-03 15:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 15711 bytes --]

From 947f539ef1e6fbd86df6948aaad4367d8254ba80 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 1/9] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 51dd91c9aac9d5ae3bc7085dc61c5e4464985212 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 2/9] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e9d83712680160640dc31aa78c51cf183942cac4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 3/9] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 177cdf3b5be536961998e4490eb77585a04f4afa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 4/9] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 8a555ae16cabfb2f753262931fce202e8c28da79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 5/9] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From cc4dff0315df926f77f237324fd5717c0f1557e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 6/9] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 4a033415174870ff4cf72f0deb7d092633848bc7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 7/9] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 571cb3b5d1a9efdbcad52428359b3b6a1eb2a928 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 8/9] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 97081ea503b82cf9949b5ef46ba184166ea48202 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 9/9] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (25 preceding siblings ...)
  2021-01-03 15:14 ` [PR PATCH] [Updated] " mobinmob
@ 2021-01-23 20:07 ` mobinmob
  2021-01-23 20:14 ` mobinmob
                   ` (144 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-23 20:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 16776 bytes --]

From 947f539ef1e6fbd86df6948aaad4367d8254ba80 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/10] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 51dd91c9aac9d5ae3bc7085dc61c5e4464985212 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/10] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e9d83712680160640dc31aa78c51cf183942cac4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/10] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 177cdf3b5be536961998e4490eb77585a04f4afa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/10] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 8a555ae16cabfb2f753262931fce202e8c28da79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/10] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From cc4dff0315df926f77f237324fd5717c0f1557e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/10] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 4a033415174870ff4cf72f0deb7d092633848bc7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/10] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 571cb3b5d1a9efdbcad52428359b3b6a1eb2a928 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/10] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 97081ea503b82cf9949b5ef46ba184166ea48202 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/10] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 80544f66a2938a9207af475ccbfa57d48a2b4127 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/10] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (26 preceding siblings ...)
  2021-01-23 20:07 ` mobinmob
@ 2021-01-23 20:14 ` mobinmob
  2021-01-23 20:17 ` mobinmob
                   ` (143 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-23 20:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.2.1
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 18304 bytes --]

From 947f539ef1e6fbd86df6948aaad4367d8254ba80 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/10] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 51dd91c9aac9d5ae3bc7085dc61c5e4464985212 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/10] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e9d83712680160640dc31aa78c51cf183942cac4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/10] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 177cdf3b5be536961998e4490eb77585a04f4afa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/10] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 8a555ae16cabfb2f753262931fce202e8c28da79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/10] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From cc4dff0315df926f77f237324fd5717c0f1557e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/10] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 4a033415174870ff4cf72f0deb7d092633848bc7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/10] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 571cb3b5d1a9efdbcad52428359b3b6a1eb2a928 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/10] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 97081ea503b82cf9949b5ef46ba184166ea48202 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/10] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 2aa29f555d2890a044b2a746854161e07134a1d3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/10] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

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

* Re: [WIP] New package: boot-66serv-2.2.1
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (27 preceding siblings ...)
  2021-01-23 20:14 ` mobinmob
@ 2021-01-23 20:17 ` mobinmob
  2021-02-01 17:22 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0 mobinmob
                   ` (142 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-01-23 20:17 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-766173095

Comment:
New version of boot-66serv:

- New homepage and distfiles for boot-66serv.
- Needs at least 66 v. 0.6.0.0 - please do not update until https://github.com/void-linux/void-packages/pull/27815 is merged. To use, boot@system should be re-enabled.
- `@options` is removed from services frontend files, as log is always created (unless it is explicitly disabled per-service) and [environment] automaticaly enables `@options = ( env )`.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (28 preceding siblings ...)
  2021-01-23 20:17 ` mobinmob
@ 2021-02-01 17:22 ` mobinmob
  2021-02-01 17:24 ` mobinmob
                   ` (141 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-01 17:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 19786 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/11] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/11] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/11] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/11] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/11] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/11] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/11] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/11] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/11] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/11] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/11] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (29 preceding siblings ...)
  2021-02-01 17:22 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0 mobinmob
@ 2021-02-01 17:24 ` mobinmob
  2021-02-03  0:14 ` [PR PATCH] [Updated] " mobinmob
                   ` (140 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-01 17:24 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-771020574

Comment:
Rebase onto master and remove tty@ frontend service file - no longer needed, as boot-66serv uses tty-rc@ and tty-earlier@ which are included.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (30 preceding siblings ...)
  2021-02-01 17:24 ` mobinmob
@ 2021-02-03  0:14 ` mobinmob
  2021-02-03  0:16 ` mobinmob
                   ` (139 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-03  0:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 20763 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/12] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/12] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/12] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/12] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/12] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/12] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/12] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/12] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/12] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/12] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/12] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From a4f86c5131230407a60db9a975e755bc681d264f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/12] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..8667821b153 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file 
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (31 preceding siblings ...)
  2021-02-03  0:14 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-03  0:16 ` mobinmob
  2021-02-03  0:25 ` mobinmob
                   ` (138 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-03  0:16 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 20762 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/12] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/12] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/12] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/12] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/12] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/12] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/12] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/12] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/12] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/12] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/12] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/12] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (32 preceding siblings ...)
  2021-02-03  0:16 ` mobinmob
@ 2021-02-03  0:25 ` mobinmob
  2021-02-04 19:48 ` [PR PATCH] [Updated] " mobinmob
                   ` (137 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-03  0:25 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-772110140

Comment:
Small improvement:
There is now a symlink in /etc/66rc.conf that points to the configuration file of the `boot@system` service. Now users can edit directly `/etc/66rc.conf` with their favourite editor and then enable again the service with:

`# 66-enable -F -t boot boot@system`

That is strictly to provide a more common approach to editing the basic boot configuration instead of using the - powerfull - `66-env` utility. 
Many thanks to @Obarun for the suggestion of the symlink.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (33 preceding siblings ...)
  2021-02-03  0:25 ` mobinmob
@ 2021-02-04 19:48 ` mobinmob
  2021-02-04 19:50 ` mobinmob
                   ` (136 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 19:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 24358 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/13] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/13] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/13] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/13] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/13] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/13] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/13] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/13] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/13] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/13] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/13] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/13] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 0136eb3d6c536c9e03ec2ee2ca469869798204f4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/13] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..a3a8cb59981 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+	
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+		
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (34 preceding siblings ...)
  2021-02-04 19:48 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 19:50 ` mobinmob
  2021-02-04 20:01 ` mobinmob
                   ` (135 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 19:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 24355 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/13] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/13] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/13] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/13] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/13] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/13] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/13] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/13] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/13] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/13] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/13] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/13] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/13] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (35 preceding siblings ...)
  2021-02-04 19:50 ` mobinmob
@ 2021-02-04 20:01 ` mobinmob
  2021-02-04 20:08 ` [PR REVIEW] " ericonr
                   ` (134 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:01 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-773569051

Comment:
The latest commit adds a small utility script named `66boot-initial-setup`. The utility  automatically creates the recommended trees (boot, default and runit) and enables needed services in them. It is non-interactive. Users can execute it after boot-66serv installation or if they want to start from scratch after removing all their existing trees.

There are also minor changes in the template (double-quoting vars etc).

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (36 preceding siblings ...)
  2021-02-04 20:01 ` mobinmob
@ 2021-02-04 20:08 ` ericonr
  2021-02-04 20:08 ` ericonr
                   ` (133 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: ericonr @ 2021-02-04 20:08 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570510854

Comment:
Why not only `/usr/bin`? And maybe `/usr/local/bin`.

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (37 preceding siblings ...)
  2021-02-04 20:08 ` [PR REVIEW] " ericonr
@ 2021-02-04 20:08 ` ericonr
  2021-02-04 20:08 ` ericonr
                   ` (132 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: ericonr @ 2021-02-04 20:08 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570510626

Comment:
Don't need the empty line, I think?

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (39 preceding siblings ...)
  2021-02-04 20:08 ` ericonr
@ 2021-02-04 20:08 ` ericonr
  2021-02-04 20:12 ` mobinmob
                   ` (130 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: ericonr @ 2021-02-04 20:08 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570511384

Comment:
Leave credits only in the commit, IMO.

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (38 preceding siblings ...)
  2021-02-04 20:08 ` ericonr
@ 2021-02-04 20:08 ` ericonr
  2021-02-04 20:08 ` ericonr
                   ` (131 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: ericonr @ 2021-02-04 20:08 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570511164

Comment:
VoidLinux or "Void Linux" would be preferred, I think

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (40 preceding siblings ...)
  2021-02-04 20:08 ` ericonr
@ 2021-02-04 20:12 ` mobinmob
  2021-02-04 20:16 ` mobinmob
                   ` (129 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:12 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570513718

Comment:
I follow the /etc/runit/2 script. It only enables these these two - one, as /sbin is a symlink to /usr/bin.

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (41 preceding siblings ...)
  2021-02-04 20:12 ` mobinmob
@ 2021-02-04 20:16 ` mobinmob
  2021-02-04 20:17 ` mobinmob
                   ` (128 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:16 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570516114

Comment:
Not needed,  just aesthetics :) I can remove it if it is a problem...

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (42 preceding siblings ...)
  2021-02-04 20:16 ` mobinmob
@ 2021-02-04 20:17 ` mobinmob
  2021-02-04 20:19 ` mobinmob
                   ` (127 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:17 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570516614

Comment:
Void Linux is in the site, so I will change to that.

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (43 preceding siblings ...)
  2021-02-04 20:17 ` mobinmob
@ 2021-02-04 20:19 ` mobinmob
  2021-02-04 20:20 ` [PR PATCH] [Updated] " mobinmob
                   ` (126 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:19 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570516614

Comment:
`Void Linux` is in the site, so I will change to that.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (44 preceding siblings ...)
  2021-02-04 20:19 ` mobinmob
@ 2021-02-04 20:20 ` mobinmob
  2021-02-04 20:20 ` [PR REVIEW] " mobinmob
                   ` (125 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:20 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 25489 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/14] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/14] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/14] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/14] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/14] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/14] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/14] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/14] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/14] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/14] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/14] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/14] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/14] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 21935139cc972241edf4040e6c0685d06f1b7e51 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/14] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66 | 2 +-
 srcpkgs/boot-66serv/template | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (45 preceding siblings ...)
  2021-02-04 20:20 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 20:20 ` mobinmob
  2021-02-04 20:21 ` mobinmob
                   ` (124 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:20 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570518500

Comment:
Done, thank you!

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (46 preceding siblings ...)
  2021-02-04 20:20 ` [PR REVIEW] " mobinmob
@ 2021-02-04 20:21 ` mobinmob
  2021-02-04 20:23 ` [PR PATCH] [Updated] " mobinmob
                   ` (123 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:21 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570518704

Comment:
Done, thank you for the review!

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (47 preceding siblings ...)
  2021-02-04 20:21 ` mobinmob
@ 2021-02-04 20:23 ` mobinmob
  2021-02-04 20:24 ` [PR REVIEW] " mobinmob
                   ` (122 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:23 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 25859 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/14] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/14] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/14] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/14] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/14] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/14] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/14] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/14] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/14] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/14] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/14] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/14] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/14] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/14] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

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

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (48 preceding siblings ...)
  2021-02-04 20:23 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 20:24 ` mobinmob
  2021-02-04 23:24 ` [PR PATCH] [Updated] " mobinmob
                   ` (121 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 20:24 UTC (permalink / raw)
  To: ml

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

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570520289

Comment:
Left only /usr/bin. Thank you!

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (49 preceding siblings ...)
  2021-02-04 20:24 ` [PR REVIEW] " mobinmob
@ 2021-02-04 23:24 ` mobinmob
  2021-02-04 23:52 ` mobinmob
                   ` (120 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 23:24 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 28011 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/15] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/15] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/15] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/15] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/15] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/15] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/15] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/15] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/15] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/15] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/15] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/15] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/15] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/15] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 5e91003596e12b76c8754b0ecfcdce47065234c1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/15] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 2 +-
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..1e21b6b7f6a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (50 preceding siblings ...)
  2021-02-04 23:24 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 23:52 ` mobinmob
  2021-02-06  0:46 ` mobinmob
                   ` (119 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-04 23:52 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 28362 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/15] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/15] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/15] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/15] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/15] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/15] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/15] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/15] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/15] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/15] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/15] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/15] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/15] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/15] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/15] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (51 preceding siblings ...)
  2021-02-04 23:52 ` mobinmob
@ 2021-02-06  0:46 ` mobinmob
  2021-02-06  0:47 ` mobinmob
                   ` (118 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-06  0:46 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 29269 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/16] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/16] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/16] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/16] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/16] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/16] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/16] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/16] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/16] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/16] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/16] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/16] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/16] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/16] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/16] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4a0b3d7c7f50555d5c7a21c5d072b9425c9752af Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/16] do not enable swap in the template - created problems
 when no classic swap partition is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (52 preceding siblings ...)
  2021-02-06  0:46 ` mobinmob
@ 2021-02-06  0:47 ` mobinmob
  2021-02-06  0:55 ` mobinmob
                   ` (117 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-06  0:47 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 29274 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/16] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/16] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/16] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/16] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/16] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/16] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/16] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/16] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/16] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/16] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/16] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/16] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/16] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/16] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/16] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/16] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (53 preceding siblings ...)
  2021-02-06  0:47 ` mobinmob
@ 2021-02-06  0:55 ` mobinmob
  2021-02-06  1:01 ` mobinmob
                   ` (116 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-06  0:55 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/services in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the envronment. 
  

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (54 preceding siblings ...)
  2021-02-06  0:55 ` mobinmob
@ 2021-02-06  1:01 ` mobinmob
  2021-02-06  1:08 ` mobinmob
                   ` (115 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-06  1:01 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/services in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the environment. 
  

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (55 preceding siblings ...)
  2021-02-06  1:01 ` mobinmob
@ 2021-02-06  1:08 ` mobinmob
  2021-02-08 11:13 ` [PR PATCH] [Updated] " mobinmob
                   ` (114 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-06  1:08 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/dirs in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the environment. 
  

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (56 preceding siblings ...)
  2021-02-06  1:08 ` mobinmob
@ 2021-02-08 11:13 ` mobinmob
  2021-02-08 17:06 ` mobinmob
                   ` (113 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-08 11:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 30466 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/17] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/17] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/17] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/17] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/17] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/17] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/17] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/17] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/17] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/17] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/17] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/17] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/17] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/17] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/17] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/17] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3ba5d66e0050cc19a8443459d009db5a508b4290 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/17] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (57 preceding siblings ...)
  2021-02-08 11:13 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-08 17:06 ` mobinmob
  2021-02-14 18:11 ` mobinmob
                   ` (112 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-08 17:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 31340 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/18] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/18] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/18] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/18] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/18] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/18] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/18] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/18] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/18] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/18] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/18] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/18] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/18] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/18] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/18] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/18] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3ba5d66e0050cc19a8443459d009db5a508b4290 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/18] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From ad2fb64cc8978de3dcd9e5377e1fd37d3d931a97 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/18] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (58 preceding siblings ...)
  2021-02-08 17:06 ` mobinmob
@ 2021-02-14 18:11 ` mobinmob
  2021-02-14 22:54 ` [PR PATCH] [Updated] " mobinmob
                   ` (111 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-14 18:11 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778816672

Comment:
There is now some updated documentation for 66 on voidlinux: https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md
@travankor 

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (59 preceding siblings ...)
  2021-02-14 18:11 ` mobinmob
@ 2021-02-14 22:54 ` mobinmob
  2021-02-14 22:59 ` mobinmob
                   ` (110 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-14 22:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 33641 bytes --]

From 783340c7d0df571a9286859eee74e0885e81ebfc Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/20] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From ce2bda0377c27db68904a62f25d71f0521a40830 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/20] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e06e7ef646b2de609925e0a88713f0a81f585c30 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/20] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 7afe51ff54431505ca6174df3d53f56467ab87b1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/20] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 6c1b3e067c046cf3db084e28ad80a70fda5c6422 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/20] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b5eeb245fec1b492f3ffa03d44df045404f87fed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/20] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From fab085acae32145f5af36c04355fc1765db1d2eb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/20] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d51397e6d29a9b20f64683e89a07ea094162a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/20] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From ad6d6abccc6a1d72200bd52e839d8c747e77b0d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/20] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From ea07991684dd796149a5bde87e42cc70fce63ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/20] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 53d3d940c0ba5bf4057f91bd6a88a993769e75ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/20] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5371e8d948994fe8efc0232d65e2f09b66cf9c3c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/20] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From a50d723eba563709048c131776f761418fffcdbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/20] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From f904775a28db7ab214375d176d461bacdfa4e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/20] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 98a2ee2c5c436cb5949ac88a26ec99bd516a8182 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/20] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 0357ba6e7e4856132bba0ffb23ba6d37bc48c4f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/20] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3b6272b902900b92b7ee343092b0dcd3c91e4fa9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/20] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4c66f146d939d65ea03b1b00508fc8581d044dae Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/20] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ca77103a5f0c2f0b66604764be2b6b4fc41f038c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/20] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 55612604e9c8d49cd65d06b330694e6c044ae4f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/20] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (60 preceding siblings ...)
  2021-02-14 22:54 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-14 22:59 ` mobinmob
  2021-02-14 22:59 ` mobinmob
                   ` (109 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-14 22:59 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yes. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (61 preceding siblings ...)
  2021-02-14 22:59 ` mobinmob
@ 2021-02-14 22:59 ` mobinmob
  2021-02-14 23:01 ` mobinmob
                   ` (108 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-14 22:59 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yes. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.
- Rebased onto master.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (62 preceding siblings ...)
  2021-02-14 22:59 ` mobinmob
@ 2021-02-14 23:01 ` mobinmob
  2021-02-16 15:14 ` [PR PATCH] [Updated] " mobinmob
                   ` (107 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-14 23:01 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yet. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.
- Rebased onto master.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (63 preceding siblings ...)
  2021-02-14 23:01 ` mobinmob
@ 2021-02-16 15:14 ` mobinmob
  2021-02-27 23:24 ` mobinmob
                   ` (106 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-16 15:14 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 34268 bytes --]

From 783340c7d0df571a9286859eee74e0885e81ebfc Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/21] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From ce2bda0377c27db68904a62f25d71f0521a40830 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/21] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e06e7ef646b2de609925e0a88713f0a81f585c30 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/21] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 7afe51ff54431505ca6174df3d53f56467ab87b1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/21] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 6c1b3e067c046cf3db084e28ad80a70fda5c6422 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/21] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b5eeb245fec1b492f3ffa03d44df045404f87fed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/21] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From fab085acae32145f5af36c04355fc1765db1d2eb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/21] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d51397e6d29a9b20f64683e89a07ea094162a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/21] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From ad6d6abccc6a1d72200bd52e839d8c747e77b0d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/21] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From ea07991684dd796149a5bde87e42cc70fce63ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/21] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 53d3d940c0ba5bf4057f91bd6a88a993769e75ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/21] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5371e8d948994fe8efc0232d65e2f09b66cf9c3c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/21] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From a50d723eba563709048c131776f761418fffcdbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/21] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From f904775a28db7ab214375d176d461bacdfa4e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/21] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 98a2ee2c5c436cb5949ac88a26ec99bd516a8182 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/21] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 0357ba6e7e4856132bba0ffb23ba6d37bc48c4f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/21] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3b6272b902900b92b7ee343092b0dcd3c91e4fa9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/21] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4c66f146d939d65ea03b1b00508fc8581d044dae Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/21] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ca77103a5f0c2f0b66604764be2b6b4fc41f038c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/21] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 55612604e9c8d49cd65d06b330694e6c044ae4f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/21] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From ac1d3b366c1660d9bd7d3c68f28879feea705f77 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/21] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (64 preceding siblings ...)
  2021-02-16 15:14 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-27 23:24 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (105 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-27 23:24 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 39377 bytes --]

From 87b29aac6a7e7e1faf031f0222f23d8c4a92bd8b Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/23] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 97190264efbe20c41192be05905188832a8d07ed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/23] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 20ea8ab3051a1d91f38df0359c8abf919bbdec31 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/23] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 0ab308819be0e03e9995a30179538b69083359f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/23] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 772a761fe235cb052340a00a691b1dfd2cdf3ee4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/23] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 7056026f3bc60246d9ddb30ee80b5096bca7e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/23] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 485582a2b312913aab61217c1ba4b69988b6efb9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/23] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 0f7b1cc9ebeb446d44f624961896131087427db2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/23] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 790887e1fbad044e84637f734d4b1633d206fb4e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/23] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 973c3f7a726dc9c497a19c3f6a50dffc7936d833 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/23] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 3b4c68fe7fcc06d5a0f1cf89d6f9dad7b100d189 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/23] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 9fa74dd0816e97601d892f7d559e40005a902510 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/23] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 8d431ead44b3b41b463fe56db4c170f9e75c4dca Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/23] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 29d196388e9bf104ea164f9d0700e17a36ffc753 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/23] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From e119f10bac620f7ae3fa4416c5b51243b4b1f4ca Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/23] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 811d2488669d64c38c9d917c9dd1693a768220d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/23] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 1c0e6701ed50c87226258cf12f7aa1d4f1fcc3c6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/23] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 06e8463029b57a5ebcd13cd98837bc99557036f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/23] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From aa87610108221926a28d4e2c119d1f868a776f0b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/23] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 4b54c9ffea49a1f2f4dddc8dec7f1389d0b33166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/23] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 979f907a23d751b85d327cd03fd0bbd26f4a5416 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/23] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 009f5bdd070cd0c6ccf9406cefc3c4937d58543c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/23] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7d..0d809c8f2f6 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 1f63e63ec60bd72b4e82ab395f608effec99554f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/23] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 00000000000..b4fe592ea5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 00000000000..a560272de2c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b6..c61af884380 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (65 preceding siblings ...)
  2021-02-27 23:24 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (104 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in /etc/66rc.conf. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the 66boot-initial-setup script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (66 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (103 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in `/etc/66rc.conf`. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the `66boot-initial-setup` script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (67 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-03-02 21:50 ` [PR PATCH] [Updated] " mobinmob
                   ` (102 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in `/etc/66rc.conf`. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the `66boot-initial-setup` script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.
- Rebase onto master.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (68 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-03-02 21:50 ` mobinmob
  2021-03-03 20:24 ` mobinmob
                   ` (101 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-02 21:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 39377 bytes --]

From 8e9d9eeb45f8c4ce1624bff1e034b5f5256a7695 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/23] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From cb428cdeb0859d710da2dc37530816b6a11f65ff Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/23] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 74f926b24a8317e43c63daa2cffc56ad58e8bffb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/23] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 052beb3b9c3704de22ad1e1f5a1113b83fabedf1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/23] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From efd30a1bc9f03fde8f16f737a04bd8923f522efa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/23] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From bf2b967605bcbd09c4b770e04d849a0d1bc2be2f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/23] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From aed9b88f701d41db743f4db965390fc185ee1dec Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/23] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 077ee341c2676dcf47aed0ff01da77abebce71e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/23] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 777385b70c0d54352d17ffc4c1ad1cbe726e0e53 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/23] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 35d00adf0a45fbab15ef7586b1f558e6fccc4d79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/23] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 5e9ee119f01183a2b6e57839907aac2f5563a7ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/23] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From fb0e4f8e594e4db8b4f63d2281f67c0564254c09 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/23] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 1958b6bf1c4612dc138ea261383b5f8aeb7e12de Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/23] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From aeef5ade436af50162f24f760e55d66bdcc43186 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/23] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 084926131661280c0c990667bcc388f3552c161b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/23] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b68fd3dbf3b4164dc66fa4dbc05dfa99eb00418b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/23] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 6d57b40c9b8988a9230eea7ae717f0399a03301c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/23] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b4c561a4a071e3157aa8e7242a61657c1e32637b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/23] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ddaac651554029e62154fdebb671d55e4f55617e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/23] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 6fa3319e7e98c8d5cf5fcbb896d83f37134f2ec3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/23] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 34fd22bc6c36624441e44b7bb90914eeecf3028c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/23] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 51f8061587f78b5455cb538d7253582c80945739 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/23] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7d..0d809c8f2f6 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 6721421ba8eb498dd087a418e00f708125b4f70f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/23] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 00000000000..b4fe592ea5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 00000000000..a560272de2c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b6..c61af884380 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (69 preceding siblings ...)
  2021-03-02 21:50 ` [PR PATCH] [Updated] " mobinmob
@ 2021-03-03 20:24 ` mobinmob
  2021-03-03 22:37 ` mobinmob
                   ` (100 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-03 20:24 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 41788 bytes --]

From 47206f508787c0ed8f33d6e3377b3ad01465a7f4 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/25] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From f4687eeb4a15f29e9c1644259326e0d6601cf1da Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/25] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From cfab5918de488ac97a293ca910dc336643a63e4c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/25] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 61cf4cd4cb06a283773cd8ce6be847d661b87919 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/25] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From ee08788f0d7adfffc19c84ab8f69bcbf10c5fbd4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/25] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From fb214c1b4c3b52b15cbf8597e5f2c008f198d371 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/25] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From d49d78bb2917542c76a67fb586927d7e0fa48b2e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/25] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 7a301a2d91316f5c7d13e85d3900ba627c2b2ccd Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/25] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 8698f6592540c763c492863ad12965476ca9f19f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/25] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 2dbabb16042397485d07d6d14552da1157333931 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/25] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 0d24eaa638de08589a8b8bdd7776006a93cb86d7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/25] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From ad90bd54dc8d10b4b937e13c7c59fe315ff72721 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/25] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From bc71d03b541848c9ecac342b6cdafcbf5f4e0454 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/25] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2c01d3b32fef2861848ac289a734914167d26b9b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/25] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 8dc72073971b34d33eef1324b41550e545a0b7b4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/25] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 8676a2bf20169d23b3a0012f1d4651334ef97160 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/25] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 74e86b2586ddd9db38d293f0a8624c772e13ca3a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/25] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4d37ae64af7add7aec8c164ac1feba0c7b101732 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/25] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b1ca83aee7ed0b9444dd022faaf09b3eb499a4aa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/25] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 7be229b310862555373aa9a141932b10b40fa74d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/25] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From f8b7b35a3968dd8ef9d90f9c53a6551173f45092 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/25] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 4e1f1ddce822485c8076145e5647c33dfb159487 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/25] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7d..0d809c8f2f6 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 15a2bbc19cb7bb9680d626a07897aa01ae13a514 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/25] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 00000000000..b4fe592ea5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 00000000000..a560272de2c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b6..c61af884380 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From e5b813be527b196550b06b753986b05ee4bdb831 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/25] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af884380..ed10d74a67e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 5d28df649577b7edca49eeda81a4870bb3854224 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/25] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6..d466a1b8865 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (70 preceding siblings ...)
  2021-03-03 20:24 ` mobinmob
@ 2021-03-03 22:37 ` mobinmob
  2021-03-03 22:39 ` mobinmob
                   ` (99 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-03 22:37 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-790122618

Comment:
Changes:

- template : Create the log directory in /var/log/66 with proper permissions and ownership (_s6log). That is not needed for most cases, as it is created automatically by the 66 utilities. The problem is that it can fail - I have seen it happen with zfs datasets mounted under /var/log. Creating it during installation solves this issue.
- files/66boot-initial-setup: use a variable for the new boot@system configuration file and use it consistently. 

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (71 preceding siblings ...)
  2021-03-03 22:37 ` mobinmob
@ 2021-03-03 22:39 ` mobinmob
  2021-03-05 17:56 ` mobinmob
                   ` (98 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-03 22:39 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-790122618

Comment:
Changes:

- template : Create the log directory in /var/log/66 with proper permissions and ownership (_s6log). That is not needed for most cases, as it is created automatically by the 66 utilities. The problem is that it can fail - I have seen it happening with zfs datasets mounted under /var/log. Creating it during installation solves this issue.
- files/66boot-initial-setup: use a variable for the new boot@system configuration file and use it consistently. 

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (72 preceding siblings ...)
  2021-03-03 22:39 ` mobinmob
@ 2021-03-05 17:56 ` mobinmob
  2021-03-05 17:57 ` mobinmob
                   ` (97 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-05 17:56 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-791583899

Comment:
There is now and unofficial repo to install `boot-66serv` and `void-66services`. The package versions are in the following format:
`upstream.version.number.0.bulddate`
Currently, that is` 2.3.0.0.20210305` for the `boot-66serv `package and `0.0.2.0.20210305` for the `void-66services` package.
The [documentation](https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md) has been updated with information on how to enable and use the repo.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (73 preceding siblings ...)
  2021-03-05 17:56 ` mobinmob
@ 2021-03-05 17:57 ` mobinmob
  2021-03-05 17:58 ` mobinmob
                   ` (96 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-05 17:57 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-791583899

Comment:
There is now an unofficial repo that contains `boot-66serv` and `void-66services` packages. The package versions are in the following format:
`upstream.version.number.0.bulddate`
Currently, that is` 2.3.0.0.20210305` for the `boot-66serv `package and `0.0.2.0.20210305` for the `void-66services` package.
The [documentation](https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md) has been updated with information on how to enable and use the repo.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (74 preceding siblings ...)
  2021-03-05 17:57 ` mobinmob
@ 2021-03-05 17:58 ` mobinmob
  2021-03-05 18:01 ` mobinmob
                   ` (95 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-05 17:58 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-791583899

Comment:
There is now an unofficial repo that contains `boot-66serv` and `void-66services` packages. The package versions are in the following format:
`upstream.version.number.0.builddate`
Currently, that is` 2.3.0.0.20210305` for the `boot-66serv `package and `0.0.2.0.20210305` for the `void-66services` package.
The [documentation](https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md) has been updated with information on how to enable and use the repo.

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (75 preceding siblings ...)
  2021-03-05 17:58 ` mobinmob
@ 2021-03-05 18:01 ` mobinmob
  2021-03-16 19:19 ` [PR PATCH] [Updated] " mobinmob
                   ` (94 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-05 18:01 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-791583899

Comment:
There is now an unofficial repo that contains `boot-66serv` and `void-66services` packages. The package versions are in the following format:
`upstream.version.number.0.builddate`
Currently, that is `2.3.0.0.20210305` for the `boot-66serv `package and `0.0.2.0.20210305` for the `void-66services` package.
The [documentation](https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md) has been updated with information on how to enable and use the repo.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (76 preceding siblings ...)
  2021-03-05 18:01 ` mobinmob
@ 2021-03-16 19:19 ` mobinmob
  2021-03-16 19:22 ` mobinmob
                   ` (93 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-16 19:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 42997 bytes --]

From fb9fc58c4e9e4bb22f1d093175687dbad907c476 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/26] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 90d5de2721d71cc6538821cd7a12e70cb4fb78c5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/26] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 54a99c4e533ecd4f6ca45f7ed0c5245ce042e790 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/26] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 6603bdfb58705fe5cd949fc9167a5e4f10c2e1fb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/26] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From d7f4937870a90d2f1daf03272d9ae17711a8d971 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/26] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b78b6b003ecee900de9a115ca0b2b252c1e6b28c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/26] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 9245cb8e908882ef8c4fcd16e516013e1cd5aedc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/26] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9532b441868bf01ae63b39346a5a53c0f262ddf9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/26] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 27bf2bbb467f5dc15980436da2ce0778c95e0b8a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/26] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 29b8a4e8c713f1cb4750d94eebf6956b02d28db7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/26] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 54dd30502b5c19b37c96c2a2e755bd4202dd2726 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/26] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5b0475b13facb29f5c03abfbbf0b6a76cfcf5195 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/26] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From ec9b01218912b6da16f7c370798586f36a8a8c2d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/26] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From a7157ea20059e87cb3d4149b8d4aa3c9ba27a138 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/26] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 069a5429de9792cf84e825598fce9e4f4f038f1e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/26] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From a3266b57eb30a526adfaf6b2d9bad2d32fa84edf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/26] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 1b096a55bc022c3f24c3e6ed2fb012c378ad570b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/26] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 8971bf1be65ee4edc9c6a3e142f87e3fd29443a1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/26] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b3f60bbd4d804c940f0676e4902bd004a340bd1d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/26] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 353131e703845469f3f3ff1d618a9c9f34afa339 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/26] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 1b7eefb1063a4c0028f16e9e800427f6214fd274 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/26] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 558cdb5e36fb1a017f1153b8ea940386447b6958 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/26] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 10a5c5333adf29280bb54c0bdd8a01cc3493137c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/26] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From dfd0622d08ac76e965ab7b27d585b85372c90458 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/26] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 93e3e875c95c4cccf7c54ba5cccb0f77609ee522 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/26] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From f8d24e71b32de8b685f342d680a268cda4d3f963 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/26] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (77 preceding siblings ...)
  2021-03-16 19:19 ` [PR PATCH] [Updated] " mobinmob
@ 2021-03-16 19:22 ` mobinmob
  2021-03-21 15:22 ` [PR PATCH] [Updated] " mobinmob
                   ` (92 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-16 19:22 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-800540195

Comment:
Add `scandir-66serv` package. This is just the beggining of enabling proper user services. Documentation and additional scripts will follow.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (78 preceding siblings ...)
  2021-03-16 19:22 ` mobinmob
@ 2021-03-21 15:22 ` mobinmob
  2021-03-22 20:49 ` mobinmob
                   ` (91 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-21 15:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 44974 bytes --]

From fb9fc58c4e9e4bb22f1d093175687dbad907c476 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/27] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 90d5de2721d71cc6538821cd7a12e70cb4fb78c5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/27] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 54a99c4e533ecd4f6ca45f7ed0c5245ce042e790 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/27] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 6603bdfb58705fe5cd949fc9167a5e4f10c2e1fb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/27] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From d7f4937870a90d2f1daf03272d9ae17711a8d971 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/27] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b78b6b003ecee900de9a115ca0b2b252c1e6b28c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/27] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 9245cb8e908882ef8c4fcd16e516013e1cd5aedc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/27] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9532b441868bf01ae63b39346a5a53c0f262ddf9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/27] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 27bf2bbb467f5dc15980436da2ce0778c95e0b8a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/27] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 29b8a4e8c713f1cb4750d94eebf6956b02d28db7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/27] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 54dd30502b5c19b37c96c2a2e755bd4202dd2726 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/27] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5b0475b13facb29f5c03abfbbf0b6a76cfcf5195 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/27] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From ec9b01218912b6da16f7c370798586f36a8a8c2d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/27] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From a7157ea20059e87cb3d4149b8d4aa3c9ba27a138 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/27] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 069a5429de9792cf84e825598fce9e4f4f038f1e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/27] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From a3266b57eb30a526adfaf6b2d9bad2d32fa84edf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/27] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 1b096a55bc022c3f24c3e6ed2fb012c378ad570b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/27] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 8971bf1be65ee4edc9c6a3e142f87e3fd29443a1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/27] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b3f60bbd4d804c940f0676e4902bd004a340bd1d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/27] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 353131e703845469f3f3ff1d618a9c9f34afa339 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/27] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 1b7eefb1063a4c0028f16e9e800427f6214fd274 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/27] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 558cdb5e36fb1a017f1153b8ea940386447b6958 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/27] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 10a5c5333adf29280bb54c0bdd8a01cc3493137c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/27] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From dfd0622d08ac76e965ab7b27d585b85372c90458 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/27] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 93e3e875c95c4cccf7c54ba5cccb0f77609ee522 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/27] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From f8d24e71b32de8b685f342d680a268cda4d3f963 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/27] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 6b6afb8376c6284fa84beb60c311be5a1a483733 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/27] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (79 preceding siblings ...)
  2021-03-21 15:22 ` [PR PATCH] [Updated] " mobinmob
@ 2021-03-22 20:49 ` mobinmob
  2021-03-22 20:55 ` mobinmob
                   ` (90 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-22 20:49 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 57349 bytes --]

From fb9fc58c4e9e4bb22f1d093175687dbad907c476 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/28] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 90d5de2721d71cc6538821cd7a12e70cb4fb78c5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/28] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 54a99c4e533ecd4f6ca45f7ed0c5245ce042e790 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/28] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 6603bdfb58705fe5cd949fc9167a5e4f10c2e1fb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/28] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From d7f4937870a90d2f1daf03272d9ae17711a8d971 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/28] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b78b6b003ecee900de9a115ca0b2b252c1e6b28c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/28] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 9245cb8e908882ef8c4fcd16e516013e1cd5aedc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/28] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9532b441868bf01ae63b39346a5a53c0f262ddf9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/28] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 27bf2bbb467f5dc15980436da2ce0778c95e0b8a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/28] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 29b8a4e8c713f1cb4750d94eebf6956b02d28db7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/28] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 54dd30502b5c19b37c96c2a2e755bd4202dd2726 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/28] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5b0475b13facb29f5c03abfbbf0b6a76cfcf5195 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/28] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From ec9b01218912b6da16f7c370798586f36a8a8c2d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/28] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From a7157ea20059e87cb3d4149b8d4aa3c9ba27a138 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/28] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 069a5429de9792cf84e825598fce9e4f4f038f1e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/28] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From a3266b57eb30a526adfaf6b2d9bad2d32fa84edf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/28] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 1b096a55bc022c3f24c3e6ed2fb012c378ad570b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/28] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 8971bf1be65ee4edc9c6a3e142f87e3fd29443a1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/28] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b3f60bbd4d804c940f0676e4902bd004a340bd1d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/28] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 353131e703845469f3f3ff1d618a9c9f34afa339 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/28] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 1b7eefb1063a4c0028f16e9e800427f6214fd274 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/28] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 558cdb5e36fb1a017f1153b8ea940386447b6958 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/28] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 10a5c5333adf29280bb54c0bdd8a01cc3493137c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/28] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From dfd0622d08ac76e965ab7b27d585b85372c90458 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/28] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 93e3e875c95c4cccf7c54ba5cccb0f77609ee522 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/28] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From f8d24e71b32de8b685f342d680a268cda4d3f963 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/28] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 6b6afb8376c6284fa84beb60c311be5a1a483733 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/28] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From dd6af66041291402d3616c01b614c03e640e27ca Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/28] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

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

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (80 preceding siblings ...)
  2021-03-22 20:49 ` mobinmob
@ 2021-03-22 20:55 ` mobinmob
  2021-05-28 20:24 ` [PR PATCH] [Updated] " mobinmob
                   ` (89 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-03-22 20:55 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-804388440

Comment:
Changes

template:

- remove the `--ZFS_IMPORT=!zpoolcache` configure switch, as zpoolcache is now the default method.
- remove the creation of the log directory - that is done now by the 66 package.

pathes/
- remove previous patches
- include all changes since the release

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (81 preceding siblings ...)
  2021-03-22 20:55 ` mobinmob
@ 2021-05-28 20:24 ` mobinmob
  2021-05-28 20:30 ` [WIP] New package: boot-66serv-2.3.1 mobinmob
                   ` (88 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-05-28 20:24 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 66853 bytes --]

From 82b554a14d4c448811613cff9e0ea6d1e90abcdd Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/29] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From da538387912cdd0045baabbcf7f2c582694025e1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/29] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 8116815591a85a64f55b3accaf20fbaa250e1a70 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/29] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 3c9aeeb3e0c827c730e891877d3662f1ccdab269 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/29] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 093da533c5d5a2c9c40c57db9120760c6d9f3b65 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/29] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 4d20ab937473014e6f94047ef6af8713188d8d63 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/29] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From bc2edfa5ac43c4dd754a2803e099db4786506255 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/29] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 62cb7985b079fb4ceed1d4fad96a0f1300984fd9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/29] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 447d5dc1fddaf693770fa3c21e558ebef4a92f4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/29] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 4513539f283d25a6450f99caccab8f779b0887b9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/29] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 51f21567678aecf845ad31fc79d64b275e5c8b35 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/29] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 7ce2e8d0e94b554f7f1c38e36edd75da3044437f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/29] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 55c502dfa240add1f750a05b6b45d7219d6eed6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/29] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From b22125bfcccc058e2571693062ea9e12a0b84466 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/29] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 5462b7ad1e8e07c35217624e84b19a94c70b505f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/29] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 78ade2fceab8197644d619ce2e6e7a83c7166779 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/29] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From d19250a77c5211902559843ff47ed50e9c45b963 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/29] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From f930d6d22dbff50749d12e9d483c4f57b678e2dc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/29] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ef3cfd33afab73eaa877d6ce259df054d4c2b300 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/29] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From a7042bb8a0f5c9b7dac478465f0d4c89bad9ac66 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/29] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 8b54cb8216149c5bed84e206a2b0739fc41f6c47 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/29] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 42016609e2d1d613d5bb51262c28e993d0970e46 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/29] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 8ccecb8673b50023ab7c2eaaab224a7737fd70fc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/29] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 2bb1347cd6bc57da744c80a7610678097065224f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/29] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 089ab05cbee6bd6c1e4c524801a7226527551331 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/29] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From d8c78695052d730b0b8b7fdb5a082d72bc8eee36 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/29] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From f8b76eade9472c7a6a159aae8cebf2eda5880b32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/29] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From a079d0129a1a495eaff33e9849d793883c2d99d7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/29] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From ec7b534a8ce82b6eeb3f184094b2c0a1dacc7c7d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/29] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (82 preceding siblings ...)
  2021-05-28 20:24 ` [PR PATCH] [Updated] " mobinmob
@ 2021-05-28 20:30 ` mobinmob
  2021-05-29 23:13 ` paper42
                   ` (87 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-05-28 20:30 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-850655130

Comment:
New version of boot-66serv. The patch is dropped, as the changes are now included in the release, and the PR is rebased on master.
The new minor relase has fixes and small improvements.

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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (83 preceding siblings ...)
  2021-05-28 20:30 ` [WIP] New package: boot-66serv-2.3.1 mobinmob
@ 2021-05-29 23:13 ` paper42
  2021-05-30 14:14 ` mobinmob
                   ` (86 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: paper42 @ 2021-05-29 23:13 UTC (permalink / raw)
  To: ml

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

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-850912154

Comment:
Files in srcpkgs/boot-66serv/ contain a lot of trailing spaces. Could this PR should be just 3 commits, one for each package?

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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (84 preceding siblings ...)
  2021-05-29 23:13 ` paper42
@ 2021-05-30 14:14 ` mobinmob
  2021-05-30 14:16 ` mobinmob
                   ` (85 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-05-30 14:14 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-851007224

Comment:
> Files in srcpkgs/boot-66serv/ contain a lot of trailing spaces. 

Yep, I should clean them up ;)

> Could this PR should be just 3 commits, one for each package?

It should be a commit per-package to get ready for merging. Until there is that possibility -and certain things get improved, I 'd rather have a commit history. 


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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (85 preceding siblings ...)
  2021-05-30 14:14 ` mobinmob
@ 2021-05-30 14:16 ` mobinmob
  2021-05-30 14:24 ` mobinmob
                   ` (84 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-05-30 14:16 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-851007224

Comment:
> Files in srcpkgs/boot-66serv/ contain a lot of trailing spaces. 

I should clean them up ;)

> Could this PR should be just 3 commits, one for each package?

It should be a commit per-package to get ready for merging. Until there is that possibility -and certain things get improved, I 'd rather have a commit history. 


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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (86 preceding siblings ...)
  2021-05-30 14:16 ` mobinmob
@ 2021-05-30 14:24 ` mobinmob
  2021-07-13 21:35 ` [PR PATCH] [Updated] " mobinmob
                   ` (83 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-05-30 14:24 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-851007224

Comment:
> Files in srcpkgs/boot-66serv/ contain a lot of trailing spaces. 

I should clean them up ;)

> Could this PR should be just 3 commits, one for each package?

It should be a commit per-package to get ready for merging. Until there is that possibility and certain things get improved, I 'd rather have a commit history. 


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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (87 preceding siblings ...)
  2021-05-30 14:24 ` mobinmob
@ 2021-07-13 21:35 ` mobinmob
  2021-07-13 21:36 ` mobinmob
                   ` (82 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-07-13 21:35 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 91902 bytes --]

From 109e28359272a00e97e026851eb5e0018f81a677 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/30] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 3766e48e6c3212439a57a33c67557391b917297d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/30] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From ace0c4097e6221c9199e5f0c1d0652924636d60a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/30] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From a6b82fd48e39840cbbfa155654045d930fa4f304 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/30] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 72e40af3466d970139e5bdcb6766e67f4078da4f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/30] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From ac1d3d4d696200f16727a5ea44631aef1876418a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/30] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2a6f17b156a4c6792d914d6437c558e1a4995118 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/30] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d4592dbaea6df9cd62720aa6f87665bf1aebf5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/30] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From efd8ac3da376b3092652b79ec97d02df943f87f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/30] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 49cf179f9d76caefde85f450686eff96188fda7b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/30] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 0c6ed95c8d353162ef6824209c251aa55c1271f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/30] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 8d1c87e0d2732788217d1d5bf5846f03e5fd9747 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/30] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 18dcaf8ca859a96e19508df4ddd5fcc7959fdf16 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/30] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 78a5cabd3d2516dc6d36f3735433b2f2083fa7c3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/30] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 5dde0fca59a5c96127b3a72904167b2cd4988f3b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/30] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 43add95996d667addeeebca749cae7bf933fa95c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/30] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From adf8cb8e13679f4716ba9d5fb5b0505b4a010a87 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/30] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 525988912d140b60034bddee38990bc747db367c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/30] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ed817fee8f634ad7b4b7dfddaadcaa0decda625e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/30] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 78f006e499fc101f826adfe5c17501eada0d8e1a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/30] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From dc423d211a7cab5cd2652e2063b27226d670d58b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/30] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 4a5cc99206e5e8fd47cb6a8f9a26f683e4d1bc91 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/30] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 36b618cdc21618142f853e7a1bcf00eb72cb9ef0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/30] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 058cfdfd7989d312d5ecf291538b58122046d56e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/30] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From ff164dba99fc98316e77d6cf9110deca89c8cf8c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/30] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 003425df5491b89db69ad2177b9017c73d1bd9c5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/30] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 730edb88b5c71dfddd22ff80189b360bdbf84ac2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/30] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From ae00b17b60b28150da7f16567d4adae61ca91f08 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/30] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From 7616df9312477948769f4d49007b25eca545d0b2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/30] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 388513c11d6cb147d835ee8fa2bb2629869b647a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/30] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (88 preceding siblings ...)
  2021-07-13 21:35 ` [PR PATCH] [Updated] " mobinmob
@ 2021-07-13 21:36 ` mobinmob
  2021-07-13 21:43 ` [PR PATCH] [Updated] " mobinmob
                   ` (81 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-07-13 21:36 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-879419213

Comment:
- Rebase on master.
- Remove tmpfiles.d support - it does not exist on voidlinux.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (89 preceding siblings ...)
  2021-07-13 21:36 ` mobinmob
@ 2021-07-13 21:43 ` mobinmob
  2021-09-15 13:07 ` mobinmob
                   ` (80 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-07-13 21:43 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 94406 bytes --]

From 109e28359272a00e97e026851eb5e0018f81a677 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/31] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 3766e48e6c3212439a57a33c67557391b917297d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/31] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From ace0c4097e6221c9199e5f0c1d0652924636d60a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/31] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From a6b82fd48e39840cbbfa155654045d930fa4f304 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/31] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 72e40af3466d970139e5bdcb6766e67f4078da4f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/31] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From ac1d3d4d696200f16727a5ea44631aef1876418a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/31] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2a6f17b156a4c6792d914d6437c558e1a4995118 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/31] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d4592dbaea6df9cd62720aa6f87665bf1aebf5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/31] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From efd8ac3da376b3092652b79ec97d02df943f87f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/31] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 49cf179f9d76caefde85f450686eff96188fda7b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/31] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 0c6ed95c8d353162ef6824209c251aa55c1271f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/31] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 8d1c87e0d2732788217d1d5bf5846f03e5fd9747 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/31] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 18dcaf8ca859a96e19508df4ddd5fcc7959fdf16 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/31] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 78a5cabd3d2516dc6d36f3735433b2f2083fa7c3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/31] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 5dde0fca59a5c96127b3a72904167b2cd4988f3b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/31] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 43add95996d667addeeebca749cae7bf933fa95c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/31] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From adf8cb8e13679f4716ba9d5fb5b0505b4a010a87 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/31] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 525988912d140b60034bddee38990bc747db367c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/31] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ed817fee8f634ad7b4b7dfddaadcaa0decda625e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/31] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 78f006e499fc101f826adfe5c17501eada0d8e1a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/31] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From dc423d211a7cab5cd2652e2063b27226d670d58b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/31] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 4a5cc99206e5e8fd47cb6a8f9a26f683e4d1bc91 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/31] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 36b618cdc21618142f853e7a1bcf00eb72cb9ef0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/31] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 058cfdfd7989d312d5ecf291538b58122046d56e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/31] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From ff164dba99fc98316e77d6cf9110deca89c8cf8c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/31] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 003425df5491b89db69ad2177b9017c73d1bd9c5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/31] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 730edb88b5c71dfddd22ff80189b360bdbf84ac2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/31] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From ae00b17b60b28150da7f16567d4adae61ca91f08 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/31] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From 7616df9312477948769f4d49007b25eca545d0b2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/31] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 388513c11d6cb147d835ee8fa2bb2629869b647a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/31] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

From 5a4135499a2087c28fa0fe2f1e958625711d2064 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:42:55 +0300
Subject: [PATCH 31/31] remove trailing spaces, thanx @paper42

---
 srcpkgs/boot-66serv/files/switch-initutils    | 11 +++++------
 srcpkgs/boot-66serv/files/switch-initutils-66 |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f6..9876234ddaa3 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc3..42aa4ed2390c 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (90 preceding siblings ...)
  2021-07-13 21:43 ` [PR PATCH] [Updated] " mobinmob
@ 2021-09-15 13:07 ` mobinmob
  2021-09-15 13:09 ` mobinmob
                   ` (79 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 13:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 119713 bytes --]

From 50da28ca7507b71cf8d955ef9100f66becf000ae Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/32] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From aa8542b1354b3f01d331b00c1b6465ba4561c62a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/32] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From b4988814a8dc0e903dc98b3106ea6c2b93703c5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/32] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From c8fba02ab65c99a4043bca564b6dd5dd17a2c402 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/32] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From aa8361310f7b9675ec63e819152b2986a3b3f197 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/32] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 65d238a1422a498e4d43719d115f982bff54fc42 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/32] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 72e5e8ffd3063b60ba018f3b5682ab4af5aea1bb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/32] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 128695569ec9142dbc4c138c9fdd2fa10d6d1ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/32] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 4b04791a0c776c9429f195ccef323f1bc2c86085 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/32] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From b84b021f6cebb5a6f08ed3fbb3a0401d98c8078c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/32] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From f28c6ed310c012ed2bb9b79180d1ae97fa5ade4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/32] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 08f6d924c77f17717a980f9ca1d9a6262a739a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/32] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 949d862d9288e4458a7d3410e7d83faa166d797c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/32] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2e2ba60cc7291c713e42d2fbb8eaa5dd3102dc5b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/32] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 796af008a9a8141f6315875b275d9a8a93aa5d4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/32] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4777209288cccad05120136a93caf618220d98bf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/32] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From d55e6562a506cca13bfd9d7764a2edb97b051a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/32] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b7b1d657e9953bf8b9a6b00ed5311db6a2f2c0e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/32] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ce7c6af9a72490636532305f2cc0f1e48ecfbd1c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/32] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From d9ea518340597331905f23acf8012c9ac1cf4a4a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/32] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 4d77ebae9124976c4dfc344c8e8fdab4272be4fe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/32] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From cb984e2723e7f99320413000c9ea50b9f4330344 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/32] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From c430a4f71b3be83ff55d13f77cc77dd95ebb492c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/32] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 2480aa6811ec6e6563c030bb72f42b70d9e929d5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/32] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From da5f5c58ee57a74e3f76f3a66fac52586644ed59 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/32] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 334bee01cd7ca8b64be4f9eb410b2f193cf839a7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/32] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From d503db4f94ab25efeb17b40a6534b39277288a28 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/32] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From e2c16fc9ae375bafb6c75fd97b7204611fda3a50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/32] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From c9e5b12e0b1ebcc73360a3d20f0899af8cdb86f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/32] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From a139fe97dbf712b6ef47cab907c0bea1b9a4a12c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/32] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

From 0274602625b1949bb2a3d98a7cfb0c2a7e6c5166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:42:55 +0300
Subject: [PATCH 31/32] remove trailing spaces, thanx @paper42

---
 srcpkgs/boot-66serv/files/switch-initutils    | 11 +++++------
 srcpkgs/boot-66serv/files/switch-initutils-66 |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f6..9876234ddaa3 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc3..42aa4ed2390c 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot

From 2aa1afb4390ac10ae57e67148d4a0542083dcdcd Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 16:06:57 +0300
Subject: [PATCH 32/32] boot-66serv: update to 2.4.0.

Also:
- add back modules.sh (it has moved to a separate repo), add a new
configuration for it
- rebase the patch to remove tmpfiles, add a fix for complete removal
- rebase all commits to master.
---
 .../patches/remove_tmpfiles.d_support.diff    | 654 ++----------------
 1 file changed, 41 insertions(+), 613 deletions(-)

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
index 79e6af9de99c..6ed257fc2d39 100644
--- a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -1,20 +1,28 @@
 diff --git a/Makefile b/Makefile
-index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+index f137878ddd68d8da9c28bee8ec9df7d1165cb073..066d8d888755d442d8f7c28efb16e2c934a6faed 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
-    -e "s,@FORCECHCK@,$(FORCECHCK)," \
-    -e "s,@LOCAL@,$(LOCAL)," \
-    -e "s,@CONTAINER@,$(CONTAINER)," \
--   -e "s,@TMPFILE@,$(TMPFILE)," \
-    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
-    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
-    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@script_directory@,$(script_directory)," \
+        -e "s,@skel_directory@,$(skel_directory)," \
+        -e "s,@livedir@,$(livedir)," \
+-       -e "s,@tmpfiles_path@,$(tmpfiles)," \
+        -e "s,@modules_path@,$(modules)," \
+        -e "s,@VERSION@,$(version)," \
+        -e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@FORCECHCK@,$(FORCECHCK)," \
+        -e "s,@LOCAL@,$(LOCAL)," \
+        -e "s,@CONTAINER@,$(CONTAINER)," \
+-       -e "s,@TMPFILE@,$(TMPFILE)," \
+        -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+        -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+        -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
 diff --git a/configure b/configure
-index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+index 9622be37e2d6414b0f7b3c3a034a9dce6f09bc19..2d26020df61da8b3dc3441db9a52c16cfa4d6363 100755
 --- a/configure
 +++ b/configure
-@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
    --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
    --LOCAL=BOOLEAN                  use rc.local scripts [!no]
    --CONTAINER=BOOLEAN              boot inside a container [!no]
@@ -22,7 +30,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
    --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
    --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
    --RANDOMSEED=BOOLEAN             set random seed [!yes]
-@@ -155,7 +154,6 @@ SYSCTL='!yes'
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
  FORCECHCK='!no'
  LOCAL='!no'
  CONTAINER='!no'
@@ -30,7 +38,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
  MODULE_KERNEL='!yes'
  MODULE_SYSTEM='!yes'
  RANDOMSEED='!yes'
-@@ -212,7 +210,6 @@ for arg ; do
+@@ -218,7 +216,6 @@ for arg ; do
      --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
      --LOCAL=*) LOCAL=${arg#*=} ;;
      --CONTAINER=*) CONTAINER=${arg#*=} ;;
@@ -38,7 +46,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
      --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
      --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
      --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
-@@ -291,7 +288,7 @@ done
+@@ -297,7 +294,7 @@ done
  
  for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
          KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
@@ -47,7 +55,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
          FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
          CRYPTTAB FIREWALL \
          CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-@@ -356,7 +353,6 @@ $SYSCTL
+@@ -364,7 +361,6 @@ $SYSCTL
  $FORCECHCK
  $LOCAL
  $CONTAINER
@@ -60,16 +68,16 @@ index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb2264
 --- a/doc/boot@.md
 +++ b/doc/boot@.md
 @@ -136,10 +136,6 @@ Two different kinds of variables are used:
-  - type: boolean.
-  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+    - type: boolean.
+    - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
  
 -- **TMPFILES**:
-- - type: boolean.
-- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-   - type: boolean.
+-   - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
 -
  - **MODULE_KERNEL**:
-  - type: boolean.
-  - description: load the kernel modules returned by the `kmod static-nodes` command.
+    - type: boolean.
+    - description: load the kernel modules returned by the `kmod static-nodes` command.
 diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
 index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
 --- a/module/boot@/configure/configure
@@ -91,581 +99,6 @@ index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab
          MODULE_KERNEL) SV_REAL="modules-kernel" ;;
          MODULE_SYSTEM) SV_REAL="modules-system" ;;
          RANDOMSEED) SV_REAL="system-random" ;;
-diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
-deleted file mode 100755
-index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
---- a/module/boot@/configure/tmpfiles.sh
-+++ /dev/null
-@@ -1,569 +0,0 @@
--#!@BINDIR@/sh
--# This is a reimplementation of the systemd tmpfiles.d code
--# Control creation, deletion, and cleaning of volatile and temporary files
--#
--# Copyright (c) 2012 Gentoo Foundation
--# Released under the 2-clause BSD license.
--#
--# This instance is a pure-POSIX sh version, written by Robin H Johnson
--# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
--# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
--#
--# See the tmpfiles.d manpage as well:
--# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--# This script should match the old manpage
--# http://0pointer.de/public/systemd-man/tmpfiles.d.html
--# as of 2012/03/12 and also implements some more recent features
--#
--
--DRYRUN=0
--
--checkprefix() {
--    n=$1
--    shift
--    for x in $@; do
--        case $n in
--            ${x}*) return 0 ;;
--    esac
--    done
--    return 1
--}
--
--warninvalid() {
--    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
--    error=$(( error+1 ))
--} >&2
--
--invalid_option() {
--    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
--    exit 1
--}
--
--dryrun_or_real() {
--    local dryrun=
--    if [ $DRYRUN -eq 1 ]; then
--        dryrun=echo
--    fi
--    $dryrun "$@"
--}
--
--_chattr() {
--    local attr="$2"
--    case $attr in
--        [+-=]*) : ;;
--        '') return ;;
--        *) attr="+$attr" ;;
--    esac
--    local IFS=
--    dryrun_or_real chattr $1 "$attr" -- $3
--}
--
--relabel() {
--    local path
--    local paths=$1 mode=$2 uid=$3 gid=$4
--    local status
--
--    status=0
--    for path in ${paths}; do
--        if [ -e "$path" ]; then
--            if [ -x /sbin/restorecon ]; then
--                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
--            fi
--            if [ $uid != '-' ]; then
--                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
--            fi
--            if [ $gid != '-' ]; then
--                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
--            fi
--            if [ $mode != '-' ]; then
--                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
--            fi
--        fi
--    done
--    return $status
--}
--
--splitpath() {
--    local path=$1
--    while [ -n "$path" ]; do
--        echo $path
--        path=${path%/*}
--    done
--}
--
--_restorecon() {
--    local path=$1
--    if [ -x /sbin/restorecon ]; then
--        dryrun_or_real restorecon -F $(splitpath "$path")
--    fi
--}
--
--createdirectory() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0755
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createfile() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real touch "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createpipe() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real mkfifo "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--_b() {
--    # Create a block device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_c() {
--    # Create a character device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_C() {
--    # recursively copy a file or directory
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real cp -r "$arg" "$path"
--        _restorecon "$path"
--        if [ $uid != '-' ]; then
--            dryrun_or_real chown "$uid" "$path"
--        fi
--        if [ $gid != '-' ]; then
--            dryrun_or_real chgrp "$gid" "$path"
--        fi
--        if [ $mode != '-' ]; then
--            dryrun_or_real chmod "$mode" "$path"
--        fi
--    fi
--}
--
--_f() {
--    # Create a file if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -e "$path" ]; then
--        createfile "$mode" "$uid" "$gid" "$path"
--        if [ -n "$arg" ]; then
--            _w "$@"
--        fi
--    fi
--}
--
--_F() {
--    # Create or truncate a file
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    dryrun_or_real rm -f "$path"
--    createfile "$mode" "$uid" "$gid" "$path"
--    if [ -n "$arg" ]; then
--        _w "$@"
--    fi
--}
--
--_d() {
--    # Create a directory if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_D() {
--    # Create or empty a directory
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
--        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
--        _restorecon "$path"
--    fi
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_v() {
--    # Create a subvolume if the path does not exist yet and the file system
--    # supports this (btrfs). Otherwise create a normal directory.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_q() {
--    # Similar to _v. However, make sure that the subvolume will be assigned
--    # to the same higher-level quota groups as the subvolume it has
--    # been created in.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_Q() {
--    # Similar to q. However, instead of copying the higher-level quota
--    # group assignments from the parent as-is, the lowest quota group
--    # of the parent subvolume is determined that is not the
--    # leaf quota group.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_h() {
--    # Set file/directory attributes. Lines of this type accept
--    # shell-style globs in place of normal path names.
--    # The format of the argument field matches chattr
--    _chattr '' "$6" "$1"
--}
--
--_H() {
--    # Recursively set file/directory attributes. Lines of this type accept
--    # shell-syle globs in place of normal path names.
--    # Does not follow symlinks
--    _chattr -R "$6" "$1"
--}
--
--_L() {
--    # Create a symlink if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real ln -s "$arg" "$path"
--    fi
--    _restorecon "$path"
--}
--
--_p() {
--    # Create a named pipe (FIFO) if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -p "$path" ]; then
--        createpipe "$mode" "$uid" "$gid" "$path"
--    fi
--}
--
--_x() {
--    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
--    # controlled with the Age parameter. Note that lines of this type do not
--    # influence the effect of r or R lines. Lines of this type accept shell-style
--    # globs in place of of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_X() {
--    # Ignore a path during cleanup. Use this type to prevent path
--    # removal as controled with the age parameter. Note that if path is
--    # a directory, the content of the directory is not excluded from
--    # clean-up, only the directory itself.
--    # Lines of this type accept shell-style globs in place of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_r() {
--    # Remove a file or directory if it exists. This may not be used to remove
--    # non-empty directories, use R for that. Lines of this type accept shell-style
--    # globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -f "$path" ]; then
--            dryrun_or_real rm -f "$path" || status="$?"
--        elif [ -d "$path" ]; then
--            dryrun_or_real rmdir "$path" || status="$?"
--        fi
--    done
--    return $status
--}
--
--_R() {
--    # Recursively remove a path and all its subdirectories (if it is a directory).
--    # Lines of this type accept shell-style globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -d "$path" ]; then
--            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
--    fi
--    done
--    return $status
--}
--
--_w() {
--    # Write the argument parameter to a file, if it exists.
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ -f "$path" ]; then
--        if [ $DRYRUN -eq 1 ]; then
--            echo "echo \"$arg\" >>\"$path\""
--        else
--            echo "$arg" >>"$path"
--        fi
--    fi
--}
--
--_z() {
--    # Set ownership, access mode and relabel security context of a file or
--    # directory if it exists. Lines of this type accept shell-style globs in
--    # place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    relabel "$@"
--}
--
--_Z() {
--    # Recursively set ownership, access mode and relabel security context of a
--    # path and all its subdirectories (if it is a directory). Lines of this type
--    # accept shell-style globs in place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    CHOPTS=-R relabel "$@"
--}
--
--usage() {
--    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
--    exit ${1:-0}
--}
--
--version() {
--    # We don't record the version info anywhere currently.
--    echo "opentmpfiles"
--    exit 0
--}
--
--BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
--EXCLUDE=
--PREFIX=
--FILES=
--
--while [ $# -gt 0 ]; do
--    case $1 in
--        --boot) BOOT=1 ;;
--        --create) CREATE=1 ;;
--        --remove) REMOVE=1 ;;
--        --clean) CLEAN=1 ;; # TODO: Not implemented
--        --verbose) VERBOSE=1 ;;
--        --dryrun|--dry-run) DRYRUN=1 ;;
--        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
--        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
--        -h|--help) usage ;;
--        --version) version ;;
--        -*) invalid_option "$1" ;;
--        *) FILES="${FILES} $1"
--    esac
--    shift
--done
--
--if [ $(( CLEAN )) -eq 1 ] ; then
--    printf '%s clean mode is not implemented\n' "${0##*/}"
--    exit 1
--fi
--
--if [ "$CREATE$REMOVE" = '00' ]; then
--    usage 1 >&2
--fi
--
--# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
--tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
--tmpfiles_basenames=''
--
--if [ -z "${FILES}" ]; then
--    # Build a list of sorted unique basenames
--    # directories declared later in the tmpfiles_d array will override earlier
--    # directories, on a per file basename basis.
--    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
--    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--    for d in ${tmpfiles_dirs} ; do
--        [ -d $d ] && for f in ${d}/*.conf ; do
--            case "${f##*/}" in
--                systemd.conf|systemd-*.conf) continue;;
--            esac
--            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
--        done # for f in ${d}
--    done # for d in ${tmpfiles_dirs}
--    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
--fi
--
--tmpfiles_d=''
--
--for b in ${FILES} ; do
--    if [ "${b##*/}" != "${b}" ]; then
--        # The user specified a path on the command line
--        # Just pass it through unaltered
--        tmpfiles_d="${tmpfiles_d} ${b}"
--    else
--        real_f=''
--        for d in $tmpfiles_dirs ; do
--            f=${d}/${b}
--            [ -f "${f}" ] && real_f=$f
--        done
--        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
--    fi
--done
--
--error=0
--
--# loop through the gathered fragments, sorted globally by filename.
--# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--FILE=
--for FILE in $tmpfiles_d ; do
--    LINENUM=0
--
--    ### FILE FORMAT ###
--    # XXX: We ignore the 'Age' parameter
--    # 1    2              3    4    5    6   7
--    # Cmd  Path           Mode UID  GID  Age Argument
--    # d    /run/user      0755 root root 10d -
--    # Mode, UID, GID, Age, Argument may be omitted!
--    # If Cmd ends with !, the line is only processed if --boot is passed
--
--    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
--    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
--    while read cmd path mode uid gid age arg; do
--        LINENUM=$(( LINENUM+1 ))
--        FORCE=0
--
--        # Unless we have both command and path, skip this line.
--        if [ -z "$cmd" -o -z "$path" ]; then
--            continue
--        fi
--
--        case $cmd in
--            \#*) continue ;;
--        esac
--
--        while [ ${#cmd} -gt 1 ]; do
--            case $cmd in
--                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
--                *+) cmd=${cmd%+}; FORCE=1; ;;
--                *) warninvalid ; continue 2 ;;
--            esac
--        done
--
--        # whine about invalid entries
--        case $cmd in
--            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
--            *) warninvalid ; continue ;;
--        esac
--
--        # fall back on defaults when parameters are passed as '-'
--        if [ "$mode" = '-' -o "$mode" = '' ]; then
--            case "$cmd" in
--                p|f|F) mode=0644 ;;
--                d|D|v) mode=0755 ;;
--                C|z|Z|x|r|R|L) ;;
--            esac
--        fi
--
--        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
--        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
--        [ "$age" = '-' -o "$age" = '' ] && age=0
--        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
--        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
--
--        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
--        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
--
--        if [ $FORCE -gt 0 ]; then
--            case $cmd in
--                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
--            esac
--        fi
--
--        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
--        _$cmd "$@"
--        rc=$?
--        if [ "${DRYRUN}" -eq "0" ]; then
--            [ $rc -ne 0 ] && error=$((error + 1))
--        fi
--    done <$FILE
--done
--
--exit $error
--
--# vim: set ts=2 sw=2 sts=2 noet ft=sh:
 diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
 index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
 --- a/module/boot@/service/all-Local
@@ -692,7 +125,7 @@ index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102
  @user = ( root )
 diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
 deleted file mode 100644
-index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+index 35a58e7281473d9ce808000c855bf448589b267e..0000000000000000000000000000000000000000
 --- a/module/boot@/service/local/local-tmpfiles
 +++ /dev/null
 @@ -1,23 +0,0 @@
@@ -717,26 +150,21 @@ index 4b471408a3efac3734c0a8ed76c4529bf2241b83..00000000000000000000000000000000
 -)
 -
 -[environment]
--script_file=!@scripts@/tmpfiles.sh
+-script_file=!@tmpfiles@/opentmpfiles.sh
 -script_args=!--create --verbose --boot
-diff --git a/package/targets.mak b/package/targets.mak
-index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
---- a/package/targets.mak
-+++ b/package/targets.mak
-@@ -1,7 +1,6 @@
- SCRIPT_TARGET := \
- module/boot@/configure/crypt.awk \
--module/boot@/configure/modules.sh \
--module/boot@/configure/tmpfiles.sh
-+module/boot@/configure/modules.sh
- 
- SERVICE_TARGET := service/boot@
- MODULE_TARGET := $(shell find module/boot@/service -type f)
 diff --git a/service/boot@ b/service/boot@
-index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+index f08eac1d2f3d480ceffe41bb0b7890931d838607..da3e5e957d31deb8597279ecd72dbb268319d90a 100644
 --- a/service/boot@
 +++ b/service/boot@
-@@ -147,9 +147,6 @@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
  
  @CONTAINER@
  

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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (91 preceding siblings ...)
  2021-09-15 13:07 ` mobinmob
@ 2021-09-15 13:09 ` mobinmob
  2021-09-15 13:10 ` mobinmob
                   ` (78 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 13:09 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-920003958

Comment:
Changes:

 - Update to version 2.4.0.
 - Add back modules.sh (it has moved to a separate repo), add a new
configuration switch for it
 - Rebase the patch to remove tmpfiles, add a fix for complete removal
 - Ρebase all commits to master.


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

* Re: [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (92 preceding siblings ...)
  2021-09-15 13:09 ` mobinmob
@ 2021-09-15 13:10 ` mobinmob
  2021-09-15 13:15 ` [PR PATCH] [Updated] " mobinmob
                   ` (77 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 13:10 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-920003958

Comment:
Changes:

 - Update to version 2.4.0.
 - Add back modules.sh (it has moved to a separate repo), add a new
configuration switch for it.
 - Rebase the patch to remove tmpfiles, add a fix for complete removal.
 - Rebase all commits to master.


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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (93 preceding siblings ...)
  2021-09-15 13:10 ` mobinmob
@ 2021-09-15 13:15 ` mobinmob
  2021-09-15 19:19 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0 mobinmob
                   ` (76 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 13:15 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 123948 bytes --]

From 50da28ca7507b71cf8d955ef9100f66becf000ae Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/32] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From aa8542b1354b3f01d331b00c1b6465ba4561c62a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/32] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From b4988814a8dc0e903dc98b3106ea6c2b93703c5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/32] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From c8fba02ab65c99a4043bca564b6dd5dd17a2c402 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/32] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From aa8361310f7b9675ec63e819152b2986a3b3f197 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/32] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 65d238a1422a498e4d43719d115f982bff54fc42 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/32] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 72e5e8ffd3063b60ba018f3b5682ab4af5aea1bb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/32] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 128695569ec9142dbc4c138c9fdd2fa10d6d1ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/32] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 4b04791a0c776c9429f195ccef323f1bc2c86085 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/32] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From b84b021f6cebb5a6f08ed3fbb3a0401d98c8078c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/32] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From f28c6ed310c012ed2bb9b79180d1ae97fa5ade4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/32] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 08f6d924c77f17717a980f9ca1d9a6262a739a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/32] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 949d862d9288e4458a7d3410e7d83faa166d797c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/32] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2e2ba60cc7291c713e42d2fbb8eaa5dd3102dc5b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/32] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 796af008a9a8141f6315875b275d9a8a93aa5d4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/32] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4777209288cccad05120136a93caf618220d98bf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/32] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From d55e6562a506cca13bfd9d7764a2edb97b051a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/32] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b7b1d657e9953bf8b9a6b00ed5311db6a2f2c0e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/32] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ce7c6af9a72490636532305f2cc0f1e48ecfbd1c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/32] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From d9ea518340597331905f23acf8012c9ac1cf4a4a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/32] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 4d77ebae9124976c4dfc344c8e8fdab4272be4fe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/32] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From cb984e2723e7f99320413000c9ea50b9f4330344 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/32] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From c430a4f71b3be83ff55d13f77cc77dd95ebb492c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/32] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 2480aa6811ec6e6563c030bb72f42b70d9e929d5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/32] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From da5f5c58ee57a74e3f76f3a66fac52586644ed59 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/32] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 334bee01cd7ca8b64be4f9eb410b2f193cf839a7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/32] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From d503db4f94ab25efeb17b40a6534b39277288a28 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/32] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From e2c16fc9ae375bafb6c75fd97b7204611fda3a50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/32] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From c9e5b12e0b1ebcc73360a3d20f0899af8cdb86f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/32] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From a139fe97dbf712b6ef47cab907c0bea1b9a4a12c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/32] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

From 0274602625b1949bb2a3d98a7cfb0c2a7e6c5166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:42:55 +0300
Subject: [PATCH 31/32] remove trailing spaces, thanx @paper42

---
 srcpkgs/boot-66serv/files/switch-initutils    | 11 +++++------
 srcpkgs/boot-66serv/files/switch-initutils-66 |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f6..9876234ddaa3 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc3..42aa4ed2390c 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot

From 63fefaf2b374f812241c2c9a7b5bf75491402de2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 16:06:57 +0300
Subject: [PATCH 32/32] boot-66serv: update to 2.4.0.

Also:
- add back modules.sh (it has moved to a separate repo), add a new
configuration for it
- rebase the patch to remove tmpfiles, add a fix for complete removal
- rebase all commits to master.
---
 srcpkgs/boot-66serv/files/modules.sh          |  85 +++
 .../patches/remove_tmpfiles.d_support.diff    | 654 ++----------------
 srcpkgs/boot-66serv/template                  |  12 +-
 3 files changed, 134 insertions(+), 617 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/modules.sh

diff --git a/srcpkgs/boot-66serv/files/modules.sh b/srcpkgs/boot-66serv/files/modules.sh
new file mode 100644
index 000000000000..0cc4d1a79729
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/modules.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# This scripts is a pure-POSIX sh version
+#
+# Copyright (c) 2015-2021 Eric Vidal <eric@obarun.org>
+# All rights reserved.
+#
+# This file is part of Obarun. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution.
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+
+# Configuration files are read from directories in
+# /etc/modules-load.d, /run/modules-load.d, and /usr/lib/modules-load.d,
+# in order of precedence
+
+MODULES_PATH='/etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d'
+MODULES_NAME=""
+MODULES_RESULT=""
+
+check_elements(){
+    for e in $2; do [ "$e" = "$1" ] && return 0; done; return 1;
+}
+
+build_array() {
+    printf "%s %s" "$1" "$2"
+}
+
+check_file(){
+
+    tidy_loop="" conf=""
+
+    for tidy_loop in $MODULES_PATH; do
+        if [ -d "${tidy_loop}" ]; then
+            for conf in "${tidy_loop}"/*.conf ; do
+                if [ -f "${conf}" ]; then
+                    if ! check_elements "${conf##*/}" "${MODULES_NAME}"; then
+                        MODULES_NAME=$(build_array "${MODULES_NAME}" "${conf##*/}")
+                    fi
+                fi
+            done
+        fi
+    done
+
+    unset tidy_loop conf
+}
+
+check_path(){
+    path="" tidy_loop=""
+    for path in ${MODULES_PATH}; do
+        for tidy_loop in ${MODULES_NAME}; do
+            if [ -f "${path}/${tidy_loop}" ]; then
+                if ! check_elements "${tidy_loop}" "${MODULES_RESULT##*/}";then
+                    MODULES_RESULT=$(build_array "${MODULES_RESULT}" "${path}/${tidy_loop}")
+                fi
+            fi
+        done
+    done
+    unset path tidy_loop
+}
+
+check_file
+
+if [ -n "${MODULES_NAME}" ]; then
+    check_path
+else
+    printf "$0: %s\n" "No modules found -- nothing to do"
+    exit 0
+fi
+
+for mod in ${MODULES_RESULT}; do
+    while read -r line; do
+        comment=$(printf "%s" "$line" | awk  '{ string=substr($0, 0, 1); print string; }' )
+        if [ "${comment}" = "#" ] || [ -z "${line}" ];then
+            continue
+        fi
+        for check in ${line};do
+            modprobe -b "${check}" -v | sed 's:insmod [^ ]*/:Load modules :g; s:\.ko\(\.gz\)\? ::g'
+        done
+    done < "${mod}"
+done
+
+exit 0
diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
index 79e6af9de99c..6ed257fc2d39 100644
--- a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -1,20 +1,28 @@
 diff --git a/Makefile b/Makefile
-index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+index f137878ddd68d8da9c28bee8ec9df7d1165cb073..066d8d888755d442d8f7c28efb16e2c934a6faed 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
-    -e "s,@FORCECHCK@,$(FORCECHCK)," \
-    -e "s,@LOCAL@,$(LOCAL)," \
-    -e "s,@CONTAINER@,$(CONTAINER)," \
--   -e "s,@TMPFILE@,$(TMPFILE)," \
-    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
-    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
-    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@script_directory@,$(script_directory)," \
+        -e "s,@skel_directory@,$(skel_directory)," \
+        -e "s,@livedir@,$(livedir)," \
+-       -e "s,@tmpfiles_path@,$(tmpfiles)," \
+        -e "s,@modules_path@,$(modules)," \
+        -e "s,@VERSION@,$(version)," \
+        -e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@FORCECHCK@,$(FORCECHCK)," \
+        -e "s,@LOCAL@,$(LOCAL)," \
+        -e "s,@CONTAINER@,$(CONTAINER)," \
+-       -e "s,@TMPFILE@,$(TMPFILE)," \
+        -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+        -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+        -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
 diff --git a/configure b/configure
-index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+index 9622be37e2d6414b0f7b3c3a034a9dce6f09bc19..2d26020df61da8b3dc3441db9a52c16cfa4d6363 100755
 --- a/configure
 +++ b/configure
-@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
    --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
    --LOCAL=BOOLEAN                  use rc.local scripts [!no]
    --CONTAINER=BOOLEAN              boot inside a container [!no]
@@ -22,7 +30,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
    --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
    --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
    --RANDOMSEED=BOOLEAN             set random seed [!yes]
-@@ -155,7 +154,6 @@ SYSCTL='!yes'
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
  FORCECHCK='!no'
  LOCAL='!no'
  CONTAINER='!no'
@@ -30,7 +38,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
  MODULE_KERNEL='!yes'
  MODULE_SYSTEM='!yes'
  RANDOMSEED='!yes'
-@@ -212,7 +210,6 @@ for arg ; do
+@@ -218,7 +216,6 @@ for arg ; do
      --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
      --LOCAL=*) LOCAL=${arg#*=} ;;
      --CONTAINER=*) CONTAINER=${arg#*=} ;;
@@ -38,7 +46,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
      --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
      --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
      --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
-@@ -291,7 +288,7 @@ done
+@@ -297,7 +294,7 @@ done
  
  for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
          KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
@@ -47,7 +55,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
          FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
          CRYPTTAB FIREWALL \
          CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-@@ -356,7 +353,6 @@ $SYSCTL
+@@ -364,7 +361,6 @@ $SYSCTL
  $FORCECHCK
  $LOCAL
  $CONTAINER
@@ -60,16 +68,16 @@ index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb2264
 --- a/doc/boot@.md
 +++ b/doc/boot@.md
 @@ -136,10 +136,6 @@ Two different kinds of variables are used:
-  - type: boolean.
-  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+    - type: boolean.
+    - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
  
 -- **TMPFILES**:
-- - type: boolean.
-- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-   - type: boolean.
+-   - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
 -
  - **MODULE_KERNEL**:
-  - type: boolean.
-  - description: load the kernel modules returned by the `kmod static-nodes` command.
+    - type: boolean.
+    - description: load the kernel modules returned by the `kmod static-nodes` command.
 diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
 index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
 --- a/module/boot@/configure/configure
@@ -91,581 +99,6 @@ index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab
          MODULE_KERNEL) SV_REAL="modules-kernel" ;;
          MODULE_SYSTEM) SV_REAL="modules-system" ;;
          RANDOMSEED) SV_REAL="system-random" ;;
-diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
-deleted file mode 100755
-index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
---- a/module/boot@/configure/tmpfiles.sh
-+++ /dev/null
-@@ -1,569 +0,0 @@
--#!@BINDIR@/sh
--# This is a reimplementation of the systemd tmpfiles.d code
--# Control creation, deletion, and cleaning of volatile and temporary files
--#
--# Copyright (c) 2012 Gentoo Foundation
--# Released under the 2-clause BSD license.
--#
--# This instance is a pure-POSIX sh version, written by Robin H Johnson
--# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
--# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
--#
--# See the tmpfiles.d manpage as well:
--# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--# This script should match the old manpage
--# http://0pointer.de/public/systemd-man/tmpfiles.d.html
--# as of 2012/03/12 and also implements some more recent features
--#
--
--DRYRUN=0
--
--checkprefix() {
--    n=$1
--    shift
--    for x in $@; do
--        case $n in
--            ${x}*) return 0 ;;
--    esac
--    done
--    return 1
--}
--
--warninvalid() {
--    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
--    error=$(( error+1 ))
--} >&2
--
--invalid_option() {
--    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
--    exit 1
--}
--
--dryrun_or_real() {
--    local dryrun=
--    if [ $DRYRUN -eq 1 ]; then
--        dryrun=echo
--    fi
--    $dryrun "$@"
--}
--
--_chattr() {
--    local attr="$2"
--    case $attr in
--        [+-=]*) : ;;
--        '') return ;;
--        *) attr="+$attr" ;;
--    esac
--    local IFS=
--    dryrun_or_real chattr $1 "$attr" -- $3
--}
--
--relabel() {
--    local path
--    local paths=$1 mode=$2 uid=$3 gid=$4
--    local status
--
--    status=0
--    for path in ${paths}; do
--        if [ -e "$path" ]; then
--            if [ -x /sbin/restorecon ]; then
--                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
--            fi
--            if [ $uid != '-' ]; then
--                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
--            fi
--            if [ $gid != '-' ]; then
--                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
--            fi
--            if [ $mode != '-' ]; then
--                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
--            fi
--        fi
--    done
--    return $status
--}
--
--splitpath() {
--    local path=$1
--    while [ -n "$path" ]; do
--        echo $path
--        path=${path%/*}
--    done
--}
--
--_restorecon() {
--    local path=$1
--    if [ -x /sbin/restorecon ]; then
--        dryrun_or_real restorecon -F $(splitpath "$path")
--    fi
--}
--
--createdirectory() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0755
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createfile() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real touch "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createpipe() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real mkfifo "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--_b() {
--    # Create a block device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_c() {
--    # Create a character device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_C() {
--    # recursively copy a file or directory
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real cp -r "$arg" "$path"
--        _restorecon "$path"
--        if [ $uid != '-' ]; then
--            dryrun_or_real chown "$uid" "$path"
--        fi
--        if [ $gid != '-' ]; then
--            dryrun_or_real chgrp "$gid" "$path"
--        fi
--        if [ $mode != '-' ]; then
--            dryrun_or_real chmod "$mode" "$path"
--        fi
--    fi
--}
--
--_f() {
--    # Create a file if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -e "$path" ]; then
--        createfile "$mode" "$uid" "$gid" "$path"
--        if [ -n "$arg" ]; then
--            _w "$@"
--        fi
--    fi
--}
--
--_F() {
--    # Create or truncate a file
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    dryrun_or_real rm -f "$path"
--    createfile "$mode" "$uid" "$gid" "$path"
--    if [ -n "$arg" ]; then
--        _w "$@"
--    fi
--}
--
--_d() {
--    # Create a directory if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_D() {
--    # Create or empty a directory
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
--        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
--        _restorecon "$path"
--    fi
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_v() {
--    # Create a subvolume if the path does not exist yet and the file system
--    # supports this (btrfs). Otherwise create a normal directory.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_q() {
--    # Similar to _v. However, make sure that the subvolume will be assigned
--    # to the same higher-level quota groups as the subvolume it has
--    # been created in.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_Q() {
--    # Similar to q. However, instead of copying the higher-level quota
--    # group assignments from the parent as-is, the lowest quota group
--    # of the parent subvolume is determined that is not the
--    # leaf quota group.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_h() {
--    # Set file/directory attributes. Lines of this type accept
--    # shell-style globs in place of normal path names.
--    # The format of the argument field matches chattr
--    _chattr '' "$6" "$1"
--}
--
--_H() {
--    # Recursively set file/directory attributes. Lines of this type accept
--    # shell-syle globs in place of normal path names.
--    # Does not follow symlinks
--    _chattr -R "$6" "$1"
--}
--
--_L() {
--    # Create a symlink if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real ln -s "$arg" "$path"
--    fi
--    _restorecon "$path"
--}
--
--_p() {
--    # Create a named pipe (FIFO) if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -p "$path" ]; then
--        createpipe "$mode" "$uid" "$gid" "$path"
--    fi
--}
--
--_x() {
--    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
--    # controlled with the Age parameter. Note that lines of this type do not
--    # influence the effect of r or R lines. Lines of this type accept shell-style
--    # globs in place of of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_X() {
--    # Ignore a path during cleanup. Use this type to prevent path
--    # removal as controled with the age parameter. Note that if path is
--    # a directory, the content of the directory is not excluded from
--    # clean-up, only the directory itself.
--    # Lines of this type accept shell-style globs in place of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_r() {
--    # Remove a file or directory if it exists. This may not be used to remove
--    # non-empty directories, use R for that. Lines of this type accept shell-style
--    # globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -f "$path" ]; then
--            dryrun_or_real rm -f "$path" || status="$?"
--        elif [ -d "$path" ]; then
--            dryrun_or_real rmdir "$path" || status="$?"
--        fi
--    done
--    return $status
--}
--
--_R() {
--    # Recursively remove a path and all its subdirectories (if it is a directory).
--    # Lines of this type accept shell-style globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -d "$path" ]; then
--            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
--    fi
--    done
--    return $status
--}
--
--_w() {
--    # Write the argument parameter to a file, if it exists.
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ -f "$path" ]; then
--        if [ $DRYRUN -eq 1 ]; then
--            echo "echo \"$arg\" >>\"$path\""
--        else
--            echo "$arg" >>"$path"
--        fi
--    fi
--}
--
--_z() {
--    # Set ownership, access mode and relabel security context of a file or
--    # directory if it exists. Lines of this type accept shell-style globs in
--    # place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    relabel "$@"
--}
--
--_Z() {
--    # Recursively set ownership, access mode and relabel security context of a
--    # path and all its subdirectories (if it is a directory). Lines of this type
--    # accept shell-style globs in place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    CHOPTS=-R relabel "$@"
--}
--
--usage() {
--    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
--    exit ${1:-0}
--}
--
--version() {
--    # We don't record the version info anywhere currently.
--    echo "opentmpfiles"
--    exit 0
--}
--
--BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
--EXCLUDE=
--PREFIX=
--FILES=
--
--while [ $# -gt 0 ]; do
--    case $1 in
--        --boot) BOOT=1 ;;
--        --create) CREATE=1 ;;
--        --remove) REMOVE=1 ;;
--        --clean) CLEAN=1 ;; # TODO: Not implemented
--        --verbose) VERBOSE=1 ;;
--        --dryrun|--dry-run) DRYRUN=1 ;;
--        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
--        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
--        -h|--help) usage ;;
--        --version) version ;;
--        -*) invalid_option "$1" ;;
--        *) FILES="${FILES} $1"
--    esac
--    shift
--done
--
--if [ $(( CLEAN )) -eq 1 ] ; then
--    printf '%s clean mode is not implemented\n' "${0##*/}"
--    exit 1
--fi
--
--if [ "$CREATE$REMOVE" = '00' ]; then
--    usage 1 >&2
--fi
--
--# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
--tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
--tmpfiles_basenames=''
--
--if [ -z "${FILES}" ]; then
--    # Build a list of sorted unique basenames
--    # directories declared later in the tmpfiles_d array will override earlier
--    # directories, on a per file basename basis.
--    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
--    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--    for d in ${tmpfiles_dirs} ; do
--        [ -d $d ] && for f in ${d}/*.conf ; do
--            case "${f##*/}" in
--                systemd.conf|systemd-*.conf) continue;;
--            esac
--            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
--        done # for f in ${d}
--    done # for d in ${tmpfiles_dirs}
--    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
--fi
--
--tmpfiles_d=''
--
--for b in ${FILES} ; do
--    if [ "${b##*/}" != "${b}" ]; then
--        # The user specified a path on the command line
--        # Just pass it through unaltered
--        tmpfiles_d="${tmpfiles_d} ${b}"
--    else
--        real_f=''
--        for d in $tmpfiles_dirs ; do
--            f=${d}/${b}
--            [ -f "${f}" ] && real_f=$f
--        done
--        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
--    fi
--done
--
--error=0
--
--# loop through the gathered fragments, sorted globally by filename.
--# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--FILE=
--for FILE in $tmpfiles_d ; do
--    LINENUM=0
--
--    ### FILE FORMAT ###
--    # XXX: We ignore the 'Age' parameter
--    # 1    2              3    4    5    6   7
--    # Cmd  Path           Mode UID  GID  Age Argument
--    # d    /run/user      0755 root root 10d -
--    # Mode, UID, GID, Age, Argument may be omitted!
--    # If Cmd ends with !, the line is only processed if --boot is passed
--
--    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
--    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
--    while read cmd path mode uid gid age arg; do
--        LINENUM=$(( LINENUM+1 ))
--        FORCE=0
--
--        # Unless we have both command and path, skip this line.
--        if [ -z "$cmd" -o -z "$path" ]; then
--            continue
--        fi
--
--        case $cmd in
--            \#*) continue ;;
--        esac
--
--        while [ ${#cmd} -gt 1 ]; do
--            case $cmd in
--                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
--                *+) cmd=${cmd%+}; FORCE=1; ;;
--                *) warninvalid ; continue 2 ;;
--            esac
--        done
--
--        # whine about invalid entries
--        case $cmd in
--            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
--            *) warninvalid ; continue ;;
--        esac
--
--        # fall back on defaults when parameters are passed as '-'
--        if [ "$mode" = '-' -o "$mode" = '' ]; then
--            case "$cmd" in
--                p|f|F) mode=0644 ;;
--                d|D|v) mode=0755 ;;
--                C|z|Z|x|r|R|L) ;;
--            esac
--        fi
--
--        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
--        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
--        [ "$age" = '-' -o "$age" = '' ] && age=0
--        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
--        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
--
--        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
--        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
--
--        if [ $FORCE -gt 0 ]; then
--            case $cmd in
--                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
--            esac
--        fi
--
--        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
--        _$cmd "$@"
--        rc=$?
--        if [ "${DRYRUN}" -eq "0" ]; then
--            [ $rc -ne 0 ] && error=$((error + 1))
--        fi
--    done <$FILE
--done
--
--exit $error
--
--# vim: set ts=2 sw=2 sts=2 noet ft=sh:
 diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
 index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
 --- a/module/boot@/service/all-Local
@@ -692,7 +125,7 @@ index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102
  @user = ( root )
 diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
 deleted file mode 100644
-index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+index 35a58e7281473d9ce808000c855bf448589b267e..0000000000000000000000000000000000000000
 --- a/module/boot@/service/local/local-tmpfiles
 +++ /dev/null
 @@ -1,23 +0,0 @@
@@ -717,26 +150,21 @@ index 4b471408a3efac3734c0a8ed76c4529bf2241b83..00000000000000000000000000000000
 -)
 -
 -[environment]
--script_file=!@scripts@/tmpfiles.sh
+-script_file=!@tmpfiles@/opentmpfiles.sh
 -script_args=!--create --verbose --boot
-diff --git a/package/targets.mak b/package/targets.mak
-index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
---- a/package/targets.mak
-+++ b/package/targets.mak
-@@ -1,7 +1,6 @@
- SCRIPT_TARGET := \
- module/boot@/configure/crypt.awk \
--module/boot@/configure/modules.sh \
--module/boot@/configure/tmpfiles.sh
-+module/boot@/configure/modules.sh
- 
- SERVICE_TARGET := service/boot@
- MODULE_TARGET := $(shell find module/boot@/service -type f)
 diff --git a/service/boot@ b/service/boot@
-index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+index f08eac1d2f3d480ceffe41bb0b7890931d838607..da3e5e957d31deb8597279ecd72dbb268319d90a 100644
 --- a/service/boot@
 +++ b/service/boot@
-@@ -147,9 +147,6 @@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
  
  @CONTAINER@
  
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index a88e8b4ed5c0..e49ced874a37 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,11 +1,12 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.1
-revision=2
+version=2.4.0
+revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --modules-script=/usr/share/66/script/"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -16,7 +17,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
 patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
@@ -39,6 +40,9 @@ post_install() {
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
+	# Install modules.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/modules.sh 755 usr/share/66/script/
+
 	# Install license file
 	vlicense LICENSE
 }

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (94 preceding siblings ...)
  2021-09-15 13:15 ` [PR PATCH] [Updated] " mobinmob
@ 2021-09-15 19:19 ` mobinmob
  2021-09-15 19:23 ` mobinmob
                   ` (75 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 19:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 124832 bytes --]

From 50da28ca7507b71cf8d955ef9100f66becf000ae Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/33] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From aa8542b1354b3f01d331b00c1b6465ba4561c62a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/33] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From b4988814a8dc0e903dc98b3106ea6c2b93703c5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/33] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From c8fba02ab65c99a4043bca564b6dd5dd17a2c402 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/33] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From aa8361310f7b9675ec63e819152b2986a3b3f197 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/33] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 65d238a1422a498e4d43719d115f982bff54fc42 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/33] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 72e5e8ffd3063b60ba018f3b5682ab4af5aea1bb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/33] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 128695569ec9142dbc4c138c9fdd2fa10d6d1ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/33] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 4b04791a0c776c9429f195ccef323f1bc2c86085 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/33] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From b84b021f6cebb5a6f08ed3fbb3a0401d98c8078c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/33] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From f28c6ed310c012ed2bb9b79180d1ae97fa5ade4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/33] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 08f6d924c77f17717a980f9ca1d9a6262a739a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/33] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 949d862d9288e4458a7d3410e7d83faa166d797c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/33] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2e2ba60cc7291c713e42d2fbb8eaa5dd3102dc5b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/33] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 796af008a9a8141f6315875b275d9a8a93aa5d4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/33] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4777209288cccad05120136a93caf618220d98bf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/33] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From d55e6562a506cca13bfd9d7764a2edb97b051a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/33] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b7b1d657e9953bf8b9a6b00ed5311db6a2f2c0e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/33] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ce7c6af9a72490636532305f2cc0f1e48ecfbd1c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/33] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From d9ea518340597331905f23acf8012c9ac1cf4a4a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/33] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 4d77ebae9124976c4dfc344c8e8fdab4272be4fe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/33] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From cb984e2723e7f99320413000c9ea50b9f4330344 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/33] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From c430a4f71b3be83ff55d13f77cc77dd95ebb492c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/33] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 2480aa6811ec6e6563c030bb72f42b70d9e929d5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/33] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From da5f5c58ee57a74e3f76f3a66fac52586644ed59 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/33] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 334bee01cd7ca8b64be4f9eb410b2f193cf839a7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/33] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From d503db4f94ab25efeb17b40a6534b39277288a28 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/33] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From e2c16fc9ae375bafb6c75fd97b7204611fda3a50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/33] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From c9e5b12e0b1ebcc73360a3d20f0899af8cdb86f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/33] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From a139fe97dbf712b6ef47cab907c0bea1b9a4a12c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/33] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

From 0274602625b1949bb2a3d98a7cfb0c2a7e6c5166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:42:55 +0300
Subject: [PATCH 31/33] remove trailing spaces, thanx @paper42

---
 srcpkgs/boot-66serv/files/switch-initutils    | 11 +++++------
 srcpkgs/boot-66serv/files/switch-initutils-66 |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f6..9876234ddaa3 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc3..42aa4ed2390c 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot

From 63fefaf2b374f812241c2c9a7b5bf75491402de2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 16:06:57 +0300
Subject: [PATCH 32/33] boot-66serv: update to 2.4.0.

Also:
- add back modules.sh (it has moved to a separate repo), add a new
configuration for it
- rebase the patch to remove tmpfiles, add a fix for complete removal
- rebase all commits to master.
---
 srcpkgs/boot-66serv/files/modules.sh          |  85 +++
 .../patches/remove_tmpfiles.d_support.diff    | 654 ++----------------
 srcpkgs/boot-66serv/template                  |  12 +-
 3 files changed, 134 insertions(+), 617 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/modules.sh

diff --git a/srcpkgs/boot-66serv/files/modules.sh b/srcpkgs/boot-66serv/files/modules.sh
new file mode 100644
index 000000000000..0cc4d1a79729
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/modules.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# This scripts is a pure-POSIX sh version
+#
+# Copyright (c) 2015-2021 Eric Vidal <eric@obarun.org>
+# All rights reserved.
+#
+# This file is part of Obarun. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution.
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+
+# Configuration files are read from directories in
+# /etc/modules-load.d, /run/modules-load.d, and /usr/lib/modules-load.d,
+# in order of precedence
+
+MODULES_PATH='/etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d'
+MODULES_NAME=""
+MODULES_RESULT=""
+
+check_elements(){
+    for e in $2; do [ "$e" = "$1" ] && return 0; done; return 1;
+}
+
+build_array() {
+    printf "%s %s" "$1" "$2"
+}
+
+check_file(){
+
+    tidy_loop="" conf=""
+
+    for tidy_loop in $MODULES_PATH; do
+        if [ -d "${tidy_loop}" ]; then
+            for conf in "${tidy_loop}"/*.conf ; do
+                if [ -f "${conf}" ]; then
+                    if ! check_elements "${conf##*/}" "${MODULES_NAME}"; then
+                        MODULES_NAME=$(build_array "${MODULES_NAME}" "${conf##*/}")
+                    fi
+                fi
+            done
+        fi
+    done
+
+    unset tidy_loop conf
+}
+
+check_path(){
+    path="" tidy_loop=""
+    for path in ${MODULES_PATH}; do
+        for tidy_loop in ${MODULES_NAME}; do
+            if [ -f "${path}/${tidy_loop}" ]; then
+                if ! check_elements "${tidy_loop}" "${MODULES_RESULT##*/}";then
+                    MODULES_RESULT=$(build_array "${MODULES_RESULT}" "${path}/${tidy_loop}")
+                fi
+            fi
+        done
+    done
+    unset path tidy_loop
+}
+
+check_file
+
+if [ -n "${MODULES_NAME}" ]; then
+    check_path
+else
+    printf "$0: %s\n" "No modules found -- nothing to do"
+    exit 0
+fi
+
+for mod in ${MODULES_RESULT}; do
+    while read -r line; do
+        comment=$(printf "%s" "$line" | awk  '{ string=substr($0, 0, 1); print string; }' )
+        if [ "${comment}" = "#" ] || [ -z "${line}" ];then
+            continue
+        fi
+        for check in ${line};do
+            modprobe -b "${check}" -v | sed 's:insmod [^ ]*/:Load modules :g; s:\.ko\(\.gz\)\? ::g'
+        done
+    done < "${mod}"
+done
+
+exit 0
diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
index 79e6af9de99c..6ed257fc2d39 100644
--- a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -1,20 +1,28 @@
 diff --git a/Makefile b/Makefile
-index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+index f137878ddd68d8da9c28bee8ec9df7d1165cb073..066d8d888755d442d8f7c28efb16e2c934a6faed 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
-    -e "s,@FORCECHCK@,$(FORCECHCK)," \
-    -e "s,@LOCAL@,$(LOCAL)," \
-    -e "s,@CONTAINER@,$(CONTAINER)," \
--   -e "s,@TMPFILE@,$(TMPFILE)," \
-    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
-    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
-    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@script_directory@,$(script_directory)," \
+        -e "s,@skel_directory@,$(skel_directory)," \
+        -e "s,@livedir@,$(livedir)," \
+-       -e "s,@tmpfiles_path@,$(tmpfiles)," \
+        -e "s,@modules_path@,$(modules)," \
+        -e "s,@VERSION@,$(version)," \
+        -e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@FORCECHCK@,$(FORCECHCK)," \
+        -e "s,@LOCAL@,$(LOCAL)," \
+        -e "s,@CONTAINER@,$(CONTAINER)," \
+-       -e "s,@TMPFILE@,$(TMPFILE)," \
+        -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+        -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+        -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
 diff --git a/configure b/configure
-index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+index 9622be37e2d6414b0f7b3c3a034a9dce6f09bc19..2d26020df61da8b3dc3441db9a52c16cfa4d6363 100755
 --- a/configure
 +++ b/configure
-@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
    --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
    --LOCAL=BOOLEAN                  use rc.local scripts [!no]
    --CONTAINER=BOOLEAN              boot inside a container [!no]
@@ -22,7 +30,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
    --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
    --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
    --RANDOMSEED=BOOLEAN             set random seed [!yes]
-@@ -155,7 +154,6 @@ SYSCTL='!yes'
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
  FORCECHCK='!no'
  LOCAL='!no'
  CONTAINER='!no'
@@ -30,7 +38,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
  MODULE_KERNEL='!yes'
  MODULE_SYSTEM='!yes'
  RANDOMSEED='!yes'
-@@ -212,7 +210,6 @@ for arg ; do
+@@ -218,7 +216,6 @@ for arg ; do
      --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
      --LOCAL=*) LOCAL=${arg#*=} ;;
      --CONTAINER=*) CONTAINER=${arg#*=} ;;
@@ -38,7 +46,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
      --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
      --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
      --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
-@@ -291,7 +288,7 @@ done
+@@ -297,7 +294,7 @@ done
  
  for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
          KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
@@ -47,7 +55,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
          FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
          CRYPTTAB FIREWALL \
          CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-@@ -356,7 +353,6 @@ $SYSCTL
+@@ -364,7 +361,6 @@ $SYSCTL
  $FORCECHCK
  $LOCAL
  $CONTAINER
@@ -60,16 +68,16 @@ index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb2264
 --- a/doc/boot@.md
 +++ b/doc/boot@.md
 @@ -136,10 +136,6 @@ Two different kinds of variables are used:
-  - type: boolean.
-  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+    - type: boolean.
+    - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
  
 -- **TMPFILES**:
-- - type: boolean.
-- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-   - type: boolean.
+-   - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
 -
  - **MODULE_KERNEL**:
-  - type: boolean.
-  - description: load the kernel modules returned by the `kmod static-nodes` command.
+    - type: boolean.
+    - description: load the kernel modules returned by the `kmod static-nodes` command.
 diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
 index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
 --- a/module/boot@/configure/configure
@@ -91,581 +99,6 @@ index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab
          MODULE_KERNEL) SV_REAL="modules-kernel" ;;
          MODULE_SYSTEM) SV_REAL="modules-system" ;;
          RANDOMSEED) SV_REAL="system-random" ;;
-diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
-deleted file mode 100755
-index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
---- a/module/boot@/configure/tmpfiles.sh
-+++ /dev/null
-@@ -1,569 +0,0 @@
--#!@BINDIR@/sh
--# This is a reimplementation of the systemd tmpfiles.d code
--# Control creation, deletion, and cleaning of volatile and temporary files
--#
--# Copyright (c) 2012 Gentoo Foundation
--# Released under the 2-clause BSD license.
--#
--# This instance is a pure-POSIX sh version, written by Robin H Johnson
--# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
--# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
--#
--# See the tmpfiles.d manpage as well:
--# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--# This script should match the old manpage
--# http://0pointer.de/public/systemd-man/tmpfiles.d.html
--# as of 2012/03/12 and also implements some more recent features
--#
--
--DRYRUN=0
--
--checkprefix() {
--    n=$1
--    shift
--    for x in $@; do
--        case $n in
--            ${x}*) return 0 ;;
--    esac
--    done
--    return 1
--}
--
--warninvalid() {
--    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
--    error=$(( error+1 ))
--} >&2
--
--invalid_option() {
--    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
--    exit 1
--}
--
--dryrun_or_real() {
--    local dryrun=
--    if [ $DRYRUN -eq 1 ]; then
--        dryrun=echo
--    fi
--    $dryrun "$@"
--}
--
--_chattr() {
--    local attr="$2"
--    case $attr in
--        [+-=]*) : ;;
--        '') return ;;
--        *) attr="+$attr" ;;
--    esac
--    local IFS=
--    dryrun_or_real chattr $1 "$attr" -- $3
--}
--
--relabel() {
--    local path
--    local paths=$1 mode=$2 uid=$3 gid=$4
--    local status
--
--    status=0
--    for path in ${paths}; do
--        if [ -e "$path" ]; then
--            if [ -x /sbin/restorecon ]; then
--                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
--            fi
--            if [ $uid != '-' ]; then
--                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
--            fi
--            if [ $gid != '-' ]; then
--                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
--            fi
--            if [ $mode != '-' ]; then
--                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
--            fi
--        fi
--    done
--    return $status
--}
--
--splitpath() {
--    local path=$1
--    while [ -n "$path" ]; do
--        echo $path
--        path=${path%/*}
--    done
--}
--
--_restorecon() {
--    local path=$1
--    if [ -x /sbin/restorecon ]; then
--        dryrun_or_real restorecon -F $(splitpath "$path")
--    fi
--}
--
--createdirectory() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0755
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createfile() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real touch "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createpipe() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real mkfifo "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--_b() {
--    # Create a block device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_c() {
--    # Create a character device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_C() {
--    # recursively copy a file or directory
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real cp -r "$arg" "$path"
--        _restorecon "$path"
--        if [ $uid != '-' ]; then
--            dryrun_or_real chown "$uid" "$path"
--        fi
--        if [ $gid != '-' ]; then
--            dryrun_or_real chgrp "$gid" "$path"
--        fi
--        if [ $mode != '-' ]; then
--            dryrun_or_real chmod "$mode" "$path"
--        fi
--    fi
--}
--
--_f() {
--    # Create a file if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -e "$path" ]; then
--        createfile "$mode" "$uid" "$gid" "$path"
--        if [ -n "$arg" ]; then
--            _w "$@"
--        fi
--    fi
--}
--
--_F() {
--    # Create or truncate a file
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    dryrun_or_real rm -f "$path"
--    createfile "$mode" "$uid" "$gid" "$path"
--    if [ -n "$arg" ]; then
--        _w "$@"
--    fi
--}
--
--_d() {
--    # Create a directory if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_D() {
--    # Create or empty a directory
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
--        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
--        _restorecon "$path"
--    fi
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_v() {
--    # Create a subvolume if the path does not exist yet and the file system
--    # supports this (btrfs). Otherwise create a normal directory.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_q() {
--    # Similar to _v. However, make sure that the subvolume will be assigned
--    # to the same higher-level quota groups as the subvolume it has
--    # been created in.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_Q() {
--    # Similar to q. However, instead of copying the higher-level quota
--    # group assignments from the parent as-is, the lowest quota group
--    # of the parent subvolume is determined that is not the
--    # leaf quota group.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_h() {
--    # Set file/directory attributes. Lines of this type accept
--    # shell-style globs in place of normal path names.
--    # The format of the argument field matches chattr
--    _chattr '' "$6" "$1"
--}
--
--_H() {
--    # Recursively set file/directory attributes. Lines of this type accept
--    # shell-syle globs in place of normal path names.
--    # Does not follow symlinks
--    _chattr -R "$6" "$1"
--}
--
--_L() {
--    # Create a symlink if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real ln -s "$arg" "$path"
--    fi
--    _restorecon "$path"
--}
--
--_p() {
--    # Create a named pipe (FIFO) if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -p "$path" ]; then
--        createpipe "$mode" "$uid" "$gid" "$path"
--    fi
--}
--
--_x() {
--    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
--    # controlled with the Age parameter. Note that lines of this type do not
--    # influence the effect of r or R lines. Lines of this type accept shell-style
--    # globs in place of of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_X() {
--    # Ignore a path during cleanup. Use this type to prevent path
--    # removal as controled with the age parameter. Note that if path is
--    # a directory, the content of the directory is not excluded from
--    # clean-up, only the directory itself.
--    # Lines of this type accept shell-style globs in place of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_r() {
--    # Remove a file or directory if it exists. This may not be used to remove
--    # non-empty directories, use R for that. Lines of this type accept shell-style
--    # globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -f "$path" ]; then
--            dryrun_or_real rm -f "$path" || status="$?"
--        elif [ -d "$path" ]; then
--            dryrun_or_real rmdir "$path" || status="$?"
--        fi
--    done
--    return $status
--}
--
--_R() {
--    # Recursively remove a path and all its subdirectories (if it is a directory).
--    # Lines of this type accept shell-style globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -d "$path" ]; then
--            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
--    fi
--    done
--    return $status
--}
--
--_w() {
--    # Write the argument parameter to a file, if it exists.
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ -f "$path" ]; then
--        if [ $DRYRUN -eq 1 ]; then
--            echo "echo \"$arg\" >>\"$path\""
--        else
--            echo "$arg" >>"$path"
--        fi
--    fi
--}
--
--_z() {
--    # Set ownership, access mode and relabel security context of a file or
--    # directory if it exists. Lines of this type accept shell-style globs in
--    # place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    relabel "$@"
--}
--
--_Z() {
--    # Recursively set ownership, access mode and relabel security context of a
--    # path and all its subdirectories (if it is a directory). Lines of this type
--    # accept shell-style globs in place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    CHOPTS=-R relabel "$@"
--}
--
--usage() {
--    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
--    exit ${1:-0}
--}
--
--version() {
--    # We don't record the version info anywhere currently.
--    echo "opentmpfiles"
--    exit 0
--}
--
--BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
--EXCLUDE=
--PREFIX=
--FILES=
--
--while [ $# -gt 0 ]; do
--    case $1 in
--        --boot) BOOT=1 ;;
--        --create) CREATE=1 ;;
--        --remove) REMOVE=1 ;;
--        --clean) CLEAN=1 ;; # TODO: Not implemented
--        --verbose) VERBOSE=1 ;;
--        --dryrun|--dry-run) DRYRUN=1 ;;
--        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
--        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
--        -h|--help) usage ;;
--        --version) version ;;
--        -*) invalid_option "$1" ;;
--        *) FILES="${FILES} $1"
--    esac
--    shift
--done
--
--if [ $(( CLEAN )) -eq 1 ] ; then
--    printf '%s clean mode is not implemented\n' "${0##*/}"
--    exit 1
--fi
--
--if [ "$CREATE$REMOVE" = '00' ]; then
--    usage 1 >&2
--fi
--
--# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
--tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
--tmpfiles_basenames=''
--
--if [ -z "${FILES}" ]; then
--    # Build a list of sorted unique basenames
--    # directories declared later in the tmpfiles_d array will override earlier
--    # directories, on a per file basename basis.
--    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
--    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--    for d in ${tmpfiles_dirs} ; do
--        [ -d $d ] && for f in ${d}/*.conf ; do
--            case "${f##*/}" in
--                systemd.conf|systemd-*.conf) continue;;
--            esac
--            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
--        done # for f in ${d}
--    done # for d in ${tmpfiles_dirs}
--    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
--fi
--
--tmpfiles_d=''
--
--for b in ${FILES} ; do
--    if [ "${b##*/}" != "${b}" ]; then
--        # The user specified a path on the command line
--        # Just pass it through unaltered
--        tmpfiles_d="${tmpfiles_d} ${b}"
--    else
--        real_f=''
--        for d in $tmpfiles_dirs ; do
--            f=${d}/${b}
--            [ -f "${f}" ] && real_f=$f
--        done
--        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
--    fi
--done
--
--error=0
--
--# loop through the gathered fragments, sorted globally by filename.
--# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--FILE=
--for FILE in $tmpfiles_d ; do
--    LINENUM=0
--
--    ### FILE FORMAT ###
--    # XXX: We ignore the 'Age' parameter
--    # 1    2              3    4    5    6   7
--    # Cmd  Path           Mode UID  GID  Age Argument
--    # d    /run/user      0755 root root 10d -
--    # Mode, UID, GID, Age, Argument may be omitted!
--    # If Cmd ends with !, the line is only processed if --boot is passed
--
--    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
--    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
--    while read cmd path mode uid gid age arg; do
--        LINENUM=$(( LINENUM+1 ))
--        FORCE=0
--
--        # Unless we have both command and path, skip this line.
--        if [ -z "$cmd" -o -z "$path" ]; then
--            continue
--        fi
--
--        case $cmd in
--            \#*) continue ;;
--        esac
--
--        while [ ${#cmd} -gt 1 ]; do
--            case $cmd in
--                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
--                *+) cmd=${cmd%+}; FORCE=1; ;;
--                *) warninvalid ; continue 2 ;;
--            esac
--        done
--
--        # whine about invalid entries
--        case $cmd in
--            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
--            *) warninvalid ; continue ;;
--        esac
--
--        # fall back on defaults when parameters are passed as '-'
--        if [ "$mode" = '-' -o "$mode" = '' ]; then
--            case "$cmd" in
--                p|f|F) mode=0644 ;;
--                d|D|v) mode=0755 ;;
--                C|z|Z|x|r|R|L) ;;
--            esac
--        fi
--
--        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
--        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
--        [ "$age" = '-' -o "$age" = '' ] && age=0
--        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
--        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
--
--        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
--        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
--
--        if [ $FORCE -gt 0 ]; then
--            case $cmd in
--                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
--            esac
--        fi
--
--        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
--        _$cmd "$@"
--        rc=$?
--        if [ "${DRYRUN}" -eq "0" ]; then
--            [ $rc -ne 0 ] && error=$((error + 1))
--        fi
--    done <$FILE
--done
--
--exit $error
--
--# vim: set ts=2 sw=2 sts=2 noet ft=sh:
 diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
 index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
 --- a/module/boot@/service/all-Local
@@ -692,7 +125,7 @@ index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102
  @user = ( root )
 diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
 deleted file mode 100644
-index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+index 35a58e7281473d9ce808000c855bf448589b267e..0000000000000000000000000000000000000000
 --- a/module/boot@/service/local/local-tmpfiles
 +++ /dev/null
 @@ -1,23 +0,0 @@
@@ -717,26 +150,21 @@ index 4b471408a3efac3734c0a8ed76c4529bf2241b83..00000000000000000000000000000000
 -)
 -
 -[environment]
--script_file=!@scripts@/tmpfiles.sh
+-script_file=!@tmpfiles@/opentmpfiles.sh
 -script_args=!--create --verbose --boot
-diff --git a/package/targets.mak b/package/targets.mak
-index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
---- a/package/targets.mak
-+++ b/package/targets.mak
-@@ -1,7 +1,6 @@
- SCRIPT_TARGET := \
- module/boot@/configure/crypt.awk \
--module/boot@/configure/modules.sh \
--module/boot@/configure/tmpfiles.sh
-+module/boot@/configure/modules.sh
- 
- SERVICE_TARGET := service/boot@
- MODULE_TARGET := $(shell find module/boot@/service -type f)
 diff --git a/service/boot@ b/service/boot@
-index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+index f08eac1d2f3d480ceffe41bb0b7890931d838607..da3e5e957d31deb8597279ecd72dbb268319d90a 100644
 --- a/service/boot@
 +++ b/service/boot@
-@@ -147,9 +147,6 @@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
  
  @CONTAINER@
  
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index a88e8b4ed5c0..e49ced874a37 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,11 +1,12 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.1
-revision=2
+version=2.4.0
+revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --modules-script=/usr/share/66/script/"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -16,7 +17,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
 patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
@@ -39,6 +40,9 @@ post_install() {
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
+	# Install modules.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/modules.sh 755 usr/share/66/script/
+
 	# Install license file
 	vlicense LICENSE
 }

From d5f56327f3205727b568ffc04c5c4443a8e2eb4f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 22:18:41 +0300
Subject: [PATCH 33/33] boot-66serv: remove redundant switch from
 configure_args.

tmpfiles.d support is already removed.
---
 srcpkgs/boot-66serv/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index e49ced874a37..42de931109b1 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --KEYMAP=!us --TZ=!Europe/Madrid
  --modules-script=/usr/share/66/script/"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (95 preceding siblings ...)
  2021-09-15 19:19 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0 mobinmob
@ 2021-09-15 19:23 ` mobinmob
  2021-11-19 18:01 ` [PR PATCH] [Updated] " mobinmob
                   ` (74 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-09-15 19:23 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-920312902

Comment:
Change:
- Removed `--TMPFILE=!no` from  `configure_args`.  I have removed the support for tmpfiles.d, so the switch is now redundant.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (96 preceding siblings ...)
  2021-09-15 19:23 ` mobinmob
@ 2021-11-19 18:01 ` mobinmob
  2021-11-19 18:04 ` mobinmob
                   ` (73 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-11-19 18:01 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 124832 bytes --]

From 50da28ca7507b71cf8d955ef9100f66becf000ae Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/33] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..c82ece19fc5e
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..9c25c7dff436
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..3919274b0f7f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 000000000000..7b72f625d84f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..1a57510f3cfb
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From aa8542b1354b3f01d331b00c1b6465ba4561c62a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/33] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436..c5e36bbfa4fe 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfb..f953ead216ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From b4988814a8dc0e903dc98b3106ea6c2b93703c5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/33] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fe..fe741ff2bd8f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From c8fba02ab65c99a4043bca564b6dd5dd17a2c402 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/33] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f..b596b3ba95f6 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From aa8361310f7b9675ec63e819152b2986a3b3f197 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/33] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..1bf6c7247455
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 65d238a1422a498e4d43719d115f982bff54fc42 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/33] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec..fa659c37010d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 72e5e8ffd3063b60ba018f3b5682ab4af5aea1bb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/33] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..7ed84c937134
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 128695569ec9142dbc4c138c9fdd2fa10d6d1ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/33] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f..d3d60bb82dd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 4b04791a0c776c9429f195ccef323f1bc2c86085 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/33] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd8..362266bad06a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From b84b021f6cebb5a6f08ed3fbb3a0401d98c8078c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/33] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06a..3a0f89f87077 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84f..f4a783bde6c2 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d..c088b82dd9e2 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From f28c6ed310c012ed2bb9b79180d1ae97fa5ade4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/33] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2..000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2..4747249557de 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 08f6d924c77f17717a980f9ca1d9a6262a739a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/33] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557de..4fce1c84b8a0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 949d862d9288e4458a7d3410e7d83faa166d797c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/33] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 000000000000..8d289de798bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a0..4c3e1f5cca76 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2e2ba60cc7291c713e42d2fbb8eaa5dd3102dc5b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/33] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e..2e5bb6a10a5f 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077..9f0f36d73c3c 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca76..0efd5480a012 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 796af008a9a8141f6315875b275d9a8a93aa5d4d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/33] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bf..4d1e42ee7472 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3c..9c0c16f5c1d4 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a012..f4467c0f0c0e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4777209288cccad05120136a93caf618220d98bf Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/33] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0e..2192a410f9cd 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From d55e6562a506cca13bfd9d7764a2edb97b051a4b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/33] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee7472..e8679bd7de02 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b7b1d657e9953bf8b9a6b00ed5311db6a2f2c0e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/33] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cd..1876f0852b68 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ce7c6af9a72490636532305f2cc0f1e48ecfbd1c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/33] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c937134..343809e845e4 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From d9ea518340597331905f23acf8012c9ac1cf4a4a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/33] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02..513f614df7de 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 4d77ebae9124976c4dfc344c8e8fdab4272be4fe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/33] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d4..35890b9fe7b7 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From cb984e2723e7f99320413000c9ea50b9f4330344 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/33] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de..0d809c8f2f6d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From c430a4f71b3be83ff55d13f77cc77dd95ebb492c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/33] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 000000000000..b4fe592ea5a1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 000000000000..a560272de2c6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68..c61af8843800 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 2480aa6811ec6e6563c030bb72f42b70d9e929d5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/33] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af8843800..ed10d74a67e9 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From da5f5c58ee57a74e3f76f3a66fac52586644ed59 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/33] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d..d466a1b88658 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 334bee01cd7ca8b64be4f9eb410b2f193cf839a7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/33] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From d503db4f94ab25efeb17b40a6534b39277288a28 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/33] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455..4239b7b53cc3 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e9..26e9dada5db4 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From e2c16fc9ae375bafb6c75fd97b7204611fda3a50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/33] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a1..000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6..000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 000000000000..16f93d1ee8d1
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db4..2ba5a8e6c63a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From c9e5b12e0b1ebcc73360a3d20f0899af8cdb86f0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 28 May 2021 23:24:18 +0300
Subject: [PATCH 29/33] update boot-66serv to 2.3.1.

---
 .../patches/upstream-20210322.diff            | 222 ------------------
 srcpkgs/boot-66serv/template                  |   5 +-
 2 files changed, 2 insertions(+), 225 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1..000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2ba5a8e6c63a..01f7cdd1beaf 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.3.1
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -16,8 +16,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
-patch_args=" -Np1"
+checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From a139fe97dbf712b6ef47cab907c0bea1b9a4a12c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:32:05 +0300
Subject: [PATCH 30/33] remove tmpfiles.d support.

---
 .../patches/remove_tmpfiles.d_support.diff    | 748 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   4 +-
 2 files changed, 750 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff

diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
new file mode 100644
index 000000000000..79e6af9de99c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -0,0 +1,748 @@
+diff --git a/Makefile b/Makefile
+index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+--- a/Makefile
++++ b/Makefile
+@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+    -e "s,@FORCECHCK@,$(FORCECHCK)," \
+    -e "s,@LOCAL@,$(LOCAL)," \
+    -e "s,@CONTAINER@,$(CONTAINER)," \
+-   -e "s,@TMPFILE@,$(TMPFILE)," \
+    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+--- a/configure
++++ b/configure
+@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -155,7 +154,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -212,7 +210,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -291,7 +288,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -356,7 +353,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb226490675569 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+  - type: boolean.
+  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+- - type: boolean.
+- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+  - type: boolean.
+  - description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
+deleted file mode 100755
+index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
+--- a/module/boot@/configure/tmpfiles.sh
++++ /dev/null
+@@ -1,569 +0,0 @@
+-#!@BINDIR@/sh
+-# This is a reimplementation of the systemd tmpfiles.d code
+-# Control creation, deletion, and cleaning of volatile and temporary files
+-#
+-# Copyright (c) 2012 Gentoo Foundation
+-# Released under the 2-clause BSD license.
+-#
+-# This instance is a pure-POSIX sh version, written by Robin H Johnson
+-# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
+-# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
+-#
+-# See the tmpfiles.d manpage as well:
+-# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
+-# This script should match the old manpage
+-# http://0pointer.de/public/systemd-man/tmpfiles.d.html
+-# as of 2012/03/12 and also implements some more recent features
+-#
+-
+-DRYRUN=0
+-
+-checkprefix() {
+-    n=$1
+-    shift
+-    for x in $@; do
+-        case $n in
+-            ${x}*) return 0 ;;
+-    esac
+-    done
+-    return 1
+-}
+-
+-warninvalid() {
+-    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
+-    error=$(( error+1 ))
+-} >&2
+-
+-invalid_option() {
+-    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
+-    exit 1
+-}
+-
+-dryrun_or_real() {
+-    local dryrun=
+-    if [ $DRYRUN -eq 1 ]; then
+-        dryrun=echo
+-    fi
+-    $dryrun "$@"
+-}
+-
+-_chattr() {
+-    local attr="$2"
+-    case $attr in
+-        [+-=]*) : ;;
+-        '') return ;;
+-        *) attr="+$attr" ;;
+-    esac
+-    local IFS=
+-    dryrun_or_real chattr $1 "$attr" -- $3
+-}
+-
+-relabel() {
+-    local path
+-    local paths=$1 mode=$2 uid=$3 gid=$4
+-    local status
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -e "$path" ]; then
+-            if [ -x /sbin/restorecon ]; then
+-                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
+-            fi
+-            if [ $uid != '-' ]; then
+-                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
+-            fi
+-            if [ $gid != '-' ]; then
+-                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
+-            fi
+-            if [ $mode != '-' ]; then
+-                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
+-            fi
+-        fi
+-    done
+-    return $status
+-}
+-
+-splitpath() {
+-    local path=$1
+-    while [ -n "$path" ]; do
+-        echo $path
+-        path=${path%/*}
+-    done
+-}
+-
+-_restorecon() {
+-    local path=$1
+-    if [ -x /sbin/restorecon ]; then
+-        dryrun_or_real restorecon -F $(splitpath "$path")
+-    fi
+-}
+-
+-createdirectory() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0755
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createfile() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real touch "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-createpipe() {
+-    local mode="$1" uid="$2" gid="$3" path="$4"
+-    dryrun_or_real mkfifo "$path"
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    dryrun_or_real chown $uid "$path"
+-    dryrun_or_real chgrp $gid "$path"
+-    dryrun_or_real chmod $mode "$path"
+-}
+-
+-_b() {
+-    # Create a block device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_c() {
+-    # Create a character device node if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ "$uid" = - ]; then
+-        uid=root
+-    fi
+-    if [ "$gid" = - ]; then
+-        gid=root
+-    fi
+-    if [ "$mode" = - ]; then
+-        mode=0644
+-    fi
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
+-        _restorecon "$path"
+-        dryrun_or_real chown $uid "$path"
+-        dryrun_or_real chgrp $gid "$path"
+-    fi
+-}
+-
+-_C() {
+-    # recursively copy a file or directory
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real cp -r "$arg" "$path"
+-        _restorecon "$path"
+-        if [ $uid != '-' ]; then
+-            dryrun_or_real chown "$uid" "$path"
+-        fi
+-        if [ $gid != '-' ]; then
+-            dryrun_or_real chgrp "$gid" "$path"
+-        fi
+-        if [ $mode != '-' ]; then
+-            dryrun_or_real chmod "$mode" "$path"
+-        fi
+-    fi
+-}
+-
+-_f() {
+-    # Create a file if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -e "$path" ]; then
+-        createfile "$mode" "$uid" "$gid" "$path"
+-        if [ -n "$arg" ]; then
+-            _w "$@"
+-        fi
+-    fi
+-}
+-
+-_F() {
+-    # Create or truncate a file
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    dryrun_or_real rm -f "$path"
+-    createfile "$mode" "$uid" "$gid" "$path"
+-    if [ -n "$arg" ]; then
+-        _w "$@"
+-    fi
+-}
+-
+-_d() {
+-    # Create a directory if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_D() {
+-    # Create or empty a directory
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
+-        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
+-        _restorecon "$path"
+-    fi
+-
+-    if [ $CREATE -gt 0 ]; then
+-        createdirectory "$mode" "$uid" "$gid" "$path"
+-        _restorecon "$path"
+-    fi
+-}
+-
+-_v() {
+-    # Create a subvolume if the path does not exist yet and the file system
+-    # supports this (btrfs). Otherwise create a normal directory.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_q() {
+-    # Similar to _v. However, make sure that the subvolume will be assigned
+-    # to the same higher-level quota groups as the subvolume it has
+-    # been created in.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_Q() {
+-    # Similar to q. However, instead of copying the higher-level quota
+-    # group assignments from the parent as-is, the lowest quota group
+-    # of the parent subvolume is determined that is not the
+-    # leaf quota group.
+-    # TODO: Implement btrfs subvol creation.
+-    _d "$@"
+-}
+-
+-_h() {
+-    # Set file/directory attributes. Lines of this type accept
+-    # shell-style globs in place of normal path names.
+-    # The format of the argument field matches chattr
+-    _chattr '' "$6" "$1"
+-}
+-
+-_H() {
+-    # Recursively set file/directory attributes. Lines of this type accept
+-    # shell-syle globs in place of normal path names.
+-    # Does not follow symlinks
+-    _chattr -R "$6" "$1"
+-}
+-
+-_L() {
+-    # Create a symlink if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ ! -e "$path" ]; then
+-        dryrun_or_real ln -s "$arg" "$path"
+-    fi
+-    _restorecon "$path"
+-}
+-
+-_p() {
+-    # Create a named pipe (FIFO) if it doesn't exist yet
+-    local path=$1 mode=$2 uid=$3 gid=$4
+-
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    if [ ! -p "$path" ]; then
+-        createpipe "$mode" "$uid" "$gid" "$path"
+-    fi
+-}
+-
+-_x() {
+-    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+-    # controlled with the Age parameter. Note that lines of this type do not
+-    # influence the effect of r or R lines. Lines of this type accept shell-style
+-    # globs in place of of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_X() {
+-    # Ignore a path during cleanup. Use this type to prevent path
+-    # removal as controled with the age parameter. Note that if path is
+-    # a directory, the content of the directory is not excluded from
+-    # clean-up, only the directory itself.
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    :
+-    # XXX: we don't implement this
+-}
+-
+-_r() {
+-    # Remove a file or directory if it exists. This may not be used to remove
+-    # non-empty directories, use R for that. Lines of this type accept shell-style
+-    # globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -f "$path" ]; then
+-            dryrun_or_real rm -f "$path" || status="$?"
+-        elif [ -d "$path" ]; then
+-            dryrun_or_real rmdir "$path" || status="$?"
+-        fi
+-    done
+-    return $status
+-}
+-
+-_R() {
+-    # Recursively remove a path and all its subdirectories (if it is a directory).
+-    # Lines of this type accept shell-style globs in place of normal path names.
+-    local path
+-    local paths=$1
+-    local status
+-
+-    [ $REMOVE -gt 0 ] || return 0
+-
+-    status=0
+-    for path in ${paths}; do
+-        if [ -d "$path" ]; then
+-            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
+-    fi
+-    done
+-    return $status
+-}
+-
+-_w() {
+-    # Write the argument parameter to a file, if it exists.
+-    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
+-    if [ -f "$path" ]; then
+-        if [ $DRYRUN -eq 1 ]; then
+-            echo "echo \"$arg\" >>\"$path\""
+-        else
+-            echo "$arg" >>"$path"
+-        fi
+-    fi
+-}
+-
+-_z() {
+-    # Set ownership, access mode and relabel security context of a file or
+-    # directory if it exists. Lines of this type accept shell-style globs in
+-    # place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    relabel "$@"
+-}
+-
+-_Z() {
+-    # Recursively set ownership, access mode and relabel security context of a
+-    # path and all its subdirectories (if it is a directory). Lines of this type
+-    # accept shell-style globs in place of normal path names.
+-    [ $CREATE -gt 0 ] || return 0
+-
+-    CHOPTS=-R relabel "$@"
+-}
+-
+-usage() {
+-    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
+-    exit ${1:-0}
+-}
+-
+-version() {
+-    # We don't record the version info anywhere currently.
+-    echo "opentmpfiles"
+-    exit 0
+-}
+-
+-BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
+-EXCLUDE=
+-PREFIX=
+-FILES=
+-
+-while [ $# -gt 0 ]; do
+-    case $1 in
+-        --boot) BOOT=1 ;;
+-        --create) CREATE=1 ;;
+-        --remove) REMOVE=1 ;;
+-        --clean) CLEAN=1 ;; # TODO: Not implemented
+-        --verbose) VERBOSE=1 ;;
+-        --dryrun|--dry-run) DRYRUN=1 ;;
+-        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
+-        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
+-        -h|--help) usage ;;
+-        --version) version ;;
+-        -*) invalid_option "$1" ;;
+-        *) FILES="${FILES} $1"
+-    esac
+-    shift
+-done
+-
+-if [ $(( CLEAN )) -eq 1 ] ; then
+-    printf '%s clean mode is not implemented\n' "${0##*/}"
+-    exit 1
+-fi
+-
+-if [ "$CREATE$REMOVE" = '00' ]; then
+-    usage 1 >&2
+-fi
+-
+-# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
+-tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
+-tmpfiles_basenames=''
+-
+-if [ -z "${FILES}" ]; then
+-    # Build a list of sorted unique basenames
+-    # directories declared later in the tmpfiles_d array will override earlier
+-    # directories, on a per file basename basis.
+-    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
+-    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-    for d in ${tmpfiles_dirs} ; do
+-        [ -d $d ] && for f in ${d}/*.conf ; do
+-            case "${f##*/}" in
+-                systemd.conf|systemd-*.conf) continue;;
+-            esac
+-            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
+-        done # for f in ${d}
+-    done # for d in ${tmpfiles_dirs}
+-    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
+-fi
+-
+-tmpfiles_d=''
+-
+-for b in ${FILES} ; do
+-    if [ "${b##*/}" != "${b}" ]; then
+-        # The user specified a path on the command line
+-        # Just pass it through unaltered
+-        tmpfiles_d="${tmpfiles_d} ${b}"
+-    else
+-        real_f=''
+-        for d in $tmpfiles_dirs ; do
+-            f=${d}/${b}
+-            [ -f "${f}" ] && real_f=$f
+-        done
+-        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
+-    fi
+-done
+-
+-error=0
+-
+-# loop through the gathered fragments, sorted globally by filename.
+-# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
+-FILE=
+-for FILE in $tmpfiles_d ; do
+-    LINENUM=0
+-
+-    ### FILE FORMAT ###
+-    # XXX: We ignore the 'Age' parameter
+-    # 1    2              3    4    5    6   7
+-    # Cmd  Path           Mode UID  GID  Age Argument
+-    # d    /run/user      0755 root root 10d -
+-    # Mode, UID, GID, Age, Argument may be omitted!
+-    # If Cmd ends with !, the line is only processed if --boot is passed
+-
+-    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
+-    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
+-    while read cmd path mode uid gid age arg; do
+-        LINENUM=$(( LINENUM+1 ))
+-        FORCE=0
+-
+-        # Unless we have both command and path, skip this line.
+-        if [ -z "$cmd" -o -z "$path" ]; then
+-            continue
+-        fi
+-
+-        case $cmd in
+-            \#*) continue ;;
+-        esac
+-
+-        while [ ${#cmd} -gt 1 ]; do
+-            case $cmd in
+-                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
+-                *+) cmd=${cmd%+}; FORCE=1; ;;
+-                *) warninvalid ; continue 2 ;;
+-            esac
+-        done
+-
+-        # whine about invalid entries
+-        case $cmd in
+-            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
+-            *) warninvalid ; continue ;;
+-        esac
+-
+-        # fall back on defaults when parameters are passed as '-'
+-        if [ "$mode" = '-' -o "$mode" = '' ]; then
+-            case "$cmd" in
+-                p|f|F) mode=0644 ;;
+-                d|D|v) mode=0755 ;;
+-                C|z|Z|x|r|R|L) ;;
+-            esac
+-        fi
+-
+-        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
+-        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
+-        [ "$age" = '-' -o "$age" = '' ] && age=0
+-        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
+-        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
+-
+-        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
+-        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
+-
+-        if [ $FORCE -gt 0 ]; then
+-            case $cmd in
+-                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
+-            esac
+-        fi
+-
+-        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
+-        _$cmd "$@"
+-        rc=$?
+-        if [ "${DRYRUN}" -eq "0" ]; then
+-            [ $rc -ne 0 ] && error=$((error + 1))
+-        fi
+-    done <$FILE
+-done
+-
+-exit $error
+-
+-# vim: set ts=2 sw=2 sts=2 noet ft=sh:
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102ed663618 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@scripts@/tmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/package/targets.mak b/package/targets.mak
+index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
+--- a/package/targets.mak
++++ b/package/targets.mak
+@@ -1,7 +1,6 @@
+ SCRIPT_TARGET := \
+ module/boot@/configure/crypt.awk \
+-module/boot@/configure/modules.sh \
+-module/boot@/configure/tmpfiles.sh
++module/boot@/configure/modules.sh
+ 
+ SERVICE_TARGET := service/boot@
+ MODULE_TARGET := $(shell find module/boot@/service -type f)
+diff --git a/service/boot@ b/service/boot@
+index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -147,9 +147,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 01f7cdd1beaf..a88e8b4ed5c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,7 +1,7 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
 version=2.3.1
-revision=1
+revision=2
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
@@ -17,7 +17,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
-
+patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {

From 0274602625b1949bb2a3d98a7cfb0c2a7e6c5166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 14 Jul 2021 00:42:55 +0300
Subject: [PATCH 31/33] remove trailing spaces, thanx @paper42

---
 srcpkgs/boot-66serv/files/switch-initutils    | 11 +++++------
 srcpkgs/boot-66serv/files/switch-initutils-66 |  8 ++++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f6..9876234ddaa3 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc3..42aa4ed2390c 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot

From 63fefaf2b374f812241c2c9a7b5bf75491402de2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 16:06:57 +0300
Subject: [PATCH 32/33] boot-66serv: update to 2.4.0.

Also:
- add back modules.sh (it has moved to a separate repo), add a new
configuration for it
- rebase the patch to remove tmpfiles, add a fix for complete removal
- rebase all commits to master.
---
 srcpkgs/boot-66serv/files/modules.sh          |  85 +++
 .../patches/remove_tmpfiles.d_support.diff    | 654 ++----------------
 srcpkgs/boot-66serv/template                  |  12 +-
 3 files changed, 134 insertions(+), 617 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/modules.sh

diff --git a/srcpkgs/boot-66serv/files/modules.sh b/srcpkgs/boot-66serv/files/modules.sh
new file mode 100644
index 000000000000..0cc4d1a79729
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/modules.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# This scripts is a pure-POSIX sh version
+#
+# Copyright (c) 2015-2021 Eric Vidal <eric@obarun.org>
+# All rights reserved.
+#
+# This file is part of Obarun. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution.
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+
+# Configuration files are read from directories in
+# /etc/modules-load.d, /run/modules-load.d, and /usr/lib/modules-load.d,
+# in order of precedence
+
+MODULES_PATH='/etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d'
+MODULES_NAME=""
+MODULES_RESULT=""
+
+check_elements(){
+    for e in $2; do [ "$e" = "$1" ] && return 0; done; return 1;
+}
+
+build_array() {
+    printf "%s %s" "$1" "$2"
+}
+
+check_file(){
+
+    tidy_loop="" conf=""
+
+    for tidy_loop in $MODULES_PATH; do
+        if [ -d "${tidy_loop}" ]; then
+            for conf in "${tidy_loop}"/*.conf ; do
+                if [ -f "${conf}" ]; then
+                    if ! check_elements "${conf##*/}" "${MODULES_NAME}"; then
+                        MODULES_NAME=$(build_array "${MODULES_NAME}" "${conf##*/}")
+                    fi
+                fi
+            done
+        fi
+    done
+
+    unset tidy_loop conf
+}
+
+check_path(){
+    path="" tidy_loop=""
+    for path in ${MODULES_PATH}; do
+        for tidy_loop in ${MODULES_NAME}; do
+            if [ -f "${path}/${tidy_loop}" ]; then
+                if ! check_elements "${tidy_loop}" "${MODULES_RESULT##*/}";then
+                    MODULES_RESULT=$(build_array "${MODULES_RESULT}" "${path}/${tidy_loop}")
+                fi
+            fi
+        done
+    done
+    unset path tidy_loop
+}
+
+check_file
+
+if [ -n "${MODULES_NAME}" ]; then
+    check_path
+else
+    printf "$0: %s\n" "No modules found -- nothing to do"
+    exit 0
+fi
+
+for mod in ${MODULES_RESULT}; do
+    while read -r line; do
+        comment=$(printf "%s" "$line" | awk  '{ string=substr($0, 0, 1); print string; }' )
+        if [ "${comment}" = "#" ] || [ -z "${line}" ];then
+            continue
+        fi
+        for check in ${line};do
+            modprobe -b "${check}" -v | sed 's:insmod [^ ]*/:Load modules :g; s:\.ko\(\.gz\)\? ::g'
+        done
+    done < "${mod}"
+done
+
+exit 0
diff --git a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
index 79e6af9de99c..6ed257fc2d39 100644
--- a/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
+++ b/srcpkgs/boot-66serv/patches/remove_tmpfiles.d_support.diff
@@ -1,20 +1,28 @@
 diff --git a/Makefile b/Makefile
-index f6141c57be6e868ef3957f5e53469587779f0381..a461615cce22e40de642e32965e3dfb25c078219 100644
+index f137878ddd68d8da9c28bee8ec9df7d1165cb073..066d8d888755d442d8f7c28efb16e2c934a6faed 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -71,7 +71,6 @@ $(DESTDIR)$(service_directory)/%: service/%
-    -e "s,@FORCECHCK@,$(FORCECHCK)," \
-    -e "s,@LOCAL@,$(LOCAL)," \
-    -e "s,@CONTAINER@,$(CONTAINER)," \
--   -e "s,@TMPFILE@,$(TMPFILE)," \
-    -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
-    -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
-    -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@script_directory@,$(script_directory)," \
+        -e "s,@skel_directory@,$(skel_directory)," \
+        -e "s,@livedir@,$(livedir)," \
+-       -e "s,@tmpfiles_path@,$(tmpfiles)," \
+        -e "s,@modules_path@,$(modules)," \
+        -e "s,@VERSION@,$(version)," \
+        -e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+        -e "s,@FORCECHCK@,$(FORCECHCK)," \
+        -e "s,@LOCAL@,$(LOCAL)," \
+        -e "s,@CONTAINER@,$(CONTAINER)," \
+-       -e "s,@TMPFILE@,$(TMPFILE)," \
+        -e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+        -e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+        -e "s,@RANDOMSEED@,$(RANDOMSEED)," \
 diff --git a/configure b/configure
-index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8c28c0257 100755
+index 9622be37e2d6414b0f7b3c3a034a9dce6f09bc19..2d26020df61da8b3dc3441db9a52c16cfa4d6363 100755
 --- a/configure
 +++ b/configure
-@@ -40,7 +40,6 @@ Fine tunning of boot configuration:
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
    --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
    --LOCAL=BOOLEAN                  use rc.local scripts [!no]
    --CONTAINER=BOOLEAN              boot inside a container [!no]
@@ -22,7 +30,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
    --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
    --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
    --RANDOMSEED=BOOLEAN             set random seed [!yes]
-@@ -155,7 +154,6 @@ SYSCTL='!yes'
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
  FORCECHCK='!no'
  LOCAL='!no'
  CONTAINER='!no'
@@ -30,7 +38,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
  MODULE_KERNEL='!yes'
  MODULE_SYSTEM='!yes'
  RANDOMSEED='!yes'
-@@ -212,7 +210,6 @@ for arg ; do
+@@ -218,7 +216,6 @@ for arg ; do
      --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
      --LOCAL=*) LOCAL=${arg#*=} ;;
      --CONTAINER=*) CONTAINER=${arg#*=} ;;
@@ -38,7 +46,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
      --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
      --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
      --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
-@@ -291,7 +288,7 @@ done
+@@ -297,7 +294,7 @@ done
  
  for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
          KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
@@ -47,7 +55,7 @@ index 7a0a8da702c35d2d1c456430e927fb3cb635a21f..308868bea02b95ebeda70eaf5205c7f8
          FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
          CRYPTTAB FIREWALL \
          CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-@@ -356,7 +353,6 @@ $SYSCTL
+@@ -364,7 +361,6 @@ $SYSCTL
  $FORCECHCK
  $LOCAL
  $CONTAINER
@@ -60,16 +68,16 @@ index 43f6480c6586a2afe141cc7e6b40e518574b4e45..a0b333e1fb06ca4551ff280b5afb2264
 --- a/doc/boot@.md
 +++ b/doc/boot@.md
 @@ -136,10 +136,6 @@ Two different kinds of variables are used:
-  - type: boolean.
-  - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+    - type: boolean.
+    - description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
  
 -- **TMPFILES**:
-- - type: boolean.
-- - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-   - type: boolean.
+-   - description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
 -
  - **MODULE_KERNEL**:
-  - type: boolean.
-  - description: load the kernel modules returned by the `kmod static-nodes` command.
+    - type: boolean.
+    - description: load the kernel modules returned by the `kmod static-nodes` command.
 diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
 index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab54f8ede8 100755
 --- a/module/boot@/configure/configure
@@ -91,581 +99,6 @@ index e6fed96bddf9d2ada8bba10c450471a5bed654d6..18d27366d29cd5d850d4c261ce71aaab
          MODULE_KERNEL) SV_REAL="modules-kernel" ;;
          MODULE_SYSTEM) SV_REAL="modules-system" ;;
          RANDOMSEED) SV_REAL="system-random" ;;
-diff --git a/module/boot@/configure/tmpfiles.sh b/module/boot@/configure/tmpfiles.sh
-deleted file mode 100755
-index 4b684365a0dc76466a190aea292e1ea2bf24684a..0000000000000000000000000000000000000000
---- a/module/boot@/configure/tmpfiles.sh
-+++ /dev/null
-@@ -1,569 +0,0 @@
--#!@BINDIR@/sh
--# This is a reimplementation of the systemd tmpfiles.d code
--# Control creation, deletion, and cleaning of volatile and temporary files
--#
--# Copyright (c) 2012 Gentoo Foundation
--# Released under the 2-clause BSD license.
--#
--# This instance is a pure-POSIX sh version, written by Robin H Johnson
--# <robbat2@gentoo.org>, based on the Arch Linux version as of 2012/01/01:
--# http://projects.archlinux.org/initscripts.git/tree/arch-tmpfiles
--#
--# See the tmpfiles.d manpage as well:
--# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--# This script should match the old manpage
--# http://0pointer.de/public/systemd-man/tmpfiles.d.html
--# as of 2012/03/12 and also implements some more recent features
--#
--
--DRYRUN=0
--
--checkprefix() {
--    n=$1
--    shift
--    for x in $@; do
--        case $n in
--            ${x}*) return 0 ;;
--    esac
--    done
--    return 1
--}
--
--warninvalid() {
--    printf "tmpfiles: ignoring invalid entry on line %d of \`%s'\n" "$LINENUM" "$FILE"
--    error=$(( error+1 ))
--} >&2
--
--invalid_option() {
--    printf "tmpfiles: invalid option '%s'\n" "$1" >&2
--    exit 1
--}
--
--dryrun_or_real() {
--    local dryrun=
--    if [ $DRYRUN -eq 1 ]; then
--        dryrun=echo
--    fi
--    $dryrun "$@"
--}
--
--_chattr() {
--    local attr="$2"
--    case $attr in
--        [+-=]*) : ;;
--        '') return ;;
--        *) attr="+$attr" ;;
--    esac
--    local IFS=
--    dryrun_or_real chattr $1 "$attr" -- $3
--}
--
--relabel() {
--    local path
--    local paths=$1 mode=$2 uid=$3 gid=$4
--    local status
--
--    status=0
--    for path in ${paths}; do
--        if [ -e "$path" ]; then
--            if [ -x /sbin/restorecon ]; then
--                dryrun_or_real restorecon $CHOPTS "$path" || status="$?"
--            fi
--            if [ $uid != '-' ]; then
--                dryrun_or_real chown $CHOPTS "$uid" "$path" || status="$?"
--            fi
--            if [ $gid != '-' ]; then
--                dryrun_or_real chgrp $CHOPTS "$gid" "$path" || status="$?"
--            fi
--            if [ $mode != '-' ]; then
--                dryrun_or_real chmod $CHOPTS "$mode" "$path" || status="$?"
--            fi
--        fi
--    done
--    return $status
--}
--
--splitpath() {
--    local path=$1
--    while [ -n "$path" ]; do
--        echo $path
--        path=${path%/*}
--    done
--}
--
--_restorecon() {
--    local path=$1
--    if [ -x /sbin/restorecon ]; then
--        dryrun_or_real restorecon -F $(splitpath "$path")
--    fi
--}
--
--createdirectory() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    [ -d "$path" ] || dryrun_or_real mkdir -p "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0755
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createfile() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real touch "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--createpipe() {
--    local mode="$1" uid="$2" gid="$3" path="$4"
--    dryrun_or_real mkfifo "$path"
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    dryrun_or_real chown $uid "$path"
--    dryrun_or_real chgrp $gid "$path"
--    dryrun_or_real chmod $mode "$path"
--}
--
--_b() {
--    # Create a block device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_c() {
--    # Create a character device node if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ "$uid" = - ]; then
--        uid=root
--    fi
--    if [ "$gid" = - ]; then
--        gid=root
--    fi
--    if [ "$mode" = - ]; then
--        mode=0644
--    fi
--    if [ ! -e "$path" ]; then
--        dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:}
--        _restorecon "$path"
--        dryrun_or_real chown $uid "$path"
--        dryrun_or_real chgrp $gid "$path"
--    fi
--}
--
--_C() {
--    # recursively copy a file or directory
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real cp -r "$arg" "$path"
--        _restorecon "$path"
--        if [ $uid != '-' ]; then
--            dryrun_or_real chown "$uid" "$path"
--        fi
--        if [ $gid != '-' ]; then
--            dryrun_or_real chgrp "$gid" "$path"
--        fi
--        if [ $mode != '-' ]; then
--            dryrun_or_real chmod "$mode" "$path"
--        fi
--    fi
--}
--
--_f() {
--    # Create a file if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -e "$path" ]; then
--        createfile "$mode" "$uid" "$gid" "$path"
--        if [ -n "$arg" ]; then
--            _w "$@"
--        fi
--    fi
--}
--
--_F() {
--    # Create or truncate a file
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--
--    [ $CREATE -gt 0 ] || return 0
--
--    dryrun_or_real rm -f "$path"
--    createfile "$mode" "$uid" "$gid" "$path"
--    if [ -n "$arg" ]; then
--        _w "$@"
--    fi
--}
--
--_d() {
--    # Create a directory if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_D() {
--    # Create or empty a directory
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    if [ -d "$path" ] && [ $REMOVE -gt 0 ]; then
--        dryrun_or_real find "$path" -mindepth 1 -maxdepth 1 -xdev -exec rm -rf {} +
--        _restorecon "$path"
--    fi
--
--    if [ $CREATE -gt 0 ]; then
--        createdirectory "$mode" "$uid" "$gid" "$path"
--        _restorecon "$path"
--    fi
--}
--
--_v() {
--    # Create a subvolume if the path does not exist yet and the file system
--    # supports this (btrfs). Otherwise create a normal directory.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_q() {
--    # Similar to _v. However, make sure that the subvolume will be assigned
--    # to the same higher-level quota groups as the subvolume it has
--    # been created in.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_Q() {
--    # Similar to q. However, instead of copying the higher-level quota
--    # group assignments from the parent as-is, the lowest quota group
--    # of the parent subvolume is determined that is not the
--    # leaf quota group.
--    # TODO: Implement btrfs subvol creation.
--    _d "$@"
--}
--
--_h() {
--    # Set file/directory attributes. Lines of this type accept
--    # shell-style globs in place of normal path names.
--    # The format of the argument field matches chattr
--    _chattr '' "$6" "$1"
--}
--
--_H() {
--    # Recursively set file/directory attributes. Lines of this type accept
--    # shell-syle globs in place of normal path names.
--    # Does not follow symlinks
--    _chattr -R "$6" "$1"
--}
--
--_L() {
--    # Create a symlink if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ ! -e "$path" ]; then
--        dryrun_or_real ln -s "$arg" "$path"
--    fi
--    _restorecon "$path"
--}
--
--_p() {
--    # Create a named pipe (FIFO) if it doesn't exist yet
--    local path=$1 mode=$2 uid=$3 gid=$4
--
--    [ $CREATE -gt 0 ] || return 0
--
--    if [ ! -p "$path" ]; then
--        createpipe "$mode" "$uid" "$gid" "$path"
--    fi
--}
--
--_x() {
--    # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
--    # controlled with the Age parameter. Note that lines of this type do not
--    # influence the effect of r or R lines. Lines of this type accept shell-style
--    # globs in place of of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_X() {
--    # Ignore a path during cleanup. Use this type to prevent path
--    # removal as controled with the age parameter. Note that if path is
--    # a directory, the content of the directory is not excluded from
--    # clean-up, only the directory itself.
--    # Lines of this type accept shell-style globs in place of normal path names.
--    :
--    # XXX: we don't implement this
--}
--
--_r() {
--    # Remove a file or directory if it exists. This may not be used to remove
--    # non-empty directories, use R for that. Lines of this type accept shell-style
--    # globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -f "$path" ]; then
--            dryrun_or_real rm -f "$path" || status="$?"
--        elif [ -d "$path" ]; then
--            dryrun_or_real rmdir "$path" || status="$?"
--        fi
--    done
--    return $status
--}
--
--_R() {
--    # Recursively remove a path and all its subdirectories (if it is a directory).
--    # Lines of this type accept shell-style globs in place of normal path names.
--    local path
--    local paths=$1
--    local status
--
--    [ $REMOVE -gt 0 ] || return 0
--
--    status=0
--    for path in ${paths}; do
--        if [ -d "$path" ]; then
--            dryrun_or_real rm -rf --one-file-system "$path" || status="$?"
--    fi
--    done
--    return $status
--}
--
--_w() {
--    # Write the argument parameter to a file, if it exists.
--    local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6
--    if [ -f "$path" ]; then
--        if [ $DRYRUN -eq 1 ]; then
--            echo "echo \"$arg\" >>\"$path\""
--        else
--            echo "$arg" >>"$path"
--        fi
--    fi
--}
--
--_z() {
--    # Set ownership, access mode and relabel security context of a file or
--    # directory if it exists. Lines of this type accept shell-style globs in
--    # place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    relabel "$@"
--}
--
--_Z() {
--    # Recursively set ownership, access mode and relabel security context of a
--    # path and all its subdirectories (if it is a directory). Lines of this type
--    # accept shell-style globs in place of normal path names.
--    [ $CREATE -gt 0 ] || return 0
--
--    CHOPTS=-R relabel "$@"
--}
--
--usage() {
--    printf 'usage: %s [--exclude-prefix=path] [--prefix=path] [--boot] [--create] [--remove] [--clean] [--verbose] [--dry-run]\n' "${0##*/}"
--    exit ${1:-0}
--}
--
--version() {
--    # We don't record the version info anywhere currently.
--    echo "opentmpfiles"
--    exit 0
--}
--
--BOOT=0 CREATE=0 REMOVE=0 CLEAN=0 VERBOSE=0 DRYRUN=0 error=0 LINENO=0
--EXCLUDE=
--PREFIX=
--FILES=
--
--while [ $# -gt 0 ]; do
--    case $1 in
--        --boot) BOOT=1 ;;
--        --create) CREATE=1 ;;
--        --remove) REMOVE=1 ;;
--        --clean) CLEAN=1 ;; # TODO: Not implemented
--        --verbose) VERBOSE=1 ;;
--        --dryrun|--dry-run) DRYRUN=1 ;;
--        --exclude-prefix=*) EXCLUDE="${EXCLUDE}${1##--exclude-prefix=} " ;;
--        --prefix=*) PREFIX="${PREFIX}${1##--prefix=} " ;;
--        -h|--help) usage ;;
--        --version) version ;;
--        -*) invalid_option "$1" ;;
--        *) FILES="${FILES} $1"
--    esac
--    shift
--done
--
--if [ $(( CLEAN )) -eq 1 ] ; then
--    printf '%s clean mode is not implemented\n' "${0##*/}"
--    exit 1
--fi
--
--if [ "$CREATE$REMOVE" = '00' ]; then
--    usage 1 >&2
--fi
--
--# XXX: The harcoding of /usr/lib/ is an explicit choice by upstream
--tmpfiles_dirs='/usr/lib/tmpfiles.d /run/tmpfiles.d /etc/tmpfiles.d'
--tmpfiles_basenames=''
--
--if [ -z "${FILES}" ]; then
--    # Build a list of sorted unique basenames
--    # directories declared later in the tmpfiles_d array will override earlier
--    # directories, on a per file basename basis.
--    # `/etc/tmpfiles.d/foo.conf' supersedes `/usr/lib/tmpfiles.d/foo.conf'.
--    # `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--    for d in ${tmpfiles_dirs} ; do
--        [ -d $d ] && for f in ${d}/*.conf ; do
--            case "${f##*/}" in
--                systemd.conf|systemd-*.conf) continue;;
--            esac
--            [ -f $f ] && tmpfiles_basenames="${tmpfiles_basenames}\n${f##*/}"
--        done # for f in ${d}
--    done # for d in ${tmpfiles_dirs}
--    FILES="$(printf "${tmpfiles_basenames}\n" | sort -u )"
--fi
--
--tmpfiles_d=''
--
--for b in ${FILES} ; do
--    if [ "${b##*/}" != "${b}" ]; then
--        # The user specified a path on the command line
--        # Just pass it through unaltered
--        tmpfiles_d="${tmpfiles_d} ${b}"
--    else
--        real_f=''
--        for d in $tmpfiles_dirs ; do
--            f=${d}/${b}
--            [ -f "${f}" ] && real_f=$f
--        done
--        [ -f "${real_f}" ] && tmpfiles_d="${tmpfiles_d} ${real_f}"
--    fi
--done
--
--error=0
--
--# loop through the gathered fragments, sorted globally by filename.
--# `/run/tmpfiles/foo.conf' will always be read after `/etc/tmpfiles.d/bar.conf'
--FILE=
--for FILE in $tmpfiles_d ; do
--    LINENUM=0
--
--    ### FILE FORMAT ###
--    # XXX: We ignore the 'Age' parameter
--    # 1    2              3    4    5    6   7
--    # Cmd  Path           Mode UID  GID  Age Argument
--    # d    /run/user      0755 root root 10d -
--    # Mode, UID, GID, Age, Argument may be omitted!
--    # If Cmd ends with !, the line is only processed if --boot is passed
--
--    # XXX: Upstream says whitespace is NOT permitted in the Path argument.
--    # But IS allowed when globs are expanded for the x/r/R/z/Z types.
--    while read cmd path mode uid gid age arg; do
--        LINENUM=$(( LINENUM+1 ))
--        FORCE=0
--
--        # Unless we have both command and path, skip this line.
--        if [ -z "$cmd" -o -z "$path" ]; then
--            continue
--        fi
--
--        case $cmd in
--            \#*) continue ;;
--        esac
--
--        while [ ${#cmd} -gt 1 ]; do
--            case $cmd in
--                *!) cmd=${cmd%!}; [ "$BOOT" -eq "1" ] || continue 2 ;;
--                *+) cmd=${cmd%+}; FORCE=1; ;;
--                *) warninvalid ; continue 2 ;;
--            esac
--        done
--
--        # whine about invalid entries
--        case $cmd in
--            f|F|w|d|D|v|p|L|c|C|b|x|X|r|R|z|Z|q|Q|h|H) ;;
--            *) warninvalid ; continue ;;
--        esac
--
--        # fall back on defaults when parameters are passed as '-'
--        if [ "$mode" = '-' -o "$mode" = '' ]; then
--            case "$cmd" in
--                p|f|F) mode=0644 ;;
--                d|D|v) mode=0755 ;;
--                C|z|Z|x|r|R|L) ;;
--            esac
--        fi
--
--        [ "$uid" = '-' -o "$uid" = '' ] && uid=0
--        [ "$gid" = '-' -o "$gid" = '' ] && gid=0
--        [ "$age" = '-' -o "$age" = '' ] && age=0
--        [ "$arg" = '-' -o "$arg" = '' ] && arg=''
--        set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg"
--
--        [ -n "$EXCLUDE" ] && checkprefix $path $EXCLUDE && continue
--        [ -n "$PREFIX" ] && ! checkprefix $path $PREFIX && continue
--
--        if [ $FORCE -gt 0 ]; then
--            case $cmd in
--                p|L|c|b) [ -f "$path" ] && dryrun_or_real rm -f "$path"
--            esac
--        fi
--
--        [ "$VERBOSE" -eq "1" ] && echo _$cmd "$@"
--        _$cmd "$@"
--        rc=$?
--        if [ "${DRYRUN}" -eq "0" ]; then
--            [ $rc -ne 0 ] && error=$((error + 1))
--        fi
--    done <$FILE
--done
--
--exit $error
--
--# vim: set ts=2 sw=2 sts=2 noet ft=sh:
 diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
 index 95a2a1b37042aa5718e4f626e4b823057820fff9..2e08187f6838241a524ff79a97f888f22d25a662 100644
 --- a/module/boot@/service/all-Local
@@ -692,7 +125,7 @@ index fe38ef4ba439197759780579326ed055a0cc1afb..ed87f7ee6f0595d037d1ed1c56c1f102
  @user = ( root )
 diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
 deleted file mode 100644
-index 4b471408a3efac3734c0a8ed76c4529bf2241b83..0000000000000000000000000000000000000000
+index 35a58e7281473d9ce808000c855bf448589b267e..0000000000000000000000000000000000000000
 --- a/module/boot@/service/local/local-tmpfiles
 +++ /dev/null
 @@ -1,23 +0,0 @@
@@ -717,26 +150,21 @@ index 4b471408a3efac3734c0a8ed76c4529bf2241b83..00000000000000000000000000000000
 -)
 -
 -[environment]
--script_file=!@scripts@/tmpfiles.sh
+-script_file=!@tmpfiles@/opentmpfiles.sh
 -script_args=!--create --verbose --boot
-diff --git a/package/targets.mak b/package/targets.mak
-index 366f2f45b0cfc7839500c1505749a7990e9323db..376b312f9838824620603a986f87b03b9ac1e07b 100644
---- a/package/targets.mak
-+++ b/package/targets.mak
-@@ -1,7 +1,6 @@
- SCRIPT_TARGET := \
- module/boot@/configure/crypt.awk \
--module/boot@/configure/modules.sh \
--module/boot@/configure/tmpfiles.sh
-+module/boot@/configure/modules.sh
- 
- SERVICE_TARGET := service/boot@
- MODULE_TARGET := $(shell find module/boot@/service -type f)
 diff --git a/service/boot@ b/service/boot@
-index 306359e210564922dbd58e5a92ecdb802ec8183f..da67f147f4278338cec746b4d03cf50b58aa0e86 100644
+index f08eac1d2f3d480ceffe41bb0b7890931d838607..da3e5e957d31deb8597279ecd72dbb268319d90a 100644
 --- a/service/boot@
 +++ b/service/boot@
-@@ -147,9 +147,6 @@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
  
  @CONTAINER@
  
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index a88e8b4ed5c0..e49ced874a37 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,11 +1,12 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.1
-revision=2
+version=2.4.0
+revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --modules-script=/usr/share/66/script/"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -16,7 +17,7 @@ license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
 patch_args=" -Np1"
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
@@ -39,6 +40,9 @@ post_install() {
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
+	# Install modules.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/modules.sh 755 usr/share/66/script/
+
 	# Install license file
 	vlicense LICENSE
 }

From d5f56327f3205727b568ffc04c5c4443a8e2eb4f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 15 Sep 2021 22:18:41 +0300
Subject: [PATCH 33/33] boot-66serv: remove redundant switch from
 configure_args.

tmpfiles.d support is already removed.
---
 srcpkgs/boot-66serv/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index e49ced874a37..42de931109b1 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --KEYMAP=!us --TZ=!Europe/Madrid
  --modules-script=/usr/share/66/script/"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (97 preceding siblings ...)
  2021-11-19 18:01 ` [PR PATCH] [Updated] " mobinmob
@ 2021-11-19 18:04 ` mobinmob
  2021-11-24  2:09 ` thegarlynch
                   ` (72 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-11-19 18:04 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-974291025

Comment:
- Rebase on master.
- Fix and rename the tmpfiles.d code removal patch.

New binary packages (20211110 suffix) have been pushed to the [void-66 repo](https://codeberg.org/mobinmob/void-66) ([doc](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-conf.md)).

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (98 preceding siblings ...)
  2021-11-19 18:04 ` mobinmob
@ 2021-11-24  2:09 ` thegarlynch
  2021-11-24  5:39 ` mobinmob
                   ` (71 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: thegarlynch @ 2021-11-24  2:09 UTC (permalink / raw)
  To: ml

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

New comment by thegarlynch on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-977398687

Comment:
Just one more successful build and i have something to do for weekend

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (99 preceding siblings ...)
  2021-11-24  2:09 ` thegarlynch
@ 2021-11-24  5:39 ` mobinmob
  2021-11-24 13:51 ` mobinmob
                   ` (70 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-11-24  5:39 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-974291025

Comment:
- Rebase on master.
- Fix and rename the tmpfiles.d code removal patch.

New binary packages (20211119 suffix) have been pushed to the [void-66 repo](https://codeberg.org/mobinmob/void-66) ([doc](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-conf.md)).θ

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (100 preceding siblings ...)
  2021-11-24  5:39 ` mobinmob
@ 2021-11-24 13:51 ` mobinmob
  2022-02-20 10:37 ` mobinmob
                   ` (69 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2021-11-24 13:51 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-974291025

Comment:
- Rebase on master.
- Fix and rename the tmpfiles.d code removal patch.

New binary packages (20211119 suffix) have been pushed to the [void-66 repo](https://codeberg.org/mobinmob/void-66) ([doc](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-conf.md)).

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (101 preceding siblings ...)
  2021-11-24 13:51 ` mobinmob
@ 2022-02-20 10:37 ` mobinmob
  2022-02-20 10:37 ` [PR PATCH] [Updated] " mobinmob
                   ` (68 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-20 10:37 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1046208453

Comment:
#### Changes for the PR:
- Squashed all commits in oder to have one commit per package. Full history of the changes is retained in the[ 66-voidlinux repo in codeberg ](url) where all new development will take place before updating this PR.
- Rebased on master.

#### Changes for boot-66serv:
- `66boot-initial-setup` is improved significantly.
- Two new configuration scripts are added:
    - `66boot-rcdotconf,` which uses the values of `/etc/rc.conf` to configure boot@system and
    - `66boot-storage-autoconf` which will discover btrfs, zfs, dmraid, cryptsetup volumes and swap partitions/files and configure 66boot-66serv accordingly.
 
Using the three 66boot scripts and re-enabling boot@system should be enough to configure boot@system.

- The upstream `system-sysctl` service now executes the script from runit-void, and the `modules-load` script is used in place of the modules.sh obarun script. Due to these changes` 66-enable -t boot -F boot@system` **needs to run after the update**.

The packages in the void-66 repository will be updated tommorow - the new boot-66serv package with have the version suffix 20220220.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (102 preceding siblings ...)
  2022-02-20 10:37 ` mobinmob
@ 2022-02-20 10:37 ` mobinmob
  2022-02-20 10:41 ` mobinmob
                   ` (67 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-20 10:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 34840 bytes --]

From b14843927d3abf0a314aa995b997fec80dfae474 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:20 +0200
Subject: [PATCH 1/3] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From e28e7ffee5b5821b49050472d93870c04074496d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:37 +0200
Subject: [PATCH 2/3] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 5782a5cdc667f82e9ce50199dd9966eec70af6b0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:49 +0200
Subject: [PATCH 3/3] New package: boot-66serv-2.4.0

based on:
- https://github.com/void-linux/void-packages/pull/23122
- https://github.com/void-linux/void-packages/pull/21142

    [ci-skip]
---
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 ++++++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 ++++++++++++++
 srcpkgs/boot-66serv/files/runit               |  34 +++
 srcpkgs/boot-66serv/files/switch-initutils    |  13 ++
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 +++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 +++
 .../0001-Remove-tmpfiles.d-support.patch      | 196 ++++++++++++++++++
 ...nt-efivars-rw-to-follow-voidlinux-be.patch |  27 +++
 ...se-the-voidlinux-modules-load-script.patch |  29 +++
 ...e-the-sysctl-script-from-the-void-ru.patch |  27 +++
 srcpkgs/boot-66serv/template                  |  51 +++++
 13 files changed, 762 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..ccdb34faedba
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..35890b9fe7b7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,34 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..42aa4ed2390c
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
new file mode 100644
index 000000000000..dc32d5229c58
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
@@ -0,0 +1,196 @@
+From 002dd3aa63530b471ed2e36334b7250ba454c1cd Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 19 Nov 2021 19:14:37 +0200
+Subject: [PATCH 1/4] Remove tmpfiles.d support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  6 +-----
+ doc/boot@.md                              |  4 ----
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  4 ----
+ 8 files changed, 2 insertions(+), 42 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index f137878..066d8d8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 9622be3..2d26020 100755
+--- a/configure
++++ b/configure
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -218,7 +216,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -297,7 +294,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -364,7 +361,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..a0b333e 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+ 	- description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..18d2736 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 35a58e7..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@tmpfiles@/opentmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..da3e5e9 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
new file mode 100644
index 000000000000..f995dee11d6e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
@@ -0,0 +1,27 @@
+From 9a1ff29bd52ff28ffb0ffdfef658648527afff30 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 16 Feb 2022 19:45:09 +0200
+Subject: [PATCH 2/4] populate-sys: mount efivars rw to follow voidlinux
+ behavior.
+
+Problem found and reported by @paper42.
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
new file mode 100644
index 000000000000..8a16b4ba15cb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
@@ -0,0 +1,29 @@
+From 189e11ef2a90b75bad1d4d2c7382d7ebc513cec6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:11:09 +0200
+Subject: [PATCH 3/4] modules-system: use the voidlinux modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index e97fa7a..80be09f 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,9 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${script_file}
++        modules-load -v
+ 
+     }
+     66-yeller -fcdp modules-system -1 /dev/console crashed!
+ )
+ 
+-[environment]
+-script_file=!@modules@/modules.sh
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
new file mode 100644
index 000000000000..70b9137016f5
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
@@ -0,0 +1,27 @@
+From 5fedd6afb48de3ddfb717ad07db7141fbb5653f1 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:12:08 +0200
+Subject: [PATCH 4/4] system-sysctl: use the sysctl script from the void-runit
+ project.
+
+---
+ module/boot@/service/system/system-sysctl | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index 02b7f9b..8318952 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,8 +12,7 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl -p
++	/usr/share/66/script/sysctl.sh	
+ 
+     }
+     66-yeller -fcdp system-sysctl -1 /dev/console crashed!
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 000000000000..f819d06972d5
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,51 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.0
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install license file
+	vlicense LICENSE
+}

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (103 preceding siblings ...)
  2022-02-20 10:37 ` [PR PATCH] [Updated] " mobinmob
@ 2022-02-20 10:41 ` mobinmob
  2022-02-20 19:29 ` mobinmob
                   ` (66 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-20 10:41 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1046208453

Comment:
#### Changes for the PR:
- Squashed all commits in oder to have one commit per package. Full history of the changes is retained in the[ 66-voidlinux repo in codeberg ](url) where all new development will take place before updating this PR.
- Rebased on master.

#### Changes for boot-66serv:
- `66boot-initial-setup` is improved significantly.
- Two new configuration scripts are added:
    - `66boot-rcdotconf,` which uses the values of `/etc/rc.conf` to configure boot@system and
    - `66boot-storage-autoconf` which will discover btrfs, zfs, dmraid, luks, lvm volumes and swap partitions/files and configure 66boot-66serv accordingly.
 
Using the three 66boot scripts and re-enabling boot@system should be enough to configure boot@system.

- The upstream `system-sysctl` service now executes the script from runit-void, and the `modules-load` script is used in place of the modules.sh obarun script. Due to these changes` 66-enable -t boot -F boot@system` **needs to run after the update**.

The packages in the void-66 repository will be updated tommorow - the new boot-66serv package with have the version suffix 20220220.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (104 preceding siblings ...)
  2022-02-20 10:41 ` mobinmob
@ 2022-02-20 19:29 ` mobinmob
  2022-02-21 17:51 ` [PR PATCH] [Updated] " mobinmob
                   ` (65 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-20 19:29 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1046208453

Comment:
#### Changes for the PR:
- Squashed all commits in order to have one commit per package. Full history of the changes is retained in the[ 66-voidlinux repo in codeberg ](url) where all new development will take place before updating this PR.
- Rebased on master.

#### Changes for boot-66serv:
- `66boot-initial-setup` is improved significantly.
- Two new configuration scripts are added:
    - `66boot-rcdotconf,` which uses the values of `/etc/rc.conf` to configure boot@system and
    - `66boot-storage-autoconf` which will discover btrfs, zfs, dmraid, luks, lvm volumes and swap partitions/files and configure 66boot-66serv accordingly.
 
Using the three 66boot scripts and re-enabling boot@system should be enough to configure boot@system.

- The upstream `system-sysctl` service now executes the script from runit-void, and the `modules-load` script is used in place of the modules.sh obarun script. Due to these changes` 66-enable -t boot -F boot@system` **needs to run after the update**.

The packages in the void-66 repository will be updated tommorow - the new boot-66serv package with have the version suffix 20220220.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (105 preceding siblings ...)
  2022-02-20 19:29 ` mobinmob
@ 2022-02-21 17:51 ` mobinmob
  2022-02-21 17:56 ` mobinmob
                   ` (64 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-21 17:51 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 35388 bytes --]

From b14843927d3abf0a314aa995b997fec80dfae474 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:20 +0200
Subject: [PATCH 1/3] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From e28e7ffee5b5821b49050472d93870c04074496d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:37 +0200
Subject: [PATCH 2/3] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From d07aa3cb7350cfd807cfe87af46c533fed0254de Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:49 +0200
Subject: [PATCH 3/3] New package: boot-66serv-2.4.0

based on:
- https://github.com/void-linux/void-packages/pull/23122
- https://github.com/void-linux/void-packages/pull/21142

    [ci-skip]
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 ++++++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 ++++++++++++++
 srcpkgs/boot-66serv/files/runit               |  34 +++
 srcpkgs/boot-66serv/files/switch-initutils    |  13 ++
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 +++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 +++
 .../0001-Remove-tmpfiles.d-support.patch      | 196 ++++++++++++++++++
 ...nt-efivars-rw-to-follow-voidlinux-be.patch |  27 +++
 ...se-the-voidlinux-modules-load-script.patch |  29 +++
 ...e-the-sysctl-script-from-the-void-ru.patch |  27 +++
 srcpkgs/boot-66serv/template                  |  54 +++++
 14 files changed, 767 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..ccdb34faedba
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..35890b9fe7b7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,34 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..42aa4ed2390c
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
new file mode 100644
index 000000000000..dc32d5229c58
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
@@ -0,0 +1,196 @@
+From 002dd3aa63530b471ed2e36334b7250ba454c1cd Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 19 Nov 2021 19:14:37 +0200
+Subject: [PATCH 1/4] Remove tmpfiles.d support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  6 +-----
+ doc/boot@.md                              |  4 ----
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  4 ----
+ 8 files changed, 2 insertions(+), 42 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index f137878..066d8d8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 9622be3..2d26020 100755
+--- a/configure
++++ b/configure
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -218,7 +216,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -297,7 +294,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -364,7 +361,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..a0b333e 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+ 	- description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..18d2736 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 35a58e7..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@tmpfiles@/opentmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..da3e5e9 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
new file mode 100644
index 000000000000..f995dee11d6e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
@@ -0,0 +1,27 @@
+From 9a1ff29bd52ff28ffb0ffdfef658648527afff30 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 16 Feb 2022 19:45:09 +0200
+Subject: [PATCH 2/4] populate-sys: mount efivars rw to follow voidlinux
+ behavior.
+
+Problem found and reported by @paper42.
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
new file mode 100644
index 000000000000..8a16b4ba15cb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
@@ -0,0 +1,29 @@
+From 189e11ef2a90b75bad1d4d2c7382d7ebc513cec6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:11:09 +0200
+Subject: [PATCH 3/4] modules-system: use the voidlinux modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index e97fa7a..80be09f 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,9 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${script_file}
++        modules-load -v
+ 
+     }
+     66-yeller -fcdp modules-system -1 /dev/console crashed!
+ )
+ 
+-[environment]
+-script_file=!@modules@/modules.sh
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
new file mode 100644
index 000000000000..70b9137016f5
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
@@ -0,0 +1,27 @@
+From 5fedd6afb48de3ddfb717ad07db7141fbb5653f1 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:12:08 +0200
+Subject: [PATCH 4/4] system-sysctl: use the sysctl script from the void-runit
+ project.
+
+---
+ module/boot@/service/system/system-sysctl | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index 02b7f9b..8318952 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,8 +12,7 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl -p
++	/usr/share/66/script/sysctl.sh	
+ 
+     }
+     66-yeller -fcdp system-sysctl -1 /dev/console crashed!
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..ffda3f9c30dc
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,54 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.0
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (106 preceding siblings ...)
  2022-02-21 17:51 ` [PR PATCH] [Updated] " mobinmob
@ 2022-02-21 17:56 ` mobinmob
  2022-02-22 14:31 ` mobinmob
                   ` (63 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-21 17:56 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1047118008

Comment:
#### boot-66serv changes:

- Install backwards compatibility symlink for removed `/usr/share/66/script/modules.sh` script. That is not needed if someone re-enables boot@system after update but it is a failsafe.
- Add `INSTALL.msg` to remind users to re-enable boot@system after an update.
- Mount efivarfs rw, to have the same behavior as the official runit scheme - reported by @paper42, many thanks :)

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (107 preceding siblings ...)
  2022-02-21 17:56 ` mobinmob
@ 2022-02-22 14:31 ` mobinmob
  2022-03-11 10:07 ` thegarlynch
                   ` (62 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-02-22 14:31 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1046208453

Comment:
#### Changes for the PR:
- Squashed all commits in order to have one commit per package. Full history of the changes is retained in the[ 66-voidlinux repo in codeberg ](url) where all new development will take place before updating this PR.
- Rebased on master.

#### Changes for boot-66serv:
- `66boot-initial-setup` is improved significantly.
- Two new configuration scripts are added:
    - `66boot-rcdotconf,` which uses the values of `/etc/rc.conf` to configure boot@system and
    - `66boot-storage-autoconf` which will discover btrfs, zfs, dmraid, luks, lvm volumes and swap partitions/files and configure 66boot-66serv accordingly.
 
Using the three 66boot scripts and re-enabling boot@system should be enough to configure boot@system.

- The upstream `system-sysctl` service now executes the script from runit-void, and the `modules-load` script is used in place of the modules.sh obarun script. Due to these changes` 66-enable -t boot -F boot@system` **needs to run after the update**.

The packages in the void-66 repository will be updated tommorow - the new boot-66serv package with have the version suffix 20220220.

_Edit: The new package has been uploaded._

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (108 preceding siblings ...)
  2022-02-22 14:31 ` mobinmob
@ 2022-03-11 10:07 ` thegarlynch
  2022-03-12  9:30 ` mobinmob
                   ` (61 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: thegarlynch @ 2022-03-11 10:07 UTC (permalink / raw)
  To: ml

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

New comment by thegarlynch on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1064963313

Comment:
It passed finally, but why didn't it merged yet ? too big ? 

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (109 preceding siblings ...)
  2022-03-11 10:07 ` thegarlynch
@ 2022-03-12  9:30 ` mobinmob
  2022-03-12  9:30 ` mobinmob
                   ` (60 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-03-12  9:30 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1065850294

Comment:
> It passed finally, but why didn't it merged yet ? too big ?

Thank you for the interest!
Tests not passing has probably little to do with the possibility of merging this PR :) It essentially adds support for another init system/service manager in the distribution and that is a **big** change. 

The PR  is also the product a totally unofficial effort that goes on for almost two years now and without a promise - or an expectation really - of ever been accepted in the distribution. That is mighty fine for me, as I find the process really rewarding and having enormous fun.

If one needs to use the packages, there is a repo (which will move to osdn at some point), the development for the templates and scripts takes place at the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repository at codeberg and the service frontend scripts and documentation are maintained in the [void-66-services](https://github.com/mobinmob/void-66-services) repository at github.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (110 preceding siblings ...)
  2022-03-12  9:30 ` mobinmob
@ 2022-03-12  9:30 ` mobinmob
  2022-03-12  9:34 ` mobinmob
                   ` (59 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-03-12  9:30 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1065850294

Comment:
> It passed finally, but why didn't it merged yet ? too big ?

Thank you for the interest!
Tests not passing has probably little to do with the possibility of merging this [WIP] PR :) It essentially adds support for another init system/service manager in the distribution and that is a **big** change. 

The PR  is also the product a totally unofficial effort that goes on for almost two years now and without a promise - or an expectation really - of ever been accepted in the distribution. That is mighty fine for me, as I find the process really rewarding and having enormous fun.

If one needs to use the packages, there is a repo (which will move to osdn at some point), the development for the templates and scripts takes place at the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repository at codeberg and the service frontend scripts and documentation are maintained in the [void-66-services](https://github.com/mobinmob/void-66-services) repository at github.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (111 preceding siblings ...)
  2022-03-12  9:30 ` mobinmob
@ 2022-03-12  9:34 ` mobinmob
  2022-03-12  9:37 ` mobinmob
                   ` (58 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-03-12  9:34 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1065850294

Comment:
> It passed finally, but why didn't it merged yet ? too big ?

Thank you for the interest!
Tests not passing has probably little to do with the possibility of merging this [WIP] PR :) It essentially adds support for another init system/service manager in the distribution and that is a **big** change. 

The PR  is also the product a totally unofficial effort that goes on for almost two years now and without a promise - or an expectation really - of ever been accepted in the distribution. That is mighty fine for me, as I find the process really rewarding and having enormous fun.

If one needs to use the packages, there is a repo (which will move to osdn at some point), the development for the templates and scripts takes place at the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repository at codeberg and the service frontends and documentation are maintained in the [void-66-services](https://github.com/mobinmob/void-66-services) repository at github.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (112 preceding siblings ...)
  2022-03-12  9:34 ` mobinmob
@ 2022-03-12  9:37 ` mobinmob
  2022-05-14 10:49 ` [PR PATCH] [Updated] " mobinmob
                   ` (57 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-03-12  9:37 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1065850294

Comment:
> It passed finally, but why didn't it merged yet ? too big ?

Thank you for the interest!
Tests not passing has probably little to do with the possibility of merging this [WIP] PR :) It essentially adds support for another init system/service manager in the distribution and that is a **big** change. 

The PR  is also the product a totally unofficial effort that goes on for almost two years now and without a promise - or an expectation really - of ever been accepted in the distribution. That is mighty fine for me, as I find the process really rewarding and having enormous fun.

If one wants to use the packages, there is a repo (which will move to osdn at some point), the development for the templates and scripts takes place at the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repository at codeberg and the service frontends and documentation are maintained in the [void-66-services](https://github.com/mobinmob/void-66-services) repository at github.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (113 preceding siblings ...)
  2022-03-12  9:37 ` mobinmob
@ 2022-05-14 10:49 ` mobinmob
  2022-05-14 10:49 ` mobinmob
                   ` (56 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 10:49 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 36340 bytes --]

From f2f2faf70133af3c6775d1eec28fca4086b5602a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:20 +0200
Subject: [PATCH 1/3] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From ac7833bb92c2f5f2652f32a344c0fa25558a9949 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:37 +0200
Subject: [PATCH 2/3] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From adf4def4fc34e2d8652967c648a7a91eef68b736 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:49 +0200
Subject: [PATCH 3/3] New package: boot-66serv-2.4.0

based on:
- https://github.com/void-linux/void-packages/pull/23122
- https://github.com/void-linux/void-packages/pull/21142

    [ci-skip]
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 ++++++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 ++++++++++++++
 srcpkgs/boot-66serv/files/runit               |  35 ++++
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  13 ++
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 +++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 +++
 .../0001-Remove-tmpfiles.d-support.patch      | 196 ++++++++++++++++++
 ...nt-efivars-rw-to-follow-voidlinux-be.patch |  27 +++
 ...se-the-voidlinux-modules-load-script.patch |  29 +++
 ...e-the-sysctl-script-from-the-void-ru.patch |  27 +++
 srcpkgs/boot-66serv/template                  |  59 ++++++
 15 files changed, 782 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..ccdb34faedba
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..42aa4ed2390c
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
new file mode 100644
index 000000000000..dc32d5229c58
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
@@ -0,0 +1,196 @@
+From 002dd3aa63530b471ed2e36334b7250ba454c1cd Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 19 Nov 2021 19:14:37 +0200
+Subject: [PATCH 1/4] Remove tmpfiles.d support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  6 +-----
+ doc/boot@.md                              |  4 ----
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  4 ----
+ 8 files changed, 2 insertions(+), 42 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index f137878..066d8d8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 9622be3..2d26020 100755
+--- a/configure
++++ b/configure
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -218,7 +216,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -297,7 +294,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -364,7 +361,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..a0b333e 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+ 	- description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..18d2736 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 35a58e7..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@tmpfiles@/opentmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..da3e5e9 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
new file mode 100644
index 000000000000..f995dee11d6e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
@@ -0,0 +1,27 @@
+From 9a1ff29bd52ff28ffb0ffdfef658648527afff30 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 16 Feb 2022 19:45:09 +0200
+Subject: [PATCH 2/4] populate-sys: mount efivars rw to follow voidlinux
+ behavior.
+
+Problem found and reported by @paper42.
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
new file mode 100644
index 000000000000..8a16b4ba15cb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
@@ -0,0 +1,29 @@
+From 189e11ef2a90b75bad1d4d2c7382d7ebc513cec6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:11:09 +0200
+Subject: [PATCH 3/4] modules-system: use the voidlinux modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index e97fa7a..80be09f 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,9 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${script_file}
++        modules-load -v
+ 
+     }
+     66-yeller -fcdp modules-system -1 /dev/console crashed!
+ )
+ 
+-[environment]
+-script_file=!@modules@/modules.sh
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
new file mode 100644
index 000000000000..70b9137016f5
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
@@ -0,0 +1,27 @@
+From 5fedd6afb48de3ddfb717ad07db7141fbb5653f1 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:12:08 +0200
+Subject: [PATCH 4/4] system-sysctl: use the sysctl script from the void-runit
+ project.
+
+---
+ module/boot@/service/system/system-sysctl | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index 02b7f9b..8318952 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,8 +12,7 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl -p
++	/usr/share/66/script/sysctl.sh	
+ 
+     }
+     66-yeller -fcdp system-sysctl -1 /dev/console crashed!
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..53f553d849c4
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,59 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.0
+revision=1
+#_upstr_version=2.4.0
+#wrksrc=${pkgname}-v${_upstr_version}
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"	
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (114 preceding siblings ...)
  2022-05-14 10:49 ` [PR PATCH] [Updated] " mobinmob
@ 2022-05-14 10:49 ` mobinmob
  2022-05-14 10:52 ` [PR PATCH] [Updated] " mobinmob
                   ` (55 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 10:49 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126690019

Comment:
## Changes:
- Small fixes for the runit frontend service file (thaks @Obarun).
- A new way to reuse existing runit services - runit-wrapsv@.
- Fix swap detection with 66boot-storage-autoconf.
- Rebase on master.

## Documentation:
- Logging (per-service and system-wide) with 66 - [void-66-logging](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-logging.md).
- Using runit services with 66 (runit and runit-wrapsv@) - [void-66-runitsv](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-runitsv.md).

### Pending: 
- Move the packages to the osdn repo - I will anounce it here and update the relevant doc. 


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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (115 preceding siblings ...)
  2022-05-14 10:49 ` mobinmob
@ 2022-05-14 10:52 ` mobinmob
  2022-05-14 10:53 ` mobinmob
                   ` (54 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 10:52 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.0.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 36339 bytes --]

From f2f2faf70133af3c6775d1eec28fca4086b5602a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:20 +0200
Subject: [PATCH 1/3] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From ac7833bb92c2f5f2652f32a344c0fa25558a9949 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:37 +0200
Subject: [PATCH 2/3] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 8a5bd55b5d6156730562eac87c4563e179637a6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 19 Feb 2022 09:45:49 +0200
Subject: [PATCH 3/3] New package: boot-66serv-2.4.0

based on:
- https://github.com/void-linux/void-packages/pull/23122
- https://github.com/void-linux/void-packages/pull/21142

    [ci-skip]
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 ++++++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 ++++++++++++++
 srcpkgs/boot-66serv/files/runit               |  35 ++++
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  13 ++
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 +++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 +++
 .../0001-Remove-tmpfiles.d-support.patch      | 196 ++++++++++++++++++
 ...nt-efivars-rw-to-follow-voidlinux-be.patch |  27 +++
 ...se-the-voidlinux-modules-load-script.patch |  29 +++
 ...e-the-sysctl-script-from-the-void-ru.patch |  27 +++
 srcpkgs/boot-66serv/template                  |  59 ++++++
 15 files changed, 782 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..ccdb34faedba
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..42aa4ed2390c
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
new file mode 100644
index 000000000000..dc32d5229c58
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-Remove-tmpfiles.d-support.patch
@@ -0,0 +1,196 @@
+From 002dd3aa63530b471ed2e36334b7250ba454c1cd Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 19 Nov 2021 19:14:37 +0200
+Subject: [PATCH 1/4] Remove tmpfiles.d support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  6 +-----
+ doc/boot@.md                              |  4 ----
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  4 ----
+ 8 files changed, 2 insertions(+), 42 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index f137878..066d8d8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 9622be3..2d26020 100755
+--- a/configure
++++ b/configure
+@@ -42,7 +42,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -159,7 +158,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -218,7 +216,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -297,7 +294,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -364,7 +361,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..a0b333e 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -136,10 +136,6 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+-
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+ 	- description: load the kernel modules returned by the `kmod static-nodes` command.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..18d2736 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -11,7 +11,7 @@ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ 
+@@ -46,7 +46,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 35a58e7..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${script_file} ${script_args} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-script_file=!@tmpfiles@/opentmpfiles.sh
+-script_args=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..da3e5e9 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -11,7 +11,6 @@
+ ::@initconf@=@skel_directory@/init.conf
+ ::@skeldir@=@skel_directory@
+ ::@live_dir@=@livedir@
+-::@tmpfiles@=@tmpfiles_path@
+ ::@modules@=@modules_path@
+ ::@vers@=@VERSION@
+ )
+@@ -149,9 +148,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
new file mode 100644
index 000000000000..f995dee11d6e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-populate-sys-mount-efivars-rw-to-follow-voidlinux-be.patch
@@ -0,0 +1,27 @@
+From 9a1ff29bd52ff28ffb0ffdfef658648527afff30 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 16 Feb 2022 19:45:09 +0200
+Subject: [PATCH 2/4] populate-sys: mount efivars rw to follow voidlinux
+ behavior.
+
+Problem found and reported by @paper42.
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
new file mode 100644
index 000000000000..8a16b4ba15cb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-modules-system-use-the-voidlinux-modules-load-script.patch
@@ -0,0 +1,29 @@
+From 189e11ef2a90b75bad1d4d2c7382d7ebc513cec6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:11:09 +0200
+Subject: [PATCH 3/4] modules-system: use the voidlinux modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index e97fa7a..80be09f 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,9 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${script_file}
++        modules-load -v
+ 
+     }
+     66-yeller -fcdp modules-system -1 /dev/console crashed!
+ )
+ 
+-[environment]
+-script_file=!@modules@/modules.sh
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
new file mode 100644
index 000000000000..70b9137016f5
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-system-sysctl-use-the-sysctl-script-from-the-void-ru.patch
@@ -0,0 +1,27 @@
+From 5fedd6afb48de3ddfb717ad07db7141fbb5653f1 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 17 Feb 2022 21:12:08 +0200
+Subject: [PATCH 4/4] system-sysctl: use the sysctl script from the void-runit
+ project.
+
+---
+ module/boot@/service/system/system-sysctl | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index 02b7f9b..8318952 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,8 +12,7 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl -p
++	/usr/share/66/script/sysctl.sh	
+ 
+     }
+     66-yeller -fcdp system-sysctl -1 /dev/console crashed!
+-- 
+2.35.1
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..757bca4849b3
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,59 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.0
+revision=1
+#_upstr_version=2.4.0
+#wrksrc=${pkgname}-v${_upstr_version}
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=db2de4a1ad10fb8ea199665c31075f9ddf96121d4c9c9272b33b5ec678630819
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (116 preceding siblings ...)
  2022-05-14 10:52 ` [PR PATCH] [Updated] " mobinmob
@ 2022-05-14 10:53 ` mobinmob
  2022-05-14 13:02 ` mobinmob
                   ` (53 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 10:53 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126690019

Comment:
## Changes:
- Small fixes for the `runit` frontend service file (thaks @Obarun).
- A new way to reuse existing runit services - `runit-wrapsv@`.
- Fix swap detection with `66boot-storage-autoconf`.
- Rebase on master.

## Documentation:
- Logging (per-service and system-wide) with 66 - [void-66-logging](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-logging.md).
- Using runit services with 66 (runit and runit-wrapsv@) - [void-66-runitsv](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-runitsv.md).

### Pending: 
- Move the packages to the osdn repo - I will anounce it here and update the relevant doc. 


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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (117 preceding siblings ...)
  2022-05-14 10:53 ` mobinmob
@ 2022-05-14 13:02 ` mobinmob
  2022-05-14 13:02 ` mobinmob
                   ` (52 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 13:02 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126690019

Comment:
## Changes:
- Small fixes for the `runit` frontend service file (thaks @Obarun).
- A new way to reuse existing runit services - `runit-wrapsv@`.
- Fix swap detection with `66boot-storage-autoconf` (reported by Gabriele -[skikky94](https://gitlab.com/skikky94)- Del Roscio .
- Rebase on master.

## Documentation:
- Logging (per-service and system-wide) with 66 - [void-66-logging](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-logging.md).
- Using runit services with 66 (runit and runit-wrapsv@) - [void-66-runitsv](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-runitsv.md).

### Pending: 
- Move the packages to the osdn repo - I will anounce it here and update the relevant doc. 


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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (118 preceding siblings ...)
  2022-05-14 13:02 ` mobinmob
@ 2022-05-14 13:02 ` mobinmob
  2022-05-15 13:44 ` mobinmob
                   ` (51 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-14 13:02 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126690019

Comment:
## Changes:
- Small fixes for the `runit` frontend service file (thanks @Obarun).
- A new way to reuse existing runit services - `runit-wrapsv@`.
- Fix swap detection with `66boot-storage-autoconf` (reported by Gabriele -[skikky94](https://gitlab.com/skikky94)- Del Roscio - many thanks!) .
- Rebase on master.

## Documentation:
- Logging (per-service and system-wide) with 66 - [void-66-logging](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-logging.md).
- Using runit services with 66 (runit and runit-wrapsv@) - [void-66-runitsv](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-runitsv.md).

### Pending: 
- Move the packages to the osdn repo - I will anounce it here and update the relevant doc. 


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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (119 preceding siblings ...)
  2022-05-14 13:02 ` mobinmob
@ 2022-05-15 13:44 ` mobinmob
  2022-05-15 13:45 ` mobinmob
                   ` (50 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-15 13:44 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126945256

Comment:
## New binary package repo

The temporary binary package repo in codeberg is deprecated.
A new repo is provided, hosted in the [osdn platform]()https://osdn.net/projects/avyssos/.

### Adding the new repository:


_(commands prefixed by `#` must be run with elevated privileges, as root)_
```
# xbps-install -S --repository=https://mirrors.gigenet.com/OSDN//storage/g/a/av/avyssos/repo void-unofficial-repo-66
```

You will be prompted to accept the new key:
```
https://mirrors.gigenet.com/OSDN//storage/g/a/av/avyssos/repo' repository has been RSA signed by "mobinmob"
Fingerprint: c7:39:79:a3:2a:cf:f1:65:a6:df:3a:1a:6e:93:36:28
Do you want to import this public key? [Y/n]  
```

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (120 preceding siblings ...)
  2022-05-15 13:44 ` mobinmob
@ 2022-05-15 13:45 ` mobinmob
  2022-06-18 10:43 ` mobinmob
                   ` (49 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-05-15 13:45 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1126945256

Comment:
## New binary package repo

The temporary binary package repo in codeberg is [deprecated](https://codeberg.org/mobinmob/void-66#deprecation-notice).
A new repo is provided, hosted in the [osdn platform](https://osdn.net/projects/avyssos/).

### Adding the new repository:


_(commands prefixed by `#` must be run with elevated privileges, as root)_
```
# xbps-install -S --repository=https://mirrors.gigenet.com/OSDN//storage/g/a/av/avyssos/repo void-unofficial-repo-66
```

You will be prompted to accept the new key:
```
https://mirrors.gigenet.com/OSDN//storage/g/a/av/avyssos/repo' repository has been RSA signed by "mobinmob"
Fingerprint: c7:39:79:a3:2a:cf:f1:65:a6:df:3a:1a:6e:93:36:28
Do you want to import this public key? [Y/n]  
```

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (121 preceding siblings ...)
  2022-05-15 13:45 ` mobinmob
@ 2022-06-18 10:43 ` mobinmob
  2022-06-18 10:43 ` mobinmob
                   ` (48 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-06-18 10:43 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1159442460

Comment:
# osdn mirror issue and fix

The mirror that was used in the void-unoficial-repo-66 is not working, so the user will not be able to get future updates. A new repo package is uplaoded in codeberg.org/mobinmob/66-void that fixes that issue. In order to install use the following command:
`
# xbps-install --repository=https://codeberg.org/mobinmob/void-66/raw/branch/master  void-unofficial-repo-66`

The packages are signed with the same key.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (122 preceding siblings ...)
  2022-06-18 10:43 ` mobinmob
@ 2022-06-18 10:43 ` mobinmob
  2022-08-22 15:18 ` NymanMatthias
                   ` (47 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-06-18 10:43 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1159442460

Comment:
## osdn mirror issue and fix

The mirror that was used in the void-unoficial-repo-66 is not working, so the user will not be able to get future updates. A new repo package is uplaoded in codeberg.org/mobinmob/66-void that fixes that issue. In order to install use the following command:

`# xbps-install --repository=https://codeberg.org/mobinmob/void-66/raw/branch/master  void-unofficial-repo-66`

The packages are signed with the same key.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (123 preceding siblings ...)
  2022-06-18 10:43 ` mobinmob
@ 2022-08-22 15:18 ` NymanMatthias
  2022-08-22 15:18 ` NymanMatthias
                   ` (46 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: NymanMatthias @ 2022-08-22 15:18 UTC (permalink / raw)
  To: ml

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

New comment by NymanMatthias on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1222504913

Comment:
With the removal of tmpfiles.d support, I believe that rc-local should no longer depend on local-tmpfiles, as it doesn't exist anymore.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (124 preceding siblings ...)
  2022-08-22 15:18 ` NymanMatthias
@ 2022-08-22 15:18 ` NymanMatthias
  2022-08-22 16:11 ` mobinmob
                   ` (45 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: NymanMatthias @ 2022-08-22 15:18 UTC (permalink / raw)
  To: ml

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

New comment by NymanMatthias on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1222504913

Comment:
With the removal of tmpfiles.d support, I believe that local-rc should no longer depend on local-tmpfiles, as it doesn't exist anymore.

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (125 preceding siblings ...)
  2022-08-22 15:18 ` NymanMatthias
@ 2022-08-22 16:11 ` mobinmob
  2022-10-01 15:49 ` mobinmob
                   ` (44 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-08-22 16:11 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1222577184

Comment:
> With the removal of tmpfiles.d support, I believe that local-rc should no longer depend on local-tmpfiles, as it doesn't exist anymore.

That is correct, thank you for the report!
I will fix it in the next package upload and report here.
I have some unfinished work for the upstream boot-66serv that I would like to finish first, as it is making the boot process more robust : https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/17

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

* Re: [WIP] New package: boot-66serv-2.4.0.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (126 preceding siblings ...)
  2022-08-22 16:11 ` mobinmob
@ 2022-10-01 15:49 ` mobinmob
  2022-10-16 13:08 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1 mobinmob
                   ` (43 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-01 15:49 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1264403123

Comment:
> I have some unfinished work for the upstream boot-66serv that I would like to finish first, as it is making the boot process more robust : https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/17

Work continues in the obarun framagit instance:
https://git.obarun.org/obmods/boot-66serv/-/merge_requests/1#54776d84710e7228457fa1df3eecc1319a5e57fe

I am rebasing the voidlinux patches on top of this branch, an update is near :)

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (127 preceding siblings ...)
  2022-10-01 15:49 ` mobinmob
@ 2022-10-16 13:08 ` mobinmob
  2022-10-16 13:11 ` mobinmob
                   ` (42 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-16 13:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 180446 bytes --]

From cdfd6f3490d0962b84c80085f458ed718ea2abdc Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/31] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 0000000000000..c82ece19fc5e4
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 0000000000000..9c25c7dff436f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 0000000000000..3919274b0f7f1
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 0000000000000..7b72f625d84fb
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 0000000000000..1a57510f3cfbc
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From de0b74a4c77c6f6f8fe39ae1ff4d7fa1cfd1843a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/31] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff436f..c5e36bbfa4fed 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cfbc..f953ead216ec6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 7196193fdb7e8c42d2e75066cc37de04c4091ba3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/31] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4fed..fe741ff2bd8f9 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From ad0354f3e1379deb9eecfec2cb86da3f4b34000c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/31] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7f1..b596b3ba95f66 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From b0e59bacdca4213ce864a685bfd4a4e5434a955e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/31] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 0000000000000..1bf6c7247455b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 842700d019c673fcdf52fb1ec5bd5958a7af193c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/31] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216ec6..fa659c37010d7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2de66e1dcbf34a16d7306ad80cb3d316e36a4a8c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/31] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 0000000000000..7ed84c9371345
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 2789f86d903991edee12569047f84a855f9fced2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/31] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8f9..d3d60bb82dd80 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 8ec3c616797a8c21884a9e26fa433a6927cc1ed0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/31] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd80..362266bad06ab 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From fd50a74721024fe6fccf335bc96a886790d7acd3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/31] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06ab..3a0f89f87077b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84fb..f4a783bde6c2d 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010d7..c088b82dd9e2d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 605d7bd6c9e212fae29073482a1ae901aea505d2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/31] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c2d..0000000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e2d..4747249557ded 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 1bd54e94c98a36020ab7e425beb7142b603c7439 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/31] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557ded..4fce1c84b8a02 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 7ece338bf2b51f4b9643b312358f596a0b24ac78 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/31] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 0000000000000..8d289de798bfc
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a02..4c3e1f5cca761 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2bc3af9060d7c7ff55c1659a95f44af43d031b3d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/31] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5e4..2e5bb6a10a5f3 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f87077b..9f0f36d73c3ca 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca761..0efd5480a0124 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 8c51843f6740b1ec11344f9bab6e37f8a866a013 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/31] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798bfc..4d1e42ee74729 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3ca..9c0c16f5c1d45 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a0124..f4467c0f0c0ec 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b99d8adb24267194876d274393dbf8923d3872b9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/31] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0ec..2192a410f9cde 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 7bbb6ade78655b47ce18efec97633a759a1fef93 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/31] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee74729..e8679bd7de02d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From ed58b574adb587969f9755284ce43ae1fa0bcf86 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/31] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9cde..1876f0852b68a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 0888c8e1fdbf1b36a89253e4bb99d33c3057706c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/31] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c9371345..343809e845e47 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 4db9b29f3a55611317b1df56999d61a660259637 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/31] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de02d..513f614df7de5 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 484d7d753ee60c556eaf7b620e2135cdc1e33633 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/31] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d45..35890b9fe7b73 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From f3f73acee8d57613ac65b1976713f673907fc497 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/31] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7de5..0d809c8f2f6d7 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4f0915884a22375f9b3fe5887c9ecc11c17bd930 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/31] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 0000000000000..b4fe592ea5a19
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 0000000000000..a560272de2c6e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b68a..c61af88438003 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From b0e9ef3c6f950b939104059600f59166bd521e03 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:22:43 +0200
Subject: [PATCH 24/31] template: Create the log dir with proper permissions at
 installation: normally it is created on first run, but it can fail.

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c61af88438003..ed10d74a67e91 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root"
+make_dirs="/etc/runit/runsvdir/66 0750 root root
+	/var/log/66 0750 _s6log _s6log"
 
 post_install() {
 

From 71f19c70387bc47f3c485cb0cbf75ca80b48bb57 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Mar 2021 22:23:39 +0200
Subject: [PATCH 25/31] files/66boot-initial-setup: clean and improve the
 script: -use a variable for the new configuration file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 0d809c8f2f6d7..d466a1b886585 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,9 +18,10 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
 warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
- [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 5bc4a6c5dbd908184df99f263e3eb16ff2b54ef2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Mar 2021 21:18:44 +0200
Subject: [PATCH 26/31] New package: scandir-66serv-0.3.1.

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 0000000000000..a064a1c9b962e
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From eb59df45825075bc7620b6d369d044e4ade95416 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 21 Mar 2021 17:22:00 +0200
Subject: [PATCH 27/31] files/switch-initutils-66: make the service more
 robust.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------
 srcpkgs/boot-66serv/template                  |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 1bf6c7247455b..4239b7b53cc38 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -17,12 +17,15 @@
 @build = custom
 @shebang = "/bin/sh -c"
 @execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
 if grep -q "init=/usr/bin/66" /proc/cmdline; then
-       for i in reboot poweroff halt shutdown; do
-               if ! test -e /usr/bin/${i}.runit; then
-                       mv /usr/bin/${i} /usr/bin/${i}.runit
-                       cp /etc/66/${i} /usr/bin/${i}
-               fi
-       done
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
 fi
 )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index ed10d74a67e91..26e9dada5db45 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -40,7 +40,7 @@ post_install() {
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 
 	# Install license file
 	vlicense LICENSE

From 27bc68d43671298d308f0f977be73354215780db Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 22 Mar 2021 22:48:57 +0200
Subject: [PATCH 28/31] remove unneeded lines in template, use upstream fixes.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff |  13 -
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff |  40 ----
 .../patches/upstream-20210322.diff            | 222 ++++++++++++++++++
 srcpkgs/boot-66serv/template                  |   6 +-
 4 files changed, 224 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
 create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
deleted file mode 100644
index b4fe592ea5a19..0000000000000
--- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
deleted file mode 100644
index a560272de2c6e..0000000000000
--- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,28 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
new file mode 100644
index 0000000000000..16f93d1ee8d1a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
@@ -0,0 +1,222 @@
+diff --git a/configure b/configure
+index fba297a..7a0a8da 100755
+--- a/configure
++++ b/configure
+@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
+   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+-  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
+-  
++  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
++
+ Fine tunning of boot configuration:
+   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
+   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
+@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+-  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
++  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
+   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
+   --CGROUPS=BOOLEAN                mount cgroups [!yes]
+@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
+-  
+- 
++
++
+  Use yes or no with lowercase character to set BOOLEAN values.
+- 
++
+  Empty value is a commented one and not used at all.
+ 
+  An exclamation mark '!' at the begin of the value unexport the variable
+  for the environment after the use. This is avoid to poluate the environment
+  with tempory variables. You need to single-quote the options as
+  follow:
+-	./configure --KEYMAP='!us'
++    ./configure --KEYMAP='!us'
+ 
+ EOF
+ exit 0
+@@ -120,9 +120,9 @@ stripdir () {
+ 
+ testval () {
+  if test -z ${1}; then
+-	return 0 ;
++    return 0 ;
+  else
+-	return 1 ;
++    return 1 ;
+  fi
+ }
+ 
+@@ -165,7 +165,7 @@ LVM='!no'
+ DMRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+-ZFS_IMPORT='!scan'
++ZFS_IMPORT='!zpoolcache'
+ CRYPTTAB='!no'
+ FIREWALL=
+ CGROUPS='!yes'
+@@ -256,20 +256,20 @@ fi
+ 
+ if test -z "$sysconfdir" ; then
+   if test "$sysconfdir" = '$sysconfdir' ; then
+-	sysconfdir = '/etc'
++    sysconfdir = '/etc'
+   fi
+   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
+-	adm_conf = '$sysconfdir/$package_macro_dir/conf'
++    adm_conf = '$sysconfdir/$package_macro_dir/conf'
+   fi
+   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
+-	skel_directory = '$sysconfdir/$package_macro_dir'
++    skel_directory = '$sysconfdir/$package_macro_dir'
+   fi
+ fi
+ 
+ # Expand installation directories
+ stripdir prefix
+ for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
+-		service_directory module_directory script_directory skel_directory adm_conf ; do
++        service_directory module_directory script_directory skel_directory adm_conf ; do
+   eval tmp=\${$i}
+   eval $i=$tmp
+   stripdir $i
+@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
+ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+-		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
+-		CRYPTTAB FIREWALL \
+-		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
++        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        CRYPTTAB FIREWALL \
++        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb..4364a2f 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,29 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
++      exit 111
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index 934cd9f..fe38ef4 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -34,5 +34,5 @@ local-rc )
+ )
+ 
+ [environment]
+-cmd_args=!--console-off -T
++cmd_args=!-T
+ cmd_log=!/var/log/dmesg.log
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index fc7e2db..1b5b4e8 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -10,12 +10,16 @@
+ @execute =
+ (
+     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
+-    if -nt {
+ 
+-        swapon -a
++    foreground {
++
++        if -nt {
+ 
++            swapon -a
++
++        }
++        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
+     }
+-    66-yeller -fcdp mount-swap -1 /dev/console crashed!
+ )
+ 
+ [stop]
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f2..76ef6d5 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
+@@ -15,13 +15,16 @@
+         execl-toc -e ${script_conf}
+         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+ 
+-        if { 66-which -q vgchange }
+-        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
+-        if -nt {
++        foreground {
+ 
+-            vgchange --sysinit -a y
++            if { 66-which -q vgchange }
++            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
++            if -nt {
++
++                vgchange --sysinit -a y
++            }
++            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+-        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+     }
+     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
+ )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 26e9dada5db45..2ba5a8e6c63ad 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
- --ZFS_IMPORT=!zpoolcache"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
@@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 patch_args=" -Np1"
 
-make_dirs="/etc/runit/runsvdir/66 0750 root root
-	/var/log/66 0750 _s6log _s6log"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
 

From ba99045cf08de3e8082c8f2c50ba43c41b81be9f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 15:22:50 +0300
Subject: [PATCH 29/31] New package: 66-void-20220424

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 44 +++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 0000000000000..916d471cd4c99
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 0000000000000..abfaa52b3b93c
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 0000000000000..12dcabd1f3e60
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 0000000000000..58de3adb8d2f5
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 0000000000000..ceb9c44191cbf
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,44 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20220424
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=28f849335eed5db4787d3b7dc342dd4066b7183f
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=43654b6c9428cd1d2ab1fc71f5af986be3f09b947b37548115ab2376a9b574e1
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/os-release
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From c20e37616e4ffa626f3d58e87b2b82e725347851 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 15:23:08 +0300
Subject: [PATCH 30/31] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 0000000000000..313a528edee40
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

From 11218558ffb56d2fa1bbb860fa3c5d8ed0711a2b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 15:23:20 +0300
Subject: [PATCH 31/31] boot-66serv: update to 2.4.1.

---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  48 ++-
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 +++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 +++++++++
 srcpkgs/boot-66serv/files/runit               |  11 +-
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  11 +-
 srcpkgs/boot-66serv/files/switch-initutils-66 |  10 +-
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 ++
 ...evices-devices-first-pass-at-improvi.patch | 157 ++++++++++
 ...ure-add-checks-to-make-the-process-m.patch | 295 ++++++++++++++++++
 ...evices-devices-add-c-dev-null-to-the.patch |  68 ++++
 ...igure-configure-add-back-tmpfile-con.patch |  34 ++
 ...onfigure-configure-fix-zfs-detection.patch |  39 +++
 ...dmraid-first-pass-at-making-the-serv.patch |  41 +++
 ...mdraid-first-pass-at-adding-mdraid-s.patch |  83 +++++
 ...ate-configuration-to-reflect-changes.patch |  71 +++++
 ...ure-add-support-for-mdraid-add-some-.patch |  95 ++++++
 ...-MDRAID-and-CHECK_CONFIGURATION-as-c.patch |  39 +++
 .../patches/0011-configure-more-fixes.patch   |  79 +++++
 .../patches/0012-configure-more-changes.patch |  60 ++++
 ...-ZFS_IMPORT-check-only-with-CHECK_CO.patch |  25 ++
 ...-service-boot-try-to-have-consistent.patch |  58 ++++
 ...re-add-code-for-MDRAID-and-CHECK_CON.patch | 117 +++++++
 ...unt-swap-partially-revert-previous-c.patch |  28 ++
 ...ure-properly-disable-devices-mdraid-.patch |  62 ++++
 ...ure-add-a-message-and-a-small-sleep-.patch |  50 +++
 ...-information-abouts-keys-that-do-not.patch | 102 ++++++
 ...odules-system-use-the-void-runit-mod.patch |  31 ++
 ...sctl-use-code-from-runit-void-for-sy.patch |  29 ++
 ...nt-efivarfs-rw-to-follow-voidlinux-p.patch |  26 ++
 .../0023-Remove-tmpfiles-support.patch        | 210 +++++++++++++
 .../patches/upstream-20210322.diff            | 222 -------------
 srcpkgs/boot-66serv/template                  |  38 ++-
 34 files changed, 2179 insertions(+), 259 deletions(-)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 mode change 100644 => 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
 delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff
 mode change 100644 => 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 0000000000000..72e28e5a99743
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
old mode 100644
new mode 100755
index d466a1b886585..ae90f3c909630
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -1,22 +1,46 @@
 #!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
 
 # Script must run as root, otherwise it creates trees
 # as the user.
 user=$(id -u)
-s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
 
 # Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
-	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
 	exit 1
 }
 
 # Create the mandatory boot tree.
-66-tree -n boot || msg_trees 
+66-tree -nz boot || msg_trees boot
 # Enable the boot@system service in the boot tree.
-66-enable -F -t boot boot@system || msg_trees
-# Copy the default boot@conf so that is will survive updates and be accesible
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
 # though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
 new_conf="/etc/66/conf/boot@system/version/boot@system"
 [ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
@@ -24,13 +48,17 @@ warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') &&
  [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
 
 # Create default tree, enable it and make it current.
-66-tree -nEc default || msg_trees
+66-tree -z -nEc default || msg_trees default
 # Enable switch-initutils oneshot service in the default tree.
-66-enable switch-initutils || msg_trees
+66-enable -z switch-initutils || msg_services switch-initutils
 
 # Create and enable runit tree.
-66-tree -nE runit || msg_trees
+66-tree -z -nE runit || msg_trees runit
 # Enable the runit service in the runit tree.
-66-enable -t runit runit || msg_trees
+66-enable -z -t runit runit || msg_services runit
 # Start runit tree after the default tree.
-66-tree -S default runit || msg_trees
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 0000000000000..f62c11c4d2435
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 0000000000000..4d3bbca5ad2ba
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs_member
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 35890b9fe7b73..1e6bc6872f78a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,7 +6,7 @@
 
 [start]
 @build = custom
-@shebang = ( "/bin/sh" )
+@shebang = "/bin/sh"
 @execute = (
 exec 2>&1
 
@@ -25,10 +25,11 @@ exec s6-env -i PATH=$PATH \
 
 [stop]
 @build = custom
-@shebang = ( "/bin/sh" )
-@execute = ( sv force-stop /var/service/* }
- sv exit /var/service/* )
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
 
 [logger]
 @backup = 3
-@maxsize = 1000000
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 0000000000000..90349947127b3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index b596b3ba95f66..9876234ddaa35 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,14 +1,13 @@
 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of 66 it deletes them and moves the runit 
-# utilities in their place. It runs by default. There is a similar 
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
 # oneshot service for 66 that does the opposite and should be enabled.
-# The script make sure that the user has the proper utilities for the 
+# The script make sure that the user has the proper utilities for the
 # init system they are currently running.
 
 for i in reboot poweroff halt shutdown; do
 	if test -e /usr/bin/${i}.runit; then
 		rm /usr/bin/${i}
-		mv /usr/bin/${i}.runit /usr/bin/${i} 
+		mv /usr/bin/${i}.runit /usr/bin/${i}
 	fi
-done
-
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
index 4239b7b53cc38..f622a736f7a8f 100644
--- a/srcpkgs/boot-66serv/files/switch-initutils-66
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -1,11 +1,11 @@
 
 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
-# and if they are part of runit-void it renames them and copies the 66 
+# and if they are part of runit-void it renames them and copies the 66
 # utilities in their place. It must be enabled, especially if one
 # changes between the two init systems. There is a similar script for
-# runit core-services that does the opposite and runs by default with runit. 
-# The service makes sure that the user has the proper utilities for the 
-# init system they are currently running. 
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
 
 [main]
 @type = oneshot
@@ -20,7 +20,7 @@
 
 poweroff_util=$(readlink -f /usr/bin/poweroff)
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
         if [ "$poweroff_util" != /usr/bin/poweroff ]; then
 		for i in reboot poweroff halt shutdown; do
             mv /usr/bin/${i} /usr/bin/${i}.runit
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 0000000000000..3a7c6f85b8981
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
new file mode 100644
index 0000000000000..cfc3239d9f2e3
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
@@ -0,0 +1,157 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/23] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
new file mode 100644
index 0000000000000..1becf7808ae89
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
@@ -0,0 +1,295 @@
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/23] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
new file mode 100644
index 0000000000000..fdbbbc59fa73b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
@@ -0,0 +1,68 @@
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/23] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
new file mode 100644
index 0000000000000..89e053009642c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
@@ -0,0 +1,34 @@
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/23] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
new file mode 100644
index 0000000000000..0d5bdd28bf336
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
@@ -0,0 +1,39 @@
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/23] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
new file mode 100644
index 0000000000000..252ccb92e7d8d
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
@@ -0,0 +1,41 @@
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/23] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
new file mode 100644
index 0000000000000..e0a73a91765d2
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
@@ -0,0 +1,83 @@
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/23] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
new file mode 100644
index 0000000000000..4df67d21093e2
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
@@ -0,0 +1,71 @@
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/23] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
new file mode 100644
index 0000000000000..d8909b459d747
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
@@ -0,0 +1,95 @@
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/23] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
new file mode 100644
index 0000000000000..f562f7d15f9b9
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
@@ -0,0 +1,39 @@
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/23] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
new file mode 100644
index 0000000000000..e3bc6e64a9580
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
@@ -0,0 +1,79 @@
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/23] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
new file mode 100644
index 0000000000000..2a953f122c5a9
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
@@ -0,0 +1,60 @@
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/23] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
new file mode 100644
index 0000000000000..ef28cbf320868
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
@@ -0,0 +1,25 @@
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/23] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
new file mode 100644
index 0000000000000..5ce87b234585a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
@@ -0,0 +1,58 @@
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/23] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
new file mode 100644
index 0000000000000..ccf5763eafd9e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
@@ -0,0 +1,117 @@
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/23] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
new file mode 100644
index 0000000000000..da48771ae0ebb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
@@ -0,0 +1,28 @@
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/23] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
new file mode 100644
index 0000000000000..400cb5cad8aba
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
@@ -0,0 +1,62 @@
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/23] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
new file mode 100644
index 0000000000000..1803ee8ed0b8b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
@@ -0,0 +1,50 @@
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/23] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
new file mode 100644
index 0000000000000..b77da1e593857
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
@@ -0,0 +1,102 @@
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/23] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
new file mode 100644
index 0000000000000..21adb560c4154
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
@@ -0,0 +1,31 @@
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/23] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
new file mode 100644
index 0000000000000..9460e81a018bf
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
@@ -0,0 +1,29 @@
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/23] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
new file mode 100644
index 0000000000000..a1b126ef3ef62
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
@@ -0,0 +1,26 @@
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/23] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
new file mode 100644
index 0000000000000..75ebd8e747f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
@@ -0,0 +1,210 @@
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/23] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff
deleted file mode 100644
index 16f93d1ee8d1a..0000000000000
--- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff
+++ /dev/null
@@ -1,222 +0,0 @@
-diff --git a/configure b/configure
-index fba297a..7a0a8da 100755
---- a/configure
-+++ b/configure
-@@ -23,8 +23,8 @@ Fine tuning of the installation directories:
-   --with-system-module=DIR         66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
-   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
-   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
--  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]	
--  
-+  --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
-+
- Fine tunning of boot configuration:
-   --HOSTNAME=VALUE                 hostname of the system [obarunS6]
-   --HARDWARECLOCK=VALUE            set the hardware clock [UTC]
-@@ -50,7 +50,7 @@ Fine tunning of boot configuration:
-   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
-   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
-   --ZFS=BOOLEAN                    mount zfs devices [!no]
--  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!scan]
-+  --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
-   --CRYPTTAB=BOOLEAN               use crypttab by default [!no]
-   --FIREWALL=VALUE                 use iptables|ip6tables|nftables|ebtables|arptables []
-   --CGROUPS=BOOLEAN                mount cgroups [!yes]
-@@ -66,17 +66,17 @@ Fine tunning of boot configuration:
-   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
-   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
-   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
--  
-- 
-+
-+
-  Use yes or no with lowercase character to set BOOLEAN values.
-- 
-+
-  Empty value is a commented one and not used at all.
- 
-  An exclamation mark '!' at the begin of the value unexport the variable
-  for the environment after the use. This is avoid to poluate the environment
-  with tempory variables. You need to single-quote the options as
-  follow:
--	./configure --KEYMAP='!us'
-+    ./configure --KEYMAP='!us'
- 
- EOF
- exit 0
-@@ -120,9 +120,9 @@ stripdir () {
- 
- testval () {
-  if test -z ${1}; then
--	return 0 ;
-+    return 0 ;
-  else
--	return 1 ;
-+    return 1 ;
-  fi
- }
- 
-@@ -165,7 +165,7 @@ LVM='!no'
- DMRAID='!no'
- BTRFS='!no'
- ZFS='!no'
--ZFS_IMPORT='!scan'
-+ZFS_IMPORT='!zpoolcache'
- CRYPTTAB='!no'
- FIREWALL=
- CGROUPS='!yes'
-@@ -256,20 +256,20 @@ fi
- 
- if test -z "$sysconfdir" ; then
-   if test "$sysconfdir" = '$sysconfdir' ; then
--	sysconfdir = '/etc'
-+    sysconfdir = '/etc'
-   fi
-   if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then
--	adm_conf = '$sysconfdir/$package_macro_dir/conf'
-+    adm_conf = '$sysconfdir/$package_macro_dir/conf'
-   fi
-   if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then
--	skel_directory = '$sysconfdir/$package_macro_dir'
-+    skel_directory = '$sysconfdir/$package_macro_dir'
-   fi
- fi
- 
- # Expand installation directories
- stripdir prefix
- for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \
--		service_directory module_directory script_directory skel_directory adm_conf ; do
-+        service_directory module_directory script_directory skel_directory adm_conf ; do
-   eval tmp=\${$i}
-   eval $i=$tmp
-   stripdir $i
-@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do
- done
- 
- for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
--		KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
--		TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
--		FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
--		CRYPTTAB FIREWALL \
--		CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
--		MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-+        KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
-+        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
-+        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
-+        CRYPTTAB FIREWALL \
-+        CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
-+        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
-   eval tmp=\${$i}
-   if testval $tmp; then
-     eval $i='${i}=\"\\#${i}=\"'
-diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
-index 2ba35fb..4364a2f 100644
---- a/module/boot@/service/local/firewall/local-iptables
-+++ b/module/boot@/service/local/firewall/local-iptables
-@@ -20,19 +20,29 @@
- )
- 
- [stop]
-+@build = custom
-+@shebang = "/usr/bin/bash -c"
- @execute =
- (
--    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
--    if -nt {
- 
--        execl-toc -x ${script_file}
--        ${script_file}
-+    exec 2>&1
- 
--    }
--    66-yeller -fcdp local-iptables -1 /dev/console crashed!
-+    66-yeller -cdp local-iptables -1 /dev/console stops...
-+
-+    if ! type -p iptables &>/dev/null; then
-+      66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program
-+      exit 111
-+    fi
-+
-+    while read -r table; do
-+        tables+=("/usr/share/iptables/empty-$table.rules")
-+    done <"/proc/net/ip_tables_names"
-+
-+    if (( ${#tables[*]} )); then
-+        cat "${tables[@]}" | iptables-restore
-+    fi
- )
- 
- [environment]
- script_conf=!/etc/iptables/iptables.rules
--script_file=!/usr/lib/iptables/scripts/iptables-flush
- 
-diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
-index 934cd9f..fe38ef4 100644
---- a/module/boot@/service/local/local-dmesg
-+++ b/module/boot@/service/local/local-dmesg
-@@ -34,5 +34,5 @@ local-rc )
- )
- 
- [environment]
--cmd_args=!--console-off -T
-+cmd_args=!-T
- cmd_log=!/var/log/dmesg.log
-diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
-index fc7e2db..1b5b4e8 100644
---- a/module/boot@/service/mount/mount-swap
-+++ b/module/boot@/service/mount/mount-swap
-@@ -10,12 +10,16 @@
- @execute =
- (
-     if { 66-yeller -cdp mount-swap -1 /dev/console starts... }
--    if -nt {
- 
--        swapon -a
-+    foreground {
-+
-+        if -nt {
- 
-+            swapon -a
-+
-+        }
-+        66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap!
-     }
--    66-yeller -fcdp mount-swap -1 /dev/console crashed!
- )
- 
- [stop]
-diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
-index 5b808f2..76ef6d5 100644
---- a/module/boot@/service/system/devices/devices-crypttab
-+++ b/module/boot@/service/system/devices/devices-crypttab
-@@ -4,7 +4,7 @@
- @description = "Active encrypted devices"
- @user = ( root )
- @options = ( !log )
--@depends = ( udevadm )
-+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm )
- 
- [start]
- @execute =
-@@ -15,13 +15,16 @@
-         execl-toc -e ${script_conf}
-         if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
- 
--        if { 66-which -q vgchange }
--        if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
--        if -nt {
-+        foreground {
- 
--            vgchange --sysinit -a y
-+            if { 66-which -q vgchange }
-+            if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... }
-+            if -nt {
-+
-+                vgchange --sysinit -a y
-+            }
-+            66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-         }
--        66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
-     }
-     66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
- )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
old mode 100644
new mode 100755
index 2ba5a8e6c63ad..be9b2833f11a5
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,24 +1,28 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.3.0
+version=2.4.1
 revision=1
+#_upstr_version=2.4.1
+#wrksrc=${pkgname}-v${_upstr_version}
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
- --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"
-depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-license="ISC"
-homepage="https://framagit.org/pkg/obmods/boot-66serv"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
-checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
 patch_args=" -Np1"
-
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
@@ -29,16 +33,28 @@ post_install() {
 	vbin "${FILESDIR}"/66
 	# Install the 66boot-initial-setup utility
 	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
 	# Create symlink for the boot@system service configuration file
-	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 
-	# Install runit and switch-initutils services for 66
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
 	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
-	vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
 
 	# Install license file
 	vlicense LICENSE

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (128 preceding siblings ...)
  2022-10-16 13:08 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1 mobinmob
@ 2022-10-16 13:11 ` mobinmob
  2022-10-16 13:19 ` [PR PATCH] [Updated] " mobinmob
                   ` (41 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-16 13:11 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1279967099

Comment:
## Changes

#### boot-66serv

- Μany checks added to the configure script that runs when the service is enabled:
	- check for existance of keys and the validity of their values
	- discover luks,lvm,zfs,btrfs.dmraid,mdraid and check for the correct configuration of the relecant keys
	- add mdraid support
	- add a staged approach to the `devices-*` services in order to avoid breaking boot and inform the user for proper configuration
	- add a configuration key to enable/disable the checks (CHECK_CONFIGURATION=yes by default)
	- ammend the documentation for the changes.
	*The changes above are explained [here](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/1#note_121)*
- Remove the tmpfiles dependency from local-rc (thanks @NymanMatthias for the report).
- Fix zfs detection on `66boot-storage-autoconf`.
- Improve `switch-initutils-66` frontend service file.
- Change of license to 0BSD (upstream change, the `66boot-*` utilities remain under BSD-2-Clause).
- Update to 2.4.1

#### 66-void and base-system-66 (new packages)

66-void can replace runit-void and base-system-66 can replaces base-system, for a more "clean" and correct approach to changing init systems in voidlinux.

#### void-66-services

The package is not updates, but many service frontend files have beed added to the repo since the last release and there are also significant fixes.
Everyone that needs them is encouraged to use the void-66-services-master template under packaging/ in the github repo.
I want to finish and test the user/session services work and release 0.0.3 with it.

#### Documentation 
Document the new packages and the transition to/from them:
[void-66-services/void-66-base-system.md at master · mobinmob/void-66-services · GitHub](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-base-system.md)

*Packages are uploaded to the repo, the package version for boot-66serv is 2.4.1.20221016.*

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (129 preceding siblings ...)
  2022-10-16 13:11 ` mobinmob
@ 2022-10-16 13:19 ` mobinmob
  2022-10-16 13:21 ` mobinmob
                   ` (40 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-16 13:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 116125 bytes --]

From 2977bbbfa03059a1bcc4429339c6b32d5f58e69b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:16:17 +0300
Subject: [PATCH 1/5] New package: boot-66serv-2.4.1

 based on:
    https://github.com/void-linux/void-packages/pull/23122
    https://github.com/void-linux/void-packages/pull/21142
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 +++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 +++++++++
 srcpkgs/boot-66serv/files/runit               |  35 +++
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  13 +
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 ++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 ++
 ...evices-devices-first-pass-at-improvi.patch | 157 ++++++++++
 ...ure-add-checks-to-make-the-process-m.patch | 295 ++++++++++++++++++
 ...evices-devices-add-c-dev-null-to-the.patch |  68 ++++
 ...igure-configure-add-back-tmpfile-con.patch |  34 ++
 ...onfigure-configure-fix-zfs-detection.patch |  39 +++
 ...dmraid-first-pass-at-making-the-serv.patch |  41 +++
 ...mdraid-first-pass-at-adding-mdraid-s.patch |  83 +++++
 ...ate-configuration-to-reflect-changes.patch |  71 +++++
 ...ure-add-support-for-mdraid-add-some-.patch |  95 ++++++
 ...-MDRAID-and-CHECK_CONFIGURATION-as-c.patch |  39 +++
 .../patches/0011-configure-more-fixes.patch   |  79 +++++
 .../patches/0012-configure-more-changes.patch |  60 ++++
 ...-ZFS_IMPORT-check-only-with-CHECK_CO.patch |  25 ++
 ...-service-boot-try-to-have-consistent.patch |  58 ++++
 ...re-add-code-for-MDRAID-and-CHECK_CON.patch | 117 +++++++
 ...unt-swap-partially-revert-previous-c.patch |  28 ++
 ...ure-properly-disable-devices-mdraid-.patch |  62 ++++
 ...ure-add-a-message-and-a-small-sleep-.patch |  50 +++
 ...-information-abouts-keys-that-do-not.patch | 102 ++++++
 ...odules-system-use-the-void-runit-mod.patch |  31 ++
 ...sctl-use-code-from-runit-void-for-sy.patch |  29 ++
 ...nt-efivarfs-rw-to-follow-voidlinux-p.patch |  26 ++
 .../0023-Remove-tmpfiles-support.patch        | 210 +++++++++++++
 srcpkgs/boot-66serv/template                  |  61 ++++
 34 files changed, 2304 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..4d3bbca5ad2b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs_member
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..f622a736f7a8
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
new file mode 100644
index 000000000000..cfc3239d9f2e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
@@ -0,0 +1,157 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/23] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
new file mode 100644
index 000000000000..1becf7808ae8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
@@ -0,0 +1,295 @@
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/23] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
new file mode 100644
index 000000000000..fdbbbc59fa73
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
@@ -0,0 +1,68 @@
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/23] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
new file mode 100644
index 000000000000..89e053009642
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
@@ -0,0 +1,34 @@
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/23] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
new file mode 100644
index 000000000000..0d5bdd28bf33
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
@@ -0,0 +1,39 @@
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/23] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
new file mode 100644
index 000000000000..252ccb92e7d8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
@@ -0,0 +1,41 @@
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/23] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
new file mode 100644
index 000000000000..e0a73a91765d
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
@@ -0,0 +1,83 @@
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/23] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
new file mode 100644
index 000000000000..4df67d21093e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
@@ -0,0 +1,71 @@
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/23] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
new file mode 100644
index 000000000000..d8909b459d74
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
@@ -0,0 +1,95 @@
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/23] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
new file mode 100644
index 000000000000..f562f7d15f9b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
@@ -0,0 +1,39 @@
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/23] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
new file mode 100644
index 000000000000..e3bc6e64a958
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
@@ -0,0 +1,79 @@
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/23] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
new file mode 100644
index 000000000000..2a953f122c5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
@@ -0,0 +1,60 @@
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/23] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
new file mode 100644
index 000000000000..ef28cbf32086
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
@@ -0,0 +1,25 @@
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/23] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
new file mode 100644
index 000000000000..5ce87b234585
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
@@ -0,0 +1,58 @@
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/23] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
new file mode 100644
index 000000000000..ccf5763eafd9
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
@@ -0,0 +1,117 @@
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/23] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
new file mode 100644
index 000000000000..da48771ae0eb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
@@ -0,0 +1,28 @@
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/23] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
new file mode 100644
index 000000000000..400cb5cad8ab
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
@@ -0,0 +1,62 @@
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/23] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
new file mode 100644
index 000000000000..1803ee8ed0b8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
@@ -0,0 +1,50 @@
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/23] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
new file mode 100644
index 000000000000..b77da1e59385
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
@@ -0,0 +1,102 @@
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/23] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
new file mode 100644
index 000000000000..21adb560c415
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
@@ -0,0 +1,31 @@
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/23] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
new file mode 100644
index 000000000000..9460e81a018b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
@@ -0,0 +1,29 @@
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/23] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
new file mode 100644
index 000000000000..a1b126ef3ef6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
@@ -0,0 +1,26 @@
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/23] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
new file mode 100644
index 000000000000..75ebd8e747f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
@@ -0,0 +1,210 @@
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/23] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..be9b2833f11a
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,61 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.1
+revision=1
+#_upstr_version=2.4.1
+#wrksrc=${pkgname}-v${_upstr_version}
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

From 4853387aa46ecbb0530db2d8ca2c988b58be17d6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:25 +0300
Subject: [PATCH 2/5] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 307a76f0c099881e73969f7f50335c080d250026 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:36 +0300
Subject: [PATCH 3/5] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 484c6fba54e2e9bc27b071d84581460dde6305f7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:48 +0300
Subject: [PATCH 4/5] New package: 66-void-20220424

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 44 +++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 000000000000..916d471cd4c9
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 000000000000..abfaa52b3b93
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 000000000000..12dcabd1f3e6
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 000000000000..58de3adb8d2f
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 000000000000..ceb9c44191cb
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,44 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20220424
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=28f849335eed5db4787d3b7dc342dd4066b7183f
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=43654b6c9428cd1d2ab1fc71f5af986be3f09b947b37548115ab2376a9b574e1
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/os-release
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From 2569142f2e0392327cbc62a1b1dc0ad71d0f5b17 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:18:00 +0300
Subject: [PATCH 5/5] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 000000000000..313a528edee4
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (130 preceding siblings ...)
  2022-10-16 13:19 ` [PR PATCH] [Updated] " mobinmob
@ 2022-10-16 13:21 ` mobinmob
  2022-10-16 14:16 ` mobinmob
                   ` (39 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-16 13:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 116157 bytes --]

From 4d251f578b5681288b1d58317350949d45d60687 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:16:17 +0300
Subject: [PATCH 1/5] New package: boot-66serv-2.4.1

 based on:
    https://github.com/void-linux/void-packages/pull/23122 (by @teldra )
    https://github.com/void-linux/void-packages/pull/21142 (by @zenfailure )
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 +++++++
 .../boot-66serv/files/66boot-storage-autoconf | 153 +++++++++
 srcpkgs/boot-66serv/files/runit               |  35 +++
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  13 +
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 ++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 ++
 ...evices-devices-first-pass-at-improvi.patch | 157 ++++++++++
 ...ure-add-checks-to-make-the-process-m.patch | 295 ++++++++++++++++++
 ...evices-devices-add-c-dev-null-to-the.patch |  68 ++++
 ...igure-configure-add-back-tmpfile-con.patch |  34 ++
 ...onfigure-configure-fix-zfs-detection.patch |  39 +++
 ...dmraid-first-pass-at-making-the-serv.patch |  41 +++
 ...mdraid-first-pass-at-adding-mdraid-s.patch |  83 +++++
 ...ate-configuration-to-reflect-changes.patch |  71 +++++
 ...ure-add-support-for-mdraid-add-some-.patch |  95 ++++++
 ...-MDRAID-and-CHECK_CONFIGURATION-as-c.patch |  39 +++
 .../patches/0011-configure-more-fixes.patch   |  79 +++++
 .../patches/0012-configure-more-changes.patch |  60 ++++
 ...-ZFS_IMPORT-check-only-with-CHECK_CO.patch |  25 ++
 ...-service-boot-try-to-have-consistent.patch |  58 ++++
 ...re-add-code-for-MDRAID-and-CHECK_CON.patch | 117 +++++++
 ...unt-swap-partially-revert-previous-c.patch |  28 ++
 ...ure-properly-disable-devices-mdraid-.patch |  62 ++++
 ...ure-add-a-message-and-a-small-sleep-.patch |  50 +++
 ...-information-abouts-keys-that-do-not.patch | 102 ++++++
 ...odules-system-use-the-void-runit-mod.patch |  31 ++
 ...sctl-use-code-from-runit-void-for-sy.patch |  29 ++
 ...nt-efivarfs-rw-to-follow-voidlinux-p.patch |  26 ++
 .../0023-Remove-tmpfiles-support.patch        | 210 +++++++++++++
 srcpkgs/boot-66serv/template                  |  61 ++++
 34 files changed, 2304 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..ae90f3c90963
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..f62c11c4d243
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root! \n" && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..4d3bbca5ad2b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && printf "You need to run this script as root!\n" && exit 1
+
+
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# Use detect fs for all types we want
+detect_fs btrfs
+detect_fs zfs_member
+detect_fs crypto_LUKS
+detect_fs LVM2_member
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+detect_fs ddf_raid_member
+detect_fs isw_raid_member
+detect_fs lsi_mega_raid_member
+detect_fs via_raid_member
+detect_fs silicon_medley_raid_member
+detect_fs nvidia_raid_member
+detect_fs promise_fasttrack_raid_member
+detect_fs hpt45x_raid_member
+detect_fs hpt37x_raid_member
+detect_fs adaptec_raid_member
+detect_fs jmicron_raid_member
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_fs swap
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..f622a736f7a8
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
new file mode 100644
index 000000000000..cfc3239d9f2e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
@@ -0,0 +1,157 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/23] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
new file mode 100644
index 000000000000..1becf7808ae8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
@@ -0,0 +1,295 @@
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/23] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
new file mode 100644
index 000000000000..fdbbbc59fa73
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
@@ -0,0 +1,68 @@
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/23] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
new file mode 100644
index 000000000000..89e053009642
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
@@ -0,0 +1,34 @@
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/23] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
new file mode 100644
index 000000000000..0d5bdd28bf33
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
@@ -0,0 +1,39 @@
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/23] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
new file mode 100644
index 000000000000..252ccb92e7d8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
@@ -0,0 +1,41 @@
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/23] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
new file mode 100644
index 000000000000..e0a73a91765d
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
@@ -0,0 +1,83 @@
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/23] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
new file mode 100644
index 000000000000..4df67d21093e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
@@ -0,0 +1,71 @@
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/23] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
new file mode 100644
index 000000000000..d8909b459d74
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
@@ -0,0 +1,95 @@
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/23] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
new file mode 100644
index 000000000000..f562f7d15f9b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
@@ -0,0 +1,39 @@
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/23] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
new file mode 100644
index 000000000000..e3bc6e64a958
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
@@ -0,0 +1,79 @@
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/23] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
new file mode 100644
index 000000000000..2a953f122c5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
@@ -0,0 +1,60 @@
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/23] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
new file mode 100644
index 000000000000..ef28cbf32086
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
@@ -0,0 +1,25 @@
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/23] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
new file mode 100644
index 000000000000..5ce87b234585
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
@@ -0,0 +1,58 @@
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/23] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
new file mode 100644
index 000000000000..ccf5763eafd9
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
@@ -0,0 +1,117 @@
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/23] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
new file mode 100644
index 000000000000..da48771ae0eb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
@@ -0,0 +1,28 @@
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/23] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
new file mode 100644
index 000000000000..400cb5cad8ab
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
@@ -0,0 +1,62 @@
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/23] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
new file mode 100644
index 000000000000..1803ee8ed0b8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
@@ -0,0 +1,50 @@
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/23] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
new file mode 100644
index 000000000000..b77da1e59385
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
@@ -0,0 +1,102 @@
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/23] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
new file mode 100644
index 000000000000..21adb560c415
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
@@ -0,0 +1,31 @@
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/23] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
new file mode 100644
index 000000000000..9460e81a018b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
@@ -0,0 +1,29 @@
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/23] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
new file mode 100644
index 000000000000..a1b126ef3ef6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
@@ -0,0 +1,26 @@
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/23] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
new file mode 100644
index 000000000000..75ebd8e747f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
@@ -0,0 +1,210 @@
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/23] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..be9b2833f11a
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,61 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.1
+revision=1
+#_upstr_version=2.4.1
+#wrksrc=${pkgname}-v${_upstr_version}
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

From abfa46835bb51ee327e34d0eda73b8a0c499cdd8 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:25 +0300
Subject: [PATCH 2/5] New package: void-66-services-0.0.2

---
 srcpkgs/void-66-services/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..343809e845e4
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,19 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.2
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From bfd5b12df35b332ebd80e932fca2268f545ad395 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:36 +0300
Subject: [PATCH 3/5] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 01e57ad47ba5cf40ff1ba8ef41c3ca92b80648ee Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:17:48 +0300
Subject: [PATCH 4/5] New package: 66-void-20220424

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 44 +++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 000000000000..916d471cd4c9
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 000000000000..abfaa52b3b93
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 000000000000..12dcabd1f3e6
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 000000000000..58de3adb8d2f
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 000000000000..ceb9c44191cb
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,44 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20220424
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=28f849335eed5db4787d3b7dc342dd4066b7183f
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=43654b6c9428cd1d2ab1fc71f5af986be3f09b947b37548115ab2376a9b574e1
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/os-release
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From ae7fe7cdd7b0ff9ef1beb7fc61334c7c9cb6d205 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 16 Oct 2022 16:18:00 +0300
Subject: [PATCH 5/5] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 000000000000..313a528edee4
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (131 preceding siblings ...)
  2022-10-16 13:21 ` mobinmob
@ 2022-10-16 14:16 ` mobinmob
  2022-10-16 22:27 ` NymanMatthias
                   ` (38 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-16 14:16 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1279967099

Comment:
## Changes

#### boot-66serv

- Μany checks added to the configure script that runs when the service is enabled:
	- check for existance of keys and the validity of their values
	- discover luks,lvm,zfs,btrfs.dmraid,mdraid and check for the correct configuration of the relecant keys
	- add mdraid support
	- add a staged approach to the `devices-*` services in order to avoid breaking boot and inform the user for proper configuration
	- add a configuration key to enable/disable the checks (CHECK_CONFIGURATION=yes by default)
	- ammend the documentation for the changes.
	*The changes above are explained [here](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/1#note_121)*
- Remove the tmpfiles dependency from local-rc (thanks @NymanMatthias for the report).
- Fix zfs detection on `66boot-storage-autoconf`.
- Improve `switch-initutils-66` frontend service file.
- Change of license to 0BSD (upstream change, the `66boot-*` utilities remain under BSD-2-Clause).
- Update to 2.4.1

#### 66-void and base-system-66 (new packages)

`66-void` can replace `runit-void` and `base-system-66` can replace `base-system`, for a more "clean" and correct approach to changing init systems in voidlinux.

#### void-66-services

The package is not updated, but many service frontend files have beed added to the repo since the last release and there are also significant fixes.
Everyone that needs them is encouraged to use the void-66-services-master template under packaging/ in the github repo.
I want to finish and test the user/session services work and release 0.0.3 with it.

#### Documentation 
Document the new packages and the transition to/from them:
[void-66-services/void-66-base-system.md at master · mobinmob/void-66-services · GitHub](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-base-system.md)

*Packages are uploaded to the repo, the package version for boot-66serv is **2.4.1.20221016.***

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (132 preceding siblings ...)
  2022-10-16 14:16 ` mobinmob
@ 2022-10-16 22:27 ` NymanMatthias
  2022-10-17  3:00 ` mobinmob
                   ` (37 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: NymanMatthias @ 2022-10-16 22:27 UTC (permalink / raw)
  To: ml

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

New comment by NymanMatthias on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1280071284

Comment:
I spun up a VM to test this PR, and everything seems to work fine. One thing I noticed while setting it up is that some of these packages are missing dependencies on s6-rc, s6, and execline. Without these packages installed, boot-66serv will never bring Void to a functional state. On Obarun, these are all dependencies of the 66 package, while Void lacks these dependencies.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (133 preceding siblings ...)
  2022-10-16 22:27 ` NymanMatthias
@ 2022-10-17  3:00 ` mobinmob
  2022-10-17  3:05 ` mobinmob
                   ` (36 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-17  3:00 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1280208811

Comment:
> I spun up a VM to test this PR, and everything seems to work fine. One thing I noticed while setting it up is that some of these packages are missing dependencies on s6-rc, s6, and execline. Without these packages installed, boot-66serv will never bring Void to a functional state. On Obarun, these are all dependencies of the 66 package, while Void lacks these dependencies.

Thank you for testing!
The 66 package should depend on these implicitly, since its template contains  `makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"`. The other packages depend on it. I will check the installation again and see why there is an issue. OFC 66 cannot work without s6 and s6-rc :)


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (134 preceding siblings ...)
  2022-10-17  3:00 ` mobinmob
@ 2022-10-17  3:05 ` mobinmob
  2022-10-17  3:23 ` mobinmob
                   ` (35 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-17  3:05 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1280208811

Comment:
> I spun up a VM to test this PR, and everything seems to work fine. One thing I noticed while setting it up is that some of these packages are missing dependencies on s6-rc, s6, and execline. Without these packages installed, boot-66serv will never bring Void to a functional state. On Obarun, these are all dependencies of the 66 package, while Void lacks these dependencies.

Thank you for testing!
The 66 package should depend on these implicitly, since its template contains  `makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"`. The other packages depend on it - I did have these deps on boot-66serv before and I removed them because of the dependency on 66. I will check the installation again and see why there is an issue. OFC 66 cannot work without s6 and s6-rc :)


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (135 preceding siblings ...)
  2022-10-17  3:05 ` mobinmob
@ 2022-10-17  3:23 ` mobinmob
  2022-10-17 12:54 ` mobinmob
                   ` (34 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-17  3:23 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1280208811

Comment:
> I spun up a VM to test this PR, and everything seems to work fine. One thing I noticed while setting it up is that some of these packages are missing dependencies on s6-rc, s6, and execline. Without these packages installed, boot-66serv will never bring Void to a functional state. On Obarun, these are all dependencies of the 66 package, while Void lacks these dependencies.

Thank you for testing!
The 66 package should depend on these implicitly, since its template contains  `makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"`. The other packages depend on it - I did have these deps on boot-66serv before and I removed them because of the dependency on 66. I will check the packages again and see why there is an issue. OFC 66 cannot work without s6 and s6-rc :)


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (136 preceding siblings ...)
  2022-10-17  3:23 ` mobinmob
@ 2022-10-17 12:54 ` mobinmob
  2023-01-16  1:58 ` github-actions
                   ` (33 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2022-10-17 12:54 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1280816605

Comment:
@NymanMatthias : https://github.com/void-linux/void-packages/pull/40007
s6 and execline are s6-rc deps. Thanks for the report :) 

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (137 preceding siblings ...)
  2022-10-17 12:54 ` mobinmob
@ 2023-01-16  1:58 ` github-actions
  2023-01-18 17:05 ` mobinmob
                   ` (32 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: github-actions @ 2023-01-16  1:58 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/25743#issuecomment-1383352974

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] 173+ messages in thread

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (138 preceding siblings ...)
  2023-01-16  1:58 ` github-actions
@ 2023-01-18 17:05 ` mobinmob
  2023-01-18 17:07 ` mobinmob
                   ` (31 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-01-18 17:05 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1387421579

Comment:
Ι am currently testing 66 with the new skarnet stack in https://github.com/void-linux/void-packages/pull/41635 .  After that I will push a small update (fixes) here and in the repo.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (139 preceding siblings ...)
  2023-01-18 17:05 ` mobinmob
@ 2023-01-18 17:07 ` mobinmob
  2023-02-05 18:41 ` [PR PATCH] [Updated] " mobinmob
                   ` (30 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-01-18 17:07 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1387421579

Comment:
Ι am currently testing 66 with the new skarnet stack release in https://github.com/void-linux/void-packages/pull/41635 .  After that I will push a small update (fixes) here and in the repo.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (140 preceding siblings ...)
  2023-01-18 17:07 ` mobinmob
@ 2023-02-05 18:41 ` mobinmob
  2023-02-05 19:06 ` mobinmob
                   ` (29 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-02-05 18:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 116896 bytes --]

From 0910ecdba279363ab84fc22e41c2d5a65d24e682 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 5 Feb 2023 20:39:31 +0200
Subject: [PATCH 1/5] New package: boot-66serv-2.4.1

based on:
        https://github.com/void-linux/void-packages/pull/23122 (by @teldra )
        https://github.com/void-linux/void-packages/pull/21142 (by @zenfailure )
---
 srcpkgs/boot-66serv/INSTALL.msg               |   2 +
 srcpkgs/boot-66serv/files/66                  |   2 +
 .../boot-66serv/files/66boot-initial-setup    |  64 ++++
 srcpkgs/boot-66serv/files/66boot-rcdotconf    | 109 +++++++
 .../boot-66serv/files/66boot-storage-autoconf | 154 +++++++++
 srcpkgs/boot-66serv/files/runit               |  35 +++
 srcpkgs/boot-66serv/files/runit-wrapsv@       |   9 +
 srcpkgs/boot-66serv/files/switch-initutils    |  13 +
 srcpkgs/boot-66serv/files/switch-initutils-66 |  31 ++
 srcpkgs/boot-66serv/files/sysctl.sh           |  26 ++
 ...evices-devices-first-pass-at-improvi.patch | 157 ++++++++++
 ...ure-add-checks-to-make-the-process-m.patch | 295 ++++++++++++++++++
 ...evices-devices-add-c-dev-null-to-the.patch |  68 ++++
 ...igure-configure-add-back-tmpfile-con.patch |  34 ++
 ...onfigure-configure-fix-zfs-detection.patch |  39 +++
 ...dmraid-first-pass-at-making-the-serv.patch |  41 +++
 ...mdraid-first-pass-at-adding-mdraid-s.patch |  83 +++++
 ...ate-configuration-to-reflect-changes.patch |  71 +++++
 ...ure-add-support-for-mdraid-add-some-.patch |  95 ++++++
 ...-MDRAID-and-CHECK_CONFIGURATION-as-c.patch |  39 +++
 .../patches/0011-configure-more-fixes.patch   |  79 +++++
 .../patches/0012-configure-more-changes.patch |  60 ++++
 ...-ZFS_IMPORT-check-only-with-CHECK_CO.patch |  25 ++
 ...-service-boot-try-to-have-consistent.patch |  58 ++++
 ...re-add-code-for-MDRAID-and-CHECK_CON.patch | 117 +++++++
 ...unt-swap-partially-revert-previous-c.patch |  28 ++
 ...ure-properly-disable-devices-mdraid-.patch |  62 ++++
 ...ure-add-a-message-and-a-small-sleep-.patch |  50 +++
 ...-information-abouts-keys-that-do-not.patch | 102 ++++++
 ...odules-system-use-the-void-runit-mod.patch |  31 ++
 ...sctl-use-code-from-runit-void-for-sy.patch |  29 ++
 ...nt-efivarfs-rw-to-follow-voidlinux-p.patch |  26 ++
 .../0023-Remove-tmpfiles-support.patch        | 210 +++++++++++++
 srcpkgs/boot-66serv/template                  |  61 ++++
 34 files changed, 2305 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
 create mode 100644 srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..bd7570c2b016
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..8c1b1924595a
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..f098bbd6dc15
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# blkid(8) from util-linux should be available for the script to function.
+[ "$(blkid -v | grep util-linux -c)" != "1" ] && \
+66-yeller -F %r You need blkid from util-linux to run this program! %n  && exit 1
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions. TYPEs are available with `blkid -k`.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# devices_to_detect is a list of some device TYPEs we want to detect
+devices_to_detect="btrfs zfs_member crypto_LUKS linux_raid_member LVM2_member swap" 
+
+# Use detect fs for all members of devices_to_detect we want
+for key in $devices_to_detect; do detect_fs "$key" ; done 
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+
+# dmraid_TYPEs holds the device TYPEs dmraid handles
+dmraid_TYPEs="ddf_raid_member isw_raid_member lsi_mega_raid_member \
+via_raid_member silicon_medley_raid_member nvidia_raid_member \
+promise_fasttrack_raid_member hpt45x_raid_member hpt37x_raid_member \
+adaptec_raid_member jmicron_raid_member"
+
+for TYPE in $dmraid_TYPEs; do detect_fs "$TYPE" ; done
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+detect_util mdraid_util mdadm
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_member_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_member_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$linux_raid_member_detected" "$mdraid_util_exists" MDRAID MDRAID mdadm "[mdadm]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..f622a736f7a8
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
new file mode 100644
index 000000000000..cfc3239d9f2e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0001-service-system-devices-devices-first-pass-at-improvi.patch
@@ -0,0 +1,157 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/23] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
new file mode 100644
index 000000000000..1becf7808ae8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0002-configure-configure-add-checks-to-make-the-process-m.patch
@@ -0,0 +1,295 @@
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/23] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
new file mode 100644
index 000000000000..fdbbbc59fa73
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0003-service-system-devices-devices-add-c-dev-null-to-the.patch
@@ -0,0 +1,68 @@
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/23] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
new file mode 100644
index 000000000000..89e053009642
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0004-module-boot-configure-configure-add-back-tmpfile-con.patch
@@ -0,0 +1,34 @@
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/23] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
new file mode 100644
index 000000000000..0d5bdd28bf33
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0005-configure-configure-fix-zfs-detection.patch
@@ -0,0 +1,39 @@
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/23] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
new file mode 100644
index 000000000000..252ccb92e7d8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0006-devices-devices-dmraid-first-pass-at-making-the-serv.patch
@@ -0,0 +1,41 @@
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/23] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
new file mode 100644
index 000000000000..e0a73a91765d
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0007-devices-devices-mdraid-first-pass-at-adding-mdraid-s.patch
@@ -0,0 +1,83 @@
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/23] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
new file mode 100644
index 000000000000..4df67d21093e
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0008-doc-boot-.md-update-configuration-to-reflect-changes.patch
@@ -0,0 +1,71 @@
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/23] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
new file mode 100644
index 000000000000..d8909b459d74
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0009-configure-configure-add-support-for-mdraid-add-some-.patch
@@ -0,0 +1,95 @@
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/23] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
new file mode 100644
index 000000000000..f562f7d15f9b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0010-service-boot-add-MDRAID-and-CHECK_CONFIGURATION-as-c.patch
@@ -0,0 +1,39 @@
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/23] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
new file mode 100644
index 000000000000..e3bc6e64a958
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0011-configure-more-fixes.patch
@@ -0,0 +1,79 @@
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/23] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
new file mode 100644
index 000000000000..2a953f122c5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0012-configure-more-changes.patch
@@ -0,0 +1,60 @@
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/23] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
new file mode 100644
index 000000000000..ef28cbf32086
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0013-configure-do-the-ZFS_IMPORT-check-only-with-CHECK_CO.patch
@@ -0,0 +1,25 @@
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/23] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
new file mode 100644
index 000000000000..5ce87b234585
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0014-doc-boot-.md-and-service-boot-try-to-have-consistent.patch
@@ -0,0 +1,58 @@
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/23] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
new file mode 100644
index 000000000000..ccf5763eafd9
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0015-Makefile-configure-add-code-for-MDRAID-and-CHECK_CON.patch
@@ -0,0 +1,117 @@
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/23] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
new file mode 100644
index 000000000000..da48771ae0eb
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0016-service-mount-mount-swap-partially-revert-previous-c.patch
@@ -0,0 +1,28 @@
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/23] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
new file mode 100644
index 000000000000..400cb5cad8ab
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0017-configure-configure-properly-disable-devices-mdraid-.patch
@@ -0,0 +1,62 @@
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/23] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
new file mode 100644
index 000000000000..1803ee8ed0b8
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0018-configure-configure-add-a-message-and-a-small-sleep-.patch
@@ -0,0 +1,50 @@
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/23] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
new file mode 100644
index 000000000000..b77da1e59385
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0019-doc-boot-.md-Add-information-abouts-keys-that-do-not.patch
@@ -0,0 +1,102 @@
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/23] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
new file mode 100644
index 000000000000..21adb560c415
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0020-system-modules-modules-system-use-the-void-runit-mod.patch
@@ -0,0 +1,31 @@
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/23] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
new file mode 100644
index 000000000000..9460e81a018b
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0021-system-system-sysctl-use-code-from-runit-void-for-sy.patch
@@ -0,0 +1,29 @@
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/23] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
new file mode 100644
index 000000000000..a1b126ef3ef6
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0022-populate-sys-mount-efivarfs-rw-to-follow-voidlinux-p.patch
@@ -0,0 +1,26 @@
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/23] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
new file mode 100644
index 000000000000..75ebd8e747f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/0023-Remove-tmpfiles-support.patch
@@ -0,0 +1,210 @@
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/23] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..be9b2833f11a
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,61 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.1
+revision=1
+#_upstr_version=2.4.1
+#wrksrc=${pkgname}-v${_upstr_version}
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

From 11281bff4361b57df194024ec5067c5f3e0a9efb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 5 Feb 2023 20:40:28 +0200
Subject: [PATCH 2/5] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From cdd3eb23261f64bff52d504b20e1493d2f220cc2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 5 Feb 2023 20:40:35 +0200
Subject: [PATCH 3/5] New package: void-66-services-0.0.3

---
 srcpkgs/void-66-services/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..4e50084086db
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,24 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.3
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/${version}.tar.gz"
+checksum=15105a70ff7876001225e0ac666393243bd0a29cdb459910aa7c788997615ea1
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense LICENSE-3RD-PARTY
+	vlicense AUTHORS
+	vdoc conf/void-66-base-system.md
+	vdoc conf/void-66-conf.md
+	vdoc conf/void-66-logging.md
+	vdoc conf/void-66-runitsv.md
+}

From e03dbd6c210eca1bef9d3112e6bf2550a1ceb83c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 5 Feb 2023 20:40:42 +0200
Subject: [PATCH 4/5] New package: 66-void-20220424

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 44 +++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 000000000000..916d471cd4c9
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 000000000000..abfaa52b3b93
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 000000000000..12dcabd1f3e6
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 000000000000..58de3adb8d2f
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 000000000000..ceb9c44191cb
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,44 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20220424
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=28f849335eed5db4787d3b7dc342dd4066b7183f
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=43654b6c9428cd1d2ab1fc71f5af986be3f09b947b37548115ab2376a9b574e1
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/os-release
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From 2a13ff0c58682ff70e487494ed770c8c50a26b92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 5 Feb 2023 20:40:48 +0200
Subject: [PATCH 5/5] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 000000000000..313a528edee4
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (141 preceding siblings ...)
  2023-02-05 18:41 ` [PR PATCH] [Updated] " mobinmob
@ 2023-02-05 19:06 ` mobinmob
  2023-02-05 19:08 ` mobinmob
                   ` (28 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-02-05 19:06 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1418240599

Comment:
# Changes

## boot-66ser:
- Fixes for zfs detection in _66boot-storage-autoconf_
- Small changes in 66boot-* scripts.

## void-66services v. 0.0.3 :

- 181 services in total!
- More work to have services log to the per-service logger instead of syslog.
- Add a changelog.
- Split licensing information (LICENSE - LICENSE-3RD-PARTY) and amend the README.md accordingly.
- Repo-wide: remove unneeded @options key, standardise layout a little.
- Create additional service frontend files for nginx, dhcpcd and dhcpcd@ that use pid namespaces though 66-ns. These frontends have the suffix _ns after the service name.
- All services are represented now by either a single frontend file or a single directory with necessary files/subdirs.
- Use a single template that packages the master branch for the users that want to track development - void-66-services-master.
- Include documentantion in the package, starting from void-66-services-master and version 0.0.3.
- Documentation:
  - Add simple logging documentation in conf/void-66-logging.md.
  - Add information about the new 66boot-* utilities in conf/void-66-conf.md
  - Change Suggestions_for_services.md to point to the master branch as the development branch.
  - Add documentation for running runit services with the runit and runit-wrapsv@ service frontend files in conf/void-66-runitsv.md. These service frontend files are not in this repo, but in the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repo since they are currently part of the boot-66serv package.
  - Change the instructions in conf/void-66-conf.md to use the new binary packages repo.
  - Add documentation for the new 66-void and base-system-66 packages in conf/void-66-base-system.md.
- Many fixes.
- Two new contributors in this release, thanks @linuxergr and @paper42 

Packages with be appearing in the repo in an hour or so with the suffix (when applicable) `20230205`.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (142 preceding siblings ...)
  2023-02-05 19:06 ` mobinmob
@ 2023-02-05 19:08 ` mobinmob
  2023-03-11 18:37 ` [PR PATCH] [Updated] " mobinmob
                   ` (27 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-02-05 19:08 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1418240599

Comment:
# Changes

## boot-66ser:
- Fixes for zfs detection in _66boot-storage-autoconf_
- Small changes in 66boot-* scripts.

## void-66services v. 0.0.3 :

- 181 services in total!
- More work to have services log to the per-service logger instead of syslog.
- Add a changelog.
- Split licensing information (LICENSE - LICENSE-3RD-PARTY) and amend the README.md accordingly.
- Repo-wide: remove unneeded @options key, standardise layout a little.
- Create additional service frontend files for nginx, dhcpcd and dhcpcd@ that use pid namespaces though 66-ns. These frontends have the suffix _ns after the service name.
- All services are represented now by either a single frontend file or a single directory with necessary files/subdirs.
- Use a single template that packages the master branch for the users that want to track development - void-66-services-master.
- Include documentantion in the package, starting from void-66-services-master and version 0.0.3.
- Documentation:
  - Add simple logging documentation in conf/void-66-logging.md.
  - Add information about the new 66boot-* utilities in conf/void-66-conf.md
  - Change Suggestions_for_services.md to point to the master branch as the development branch.
  - Add documentation for running runit services with the runit and runit-wrapsv@ service frontend files in conf/void-66-runitsv.md. These service frontend files are not in this repo, but in the [66-voidlinux](https://codeberg.org/mobinmob/66-voidlinux) repo since they are currently part of the boot-66serv package.
  - Change the instructions in conf/void-66-conf.md to use the new binary packages repo.
  - Add documentation for the new 66-void and base-system-66 packages in conf/void-66-base-system.md.
- Many fixes.
- Two new contributors in this release, thanks @linuxergr and @paper42 

Packages with be appearing in the repo in an hour or so with the version suffix (when applicable) `20230205`.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (143 preceding siblings ...)
  2023-02-05 19:08 ` mobinmob
@ 2023-03-11 18:37 ` mobinmob
  2023-03-11 18:53 ` mobinmob
                   ` (26 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 106046 bytes --]

From deffd18203598fbdded63609d11a9da8ed82a28d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:28:20 +0200
Subject: [PATCH 1/5] New package: boot-66serv-2.4.1

based on:
    https://github.com/void-linux/void-packages/pull/23122 (by @teldra )
    https://github.com/void-linux/void-packages/pull/21142 (by @zenfailure )
---
 srcpkgs/boot-66serv/INSTALL.msg               |    2 +
 srcpkgs/boot-66serv/files/66                  |    2 +
 .../boot-66serv/files/66boot-initial-setup    |   64 +
 srcpkgs/boot-66serv/files/66boot-rcdotconf    |  109 +
 .../boot-66serv/files/66boot-storage-autoconf |  154 ++
 srcpkgs/boot-66serv/files/runit               |   35 +
 srcpkgs/boot-66serv/files/runit-wrapsv@       |    9 +
 srcpkgs/boot-66serv/files/switch-initutils    |   13 +
 srcpkgs/boot-66serv/files/switch-initutils-66 |   31 +
 srcpkgs/boot-66serv/files/sysctl.sh           |   26 +
 .../patches/66-voidlinux-20230311.patch       | 1850 +++++++++++++++++
 srcpkgs/boot-66serv/template                  |   58 +
 12 files changed, 2353 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..bd7570c2b016
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..8c1b1924595a
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..f098bbd6dc15
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# blkid(8) from util-linux should be available for the script to function.
+[ "$(blkid -v | grep util-linux -c)" != "1" ] && \
+66-yeller -F %r You need blkid from util-linux to run this program! %n  && exit 1
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions. TYPEs are available with `blkid -k`.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# devices_to_detect is a list of some device TYPEs we want to detect
+devices_to_detect="btrfs zfs_member crypto_LUKS linux_raid_member LVM2_member swap" 
+
+# Use detect fs for all members of devices_to_detect we want
+for key in $devices_to_detect; do detect_fs "$key" ; done 
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+
+# dmraid_TYPEs holds the device TYPEs dmraid handles
+dmraid_TYPEs="ddf_raid_member isw_raid_member lsi_mega_raid_member \
+via_raid_member silicon_medley_raid_member nvidia_raid_member \
+promise_fasttrack_raid_member hpt45x_raid_member hpt37x_raid_member \
+adaptec_raid_member jmicron_raid_member"
+
+for TYPE in $dmraid_TYPEs; do detect_fs "$TYPE" ; done
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+detect_util mdraid_util mdadm
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_member_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_member_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$linux_raid_member_detected" "$mdraid_util_exists" MDRAID MDRAID mdadm "[mdadm]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..f622a736f7a8
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch b/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
new file mode 100644
index 000000000000..b292b01894b4
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
@@ -0,0 +1,1850 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/24] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.39.2
+
+
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/24] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.39.2
+
+
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/24] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.39.2
+
+
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/24] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.39.2
+
+
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/24] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.39.2
+
+
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/24] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.39.2
+
+
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/24] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.39.2
+
+
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/24] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.39.2
+
+
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/24] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.39.2
+
+
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/24] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.39.2
+
+
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/24] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.39.2
+
+
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/24] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.39.2
+
+
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/24] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.39.2
+
+
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/24] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.39.2
+
+
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/24] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.39.2
+
+
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/24] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.39.2
+
+
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/24] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.39.2
+
+
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/24] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.39.2
+
+
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/24] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.39.2
+
+
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/24] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.39.2
+
+
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/24] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.39.2
+
+
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/24] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.39.2
+
+
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/24] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.39.2
+
+
+From 293672fbd073cea1ff8d1773c11ad722a9995d19 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 17 Feb 2023 19:59:23 +0200
+Subject: [PATCH 24/24] system-fsck: replace s6-test with test
+
+s6-test was moved to execline and eltest, deprecated from s6-portable-
+utils and finally removed in v. 2.3.0.0. The service will fail with
+exit code 111 and the boot will hang without replacing it.
+---
+ module/boot@/service/system/system-fsck | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/system/system-fsck b/module/boot@/service/system/system-fsck
+index ee93e8a..b5a4a47 100644
+--- a/module/boot@/service/system/system-fsck
++++ b/module/boot@/service/system/system-fsck
+@@ -12,7 +12,7 @@
+     if { 66-yeller -cdp system-fsck -1 /dev/console starts... }
+ 
+     execl-envfile ${conf_file}
+-    ifelse -X { s6-test ${FORCECHCK} = yes }
++    ifelse -X { test ${FORCECHCK} = yes }
+     {
+         if { 66-yeller -cdp system-fsck -1 /dev/console FORCECHCK was asked... }
+         execl-cmdline -s {
+-- 
+2.39.2
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..9015cfc91a87
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,58 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

From 8efa3b8dcb161a22d324d2217a7b91366cb1a222 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:28:37 +0200
Subject: [PATCH 2/5] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 738a8bd81f9d7d646d82865d17a2dea937a9e583 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:29:07 +0200
Subject: [PATCH 3/5] New package: void-66-services-0.0.3

---
 srcpkgs/void-66-services/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..4e50084086db
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,24 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.3
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/${version}.tar.gz"
+checksum=15105a70ff7876001225e0ac666393243bd0a29cdb459910aa7c788997615ea1
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense LICENSE-3RD-PARTY
+	vlicense AUTHORS
+	vdoc conf/void-66-base-system.md
+	vdoc conf/void-66-conf.md
+	vdoc conf/void-66-logging.md
+	vdoc conf/void-66-runitsv.md
+}

From 08eb0b5c8d5675bf8630f74421d43a080bfc52b8 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:29:15 +0200
Subject: [PATCH 4/5] New package: 66-void-20220424

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 44 +++++++++++
 5 files changed, 124 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 000000000000..916d471cd4c9
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 000000000000..abfaa52b3b93
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 000000000000..12dcabd1f3e6
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 000000000000..58de3adb8d2f
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 000000000000..ceb9c44191cb
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,44 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20220424
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=28f849335eed5db4787d3b7dc342dd4066b7183f
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=43654b6c9428cd1d2ab1fc71f5af986be3f09b947b37548115ab2376a9b574e1
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/os-release
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From 75ac9e32db2bcaeb1c1d7e2986327cb7ee8b4e20 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:29:22 +0200
Subject: [PATCH 5/5] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 000000000000..313a528edee4
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

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

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (144 preceding siblings ...)
  2023-03-11 18:37 ` [PR PATCH] [Updated] " mobinmob
@ 2023-03-11 18:53 ` mobinmob
  2023-03-11 18:57 ` mobinmob
                   ` (25 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.4.1.
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 105855 bytes --]

From b83aaed7491e41bc5c6bd539a540a24d6c82fcf0 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:52:03 +0200
Subject: [PATCH 1/5] New package: boot-66serv-2.4.1

---
 srcpkgs/boot-66serv/INSTALL.msg               |    2 +
 srcpkgs/boot-66serv/files/66                  |    2 +
 .../boot-66serv/files/66boot-initial-setup    |   64 +
 srcpkgs/boot-66serv/files/66boot-rcdotconf    |  109 +
 .../boot-66serv/files/66boot-storage-autoconf |  154 ++
 srcpkgs/boot-66serv/files/runit               |   35 +
 srcpkgs/boot-66serv/files/runit-wrapsv@       |    9 +
 srcpkgs/boot-66serv/files/switch-initutils    |   13 +
 srcpkgs/boot-66serv/files/switch-initutils-66 |   31 +
 srcpkgs/boot-66serv/files/sysctl.sh           |   26 +
 .../patches/66-voidlinux-20230311.patch       | 1850 +++++++++++++++++
 srcpkgs/boot-66serv/template                  |   58 +
 12 files changed, 2353 insertions(+)
 create mode 100755 srcpkgs/boot-66serv/INSTALL.msg
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100755 srcpkgs/boot-66serv/files/66boot-initial-setup
 create mode 100755 srcpkgs/boot-66serv/files/66boot-rcdotconf
 create mode 100755 srcpkgs/boot-66serv/files/66boot-storage-autoconf
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100644 srcpkgs/boot-66serv/files/runit-wrapsv@
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66
 create mode 100755 srcpkgs/boot-66serv/files/sysctl.sh
 create mode 100644 srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
 create mode 100755 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/INSTALL.msg b/srcpkgs/boot-66serv/INSTALL.msg
new file mode 100755
index 000000000000..72e28e5a9974
--- /dev/null
+++ b/srcpkgs/boot-66serv/INSTALL.msg
@@ -0,0 +1,2 @@
+Please re-enable the boot@system service after an update,
+by running '66-enable -t boot -F boot@system".
diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 000000000000..2e5bb6a10a5f
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100755
index 000000000000..bd7570c2b016
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This scripts create basic trees and enables services.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools), 66-env, 66-tree and 66-enable (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-initial-setup"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# Information for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	# ${1} is the name of the tree 
+	66-yeller -W %b "An action for the [${1}] tree failed.
+Check the output before this message for a possibe cause and consult
+the 66-tree documentation." %n
+}
+
+msg_services() {
+	# ${1} is the name of a service
+	66-yeller -F %r "Enabling the [${1}] service failed.
+Check the output before this message for a possibe cause and consult
+the 66-enable documentation." %n
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -nz boot || msg_trees boot
+# Enable the boot@system service in the boot tree.
+66-enable -z -F -t boot boot@system || msg_services boot@system
+
+# Copy the default boot@conf so that it will survive updates and be accesible
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+new_conf="/etc/66/conf/boot@system/version/boot@system"
+[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf"
+
+# Create default tree, enable it and make it current.
+66-tree -z -nEc default || msg_trees default
+# Enable switch-initutils oneshot service in the default tree.
+66-enable -z switch-initutils || msg_services switch-initutils
+
+# Create and enable runit tree.
+66-tree -z -nE runit || msg_trees runit
+# Enable the runit service in the runit tree.
+66-enable -z -t runit runit || msg_services runit
+# Start runit tree after the default tree.
+66-tree -z -S default runit || msg_trees runit
+
+# Print on succesfull completion
+# shellcheck disable=SC2181
+if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi
diff --git a/srcpkgs/boot-66serv/files/66boot-rcdotconf b/srcpkgs/boot-66serv/files/66boot-rcdotconf
new file mode 100755
index 000000000000..8c1b1924595a
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-rcdotconf
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script reads a **valid** rc.conf and writes the values to the 
+# corresponding configuration options in the boot@system environment file.
+# Excluding the common posix userland commands, the script needs 66-yeller
+# (from 66-tools) and 66-env (from 66).
+
+# Variables for 66-yeller
+export PROG="66boot-rcdotconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+HOSTNAME=
+HOSTNAME1=
+HARDWARECLOCK=
+TIMEZONE=
+KEYMAP=
+FONT=
+FONT_MAP=
+FONT_UNIMAP=
+TTYS=
+
+apply_conf_from_to(){
+	# Set configuration value ${3} from ${1} to ${2}
+	# ${1} is the conf option from /etc/rc.conf
+	# ${2} is the conf option from the boot@ conf file
+	# ${3} is the value from the /etc/rc.conf option/var
+	if [ -n "${3}" ]
+	then
+		66-env -t boot -r "${2}"=!"${3}" boot@system
+		66-yeller %g "${2} set to [${3}]." %n
+	fi
+}
+
+set_hostname() { 
+	# ${1} HOSTNAME value
+	[ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1
+	
+	if [ -n "${1}" ]
+	then
+		66-env -t boot -r HOSTNAME=!"${1}" boot@system
+		66-yeller %g "HOSTNAME set to [${1}]." %n
+	elif [ -n "$HOSTNAME1" ]
+	then
+		66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system
+		66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n
+	elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ]
+	then
+	66-env -t boot -r HOSTNAME=!void-live boot@system
+	66-yeller -W %b "No HOSTNAME set, reverting
+ to the default [void-live]." %n
+	fi
+}
+ 
+set_ttys() {
+	# Same positional args as apply_conf_from_to
+	if  [ -n "${3}" ]
+	then
+		if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ]
+		 then
+		 	apply_conf_from_to "${1}" "${2}" "${3}"
+		else
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller -W %b "${3} TTYS is not valid as a tty number,
+reverting to the default [4]." %n
+		exit 1
+		fi
+	else 
+		66-env -t boot -r TTY=!4 boot@system
+		66-yeller  -W  %b "TTY number not set, reverting
+ to the default [4]." %n
+	fi
+}
+
+check_tz() {
+	# On installation timezone can be set by symlink and not by the 
+	# TIMEZONE key in rc.conf. In that case follow the symlink.
+	if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then
+		TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)"
+		export TIMEZONE
+	fi
+}
+
+
+# shellcheck disable=SC1091
+. /etc/rc.conf
+
+check_tz
+set_hostname "$HOSTNAME"
+apply_conf_from_to TIMEZONE TZ "$TIMEZONE"
+apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK"
+apply_conf_from_to KEYMAP KEYMAP "$KEYMAP"
+apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP"
+apply_conf_from_to FONT FONT "$FONT"
+apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP"
+set_ttys TTYS TTY "$TTYS"
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system' " %n
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/66boot-storage-autoconf b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
new file mode 100755
index 000000000000..f098bbd6dc15
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-storage-autoconf
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Copyright 2021 mobinmob <mobinmob@disroot.org>
+# Use of this source code is governed by the 2-Clause BSD License
+# that can be found in the LICENSE file at the root project directory.
+# SPDX short identifier: BSD-2-Clause
+
+# This script determines if the system has dmraid, luks, zfs, btrfs,
+# volumes, a swap partition or swapfile and configures the environment
+# file of the boot@system service accordingly.
+# Excluding the common posix userland commands, the script needs 66-which and 66-yeller
+# (from 66-tools), 66-env (from 66) and blkid (from util-linux).
+
+# Variables for 66-yeller
+export PROG="66boot-storage-autoconf"
+export COLOR_ENABLED="1"
+export CLOCK_ENABLED="0"
+
+# Script must run as root.
+user=$(id -u)
+[ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n  && exit 1
+
+# blkid(8) from util-linux should be available for the script to function.
+[ "$(blkid -v | grep util-linux -c)" != "1" ] && \
+66-yeller -F %r You need blkid from util-linux to run this program! %n  && exit 1
+
+detect_fs() {
+        # Uses blkid to detect partition TYPEs. The result is the number
+        # of detected partitions. TYPEs are available with `blkid -k`.
+        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
+}
+
+detect_swapfile() {
+        # Finds swap references in /etc/fstab.
+        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
+        export swapfile_detected
+}
+
+detect_util() {
+        # Uses 66-which to determine if a utility exists.
+        # Output is $fs_util_exitst=0 (or 1)
+        # ${1} is the variable for the utility, in the form of "$fs_util"
+        # ${2} is the name of the executable
+        export "${1}"_exists="$(66-which "${2}" | wc -l)"
+}
+
+check_and_apply_conf() {
+        # Checks for partition types and the existance of the relevant utilities.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        # ${3} is the name of the configuration variable
+        # ${4} is the user-friendly name for the configuration option
+        # ${5} name of the utility needed for the block device type
+        # ${6} is the name of the package that contains the program
+        # ${6} is **distribution-dependent**
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "${3}"=!yes boot@system 
+                66-yeller %g "${4} detected and enabled!" %n
+        elif [ "${1}" != "0" ] && [ "${2}" = "0" ]
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n
+        elif [ "${1}" = "0" ] 
+        then
+                66-env -t boot -r "${3}"=!no boot@system
+                66-yeller %b "${4} not detected!" %n
+        fi
+
+}
+
+check_and_apply_conf_zpool() {
+        # Checks for the zfs pool import method if ZFS is enabled.
+        # Outputs user information
+        # ${1} is in the form of $fs_detected
+        # ${2} is in the form of $fs_name_exists
+        if [ "${1}" != "0" ] && [ "${2}" = "1" ] 
+        then 
+                66-env -t boot -r "ZFS"=!yes boot@system 
+                if [ -e /etc/zfs/zpool.cache ]
+                then
+                        66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system
+                        66-yeller %g "ZFS import method configured as zpoolcache." %n
+                else
+                        66-env -t boot -r ZFS_IMPORT=!scan boot@system
+                        66-yeller %g "ZFS import method configured as scan." %n
+                fi
+        fi
+
+}
+
+# devices_to_detect is a list of some device TYPEs we want to detect
+devices_to_detect="btrfs zfs_member crypto_LUKS linux_raid_member LVM2_member swap" 
+
+# Use detect fs for all members of devices_to_detect we want
+for key in $devices_to_detect; do detect_fs "$key" ; done 
+
+# dmraid supports multiple TYPEs of *-raid-member devices.
+# find them first and add the sum of the *_detected values to
+# dmraid_detected.
+
+# dmraid_TYPEs holds the device TYPEs dmraid handles
+dmraid_TYPEs="ddf_raid_member isw_raid_member lsi_mega_raid_member \
+via_raid_member silicon_medley_raid_member nvidia_raid_member \
+promise_fasttrack_raid_member hpt45x_raid_member hpt37x_raid_member \
+adaptec_raid_member jmicron_raid_member"
+
+for TYPE in $dmraid_TYPEs; do detect_fs "$TYPE" ; done
+
+# shellcheck disable=SC2154
+dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
++lsi_mega_raid_member_detected+via_raid_member_detected\
++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
++hpt45x_raid_member_detected+adaptec_raid_member_detected\
++jmicron_raid_member_detected))
+
+# swap can be detected by blkid if it is a partition or it can be a swapfile
+# declared in fstab
+detect_swapfile
+swap_detected=$((swap_detected+swapfile_detected))
+
+# Use detect_util for all utilities
+detect_util btrfs_util btrfs
+detect_util zfs_util zfs
+detect_util luks_util cryptsetup
+detect_util lvm_util lvchange
+detect_util dmraid_util dmraid
+detect_util swap_util swapon
+detect_util mdraid_util mdadm
+
+# Finally detect and apply the configuration
+# shellcheck disable=SC2154
+check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$zfs_member_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]"
+# shellcheck disable=SC2154
+check_and_apply_conf_zpool "$zfs_member_detected" "$zfs_util_exists" ZFS
+# shellcheck disable=SC2154
+check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]"
+# shellcheck disable=SC2154
+check_and_apply_conf "$linux_raid_member_detected" "$mdraid_util_exists" MDRAID MDRAID mdadm "[mdadm]"
+
+
+66-yeller %g "Please re-enable the boot@system service
+for the changes to take effect by running (as root):
+'66-enable -F -t boot boot@system'" %n
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 000000000000..1e6bc6872f78
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,35 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+
+[start]
+@build = custom
+@shebang = "/bin/sh"
+@execute = (
+exec 2>&1
+
+PATH=/usr/bin:/usr/sbin
+runlevel=66
+
+runsvchdir "${runlevel}"
+s6-mkdir -v -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
+
+exec s6-env -i PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
+ )
+
+[stop]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = (
+    sv force-stop /var/service/* &&
+    sv exit /var/service/* )
+
+[logger]
+@backup = 3
+@maxsize = 1000000
\ No newline at end of file
diff --git a/srcpkgs/boot-66serv/files/runit-wrapsv@ b/srcpkgs/boot-66serv/files/runit-wrapsv@
new file mode 100644
index 000000000000..90349947127b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit-wrapsv@
@@ -0,0 +1,9 @@
+# The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd
+[main]
+@type = classic
+@version = @VERSION@
+@description = "wrapper for @I runit service"
+@user = ( root )
+
+[start]
+@execute = ( /etc/sv/@I/run )
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 000000000000..9876234ddaa3
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,13 @@
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit
+# utilities in their place. It runs by default. There is a similar
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i}
+	fi
+	done
diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 000000000000..f622a736f7a8
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,31 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit.
+# The service makes sure that the user has the proper utilities for the
+# init system they are currently running.
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+
+poweroff_util=$(readlink -f /usr/bin/poweroff)
+
+if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then
+        if [ "$poweroff_util" != /usr/bin/poweroff ]; then
+		for i in reboot poweroff halt shutdown; do
+            mv /usr/bin/${i} /usr/bin/${i}.runit
+            cp /etc/66/${i} /usr/bin/${i}
+            done
+            fi
+fi
+)
diff --git a/srcpkgs/boot-66serv/files/sysctl.sh b/srcpkgs/boot-66serv/files/sysctl.sh
new file mode 100755
index 000000000000..3a7c6f85b898
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/sysctl.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copy of the 08-syctl.sh script of the void-runit project,
+# that is in the public domain.
+# Latest version of the upstream script is in:
+# https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh
+# Licence information is available in the README.md:
+# https://github.com/void-linux/void-runit#readme
+
+if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
+	mkdir -p /run/vsysctl.d
+    for i in /run/sysctl.d/*.conf \
+        /etc/sysctl.d/*.conf \
+        /usr/local/lib/sysctl.d/*.conf \
+        /usr/lib/sysctl.d/*.conf; do
+
+        if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then
+            ln -s "$i" "/run/vsysctl.d/${i##*/}"
+        fi
+    done
+    for i in /run/vsysctl.d/*.conf; do
+        sysctl -p "$i"
+    done
+    rm -rf -- /run/vsysctl.d
+    sysctl -p /etc/sysctl.conf
+fi
diff --git a/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch b/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
new file mode 100644
index 000000000000..b292b01894b4
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/66-voidlinux-20230311.patch
@@ -0,0 +1,1850 @@
+From fd57e39ac0214f0009998329f81abf843f3efb82 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Tue, 17 May 2022 17:18:33 +0300
+Subject: [PATCH 01/24] service/system/devices/devices-*: first pass at
+ improving user warnings and general behavior. More information on the
+ [PR](https://framagit.org/pkg/obmods/boot-66serv/-/merge_requests/16)
+
+---
+ .../service/system/devices/devices-btrfs      | 18 +++++++-------
+ .../service/system/devices/devices-crypttab   | 17 ++++++++-----
+ .../boot@/service/system/devices/devices-lvm  | 24 ++++++++-----------
+ .../boot@/service/system/devices/devices-zfs  | 15 +++++++-----
+ 4 files changed, 40 insertions(+), 34 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index dc46638..987d29c 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active btrfs devices"
++@description = "Activate btrfs devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -10,11 +10,13 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q btrfs }
+-        btrfs device scan
+-
+-    }
+-    66-yeller -fcdp devices-btrfs -1 /dev/console crashed!
++    ifelse { blkid --match-token=TYPE="btrfs" }
++        { ifelse -n { 66-which -q btrfs }
++            { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
++        if -nt { 
++            btrfs device scan
++        }
++        66-yeller -fcdp devices-btrfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index fd491ef..b1c327b 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,13 +10,15 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+-    if -nt {
++ ifelse { blkid --match-token=TYPE="crypto_LUKS" }
+ 
+-        execl-toc -e ${script_conf}
+-        if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
+-
+-        foreground {
++    {  
++    ifelse { execl-toc -X -e ${script_conf} }
++        { if -nt { 
++            if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } }
++            foreground {
+ 
++            if { blkid --match-token=TYPE="LVM2_member" }
+             if { 66-which -q vgchange }
+             if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... }
+             if -nt {
+@@ -26,7 +28,10 @@
+             66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices
+         }
+     }
+-    66-yeller -fcdp devices-crypttab -1 /dev/console crashed!
++    66-yeller -fcdp devices-crypttab -1 /dev/console crashed! }
++     if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 }      
++        
++    66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available!
+ )
+ 
+ [environment]
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index df1429e..3a5068d 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -1,7 +1,7 @@
+ [main]
+ @type = oneshot
+ @version = @vers@
+-@description = "Active lvm devices"
++@description = "Activate lvm devices"
+ @user = ( root )
+ @depends = ( udevadm )
+ @options = ( !log )
+@@ -9,18 +9,14 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q lvmetad }
+-        execl-toc -d /run/lvm
+-        if { lvmetad -p /run/lvm/lvmetad.pid }
+-        if { 66-which -q vgchange }
+-        foreground {
+-            vgchange --sysinit -a ay
++if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
++    ifelse { blkid --match-token=TYPE="LVM2_member" }
++        { ifelse -n { 66-which -q vgchange }
++            { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
++        if -nt { 
++           vgchange --sysinit -a ay
+         }
+-        pkill lvmetad
+-
+-    }
+-    66-yeller -fcdp devices-lvm -1 /dev/console crashed!
++        66-yeller -fcdp devices-lvm -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available!
+ )
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index c832647..fdfbe5f 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,14 +10,17 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q zfs }
+-        if { execl-cmdline -s { zfs mount ${mount_args} } }
++    ifelse { blkid --match-token=TYPE="zfs" }
++        { ifelse -n { 66-which -q zfs }
++            { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
++        if -nt { 
++           if { execl-cmdline -s { zfs mount ${mount_args} } }
+         execl-cmdline -s { zfs share ${share_args} }
++        }
++        66-yeller -fcdp devices-zfs -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!!
+ 
+-    }
+-    66-yeller -fcdp devices-zfs -1 /dev/console crashed!
+ )
+ 
+ [environment]
+-- 
+2.39.2
+
+
+From cc9ac05ef06a8dcf871f950dd076ab536aa26a18 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:12:03 +0300
+Subject: [PATCH 02/24] configure/configure: add checks to make the process
+ more robust
+
+- check for the existence of necessary keys
+- check if keys have correct values
+- check if btrfs, zfs, luks, dmraid etc volumes exist, the relevant
+configuration options are valid and the utilities needed are present
+- enable tests if CHECK_CONFIGURATION=yes.
+---
+ module/boot@/configure/configure | 230 ++++++++++++++++++++++++++++++-
+ 1 file changed, 224 insertions(+), 6 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index e6fed96..bcf2fad 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -10,19 +10,96 @@ export COLOR_ENABLED="${MOD_COLOR}"
+ service_dir="${MOD_MODULE_DIR}/service"
+ SV_REAL=
+ 
++## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+-
++## sv_container_list contained keys for options that are disabled in a container
+ sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_container_list is used by the check funtions and has the same contents as the
++## sv_container_list, minus UDEV_ADM 
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
++## sv_extra_list_check is used by the check functions and contains keys that need
++## to be present but are not in the previous lists
++sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ die(){
+-  66-yeller -f "${@}"
+-  exit 111
++    fatal_error_message="$( printf '%s' "${@}" )"
++    66-yeller -f "%r $fatal_error_message %n"
++    exit 111
++}
++
++warn() {
++    warn_message="$( printf '%s' "${@}" )"
++    66-yeller -W "%y $warn_message %n"
++}
++
++emit_trace() {
++    trace_message="$( printf '%s' "${@}" )"
++    66-yeller -t "%b $trace_message %n"
++}
++
++## Detect functions. They use blkid(8) from util-linux to detect volume types
++## and 66-which to detect the needed utilities for the volume types
++
++detect_fs() {
++        # Uses blkid to detect partition TYPEs. The result is the number
++        # of detected partitions.
++        export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )"
++}
++detect_swapfile() {
++        # Finds swap references in /etc/fstab.
++        swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )"
++        export swapfile_detected
+ }
++detect_util() {
++        # Uses 66-which to determine if a utility exists.
++        # Output is $fs_util_exitst=0 (or 1)
++        # ${1} is the variable for the utility, in the form of "$fs_util"
++        # ${2} is the name of the executable
++        export "${1}"_exists="$(66-which "${2}" | wc -l)"
++}
++
++detect_fs btrfs
++detect_fs zfs
++detect_fs crypto_LUKS
++detect_fs LVM2_member
++# dmraid supports multiple TYPEs of *-raid-member devices.
++# find them first and add the sum of the *_detected values to
++# dmraid_detected.
++detect_fs ddf_raid_member
++detect_fs isw_raid_member
++detect_fs lsi_mega_raid_member
++detect_fs via_raid_member
++detect_fs silicon_medley_raid_member
++detect_fs nvidia_raid_member
++detect_fs promise_fasttrack_raid_member
++detect_fs hpt45x_raid_member
++detect_fs hpt37x_raid_member
++detect_fs adaptec_raid_member
++detect_fs jmicron_raid_member
++dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\
+++lsi_mega_raid_member_detected+via_raid_member_detected\
+++silicon_medley_raid_member_detected+nvidia_raid_member_detected\
+++promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\
+++hpt45x_raid_member_detected+adaptec_raid_member_detected\
+++jmicron_raid_member_detected))
++# swap can be detected by blkid if it is a partition or it can be a swapfile
++# declared in fstab
++detect_fs swap
++detect_swapfile
++swap_detected=$((swap_detected+swapfile_detected))
++detect_util btrfs_util btrfs
++detect_util zfs_util zfs
++detect_util luks_util cryptsetup
++detect_util lvm_util lvchange
++detect_util dmraid_util dmraid
++detect_util swap_util swapon
+ 
++## Check functions.
+ check_empty_var(){
+     name="${1}" var_value="${2}"
+     if [ -z "${var_value}" ]; then
+@@ -30,7 +107,129 @@ check_empty_var(){
+     fi
+ }
+ 
++check_var_existance() {
++    # ${1} is a list with key names
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++        if [ -z  "$key_value" ]; then
++        die "$key is not present or misconfigured. The process cannot continue, 
++        please fix yout configuration and try again!"
++        fi
++    done
++}
++
++check_boolean_var_values() {
++    # ${1} is a list of key names
++    # ${2} and ${2} are valid values for these keys
++    for key in ${1}
++    do
++    eval key_value="\$${key}"
++    key_value="$key_value"
++    if [ "$key_value" = "${2}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    elif  [ "$key_value" = "${3}" ]; then
++        emit_trace "$key has a correct value of [$key_value]"
++    else
++        die " [${key_value}] is not a valid value for ${key}. The process cannot continue,
++please fix your configuration and try again!"
++    fi
++    done
++}
++    
++check_volume_sanity() {
++    # ${1} is the configuration key for the volume type
++    # ${2} is the value of the relevant detect_fs function
++    # ${3} is the value of the relevant detect_util_exists function
++    # ${4} is the name of the relevant utility
++    # Check if volumes of a certain type (${2}) exist, if the utility
++    # needed for the type exists and if that volume type is enabled
++    # in the environment file.
++    eval key_value="\$${1}"
++    key_value="$key_value"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
++    emit_trace "${1} is enabled and configured correctly"
++    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    [ $key_value ] but there are no relevant volumes present. This is\
++ a non-fatal warning, you may want to check your configuration"
++    [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
++    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
++The process cannot continue, please check your configuration and try again"
++    [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
++    warn "${1} is set to [$key_value], but relevant volumes exist. \
++This is a non-fatal warning but you should check your configuration!"
++}
++
++check_tty_number() {
++    # TTY should between 1 and 11. Warn if it is 0, abort with an error
++    # if it is outside of this range.
++    key_value="$TTY"
++    if [ "${key_value}" -gt 11 ]; then
++        die "TTY should have a value between 1 and 11. The current value\
++ of [$key_value] is not valid. The process cannot  continue, please fix\
++ your configuration and try again"
++    elif [ "$key_value" -lt 0 ]; then 
++        die "TTY should have a value between 1 and 11. The process cannot\
++ continue, please fix your configuration and try again"
++    elif [ "$key_value" -eq 0 ]; then
++        warn "TTY has a value of [0]. That is valid, but means that the\
++ system will not have a configured tty."
++    else 
++        emit_trace "TTY has a valid value. [$key_value] ttys will be\
++ configured. "
++    fi
++}
++
++check_tz() {
++    # TZ should have a timezone that exists as a value
++    execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \
++a valid value for TZ. The process cannot continue, please check your configuration and try again."
++    execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\
++ value of [${TZ}]."
++}
++
++check_keymap() {
++    # KEYMAP value is checked against a generated list of keymaps in the system
++    keymap_list=""
++    keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')"
++    keymap_exists=
++    for keymap in $keymap_list;
++        do 
++            [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ;
++        done
++    if [ "$keymap_exists" = "1" ] ;
++    then
++        emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]."
++    else
++        die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++check_consolefont() {
++    # FONT value is checked against a generated list of console fonts that
++    # exist in the system. Currently psf and psfu types are listed, compressed
++    # with gz. We will see if that is enough.
++    console_fontlist=""
++    console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')"
++    console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')"
++    font_exists=
++    for font in $console_fontlist;
++        do 
++            [ "$font" = "${FONT}" ] && export font_exists=1 ;
++        done
++    if [ "$font_exists" = "1" ] ;
++        then
++        emit_trace "FONT is correctly configured with a value of [${FONT}]."
++    else
++        die " [${FONT}] is not a valid value for FONT. The process cannot continue,\
++         please check your configuration and try again."
++    fi
++}
++
+ retrieve_sv_name(){
++    # Matches the configuration key of the environment section/file to the name
++    # of the corresponding service frontend.
+     sv=${1}
+     case ${sv} in
+         HARDWARECLOCK) SV_REAL="system-hwclock" ;;
+@@ -46,7 +245,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+@@ -127,6 +325,26 @@ sv_comment_real() {
+     fi
+ }
+ 
++
++# Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
++# environment section/file
++if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++    check_var_existance "$sv_boolean_list"
++    check_var_existance "$sv_container_list_check"
++    check_var_existance "$sv_extra_list_check"
++    check_boolean_var_values "$sv_boolean_list" "yes" "no"
++    check_tty_number
++    check_tz
++    check_keymap
++    check_consolefont
++    check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
++    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
++    check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
++    check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
++    check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++fi
++
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+ touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12"
+ 
+@@ -210,4 +428,4 @@ else
+     done
+ fi
+ 
+-66-yeller "%bsuccessfully%n configured"
++66-yeller "%bsuccessfully%n configured"
+\ No newline at end of file
+-- 
+2.39.2
+
+
+From b600e122710af5dc92e74988b68aa7583d922487 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 10 Jul 2022 17:13:45 +0300
+Subject: [PATCH 03/24] service/system/devices/devices-* : add -c /dev/null to
+ the blkid command in order to avoid using a cachefile for the detection.
+
+---
+ module/boot@/service/system/devices/devices-btrfs    | 2 +-
+ module/boot@/service/system/devices/devices-crypttab | 2 +-
+ module/boot@/service/system/devices/devices-lvm      | 2 +-
+ module/boot@/service/system/devices/devices-zfs      | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-btrfs b/module/boot@/service/system/devices/devices-btrfs
+index 987d29c..3e5fcec 100644
+--- a/module/boot@/service/system/devices/devices-btrfs
++++ b/module/boot@/service/system/devices/devices-btrfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="btrfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" }
+         { ifelse -n { 66-which -q btrfs }
+             { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index b1c327b..07a0e36 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... }
+- ifelse { blkid --match-token=TYPE="crypto_LUKS" }
++ ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" }
+ 
+     {  
+     ifelse { execl-toc -X -e ${script_conf} }
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 3a5068d..0da7390 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+ if { 66-yeller -cdp devices-lvm -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="LVM2_member" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" }
+         { ifelse -n { 66-which -q vgchange }
+             { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 }
+         if -nt { 
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index fdfbe5f..69c6b34 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.39.2
+
+
+From 2c14f843c9de0405b5e6e959afc754c5c1b28842 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:26:04 +0300
+Subject: [PATCH 04/24] module/boot@/configure/configure: add back tmpfile
+ configuration.
+
+---
+ module/boot@/configure/configure | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bcf2fad..2cdef3f 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
++DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -245,6 +245,7 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
++        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+-- 
+2.39.2
+
+
+From be5ea919956fe5e5a1913d8fd98c58577ae9ade6 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 20:32:21 +0300
+Subject: [PATCH 05/24] configure/configure: fix zfs detection.
+
+---
+ module/boot@/configure/configure                | 2 +-
+ module/boot@/service/system/devices/devices-zfs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2cdef3f..eca4903 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -64,7 +64,7 @@ detect_util() {
+ }
+ 
+ detect_fs btrfs
+-detect_fs zfs
++detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+diff --git a/module/boot@/service/system/devices/devices-zfs b/module/boot@/service/system/devices/devices-zfs
+index 69c6b34..8968b04 100644
+--- a/module/boot@/service/system/devices/devices-zfs
++++ b/module/boot@/service/system/devices/devices-zfs
+@@ -10,7 +10,7 @@
+ @execute =
+ (
+     if { 66-yeller -cdp devices-zfs -1 /dev/console starts... }
+-    ifelse { blkid -c /dev/null --match-token=TYPE="zfs" }
++    ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" }
+         { ifelse -n { 66-which -q zfs }
+             { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 }
+         if -nt { 
+-- 
+2.39.2
+
+
+From e8c012d02d2ac37648420ad43eb8b44fdd071b03 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 21:54:56 +0300
+Subject: [PATCH 06/24] devices/devices-dmraid: first pass at making the
+ service more robust.
+
+- make the check for the utility not fatal - exist with a warning
+- make the dmraid invocation more verbose (it not easy to add the same
+check as in other services)
+- make the crash message a warning.
+---
+ .../boot@/service/system/devices/devices-dmraid   | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/module/boot@/service/system/devices/devices-dmraid b/module/boot@/service/system/devices/devices-dmraid
+index f1408ad..699fc5f 100644
+--- a/module/boot@/service/system/devices/devices-dmraid
++++ b/module/boot@/service/system/devices/devices-dmraid
+@@ -9,12 +9,11 @@
+ [start]
+ @execute =
+ (
+-    if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
+-    if -nt {
+-
+-        if { 66-which -q dmraid }
+-        dmraid -i -ay
+-
+-    }
+-    66-yeller -fcdp devices-dmraid -1 /dev/console crashed!
++	if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... }
++	ifelse -n { 66-which -q dmraid }
++		{ if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 }
++		if -nt {
++			dmraid -vv -i -ay
++			}
++	66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found!
+ )
+-- 
+2.39.2
+
+
+From d95f82e086a8b85c003b67c2d1c91740fc48c0ab Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 28 Sep 2022 22:15:50 +0300
+Subject: [PATCH 07/24] devices/devices-mdraid: first pass at adding mdraid
+ support. - add devices-mdraid frontend service file - add devices-mdraid in
+ the @depends array of devices-crypttab, devices-lvm and in the @contents
+ array of system-devices.
+
+---
+ .../service/system/devices/devices-crypttab   |  2 +-
+ .../boot@/service/system/devices/devices-lvm  |  2 +-
+ .../service/system/devices/devices-mdraid     | 22 +++++++++++++++++++
+ module/boot@/service/system/system-Devices    |  1 +
+ 4 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 module/boot@/service/system/devices/devices-mdraid
+
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 07a0e36..68e882c 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Activate encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm devices-dmraid devices-lvm )
++@depends = ( udevadm devices-dmraid devices-lvm devices-mdraid )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/system/devices/devices-lvm b/module/boot@/service/system/devices/devices-lvm
+index 0da7390..ac75959 100644
+--- a/module/boot@/service/system/devices/devices-lvm
++++ b/module/boot@/service/system/devices/devices-lvm
+@@ -3,7 +3,7 @@
+ @version = @vers@
+ @description = "Activate lvm devices"
+ @user = ( root )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-dmraid devices-mdraid )
+ @options = ( !log )
+ 
+ [start]
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+new file mode 100644
+index 0000000..d331c52
+--- /dev/null
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -0,0 +1,22 @@
++[main]
++@type = oneshot
++@version = @vers@
++@description = "Activate software raid devices"
++@user = ( root )
++@depends = ( udevadm )
++@options = ( !log )
++
++[start]
++@execute =
++(
++   if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... }
++    ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" }
++        { ifelse -n { 66-which -q mdadm }
++            { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 }
++        if -nt { 
++            mdadm -As
++        }
++        66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
++    
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++)
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de8e5e8..de10e56 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -10,4 +10,5 @@ devices-btrfs
+ devices-crypttab
+ devices-lvm
+ devices-zfs
++devices-mdraid
+ )
+-- 
+2.39.2
+
+
+From 6d13228b4128900cb4c1ad00c67e2719616deae3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:48:32 +0300
+Subject: [PATCH 08/24] doc/boot@.md: update configuration to reflect changes
+
+---
+ doc/boot@.md | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 43f6480..02117bb 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -88,25 +88,32 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `lvmetad` and `vgchange` program to activate LVM partitions. If these programs is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++
++- **MDRAID**:
++	- type: boolean.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed on your system, the boot process **fail** even if the enable process finish successfully.
++	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+ 	- valid value: scan or zpoolcache.
+ 	- description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the `ZFS` variable. In case the `ZFS` variable is set to no or commented, the `ZFS_IMPORT` variable has no effect.
+ 
++*LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the `blkid` program from `util-linux` for device descovery.*
++ 
++
+ - **SETUPCONSOLE**:
+ 	- type: boolean.
+ 	- description: set it to no if you don't want to configure the console. In this case the `KEYMAP,FONT`, `FONT_MAP`, `FONT_UNIMAP` variable has no effect.
+@@ -156,6 +163,8 @@ Two different kinds of variables are used:
+ 	- type: boolean.
+ 	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
+ 
++*CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
++
+ - **FIREWALL**:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+@@ -212,3 +221,8 @@ Two different kinds of variables are used:
+ - **POPULATE_TMP**:
+ 	- type: boolean
+ 	- description: create the `/tmp/.X11-unix` and `/tmp/.ICE-unix` directories.
++
++- **CHECK_CONFIGURATION**:
++	- type: boolean
++	- description: run configuration checks when enabling the boot@ service
++
+-- 
+2.39.2
+
+
+From 5ab2369393778db76a5d5e8aab439dc86af9f095 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:49:14 +0300
+Subject: [PATCH 09/24] configure/configure: add support for mdraid, add some
+ comments.
+
+---
+ module/boot@/configure/configure | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index eca4903..bdbccf9 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -16,28 +16,35 @@ DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+-sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_container_list is used by the check funtions and has the same contents as the
+ ## sv_container_list, minus UDEV_ADM 
+-sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID BTRFS \
++sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \
+ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ ## sv_extra_list_check is used by the check functions and contains keys that need
+ ## to be present but are not in the previous lists
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
++## Message functions. They use 66-yeller to provide three different levels of 
++## messages for the script.
++
+ die(){
++	# Prints a fatal error message, in red color and exits the script.
+     fatal_error_message="$( printf '%s' "${@}" )"
+     66-yeller -f "%r $fatal_error_message %n"
+     exit 111
+ }
+ 
+ warn() {
++	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+     66-yeller -W "%y $warn_message %n"
+ }
+ 
+ emit_trace() {
++	# Prints a tracing message in red, visible only when the 66-enable is
++	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+ }
+@@ -67,6 +74,7 @@ detect_fs btrfs
+ detect_fs zfs_member
+ detect_fs crypto_LUKS
+ detect_fs LVM2_member
++detect_fs linux_raid_member
+ # dmraid supports multiple TYPEs of *-raid-member devices.
+ # find them first and add the sum of the *_detected values to
+ # dmraid_detected.
+@@ -98,6 +106,7 @@ detect_util luks_util cryptsetup
+ detect_util lvm_util lvchange
+ detect_util dmraid_util dmraid
+ detect_util swap_util swapon
++detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+ check_empty_var(){
+@@ -239,6 +248,7 @@ retrieve_sv_name(){
+         SWAP) SV_REAL="mount-swap" ;;
+         LVM) SV_REAL="devices-lvm" ;;
+         DMRAID) SV_REAL="devices-dmraid" ;;
++        MDRAID) SV_REAL="devices-mdraid" ;;
+         BTRFS) SV_REAL="devices-btrfs" ;;
+         ZFS) SV_REAL="devices-zfs" ;;
+         UDEV) SV_REAL="udevd" ;;
+@@ -344,6 +354,7 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
++    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -400,6 +411,7 @@ if [ "${LVM}" = "no" ] && \
+ [ "${DMRAID}" = "no" ] && \
+ [ "${BTRFS}" = "no" ] && \
+ [ "${ZFS}" = "no" ] && \
++[ "${MDRAID}" = "no" ] && \
+ [ "${CRYPTTAB}" = "no" ]; then
+     sv_comment_real "system-Devices"
+ fi
+-- 
+2.39.2
+
+
+From 4e50b48615b49cdd26fc3e6d35635e0a65f6ae49 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Thu, 29 Sep 2022 19:50:01 +0300
+Subject: [PATCH 10/24] service/boot@ : add MDRAID and CHECK_CONFIGURATION as
+ configuration keys in the [environment]
+
+---
+ service/boot@ | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/service/boot@ b/service/boot@
+index f08eac1..e4e2c7d 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -102,6 +102,10 @@
+ 
+ @ZFS_IMPORT@
+ 
++## Activate mdraid arrays
++
++@MDRAID@
++
+ #=======================================================================
+ #=================== Advanced user configuration =======================
+ #
+@@ -235,3 +239,10 @@
+ ## Create /tmp/{.X11-unix,.ICE-unix} files
+ 
+ @POPULATE_TMP@
++
++#========================== Configuration checks ==========================
++
++## Check the configuration for errors
++
++@CHECK_CONFIGURATION@
++
+-- 
+2.39.2
+
+
+From 814c7a07c564af50ccb52f0410d5d13d63b25206 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 12:27:55 +0300
+Subject: [PATCH 11/24] configure : more fixes...
+
+---
+ module/boot@/configure/configure | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index bdbccf9..2116070 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -27,7 +27,8 @@ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS"
+ sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT"
+ 
+ ## Message functions. They use 66-yeller to provide three different levels of 
+-## messages for the script.
++## messages for the script. Colors are available if 66-enabled is invoked with
++## the -z option.
+ 
+ die(){
+ 	# Prints a fatal error message, in red color and exits the script.
+@@ -43,7 +44,7 @@ warn() {
+ }
+ 
+ emit_trace() {
+-	# Prints a tracing message in red, visible only when the 66-enable is
++	# Prints a tracing message in blue color, visible only when the 66-enable is
+ 	# invoced with a verbosity (-v) level of 3 or above.
+     trace_message="$( printf '%s' "${@}" )"
+     66-yeller -t "%b $trace_message %n"
+@@ -131,7 +132,7 @@ check_var_existance() {
+ 
+ check_boolean_var_values() {
+     # ${1} is a list of key names
+-    # ${2} and ${2} are valid values for these keys
++    # ${2} and ${3} are valid values for these keys
+     for key in ${1}
+     do
+     eval key_value="\$${key}"
+@@ -158,13 +159,14 @@ check_volume_sanity() {
+     eval key_value="\$${1}"
+     key_value="$key_value"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \
+-    emit_trace "${1} is enabled and configured correctly"
+-    [ "${1}" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
++    emit_trace "${1} is enabled and configured correctly."
++    [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to 
+     [ $key_value ] but there are no relevant volumes present. This is\
+- a non-fatal warning, you may want to check your configuration"
++ a non-fatal warning, you may want to check your configuration!"
+     [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \
+-    die "${1} is set to [$key_value], relevant volumes exist but [${4}] does not exist. \
+-The process cannot continue, please check your configuration and try again"
++    die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not
++     present in the system. \
++The process cannot continue, please check your configuration and try again."
+     [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \
+     warn "${1} is set to [$key_value], but relevant volumes exist. \
+ This is a non-fatal warning but you should check your configuration!"
+@@ -349,12 +351,12 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_keymap
+     check_consolefont
+     check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs
+-    check_volume_sanity ZFS "$zfs_detected" "$zfs_util_exists" zfs
++    check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs
+     check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup
+     check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+-    check_volume_sanity MDRAID "$mdraid_detected" "$mdraid_util_exists" mdadm
++    check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.39.2
+
+
+From 6490c41a82ce3ddab0ec88a71a2556bbc17691e7 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 14:36:31 +0300
+Subject: [PATCH 12/24] configure: more changes...
+
+- remove check_empty_var() and replace with check_var_existance() for
+FIREWALL
+- add a check for the ZFS_IMPORT values
+---
+ module/boot@/configure/configure | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 2116070..ca55e78 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -110,12 +110,6 @@ detect_util swap_util swapon
+ detect_util mdraid_util mdadm
+ 
+ ## Check functions.
+-check_empty_var(){
+-    name="${1}" var_value="${2}"
+-    if [ -z "${var_value}" ]; then
+-        die invalid value for variable: "${name}"
+-    fi
+-}
+ 
+ check_var_existance() {
+     # ${1} is a list with key names
+@@ -357,6 +351,9 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid
+     check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon
+     check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm
++    if [ "${ZFS}" = "yes" ]; then
++		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+@@ -399,6 +396,8 @@ if [ "${CONTAINER}" = "yes" ]; then
+ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
++	
++	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+@@ -428,7 +427,7 @@ fi
+ 
+ if execl-toc -X -V FIREWALL; then
+ 
+-    check_empty_var "FIREWALL" "${FIREWALL}"
++    check_var_existance "FIREWALL"
+ 
+     for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do
+         if [ "${FIREWALL}" = "${sv}" ]; then
+-- 
+2.39.2
+
+
+From 70b509e490ac28560cab383408cd9696c853ccc3 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:31:43 +0300
+Subject: [PATCH 13/24] configure: do the ZFS_IMPORT check only with
+ CHECK_CONFIGURATION=yes.
+
+---
+ module/boot@/configure/configure | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ca55e78..942751a 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -397,7 +397,6 @@ fi
+ 
+ if [ "${ZFS}" = "yes" ]; then
+ 	
+-	check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+     if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then
+         sv_comment_real "devices-zfs-import-scan"
+     else
+-- 
+2.39.2
+
+
+From c81a6ff10bd598399c0d0fb1ef8aa31116f0c7dc Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 1 Oct 2022 17:48:14 +0300
+Subject: [PATCH 14/24] doc/boot@.md and service/boot@ : try to have consistent
+ naming
+
+- use disks/devices/filesystems/volume groups consistently
+- naming is based on the output of the relevant commands and/or the
+manpages
+---
+ service/boot@ | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/service/boot@ b/service/boot@
+index e4e2c7d..856ef38 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -77,23 +77,23 @@
+ 
+ @FSTAB@
+ 
+-## Active swap [yes|no].
++## Activate swap [yes|no].
+ 
+ @SWAP@
+ 
+-## Active lvm devices [yes|no].
++## Activate lvm volume groups [yes|no].
+ 
+ @LVM@
+ 
+-## Active dmraid devices [yes|no].
++## Activate dmraid disks [yes|no].
+ 
+ @DMRAID@
+ 
+-## Active btrfs devices [yes|no].
++## Activate btrfs devices [yes|no].
+ 
+ @BTRFS@
+ 
+-## Mount zfs devices [yes|no].
++## Mount zfs filesystems [yes|no].
+ 
+ @ZFS@
+ 
+@@ -171,7 +171,7 @@
+ 
+ #========================== Security ===================================
+ 
+-## Active encrypted devices [yes|no].
++## Activate encrypted devices [yes|no].
+ 
+ @CRYPTTAB@
+ 
+-- 
+2.39.2
+
+
+From a622bbb11a5c2e8893cba71d037444997970ab69 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 10:56:29 +0300
+Subject: [PATCH 15/24] Makefile, configure: add code for MDRAID and
+ CHECK_CONFIGURATION.
+
+---
+ Makefile  |  4 +++-
+ configure | 12 ++++++++++--
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f137878..8303652 100644
+--- a/Makefile
++++ b/Makefile
+@@ -81,6 +81,7 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@SWAP@,$(SWAP)," \
+ 		-e "s,@LVM@,$(LVM)," \
+ 		-e "s,@DMRAID@,$(DMRAID)," \
++		-e "s,@MDRAID@,$(MDRAID)," \
+ 		-e "s,@BTRFS@,$(BTRFS)," \
+ 		-e "s,@ZFS@,$(ZFS)," \
+ 		-e "s,@ZFS_IMPORT@,$(ZFS_IMPORT)," \
+@@ -98,7 +99,8 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@POPULATE_SYS@,$(POPULATE_SYS)," \
+ 		-e "s,@POPULATE_DEV@,$(POPULATE_DEV)," \
+ 		-e "s,@POPULATE_RUN@,$(POPULATE_RUN)," \
+-		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," $@
++		-e "s,@POPULATE_TMP@,$(POPULATE_TMP)," \
++		-e "s,@CHECK_CONFIGURATION@,$(CHECK_CONFIGURATION)," $@
+ 
+ $(DESTDIR)$(datarootdir)/doc/$(package)/%.html: doc/html/%.html
+ 	$(INSTALL) -D -m 644 $< $@ && \
+diff --git a/configure b/configure
+index 9622be3..75494db 100755
+--- a/configure
++++ b/configure
+@@ -50,6 +50,7 @@ Fine tunning of boot configuration:
+   --SWAP=BOOLEAN                   mount swap [!no]
+   --LVM=BOOLEAN                    mount lvm devices [!no]
+   --DMRAID=BOOLEAN                 mount dmraid devices [!no]
++  --MDRAID=BOOLEAN                 mount mdraid devices [!no]
+   --BTRFS=BOOLEAN                  mount btrfs devices [!no]
+   --ZFS=BOOLEAN                    mount zfs devices [!no]
+   --ZFS_IMPORT=VALUE               use scan or zpoolcache method for zfs pools importation [!zpoolcache]
+@@ -68,6 +69,7 @@ Fine tunning of boot configuration:
+   --POPULATE_DEV=BOOLEAN           populate dev directory [!yes]
+   --POPULATE_RUN=BOOLEAN           populate run directory [!yes]
+   --POPULATE_TMP=BOOLEAN           populate tmp directory [!yes]
++  --CHECK_CONFIGURATION=BOOLEAN    enable checks on 66-enable [!yes]
+ 
+ 
+  Use yes or no with lowercase character to set BOOLEAN values.
+@@ -167,6 +169,7 @@ FSTAB='!yes'
+ SWAP='!no'
+ LVM='!no'
+ DMRAID='!no'
++MDRAID='!no'
+ BTRFS='!no'
+ ZFS='!no'
+ ZFS_IMPORT='!zpoolcache'
+@@ -185,6 +188,7 @@ POPULATE_SYS='!yes'
+ POPULATE_DEV='!yes'
+ POPULATE_RUN='!yes'
+ POPULATE_TMP='!yes'
++CHECK_CONFIGURATION='!yes'
+ 
+ 
+ for arg ; do
+@@ -226,6 +230,7 @@ for arg ; do
+     --SWAP=*) SWAP=${arg#*=} ;;
+     --LVM=*) LVM=${arg#*=} ;;
+     --DMRAID=*) DMRAID=${arg#*=} ;;
++    --MDRAID=*) MDRAID=${arg#*=} ;;
+     --BTRFS=*) BTRFS=${arg#*=} ;;
+     --ZFS=*) ZFS=${arg#*=} ;;
+     --ZFS_IMPORT=*) ZFS_IMPORT=${arg#*=} ;;
+@@ -244,6 +249,7 @@ for arg ; do
+     --POPULATE_DEV=*) POPULATE_DEV=${arg#*=} ;;
+     --POPULATE_RUN=*) POPULATE_RUN=${arg#*=} ;;
+     --POPULATE_TMP=*) POPULATE_TMP=${arg#*=} ;;
++    --CHECK_CONFIGURATION=*) CHECK_CONFIGURATION=${arg#*=} ;;
+     -* ) echo "$0: unknown option $arg" ;;
+     *=*) ;;
+     *) target=$arg ;;
+@@ -298,10 +304,10 @@ done
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+         TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+-        FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \
++        FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+-        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do
++        MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP CHECK_CONFIGURATION ; do
+   eval tmp=\${$i}
+   if testval $tmp; then
+     eval $i='${i}=\"\\#${i}=\"'
+@@ -372,6 +378,7 @@ $FSTAB
+ $SWAP
+ $LVM
+ $DMRAID
++$MDRAID
+ $BTRFS
+ $ZFS
+ $ZFS_IMPORT
+@@ -390,6 +397,7 @@ $POPULATE_SYS
+ $POPULATE_DEV
+ $POPULATE_RUN
+ $POPULATE_TMP
++$CHECK_CONFIGURATION
+ EOF
+ 
+ exec 1>&3 3>&-
+-- 
+2.39.2
+
+
+From 6f45c4d8008227a269db000be9751affb2980268 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 18:05:56 +0300
+Subject: [PATCH 16/24] service/mount/mount-swap: partially revert previous
+ change
+
+swapon does not fail when there is no swap partition/file, so it makes
+sense to have a stricter test.
+---
+ module/boot@/service/mount/mount-swap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap
+index 3e8339a..e1d0663 100644
+--- a/module/boot@/service/mount/mount-swap
++++ b/module/boot@/service/mount/mount-swap
+@@ -16,7 +16,7 @@
+             swapon -a
+ 
+         }
+-        66-yeller -Wcdp mount-swap -1 /dev/console unable to activate the swap!
++        66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap!
+ 
+ )
+ 
+-- 
+2.39.2
+
+
+From ab8029ba09e645fcf5f7e5434cbb7fa92752c937 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:03:36 +0300
+Subject: [PATCH 17/24] configure/configure: properly disable devices-mdraid
+ when MDRAID=!no.
+
+Also fix language on system-Devices and devices-mdraid.
+---
+ module/boot@/configure/configure                   | 4 ++--
+ module/boot@/service/system/devices/devices-mdraid | 2 +-
+ module/boot@/service/system/system-Devices         | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 942751a..7ec11bf 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -374,7 +374,7 @@ done
+ 
+ comment_udev() {
+     for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \
+-            "devices-dmraid" "devices-btrfs" "devices-lvm" ; do
++            "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do
+         sv_comment_real ${sv}
+     done
+ }
+diff --git a/module/boot@/service/system/devices/devices-mdraid b/module/boot@/service/system/devices/devices-mdraid
+index d331c52..09eeaba 100644
+--- a/module/boot@/service/system/devices/devices-mdraid
++++ b/module/boot@/service/system/devices/devices-mdraid
+@@ -18,5 +18,5 @@
+         }
+         66-yeller -fcdp devices-mdraid -1 /dev/console crashed! }
+     
+-    66-yeller -cdp device-mdraid -1 /dev/console no mdraid volumes available!
++    66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available!
+ )
+diff --git a/module/boot@/service/system/system-Devices b/module/boot@/service/system/system-Devices
+index de10e56..5fd25ee 100644
+--- a/module/boot@/service/system/system-Devices
++++ b/module/boot@/service/system/system-Devices
+@@ -1,7 +1,7 @@
+ [main]
+ @type = bundle
+ @version = @vers@
+-@description = "Active specific devices"
++@description = "Activate specific devices"
+ @user = ( root )
+ @contents =
+ (
+-- 
+2.39.2
+
+
+From 089b28b9aa2af51a8bebdb642ceb43d23c416491 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 20:59:16 +0300
+Subject: [PATCH 18/24] configure/configure: add a message and a small sleep to
+ give the user the opportunity to actually see the warnings.
+
+---
+ module/boot@/configure/configure | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index 7ec11bf..ffa965b 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -40,7 +40,7 @@ die(){
+ warn() {
+ 	# Print a warning message, non-fatal, always visible in yellow color.
+     warn_message="$( printf '%s' "${@}" )"
+-    66-yeller -W "%y $warn_message %n"
++    66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1))
+ }
+ 
+ emit_trace() {
+@@ -336,6 +336,7 @@ sv_comment_real() {
+ # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the
+ # environment section/file
+ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
++	warning_counter=0
+     check_var_existance "$sv_boolean_list"
+     check_var_existance "$sv_container_list_check"
+     check_var_existance "$sv_extra_list_check"
+@@ -354,6 +355,15 @@ if [ "${CHECK_CONFIGURATION}" = "yes" ]; then
+     if [ "${ZFS}" = "yes" ]; then
+ 		check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan
+ 	fi
++	# If there are warnings, display a message and wait for a time relative
++	# to the number of warnings.
++	if [ $warning_counter -gt 0 ]; then
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	66-yeller %g Please see above for warnings. The proccess will continue shortly... %n
++	66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n
++	wait_timer=$((warning_counter*3))
++	sleep "$wait_timer"
++	fi
+ fi
+ 
+ 66-yeller %benable%n service: "tty-earlier@tty12"
+-- 
+2.39.2
+
+
+From 4a0710da34186c74e149938be32caf821766030e Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Mon, 3 Oct 2022 21:01:40 +0300
+Subject: [PATCH 19/24] doc/boot@.md: Add information abouts keys that do not
+ need to be present in the environment/configuration file. Also change the
+ devices naming.
+
+---
+ doc/boot@.md | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/doc/boot@.md b/doc/boot@.md
+index 02117bb..c26015d 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -46,6 +46,8 @@ Two different kinds of variables are used:
+ 
+ - string: depends on the variable and is defined in the following documentation.
+ 
++Variables need to be present in the environment section/file, unless otherwise noted below.
++
+ ---
+ 
+ - **HOSTNAME**:
+@@ -62,6 +64,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/keymaps` directory.
+ 	- description: uses the `loadkeys` program to set the keymap for the console to use. Usually a simple string like fr, us,...
++	- KEYMAP does not need to be present in the environment.
+ 	
+ - **FONT**:
+ 	- type: string.
+@@ -72,11 +75,13 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/consoletrans`.
+ 	- description: uses the `setfont` program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,...
++	- FONT_MAP does not need to be present in the environment.
+ 
+ - **FONT_UNIMAP**:
+ 	- type: string.
+ 	- valid value: any valid name found at `/usr/share/kbd/unimaps`.
+ 	- description: uses the `setfont` program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
++	- FONT_UNIMAP does not need to be present in the environment.
+ 
+ - **FSTAB**:
+ 	- type: boolean.
+@@ -88,23 +93,23 @@ Two different kinds of variables are used:
+ 	
+ - **LVM**:
+ 	- type: boolean.
+-	- description: uses the `vgchange` program to activate LVM partitions and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, an warning is emmited.
++	- description: uses the `vgchange` program to activate LVM volume groups and `cryptsetup` to open luks volumes in them.  If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
+ 
+ - **DMRAID**:
+ 	- type: boolean.
+-	- description: uses the `dmraid` program to activate RAID devices. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
++	- description: uses the `dmraid` program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
+ 
+ - **MDRAID**:
+ 	- type: boolean.
+-	- description: uses the  `mdadm` program to activate software raid (mdraid) devices. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
++	- description: uses the  `mdadm` program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
+ 
+ - **BTRFS**:
+ 	- type: boolean.
+-	- description: uses the `btrfs` program to activate BTRFS partitions. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
++	- description: uses the `btrfs` program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
+ 	
+ - **ZFS**:
+ 	- type: boolean.
+-	- description: uses the `zfs` program to mount ZFS partitions. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
++	- description: uses the `zfs` program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
+ 
+ - **ZFS_IMPORT**:
+ 	- type: string.
+@@ -161,7 +166,7 @@ Two different kinds of variables are used:
+ 
+ - **CRYPTTAB**:
+ 	- type: boolean.
+-	- description: use the file `/etc/crypttab` to decrypt an encrypted device. The file `/etc/crypttab` ***must*** exist on your system.
++	- description: use the file `/etc/crypttab` to decrypt encrypted devices. The file `/etc/crypttab` ***must*** exist on your system.
+ 
+ *CRYPTTAB relies on the `blkid` program from `util-linux` for device descovery.*
+ 
+@@ -169,6 +174,7 @@ Two different kinds of variables are used:
+ 	- type: string.
+ 	- valid value: iptables,ip6tables,nftables,ebtables,arptables.
+ 	- description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the `/etc/<program>/<program>.rules` file ***must*** exist on your system. In other cases the `/etc/<program>.conf` ***must*** exist on your system.
++	- FIREWALL does not need to be present in the environment.
+ 
+ - **CGROUPS**:
+ 	- type: boolean.
+@@ -225,4 +231,4 @@ Two different kinds of variables are used:
+ - **CHECK_CONFIGURATION**:
+ 	- type: boolean
+ 	- description: run configuration checks when enabling the boot@ service
+-
++	- CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
+\ No newline at end of file
+-- 
+2.39.2
+
+
+From a208ed0ce8d4a879adffcb7b1c8704e1586e2499 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:17:54 +0300
+Subject: [PATCH 20/24] system/modules/modules-system: use the void-runit
+ modules-load script.
+
+---
+ module/boot@/service/system/modules/modules-system | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/module/boot@/service/system/modules/modules-system b/module/boot@/service/system/modules/modules-system
+index f90abea..e69f788 100644
+--- a/module/boot@/service/system/modules/modules-system
++++ b/module/boot@/service/system/modules/modules-system
+@@ -12,11 +12,8 @@
+     if { 66-yeller -cdp modules-system -1 /dev/console starts... }
+     if -nt {
+ 
+-        ${SCRIPT_FILE}
++       modules-load -v
+ 
+     }
+-    66-yeller -fcdp modules-system -1 /dev/console crashed!
++    66-yeller -Wcdp modules-system -1 /dev/console crashed!
+ )
+-
+-[environment]
+-SCRIPT_FILE=!@modules@/modules.sh
+-- 
+2.39.2
+
+
+From 7e56c1e889665ea164cd5f6c31843ff75d1b9abb Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 12:22:12 +0300
+Subject: [PATCH 21/24] system/system-sysctl: use code from runit-void for
+ sysctl.
+
+---
+ module/boot@/service/system/system-sysctl | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/module/boot@/service/system/system-sysctl b/module/boot@/service/system/system-sysctl
+index cd4b48e..96de1f0 100644
+--- a/module/boot@/service/system/system-sysctl
++++ b/module/boot@/service/system/system-sysctl
+@@ -12,9 +12,8 @@
+     if { 66-yeller -cdp system-sysctl -1 /dev/console starts... }
+     if -nt {
+ 
+-        if { 66-which -q sysctl }
+-        sysctl --system
++       /usr/share/66/script/sysctl.sh
+ 
+     }
+-    66-yeller -fcdp system-sysctl -1 /dev/console crashed!
++    66-yeller -Wcdp system-sysctl -1 /dev/console crashed!
+ )
+-- 
+2.39.2
+
+
+From e1614cc94815e8ae24c43f0811218766b6bcbdda Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sun, 2 Oct 2022 20:07:21 +0300
+Subject: [PATCH 22/24] populate-sys: mount efivarfs rw to follow voidlinux
+ policy.
+
+---
+ module/boot@/service/mount/populate/populate-sys | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/mount/populate/populate-sys b/module/boot@/service/mount/populate/populate-sys
+index c1a5ee8..2583644 100644
+--- a/module/boot@/service/mount/populate/populate-sys
++++ b/module/boot@/service/mount/populate/populate-sys
+@@ -14,7 +14,7 @@
+ 
+         foreground {
+             if -t { grep -Fq efivarfs /proc/filesystems }
+-            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,ro -t efivarfs -d efivars
++            execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars
+         }
+ 
+         foreground {
+-- 
+2.39.2
+
+
+From 1bd9c340ff45b447b0fe2b150859fc9e322b430c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Wed, 5 Oct 2022 17:57:12 +0300
+Subject: [PATCH 23/24] Remove tmpfiles support.
+
+---
+ Makefile                                  |  2 --
+ configure                                 |  7 +------
+ doc/boot@.md                              |  3 ---
+ module/boot@/configure/configure          |  3 +--
+ module/boot@/service/all-Local            |  1 -
+ module/boot@/service/local/local-dmesg    |  1 -
+ module/boot@/service/local/local-rc       |  3 +--
+ module/boot@/service/local/local-tmpfiles | 23 -----------------------
+ service/boot@                             |  3 ---
+ 9 files changed, 3 insertions(+), 43 deletions(-)
+ delete mode 100644 module/boot@/service/local/local-tmpfiles
+
+diff --git a/Makefile b/Makefile
+index 8303652..df010f8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,7 +56,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@script_directory@,$(script_directory)," \
+ 		-e "s,@skel_directory@,$(skel_directory)," \
+ 		-e "s,@livedir@,$(livedir)," \
+-		-e "s,@tmpfiles_path@,$(tmpfiles)," \
+ 		-e "s,@modules_path@,$(modules)," \
+ 		-e "s,@VERSION@,$(version)," \
+ 		-e "s,@HOSTNAME@,$(HOSTNAME)," \
+@@ -73,7 +72,6 @@ $(DESTDIR)$(service_directory)/%: service/%
+ 		-e "s,@FORCECHCK@,$(FORCECHCK)," \
+ 		-e "s,@LOCAL@,$(LOCAL)," \
+ 		-e "s,@CONTAINER@,$(CONTAINER)," \
+-		-e "s,@TMPFILE@,$(TMPFILE)," \
+ 		-e "s,@MODULE_KERNEL@,$(MODULE_KERNEL)," \
+ 		-e "s,@MODULE_SYSTEM@,$(MODULE_SYSTEM)," \
+ 		-e "s,@RANDOMSEED@,$(RANDOMSEED)," \
+diff --git a/configure b/configure
+index 75494db..bc0145e 100755
+--- a/configure
++++ b/configure
+@@ -24,7 +24,6 @@ Fine tuning of the installation directories:
+   --with-system-script=DIR         66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script]
+   --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf]
+   --with-skeleton=DIR              66 skeleton files directory installation [SYSDIR/$package_macro_dir]
+-  --opentmpfiles-script=DIR        absolute path of the opentmpfiles script [BINDIR]
+   --modules-script=DIR             absolute path of the modules script [BINDIR]
+ 
+ Fine tunning of boot configuration:
+@@ -42,7 +41,6 @@ Fine tunning of boot configuration:
+   --FORCECHCK=BOOLEAN              force a check of the filesystem [!no]
+   --LOCAL=BOOLEAN                  use rc.local scripts [!no]
+   --CONTAINER=BOOLEAN              boot inside a container [!no]
+-  --TMPFILE=BOOLEAN                use tmpfiles.d files [!yes]
+   --MODULE_KERNEL=BOOLEAN          load modules kernel [!yes]
+   --MODULE_SYSTEM=BOOLEAN          load modules from modules.d files [!yes]
+   --RANDOMSEED=BOOLEAN             set random seed [!yes]
+@@ -161,7 +159,6 @@ SYSCTL='!yes'
+ FORCECHCK='!no'
+ LOCAL='!no'
+ CONTAINER='!no'
+-TMPFILE='!yes'
+ MODULE_KERNEL='!yes'
+ MODULE_SYSTEM='!yes'
+ RANDOMSEED='!yes'
+@@ -222,7 +219,6 @@ for arg ; do
+     --FORCECHCK=*) FORCECHCK=${arg#*=} ;;
+     --LOCAL=*) LOCAL=${arg#*=} ;;
+     --CONTAINER=*) CONTAINER=${arg#*=} ;;
+-    --TMPFILE=*) TMPFILE=${arg#*=} ;;
+     --MODULE_KERNEL=*) MODULE_KERNEL=${arg#*=} ;;
+     --MODULE_SYSTEM=*) MODULE_SYSTEM=${arg#*=} ;;
+     --RANDOMSEED=*) RANDOMSEED=${arg#*=} ;;
+@@ -303,7 +299,7 @@ done
+ 
+ for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \
+         KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \
+-        TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
++        MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \
+         FSTAB SWAP LVM DMRAID MDRAID BTRFS ZFS ZFS_IMPORT \
+         CRYPTTAB FIREWALL \
+         CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \
+@@ -370,7 +366,6 @@ $SYSCTL
+ $FORCECHCK
+ $LOCAL
+ $CONTAINER
+-$TMPFILE
+ $MODULE_KERNEL
+ $MODULE_SYSTEM
+ $RANDOMSEED
+diff --git a/doc/boot@.md b/doc/boot@.md
+index c26015d..917096f 100644
+--- a/doc/boot@.md
++++ b/doc/boot@.md
+@@ -148,9 +148,6 @@ Variables need to be present in the environment section/file, unless otherwise n
+ 	- type: boolean.
+ 	- description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the `HARDWARECLOCK`, `SETUPCONSOLE`, `KEYMAP`, `FONT`, `FONT_MAP`, `FONT_UNIMAP`, `CRYPTTAB`, `SWAP`, `LVM`, `DMRAID`, `BTRFS`, `ZFS`, `UDEV`, `SYSCTL`, `FORCECHCK`, `CGROUPS`, `MODULE_SYSTEM`, `RANDOMSEED`, `MNT_NETFS` variables have no effect.
+ 
+-- **TMPFILES**:
+-	- type: boolean.
+-	- description: read, parse and apply a systemd-style tmpfiles.d files usually found at `/usr/lib/tmpfiles.d` directory to handle volatile and temporary files.
+ 
+ - **MODULE_KERNEL**:
+ 	- type: boolean.
+diff --git a/module/boot@/configure/configure b/module/boot@/configure/configure
+index ffa965b..3293794 100755
+--- a/module/boot@/configure/configure
++++ b/module/boot@/configure/configure
+@@ -12,7 +12,7 @@ SV_REAL=
+ 
+ ## sv_boolean_list contain keys that take yes or no as values
+ sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \
+-DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER TMPFILE MODULE_KERNEL \
++DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \
+ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \
+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP"
+ ## sv_container_list contained keys for options that are disabled in a container
+@@ -251,7 +251,6 @@ retrieve_sv_name(){
+         SYSCTL) SV_REAL="system-sysctl" ;;
+         FORCECHCK) SV_REAL="system-fsck" ;;
+         LOCAL) SV_REAL="local-rc" ;;
+-        TMPFILE) SV_REAL="local-tmpfiles" ;;
+         MODULE_KERNEL) SV_REAL="modules-kernel" ;;
+         MODULE_SYSTEM) SV_REAL="modules-system" ;;
+         RANDOMSEED) SV_REAL="system-random" ;;
+diff --git a/module/boot@/service/all-Local b/module/boot@/service/all-Local
+index 95a2a1b..2e08187 100644
+--- a/module/boot@/service/all-Local
++++ b/module/boot@/service/all-Local
+@@ -17,7 +17,6 @@ local-loop
+ local-sethostname
+ local-time
+ local-authfiles
+-local-tmpfiles
+ local-rc
+ local-dmesg
+ )
+diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg
+index fe38ef4..ed87f7e 100644
+--- a/module/boot@/service/local/local-dmesg
++++ b/module/boot@/service/local/local-dmesg
+@@ -13,7 +13,6 @@ local-arptables
+ local-loop
+ local-sethostname
+ local-time
+-local-tmpfiles
+ local-authfiles
+ local-rc )
+ @user = ( root )
+diff --git a/module/boot@/service/local/local-rc b/module/boot@/service/local/local-rc
+index 7890b73..254b0c1 100644
+--- a/module/boot@/service/local/local-rc
++++ b/module/boot@/service/local/local-rc
+@@ -13,8 +13,7 @@
+     local-arptables
+     local-loop
+     local-time
+-    local-authfiles
+-    local-tmpfiles )
++    local-authfiles )
+ 
+ [start]
+ @execute =
+diff --git a/module/boot@/service/local/local-tmpfiles b/module/boot@/service/local/local-tmpfiles
+deleted file mode 100644
+index 344e02d..0000000
+--- a/module/boot@/service/local/local-tmpfiles
++++ /dev/null
+@@ -1,23 +0,0 @@
+-[main]
+-@type = oneshot
+-@version = @vers@
+-@description = "Create temporary files"
+-@depends = ( mount-rw )
+-@user = ( root )
+-@options = ( !log )
+-
+-[start]
+-@execute =
+-(
+-    if { 66-yeller -cdp local-tmpfiles -1 /dev/console starts... }
+-    if -nt {
+-
+-        execl-cmdline -s { ${SCRIPT_FILE} ${SCRIPT_ARGS} }
+-
+-    }
+-    66-yeller -Fcdp local-tmpfiles -1 /dev/console something went wrong!
+-)
+-
+-[environment]
+-SCRIPT_FILE=!@tmpfiles@/opentmpfiles.sh
+-SCRIPT_ARGS=!--create --verbose --boot
+diff --git a/service/boot@ b/service/boot@
+index 856ef38..8222abb 100644
+--- a/service/boot@
++++ b/service/boot@
+@@ -153,9 +153,6 @@
+ 
+ @CONTAINER@
+ 
+-## Apply tmpfiles.d configuration file [yes|no].
+-
+-@TMPFILE@
+ 
+ ## Load kernel modules [yes|no].
+ 
+-- 
+2.39.2
+
+
+From 293672fbd073cea1ff8d1773c11ad722a9995d19 Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Fri, 17 Feb 2023 19:59:23 +0200
+Subject: [PATCH 24/24] system-fsck: replace s6-test with test
+
+s6-test was moved to execline and eltest, deprecated from s6-portable-
+utils and finally removed in v. 2.3.0.0. The service will fail with
+exit code 111 and the boot will hang without replacing it.
+---
+ module/boot@/service/system/system-fsck | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/module/boot@/service/system/system-fsck b/module/boot@/service/system/system-fsck
+index ee93e8a..b5a4a47 100644
+--- a/module/boot@/service/system/system-fsck
++++ b/module/boot@/service/system/system-fsck
+@@ -12,7 +12,7 @@
+     if { 66-yeller -cdp system-fsck -1 /dev/console starts... }
+ 
+     execl-envfile ${conf_file}
+-    ifelse -X { s6-test ${FORCECHCK} = yes }
++    ifelse -X { test ${FORCECHCK} = yes }
+     {
+         if { 66-yeller -cdp system-fsck -1 /dev/console FORCECHCK was asked... }
+         execl-cmdline -s {
+-- 
+2.39.2
+
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100755
index 000000000000..9015cfc91a87
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,58 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.4.1
+revision=1
+build_style=gnu-configure
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+ --KEYMAP=!us --TZ=!Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6-linux-utils s6-portable-utils 66 66-tools virtual?awk"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# Upstream project is licensed under 0BSD from v2.4.1 onwards.
+# The 66boot-* utilities are under BSD-2-Clause.
+license="0BSD, BSD-2-Clause"
+homepage="https://git.obarun.org/obmods/boot-66serv"
+conf_files="/etc/66/rc.local"
+#distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${_upstr_version}/boot-66serv-v${_upstr_version}.tar.bz2"
+distfiles="https://git.obarun.org/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=3f6b7437451a1ca20820fa75d42e0165d88e2ec722fcfad1276f276a97c46a7c
+patch_args=" -Np1"
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
+post_install() {
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
+	# Install the 66boot-rcdotconf utility
+	vbin "${FILESDIR}"/66boot-rcdotconf
+	# Install the 66boot-storage-autoconf utility
+	vbin "${FILESDIR}"/66boot-storage-autoconf
+	# Create symlink for the boot@system service configuration file
+	ln -s ../etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
+
+	# Install runit, runit-wrapsv@ and switch-initutils services for 66
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.3/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+	vinstall "${FILESDIR}"/runit-wrapsv@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit-wrapsv@"
+
+	# Install sysctl.sh in /usr/share/66/script/
+	vinstall "${FILESDIR}"/sysctl.sh 755 usr/share/66/script/
+
+	# Install backwards compatibility symlink for modules.sh
+	ln -s /usr/bin/modules-load ${DESTDIR}/usr/share/66/script/modules.sh
+
+	# Install license file
+	vlicense LICENSE
+}

From fb7d79302c3237a13742a4f7491f71911e033e5c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:52:17 +0200
Subject: [PATCH 2/5] New package: scandir-66serv-0.3.1

---
 srcpkgs/scandir-66serv/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/scandir-66serv/template

diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template
new file mode 100644
index 000000000000..a064a1c9b962
--- /dev/null
+++ b/srcpkgs/scandir-66serv/template
@@ -0,0 +1,17 @@
+# Template file for 'scandir-66serv'
+pkgname=scandir-66serv
+version=0.3.1
+revision=1
+wrksrc="${pkgname}-v${version}"
+build_style=configure
+depends="66 66-tools"
+short_desc="66 module that enables user services"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="ISC"
+homepage="https://framagit.org/pkg/obmods/scandir-66serv"
+distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2"
+checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756
+
+post_install() {
+	vlicense LICENSE
+}

From 81a8435fb38920ba007c264c52de04f0ecb6b093 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:52:26 +0200
Subject: [PATCH 3/5] New package: void-66-services-0.0.3

---
 srcpkgs/void-66-services/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 000000000000..4e50084086db
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,24 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.3
+revision=1
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/${version}.tar.gz"
+checksum=15105a70ff7876001225e0ac666393243bd0a29cdb459910aa7c788997615ea1
+
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
+	vlicense LICENSE
+	vlicense LICENSE-3RD-PARTY
+	vlicense AUTHORS
+	vdoc conf/void-66-base-system.md
+	vdoc conf/void-66-conf.md
+	vdoc conf/void-66-logging.md
+	vdoc conf/void-66-runitsv.md
+}

From f8e8ca4dad7d6a2e98f1783a9887bd4e85066481 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:52:34 +0200
Subject: [PATCH 4/5] New package: 66-void-20230208

---
 srcpkgs/66-void/files/hostname                |  1 +
 srcpkgs/66-void/files/locale.conf             |  2 +
 srcpkgs/66-void/files/os-release              |  4 +
 .../0001-Makefile-adapt-for-66-void.patch     | 73 +++++++++++++++++++
 srcpkgs/66-void/template                      | 43 +++++++++++
 5 files changed, 123 insertions(+)
 create mode 100644 srcpkgs/66-void/files/hostname
 create mode 100644 srcpkgs/66-void/files/locale.conf
 create mode 100644 srcpkgs/66-void/files/os-release
 create mode 100644 srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
 create mode 100644 srcpkgs/66-void/template

diff --git a/srcpkgs/66-void/files/hostname b/srcpkgs/66-void/files/hostname
new file mode 100644
index 000000000000..916d471cd4c9
--- /dev/null
+++ b/srcpkgs/66-void/files/hostname
@@ -0,0 +1 @@
+void-live
diff --git a/srcpkgs/66-void/files/locale.conf b/srcpkgs/66-void/files/locale.conf
new file mode 100644
index 000000000000..abfaa52b3b93
--- /dev/null
+++ b/srcpkgs/66-void/files/locale.conf
@@ -0,0 +1,2 @@
+LANG=en_US.UTF-8
+LC_COLLATE=C
diff --git a/srcpkgs/66-void/files/os-release b/srcpkgs/66-void/files/os-release
new file mode 100644
index 000000000000..12dcabd1f3e6
--- /dev/null
+++ b/srcpkgs/66-void/files/os-release
@@ -0,0 +1,4 @@
+NAME="void"
+ID="void"
+DISTRIB_ID="void"
+PRETTY_NAME="void"
diff --git a/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
new file mode 100644
index 000000000000..58de3adb8d2f
--- /dev/null
+++ b/srcpkgs/66-void/patches/0001-Makefile-adapt-for-66-void.patch
@@ -0,0 +1,73 @@
+From b2d94d4a2505ab2b6f07b96e9373331f64489a0c Mon Sep 17 00:00:00 2001
+From: mobinmob <mobinmob@disroot.org>
+Date: Sat, 8 Oct 2022 08:21:14 +0300
+Subject: [PATCH] Makefile: adapt for 66-void.
+
+---
+ Makefile | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 08117ab..3ec70e2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-PREFIX ?=	/usr/local
+-SCRIPTS=	1 2 3 ctrlaltdel
++DESTDIR ?=
++PREFIX ?= /usr/local
+ 
+ all:
+ 	$(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS)
+@@ -8,41 +8,25 @@ all:
+ 	$(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS)
+ 
+ install:
+-	install -d ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 halt ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 pause ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin
+-	install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown
+-	install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load
+-	install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng
+-	install -m755 zzz ${DESTDIR}/${PREFIX}/sbin
+-	ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff
+-	ln -sf halt ${DESTDIR}/${PREFIX}/sbin/reboot
++	install -d ${DESTDIR}/${PREFIX}/bin
++	install -m755 pause ${DESTDIR}/${PREFIX}/bin
++	install -m755 vlogger ${DESTDIR}/${PREFIX}/bin
++	install -m755 modules-load ${DESTDIR}/${PREFIX}/bin/modules-load
++	install -m755 seedrng ${DESTDIR}/${PREFIX}/bin/seedrng
++	install -m755 zzz ${DESTDIR}/${PREFIX}/bin
++	ln -sf zzz ${DESTDIR}/${PREFIX}/bin/ZZZ
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
+ 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 modules-load.8 ${DESTDIR}/${PREFIX}/share/man/man8
+ 	install -m644 vlogger.8 ${DESTDIR}/${PREFIX}/share/man/man8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+-	ln -sf halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
+ 	install -d ${DESTDIR}/etc/sv
+ 	install -d ${DESTDIR}/etc/runit/runsvdir
+-	install -d ${DESTDIR}/etc/runit/core-services
+-	install -m644 core-services/*.sh ${DESTDIR}/etc/runit/core-services
+-	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
+-	install -m644 functions $(DESTDIR)/etc/runit
+-	install -m644 crypt.awk  ${DESTDIR}/etc/runit
+ 	install -m644 rc.conf ${DESTDIR}/etc
+ 	install -m755 rc.local ${DESTDIR}/etc
+-	install -m755 rc.shutdown ${DESTDIR}/etc
+ 	install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+ 	install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d
+-	ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/
+-	ln -sf /run/runit/stopit ${DESTDIR}/etc/runit/
+ 	cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
+ 	cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/sv/
+ 
+-- 
+2.38.0
+
diff --git a/srcpkgs/66-void/template b/srcpkgs/66-void/template
new file mode 100644
index 000000000000..6b2ec294594c
--- /dev/null
+++ b/srcpkgs/66-void/template
@@ -0,0 +1,43 @@
+# Template file for '66-void'
+# Based heavily on the runit-void package and reusing
+# the void-runit repository.
+pkgname=66-void
+# This the not a released version but the date of the
+# last commit at this time.
+version=20230208
+revision=1
+# This the the last commit hash at this time.
+_void_runit_version=e9d35904c8d5802b623c1c015eb155d1affdfcdf
+wrksrc="void-runit-${_void_runit_version}"
+build_style=gnu-makefile
+short_desc="Void Linux base package, adapted for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="CC0-1.0"
+homepage="https://github.com/void-linux/void-runit"
+# distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+distfiles="https://github.com/void-linux/void-runit/archive/${_void_runit_version}.tar.gz"
+checksum=e3fd74416dce2f208fcd9dae45987c3221177974fc68ab75efcd54108f684951
+replaces="runit-void>=0"
+
+make_dirs="
+	/etc/runit/core-services 755 root root
+	/etc/zzz.d/suspend 0755 root root
+	/etc/zzz.d/resume 0755 root root"
+
+depends="boot-66serv"
+conf_files="
+ /etc/hostname
+ /etc/locale.conf
+ /etc/rc.conf
+ /etc/rc.local"
+
+post_install() {
+	vconf ${FILESDIR}/hostname
+	vconf ${FILESDIR}/locale.conf
+	# Create symlinks for init and init utilities
+	ln -s /usr/bin/66 "${DESTDIR}"/usr/bin/init
+	for i in reboot poweroff halt shutdown;
+		do
+		ln -s /etc/66/${i} "${DESTDIR}"/usr/bin/${i}
+	done
+}

From de1d3154075301a4fe761d1ce0278598d2f22946 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 11 Mar 2023 20:52:48 +0200
Subject: [PATCH 5/5] New package: base-system-66-0.114

---
 srcpkgs/base-system-66/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/base-system-66/template

diff --git a/srcpkgs/base-system-66/template b/srcpkgs/base-system-66/template
new file mode 100644
index 000000000000..313a528edee4
--- /dev/null
+++ b/srcpkgs/base-system-66/template
@@ -0,0 +1,29 @@
+# Template file for 'base-system-66'
+pkgname=base-system-66
+version=0.114
+revision=1
+build_style=meta
+short_desc="Void Linux base system meta package"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# A minor modification of the base-system template
+# maintained by Enno Boland <gottox@voidlinux.org>
+license="Public Domain"
+homepage="https://codeberg.org/mobinmob/66-voidlinux"
+replaces="base-system>=0"
+
+depends="
+ base-files>=0.77 ncurses coreutils findutils diffutils libgcc
+ dash bash grep gzip file sed gawk less util-linux which tar man-pages
+ mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
+ procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
+ kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
+ void-artwork traceroute ethtool kmod acpid eudev 66-void removed-packages"
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) depends+=" musl";;
+	*) depends+=" glibc-locales";;
+esac
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*|ppc*) depends+=" linux";;
+esac

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (145 preceding siblings ...)
  2023-03-11 18:53 ` mobinmob
@ 2023-03-11 18:57 ` mobinmob
  2023-03-11 18:58 ` mobinmob
                   ` (24 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:57 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1464983872

Comment:
###Changes:
 - boot-66serv : replaces removed 66-test with test
 - 66-void: new version, remove `/etc/os-release`, it is now in `base-files`.
 
Packages with be appearing in the repo in  less than a day with the version suffix (when applicable) 20230311.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (146 preceding siblings ...)
  2023-03-11 18:57 ` mobinmob
@ 2023-03-11 18:58 ` mobinmob
  2023-03-11 18:58 ` mobinmob
                   ` (23 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:58 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/25743#issuecomment-1464983872

Comment:
### Changes:
 - boot-66serv : replaces removed 66-test with test
 - 66-void: new version, remove `/etc/os-release`, it is now in `base-files`.
 
Packages with be appearing in the repo in  less than a day with the version suffix (when applicable) 20230311.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (147 preceding siblings ...)
  2023-03-11 18:58 ` mobinmob
@ 2023-03-11 18:58 ` mobinmob
  2023-03-11 18:59 ` mobinmob
                   ` (22 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:58 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1464983872

Comment:
### Changes:
 - boot-66serv : replace removed 66-test with test
 - 66-void: new version, remove `/etc/os-release`, it is now in `base-files`.
 
Packages with be appearing in the repo in  less than a day with the version suffix (when applicable) 20230311.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (148 preceding siblings ...)
  2023-03-11 18:58 ` mobinmob
@ 2023-03-11 18:59 ` mobinmob
  2023-03-11 19:00 ` mobinmob
                   ` (21 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 18:59 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1464983872

Comment:
### Changes:
 - **boot-66serv** : replace removed `s6-test` with `test`
 - **66-void**: new version, remove `/etc/os-release`, it is now in `base-files`.
 
Packages with be appearing in the repo in  less than a day with the version suffix (when applicable) 20230311.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (149 preceding siblings ...)
  2023-03-11 18:59 ` mobinmob
@ 2023-03-11 19:00 ` mobinmob
  2023-04-12 16:33 ` sonnysighedup
                   ` (20 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-03-11 19:00 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1464983872

Comment:
### Changes:
 - **boot-66serv** : replace removed `s6-test` with `test`
 - **66-void**: new version, remove `/etc/os-release`, it is now in `base-files`.
 
Packages with be appearing in the repo in  less than a day with the version suffix (when applicable) `20230311`.
The [66-voidlinux repo](https://codeberg.org/mobinmob/66-voidlinux/src/branch/master/srcpkgs) with have the same tag.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (150 preceding siblings ...)
  2023-03-11 19:00 ` mobinmob
@ 2023-04-12 16:33 ` sonnysighedup
  2023-04-12 16:45 ` mobinmob
                   ` (19 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: sonnysighedup @ 2023-04-12 16:33 UTC (permalink / raw)
  To: ml

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

New comment by sonnysighedup on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505583123

Comment:
Hi @mobinmob, 

I get an interesting crash after the recent 66/s6/execline/oblibs/skalibs update you pushed to the void repos recently. The update itself went fine, but when I go to reboot, the system crashes, and upon hard reboot - after nearly making it all the way through the boot - I get the following message:

`if: fatal: unable to spawn s6-test: No such file or directory`
`if: fatal: unable to spawn s6-test: No such file or directory`
`ifelse: fatal: unable to spawn s6-test: No such file or directory`
`error: i/o error: Broken pipe (os error 32)`

I was able to downgrade everything and boot as normal.

I think the crash happened right before greetd was to pull up my login page. Could this be related to the shift from s6-test to test in boot-66serv from last month?

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (151 preceding siblings ...)
  2023-04-12 16:33 ` sonnysighedup
@ 2023-04-12 16:45 ` mobinmob
  2023-04-12 16:46 ` mobinmob
                   ` (18 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 16:45 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505598096

Comment:
> Hi @mobinmob, 
> 
> I get an interesting crash after the recent 66/s6/execline/oblibs/skalibs update you pushed to the void repos recently. The update itself went fine, but when I go to reboot, the system crashes, and upon hard reboot - after nearly making it all the way through the boot - I get the following message:
> 
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `ifelse: fatal: unable to spawn s6-test: No such file or directory`
> `error: i/o error: Broken pipe (os error 32)`
> 
> I was able to downgrade everything and boot as normal.
> 
> I think the crash happened right before greetd was to pull up my login page. Could this be related to the shift from s6-test to test in boot-66serv from last month?

Since the last update of this PR and the repo packages in avyssos I have removed the single reference to s6-test from boot-66serv. [I also pushed the one-line change upstream and was acccepted and merged.](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/2).
Are you using the packages from the repo? The latest boot-66serv version is 



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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (152 preceding siblings ...)
  2023-04-12 16:45 ` mobinmob
@ 2023-04-12 16:46 ` mobinmob
  2023-04-12 16:48 ` mobinmob
                   ` (17 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 16:46 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505598096

Comment:
> Hi @mobinmob, 
> 
> I get an interesting crash after the recent 66/s6/execline/oblibs/skalibs update you pushed to the void repos recently. The update itself went fine, but when I go to reboot, the system crashes, and upon hard reboot - after nearly making it all the way through the boot - I get the following message:
> 
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `ifelse: fatal: unable to spawn s6-test: No such file or directory`
> `error: i/o error: Broken pipe (os error 32)`
> 
> I was able to downgrade everything and boot as normal.
> 
> I think the crash happened right before greetd was to pull up my login page. Could this be related to the shift from s6-test to test in boot-66serv from last month?

Since the last update of this PR and the repo packages in avyssos I have removed the single reference to s6-test from boot-66serv. [I also pushed the one-line change upstream and was acccepted and merged.](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/2).
Are you using the packages from the repo?

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (153 preceding siblings ...)
  2023-04-12 16:46 ` mobinmob
@ 2023-04-12 16:48 ` mobinmob
  2023-04-12 17:35 ` mobinmob
                   ` (16 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 16:48 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505598096

Comment:
> Hi @mobinmob, 
> 
> I get an interesting crash after the recent 66/s6/execline/oblibs/skalibs update you pushed to the void repos recently. The update itself went fine, but when I go to reboot, the system crashes, and upon hard reboot - after nearly making it all the way through the boot - I get the following message:
> 
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `if: fatal: unable to spawn s6-test: No such file or directory`
> `ifelse: fatal: unable to spawn s6-test: No such file or directory`
> `error: i/o error: Broken pipe (os error 32)`
> 
> I was able to downgrade everything and boot as normal.
> 
> I think the crash happened right before greetd was to pull up my login page. Could this be related to the shift from s6-test to test in boot-66serv from last month?

Since the last update of this PR and the repo packages in avyssos I have removed the single reference to s6-test from boot-66serv. [I also pushed the one-line change upstream and was acccepted and merged.](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/2).
Are you using the packages from the repo?
 `boot-66serv-2.4.1.20230311_1` has the fix...

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (154 preceding siblings ...)
  2023-04-12 16:48 ` mobinmob
@ 2023-04-12 17:35 ` mobinmob
  2023-04-12 17:50 ` sonnysighedup
                   ` (15 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 17:35 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505598096

Comment:
@sonnysighedup 

Since the last update of this PR and the repo packages in avyssos I have removed the single reference to s6-test from boot-66serv. [I also pushed the one-line change upstream and was acccepted and merged.](https://git.obarun.org/obmods/boot-66serv/-/merge_requests/2).
Are you using the packages from the repo?
 `boot-66serv-2.4.1.20230311_1` has the fix...

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (155 preceding siblings ...)
  2023-04-12 17:35 ` mobinmob
@ 2023-04-12 17:50 ` sonnysighedup
  2023-04-12 17:59 ` mobinmob
                   ` (14 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: sonnysighedup @ 2023-04-12 17:50 UTC (permalink / raw)
  To: ml

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

New comment by sonnysighedup on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505692238

Comment:
Thank you for the quick reply, @mobinmob.

It's turns out this was more of a display manager issue, than a boot one. I forgot that I hacked up [ob-gtkgreet-sway](https://framagit.org/xprl-obarun-contrib-wayland/ob-gtkgreet-sway) to work with your void-66 implementation. The `wayland-session` script used to launch window managers calls `s6-test`. I replaced those references with `test` and everything worked with the updated 66/s6 packages, though it produces some output that I haven't been able to catch yet.

Thanks for all work you've to make 66 a reality on void!

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (156 preceding siblings ...)
  2023-04-12 17:50 ` sonnysighedup
@ 2023-04-12 17:59 ` mobinmob
  2023-04-12 17:59 ` mobinmob
                   ` (13 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 17:59 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505703269

Comment:
Thank you for the feedback - always happy to help 😉
If you have working frontend files for your setup which are missing from void-66-services, please consider sending s PR.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (157 preceding siblings ...)
  2023-04-12 17:59 ` mobinmob
@ 2023-04-12 17:59 ` mobinmob
  2023-07-12  2:06 ` github-actions
                   ` (12 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-04-12 17:59 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1505703269

Comment:
Thank you for the feedback - always happy to help 😉
If you have working frontend files for your setup which are missing from void-66-services, please consider sending a PR.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (158 preceding siblings ...)
  2023-04-12 17:59 ` mobinmob
@ 2023-07-12  2:06 ` github-actions
  2023-07-27  1:46 ` [PR PATCH] [Closed]: " github-actions
                   ` (11 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: github-actions @ 2023-07-12  2:06 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/25743#issuecomment-1631740594

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] 173+ messages in thread

* Re: [PR PATCH] [Closed]: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (159 preceding siblings ...)
  2023-07-12  2:06 ` github-actions
@ 2023-07-27  1:46 ` github-actions
  2023-07-29 17:42 ` mobinmob
                   ` (10 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: github-actions @ 2023-07-27  1:46 UTC (permalink / raw)
  To: ml

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

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

[WIP] New package: boot-66serv-2.4.1.
https://github.com/void-linux/void-packages/pull/25743

Description:
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (160 preceding siblings ...)
  2023-07-27  1:46 ` [PR PATCH] [Closed]: " github-actions
@ 2023-07-29 17:42 ` mobinmob
  2023-07-29 17:43 ` mobinmob
                   ` (9 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-07-29 17:42 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1656804280

Comment:
osnd issues means the unofficial repo is down - I will have a solution hopefully in the nect week.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (161 preceding siblings ...)
  2023-07-29 17:42 ` mobinmob
@ 2023-07-29 17:43 ` mobinmob
  2023-07-29 17:43 ` mobinmob
                   ` (8 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-07-29 17:43 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1656804433

Comment:
@paper42 Can this PR be re-opened?

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (162 preceding siblings ...)
  2023-07-29 17:43 ` mobinmob
@ 2023-07-29 17:43 ` mobinmob
  2023-08-05  7:55 ` mobinmob
                   ` (7 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-07-29 17:43 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1656804280

Comment:
osnd issues means the unofficial repo is down - I will have a solution hopefully in the next week.

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (163 preceding siblings ...)
  2023-07-29 17:43 ` mobinmob
@ 2023-08-05  7:55 ` mobinmob
  2023-08-05  8:08 ` mobinmob
                   ` (6 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-05  7:55 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1666431364

Comment:
New repo is up, please add it with:

`# xbps-install -S --repository=https://codeberg.org/mobinmob/void-66/raw/branch/master void-unofficial-repo-66`

or

`# xbps-install -S --repository=http://www.avyssos.eu/repos/voidlinux/66 void-unofficial-repo-66`

The new release tar is `20230805`, has only minor xlint fixes. I pushed it to my branch but since this PR is still closed it will not a ppear here...


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (164 preceding siblings ...)
  2023-08-05  7:55 ` mobinmob
@ 2023-08-05  8:08 ` mobinmob
  2023-08-05  9:08 ` mobinmob
                   ` (5 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-05  8:08 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1666431364

Comment:
New repo is up, please add it with:

`# xbps-install -S --repository=https://codeberg.org/mobinmob/void-66/raw/branch/master void-unofficial-repo-66`

or

`# xbps-install -S --repository=http://www.avyssos.eu/repos/voidlinux/66 void-unofficial-repo-66`

The new release tar is `20230805`, has only minor xlint fixes. I pushed it to my branch but since this PR is still closed it will not appear here...


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (165 preceding siblings ...)
  2023-08-05  8:08 ` mobinmob
@ 2023-08-05  9:08 ` mobinmob
  2023-08-06 18:55 ` mobinmob
                   ` (4 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-05  9:08 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1666431364

Comment:
New repo is up, please add it with:

`# xbps-install -S --repository=https://codeberg.org/mobinmob/void-66/raw/branch/master void-unofficial-repo-66`

or

`# xbps-install -S --repository=http://www.avyssos.eu/repos/voidlinux/66 void-unofficial-repo-66`

The new release tag is `20230805`, has only minor xlint fixes. I pushed it to my branch but since this PR is still closed it will not appear here...


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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (166 preceding siblings ...)
  2023-08-05  9:08 ` mobinmob
@ 2023-08-06 18:55 ` mobinmob
  2023-08-06 19:15 ` mobinmob
                   ` (3 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-06 18:55 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1666944288

Comment:
The repo now supports tls, the [void-unofficial-repo-66 package was updated](https://codeberg.org/mobinmob/66-voidlinux/commit/721050e92677a728f2c4f4eccf8b8969eb21447d) to version 4 to reflect that. No user intervention is required other than a regular update :)

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (167 preceding siblings ...)
  2023-08-06 18:55 ` mobinmob
@ 2023-08-06 19:15 ` mobinmob
  2023-08-13 14:46 ` mobinmob
                   ` (2 subsequent siblings)
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-06 19:15 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1666944288

Comment:
The repo now supports tls, the [void-unofficial-repo-66 package was updated](https://codeberg.org/mobinmob/66-voidlinux/commit/721050e92677a728f2c4f4eccf8b8969eb21447d) to version 4 to reflect that. No user intervention is required other than a regular update :)

I hope I will be able to test in the following week a way that a user can automatically reuse the standard /etc/rc.conf to configure the boot@ stage1 moduse service. The `66boot-rcdotconf` and `66boot-storage-autoconf` ([see documentation](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66boot-.md)) already do a fine job, but I think I can make it so a user just needs to enable the boot@ service and everything will work :)

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (168 preceding siblings ...)
  2023-08-06 19:15 ` mobinmob
@ 2023-08-13 14:46 ` mobinmob
  2023-08-14  8:07 ` mobinmob
  2023-08-14  8:07 ` mobinmob
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-13 14:46 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1676381601

Comment:
The PR continues in https://github.com/void-linux/void-packages/pull/45578.
Thanks for eveyone that contributed, I hope you are still interested in 66 on voidlinux. Many nice develpments lie ahead :P

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (169 preceding siblings ...)
  2023-08-13 14:46 ` mobinmob
@ 2023-08-14  8:07 ` mobinmob
  2023-08-14  8:07 ` mobinmob
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-14  8:07 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1676381601

Comment:
The PR continues in https://github.com/void-linux/void-packages/pull/45578.
Thanks for eveyone that contributed, I hope you are still interested in 66 on voidlinux. Many nice develpments lie ahead :)

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

* Re: [WIP] New package: boot-66serv-2.4.1.
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (170 preceding siblings ...)
  2023-08-14  8:07 ` mobinmob
@ 2023-08-14  8:07 ` mobinmob
  171 siblings, 0 replies; 173+ messages in thread
From: mobinmob @ 2023-08-14  8:07 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-1676381601

Comment:
The PR continues in https://github.com/void-linux/void-packages/pull/45578.
Thanks for eveyone that contributed, I hope you are still interested in 66 on voidlinux. Many nice developments lie ahead :)

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

end of thread, other threads:[~2023-08-14  8:07 UTC | newest]

Thread overview: 173+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
2020-10-19 19:16 ` mobinmob
2020-10-19 19:18 ` [PR PATCH] [Updated] " mobinmob
2020-11-08 15:10 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.2.1 mobinmob
2020-11-08 15:24 ` mobinmob
2020-11-08 15:26 ` mobinmob
2020-11-08 15:27 ` mobinmob
2020-11-08 15:31 ` mobinmob
2020-11-23 23:55 ` [PR PATCH] [Updated] " mobinmob
2020-11-23 23:58 ` mobinmob
2020-11-25 19:25 ` [PR PATCH] [Updated] " mobinmob
2020-11-25 19:29 ` mobinmob
2020-12-15 21:54 ` mobinmob
2020-12-15 22:01 ` mobinmob
2020-12-28 21:58 ` [PR PATCH] [Updated] " mobinmob
2020-12-28 22:00 ` mobinmob
2020-12-29  7:47 ` travankor
2020-12-29  9:54 ` mobinmob
2020-12-29  9:55 ` mobinmob
2020-12-29 10:03 ` mobinmob
2021-01-03 14:24 ` [PR PATCH] [Updated] " mobinmob
2021-01-03 14:30 ` mobinmob
2021-01-03 14:31 ` mobinmob
2021-01-03 14:32 ` mobinmob
2021-01-03 14:32 ` mobinmob
2021-01-03 14:35 ` mobinmob
2021-01-03 15:14 ` [PR PATCH] [Updated] " mobinmob
2021-01-23 20:07 ` mobinmob
2021-01-23 20:14 ` mobinmob
2021-01-23 20:17 ` mobinmob
2021-02-01 17:22 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0 mobinmob
2021-02-01 17:24 ` mobinmob
2021-02-03  0:14 ` [PR PATCH] [Updated] " mobinmob
2021-02-03  0:16 ` mobinmob
2021-02-03  0:25 ` mobinmob
2021-02-04 19:48 ` [PR PATCH] [Updated] " mobinmob
2021-02-04 19:50 ` mobinmob
2021-02-04 20:01 ` mobinmob
2021-02-04 20:08 ` [PR REVIEW] " ericonr
2021-02-04 20:08 ` ericonr
2021-02-04 20:08 ` ericonr
2021-02-04 20:08 ` ericonr
2021-02-04 20:12 ` mobinmob
2021-02-04 20:16 ` mobinmob
2021-02-04 20:17 ` mobinmob
2021-02-04 20:19 ` mobinmob
2021-02-04 20:20 ` [PR PATCH] [Updated] " mobinmob
2021-02-04 20:20 ` [PR REVIEW] " mobinmob
2021-02-04 20:21 ` mobinmob
2021-02-04 20:23 ` [PR PATCH] [Updated] " mobinmob
2021-02-04 20:24 ` [PR REVIEW] " mobinmob
2021-02-04 23:24 ` [PR PATCH] [Updated] " mobinmob
2021-02-04 23:52 ` mobinmob
2021-02-06  0:46 ` mobinmob
2021-02-06  0:47 ` mobinmob
2021-02-06  0:55 ` mobinmob
2021-02-06  1:01 ` mobinmob
2021-02-06  1:08 ` mobinmob
2021-02-08 11:13 ` [PR PATCH] [Updated] " mobinmob
2021-02-08 17:06 ` mobinmob
2021-02-14 18:11 ` mobinmob
2021-02-14 22:54 ` [PR PATCH] [Updated] " mobinmob
2021-02-14 22:59 ` mobinmob
2021-02-14 22:59 ` mobinmob
2021-02-14 23:01 ` mobinmob
2021-02-16 15:14 ` [PR PATCH] [Updated] " mobinmob
2021-02-27 23:24 ` mobinmob
2021-02-27 23:31 ` mobinmob
2021-02-27 23:31 ` mobinmob
2021-02-27 23:31 ` mobinmob
2021-03-02 21:50 ` [PR PATCH] [Updated] " mobinmob
2021-03-03 20:24 ` mobinmob
2021-03-03 22:37 ` mobinmob
2021-03-03 22:39 ` mobinmob
2021-03-05 17:56 ` mobinmob
2021-03-05 17:57 ` mobinmob
2021-03-05 17:58 ` mobinmob
2021-03-05 18:01 ` mobinmob
2021-03-16 19:19 ` [PR PATCH] [Updated] " mobinmob
2021-03-16 19:22 ` mobinmob
2021-03-21 15:22 ` [PR PATCH] [Updated] " mobinmob
2021-03-22 20:49 ` mobinmob
2021-03-22 20:55 ` mobinmob
2021-05-28 20:24 ` [PR PATCH] [Updated] " mobinmob
2021-05-28 20:30 ` [WIP] New package: boot-66serv-2.3.1 mobinmob
2021-05-29 23:13 ` paper42
2021-05-30 14:14 ` mobinmob
2021-05-30 14:16 ` mobinmob
2021-05-30 14:24 ` mobinmob
2021-07-13 21:35 ` [PR PATCH] [Updated] " mobinmob
2021-07-13 21:36 ` mobinmob
2021-07-13 21:43 ` [PR PATCH] [Updated] " mobinmob
2021-09-15 13:07 ` mobinmob
2021-09-15 13:09 ` mobinmob
2021-09-15 13:10 ` mobinmob
2021-09-15 13:15 ` [PR PATCH] [Updated] " mobinmob
2021-09-15 19:19 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.0 mobinmob
2021-09-15 19:23 ` mobinmob
2021-11-19 18:01 ` [PR PATCH] [Updated] " mobinmob
2021-11-19 18:04 ` mobinmob
2021-11-24  2:09 ` thegarlynch
2021-11-24  5:39 ` mobinmob
2021-11-24 13:51 ` mobinmob
2022-02-20 10:37 ` mobinmob
2022-02-20 10:37 ` [PR PATCH] [Updated] " mobinmob
2022-02-20 10:41 ` mobinmob
2022-02-20 19:29 ` mobinmob
2022-02-21 17:51 ` [PR PATCH] [Updated] " mobinmob
2022-02-21 17:56 ` mobinmob
2022-02-22 14:31 ` mobinmob
2022-03-11 10:07 ` thegarlynch
2022-03-12  9:30 ` mobinmob
2022-03-12  9:30 ` mobinmob
2022-03-12  9:34 ` mobinmob
2022-03-12  9:37 ` mobinmob
2022-05-14 10:49 ` [PR PATCH] [Updated] " mobinmob
2022-05-14 10:49 ` mobinmob
2022-05-14 10:52 ` [PR PATCH] [Updated] " mobinmob
2022-05-14 10:53 ` mobinmob
2022-05-14 13:02 ` mobinmob
2022-05-14 13:02 ` mobinmob
2022-05-15 13:44 ` mobinmob
2022-05-15 13:45 ` mobinmob
2022-06-18 10:43 ` mobinmob
2022-06-18 10:43 ` mobinmob
2022-08-22 15:18 ` NymanMatthias
2022-08-22 15:18 ` NymanMatthias
2022-08-22 16:11 ` mobinmob
2022-10-01 15:49 ` mobinmob
2022-10-16 13:08 ` [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1 mobinmob
2022-10-16 13:11 ` mobinmob
2022-10-16 13:19 ` [PR PATCH] [Updated] " mobinmob
2022-10-16 13:21 ` mobinmob
2022-10-16 14:16 ` mobinmob
2022-10-16 22:27 ` NymanMatthias
2022-10-17  3:00 ` mobinmob
2022-10-17  3:05 ` mobinmob
2022-10-17  3:23 ` mobinmob
2022-10-17 12:54 ` mobinmob
2023-01-16  1:58 ` github-actions
2023-01-18 17:05 ` mobinmob
2023-01-18 17:07 ` mobinmob
2023-02-05 18:41 ` [PR PATCH] [Updated] " mobinmob
2023-02-05 19:06 ` mobinmob
2023-02-05 19:08 ` mobinmob
2023-03-11 18:37 ` [PR PATCH] [Updated] " mobinmob
2023-03-11 18:53 ` mobinmob
2023-03-11 18:57 ` mobinmob
2023-03-11 18:58 ` mobinmob
2023-03-11 18:58 ` mobinmob
2023-03-11 18:59 ` mobinmob
2023-03-11 19:00 ` mobinmob
2023-04-12 16:33 ` sonnysighedup
2023-04-12 16:45 ` mobinmob
2023-04-12 16:46 ` mobinmob
2023-04-12 16:48 ` mobinmob
2023-04-12 17:35 ` mobinmob
2023-04-12 17:50 ` sonnysighedup
2023-04-12 17:59 ` mobinmob
2023-04-12 17:59 ` mobinmob
2023-07-12  2:06 ` github-actions
2023-07-27  1:46 ` [PR PATCH] [Closed]: " github-actions
2023-07-29 17:42 ` mobinmob
2023-07-29 17:43 ` mobinmob
2023-07-29 17:43 ` mobinmob
2023-08-05  7:55 ` mobinmob
2023-08-05  8:08 ` mobinmob
2023-08-05  9:08 ` mobinmob
2023-08-06 18:55 ` mobinmob
2023-08-06 19:15 ` mobinmob
2023-08-13 14:46 ` mobinmob
2023-08-14  8:07 ` mobinmob
2023-08-14  8:07 ` mobinmob

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).