Github messages for voidlinux
 help / color / mirror / Atom feed
From: mobinmob <mobinmob@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.4.1.
Date: Sun, 16 Oct 2022 15:08:05 +0200	[thread overview]
Message-ID: <20221016130805._JSVbbyVlUq-vn8VQJwtNpzhqPuhFQgSwYaUcrgppvY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-25743@inbox.vuxu.org>

[-- 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

  parent reply	other threads:[~2022-10-16 13:08 UTC|newest]

Thread overview: 173+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` mobinmob [this message]
2022-10-16 13:11 ` [WIP] New package: boot-66serv-2.4.1 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221016130805._JSVbbyVlUq-vn8VQJwtNpzhqPuhFQgSwYaUcrgppvY@z \
    --to=mobinmob@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).