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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

New comment by travankor on void-packages repository

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

Comment:
More work on the runit service:

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

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

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

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

New comment by mobinmob on void-packages repository

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

Comment:
More work on the runit service:

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

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

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

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

New comment by mobinmob on void-packages repository

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

Comment:
More work on the runit service:

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

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

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

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

New comment by mobinmob on void-packages repository

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

Comment:
More work on the runit service:

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

Comment:
New version of boot-66serv:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New comment by mobinmob on void-packages repository

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

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

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

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

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

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

New review comment by ericonr on void-packages repository

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

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

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

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

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

New review comment by ericonr on void-packages repository

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

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

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

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

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

New review comment by ericonr on void-packages repository

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

Comment:
Leave credits only in the commit, IMO.

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

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

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

New review comment by ericonr on void-packages repository

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

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

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

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

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

New review comment by mobinmob on void-packages repository

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

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

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

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

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

New review comment by mobinmob on void-packages repository

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

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

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

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

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

New review comment by mobinmob on void-packages repository

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

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

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

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

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

New review comment by mobinmob on void-packages repository

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

New review comment by mobinmob on void-packages repository

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

Comment:
Done, thank you!

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

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

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

New review comment by mobinmob on void-packages repository

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

Comment:
Done, thank you for the review!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/14] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/14] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/14] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/14] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/14] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/14] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/14] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/14] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR REVIEW] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (48 preceding siblings ...)
  2021-02-04 20:23 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 20:24 ` mobinmob
  2021-02-04 23:24 ` [PR PATCH] [Updated] " mobinmob
                   ` (51 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-04 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

New review comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#discussion_r570520289

Comment:
Left only /usr/bin. Thank you!

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (49 preceding siblings ...)
  2021-02-04 20:24 ` [PR REVIEW] " mobinmob
@ 2021-02-04 23:24 ` mobinmob
  2021-02-04 23:52 ` mobinmob
                   ` (50 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-04 23:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 28011 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/15] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/15] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/15] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/15] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/15] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/15] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/15] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/15] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/15] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/15] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/15] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/15] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/15] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/15] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 5e91003596e12b76c8754b0ecfcdce47065234c1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/15] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 2 +-
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..1e21b6b7f6a 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (50 preceding siblings ...)
  2021-02-04 23:24 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-04 23:52 ` mobinmob
  2021-02-06  0:46 ` mobinmob
                   ` (49 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-04 23:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 28362 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/15] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/15] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/15] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/15] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/15] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/15] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/15] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/15] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/15] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/15] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/15] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/15] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/15] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/15] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/15] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (51 preceding siblings ...)
  2021-02-04 23:52 ` mobinmob
@ 2021-02-06  0:46 ` mobinmob
  2021-02-06  0:47 ` mobinmob
                   ` (48 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-06  0:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 29269 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/16] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/16] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/16] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/16] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/16] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/16] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/16] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/16] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/16] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/16] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/16] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/16] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/16] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/16] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/16] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 4a0b3d7c7f50555d5c7a21c5d072b9425c9752af Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/16] do not enable swap in the template - created problems
 when no classic swap partition is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (52 preceding siblings ...)
  2021-02-06  0:46 ` mobinmob
@ 2021-02-06  0:47 ` mobinmob
  2021-02-06  0:55 ` mobinmob
                   ` (47 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-06  0:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 29274 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/16] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/16] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/16] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/16] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/16] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/16] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/16] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/16] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/16] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/16] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/16] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/16] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/16] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/16] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/16] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/16] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (53 preceding siblings ...)
  2021-02-06  0:47 ` mobinmob
@ 2021-02-06  0:55 ` mobinmob
  2021-02-06  1:01 ` mobinmob
                   ` (46 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-06  0:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/services in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the envronment. 
  

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (54 preceding siblings ...)
  2021-02-06  0:55 ` mobinmob
@ 2021-02-06  1:01 ` mobinmob
  2021-02-06  1:08 ` mobinmob
                   ` (45 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-06  1:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/services in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the environment. 
  

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (55 preceding siblings ...)
  2021-02-06  1:01 ` mobinmob
@ 2021-02-06  1:08 ` mobinmob
  2021-02-08 11:13 ` [PR PATCH] [Updated] " mobinmob
                   ` (44 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-06  1:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-774365112

Comment:
66boot-initial-setup:

- do not overwrite existing /etc/66/conf/boot@system/version/boot@system if it exists.

runit service frontend file:

- redirect stdout to stderr in order to catch everything in the per-service logger,
- use ln instead of s6-ln (different behaviour),
- remove redundant files/dirs in /var/service.

template:

- disable TMPFILE support by default,
- remove all conf variables from the environment. 
  

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (56 preceding siblings ...)
  2021-02-06  1:08 ` mobinmob
@ 2021-02-08 11:13 ` mobinmob
  2021-02-08 17:06 ` mobinmob
                   ` (43 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-08 11:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 30466 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/17] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/17] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/17] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/17] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/17] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/17] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/17] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/17] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/17] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/17] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/17] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/17] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/17] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/17] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/17] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/17] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3ba5d66e0050cc19a8443459d009db5a508b4290 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/17] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (57 preceding siblings ...)
  2021-02-08 11:13 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-08 17:06 ` mobinmob
  2021-02-14 18:11 ` mobinmob
                   ` (42 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-08 17:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 31340 bytes --]

From b3991090bddd95ed0fea497a437bf3e80dcd17f6 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/18] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From c627e8a606c22d29f380b41dfa1fa72dc21738a5 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/18] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 768b72fdf37ef5d9f8c65c67b2b47af16ec62a56 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/18] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From afd70627d4c42aafd9d54ab211034edf71d4bc50 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/18] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 440a15068e76bee628ea249cc0251aae29660b6b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/18] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 81d4835e725d98226956995897ae54b2542f8cbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/18] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 2bce6588b26e613002584d0cac25563953f0b053 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/18] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From f4156f7224b7fe1e31684f24a8cc3a0c5b1e2980 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/18] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 39b6c5ba0eb6a54273bf1a95cd9146840f5200d4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/18] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 9a0e8fcbf3fd39e33c8c3e2250b5ba9c0690ef32 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/18] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From c692426c11ef24eb0a4abb39ecc1975b10acf7b7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/18] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 29fe7a4af833eaa8567454c31e257b6fae4c489e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/18] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 6fa2a4fa03b40c50f85f1611a68d31b6e7b99d6e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/18] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From ca28978688580c62538efcf99b19c8ecff94bd92 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/18] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 9cd40a77bc4a1d00acf1cf5389a87a7bcc99410f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/18] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 446181bc2aacece649518b70b805510765fb0a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/18] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3ba5d66e0050cc19a8443459d009db5a508b4290 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/18] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From ad2fb64cc8978de3dcd9e5377e1fd37d3d931a97 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/18] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (58 preceding siblings ...)
  2021-02-08 17:06 ` mobinmob
@ 2021-02-14 18:11 ` mobinmob
  2021-02-14 22:54 ` [PR PATCH] [Updated] " mobinmob
                   ` (41 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-14 18:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778816672

Comment:
There is now some updated documentation for 66 on voidlinux: https://github.com/mobinmob/void-66-services/blob/devel/conf/void-66-conf.md
@travankor 

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (59 preceding siblings ...)
  2021-02-14 18:11 ` mobinmob
@ 2021-02-14 22:54 ` mobinmob
  2021-02-14 22:59 ` mobinmob
                   ` (40 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-14 22:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 33641 bytes --]

From 783340c7d0df571a9286859eee74e0885e81ebfc Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/20] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From ce2bda0377c27db68904a62f25d71f0521a40830 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/20] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e06e7ef646b2de609925e0a88713f0a81f585c30 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/20] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 7afe51ff54431505ca6174df3d53f56467ab87b1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/20] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 6c1b3e067c046cf3db084e28ad80a70fda5c6422 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/20] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b5eeb245fec1b492f3ffa03d44df045404f87fed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/20] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From fab085acae32145f5af36c04355fc1765db1d2eb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/20] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d51397e6d29a9b20f64683e89a07ea094162a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/20] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From ad6d6abccc6a1d72200bd52e839d8c747e77b0d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/20] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From ea07991684dd796149a5bde87e42cc70fce63ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/20] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 53d3d940c0ba5bf4057f91bd6a88a993769e75ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/20] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5371e8d948994fe8efc0232d65e2f09b66cf9c3c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/20] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From a50d723eba563709048c131776f761418fffcdbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/20] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From f904775a28db7ab214375d176d461bacdfa4e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/20] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 98a2ee2c5c436cb5949ac88a26ec99bd516a8182 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/20] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 0357ba6e7e4856132bba0ffb23ba6d37bc48c4f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/20] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3b6272b902900b92b7ee343092b0dcd3c91e4fa9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/20] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4c66f146d939d65ea03b1b00508fc8581d044dae Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/20] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ca77103a5f0c2f0b66604764be2b6b4fc41f038c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/20] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 55612604e9c8d49cd65d06b330694e6c044ae4f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/20] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (60 preceding siblings ...)
  2021-02-14 22:54 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-14 22:59 ` mobinmob
  2021-02-14 22:59 ` mobinmob
                   ` (39 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-14 22:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yes. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (61 preceding siblings ...)
  2021-02-14 22:59 ` mobinmob
@ 2021-02-14 22:59 ` mobinmob
  2021-02-14 23:01 ` mobinmob
                   ` (38 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-14 22:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yes. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.
- Rebased onto master.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (62 preceding siblings ...)
  2021-02-14 22:59 ` mobinmob
@ 2021-02-14 23:01 ` mobinmob
  2021-02-16 15:14 ` [PR PATCH] [Updated] " mobinmob
                   ` (37 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-14 23:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-778856301

Comment:
Changes:
- New void-66-services release. It includes basic documentation (linked in the previous comment). It is not installed with the package yet. Other significant changes are included in the [release changelog](https://github.com/mobinmob/void-66-services/releases/tag/v0.0.2).
- Small fix - typo in the 66boot-initial-setup script.
- Rebased onto master.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (63 preceding siblings ...)
  2021-02-14 23:01 ` mobinmob
@ 2021-02-16 15:14 ` mobinmob
  2021-02-27 23:24 ` mobinmob
                   ` (36 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-16 15:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 34268 bytes --]

From 783340c7d0df571a9286859eee74e0885e81ebfc Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/21] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From ce2bda0377c27db68904a62f25d71f0521a40830 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/21] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From e06e7ef646b2de609925e0a88713f0a81f585c30 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/21] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 7afe51ff54431505ca6174df3d53f56467ab87b1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/21] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 6c1b3e067c046cf3db084e28ad80a70fda5c6422 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/21] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From b5eeb245fec1b492f3ffa03d44df045404f87fed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/21] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From fab085acae32145f5af36c04355fc1765db1d2eb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/21] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 9d51397e6d29a9b20f64683e89a07ea094162a01 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/21] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From ad6d6abccc6a1d72200bd52e839d8c747e77b0d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/21] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From ea07991684dd796149a5bde87e42cc70fce63ffc Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/21] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 53d3d940c0ba5bf4057f91bd6a88a993769e75ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/21] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 5371e8d948994fe8efc0232d65e2f09b66cf9c3c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/21] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From a50d723eba563709048c131776f761418fffcdbe Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/21] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From f904775a28db7ab214375d176d461bacdfa4e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/21] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 98a2ee2c5c436cb5949ac88a26ec99bd516a8182 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/21] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 0357ba6e7e4856132bba0ffb23ba6d37bc48c4f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/21] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 3b6272b902900b92b7ee343092b0dcd3c91e4fa9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/21] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4c66f146d939d65ea03b1b00508fc8581d044dae Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/21] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ca77103a5f0c2f0b66604764be2b6b4fc41f038c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/21] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 55612604e9c8d49cd65d06b330694e6c044ae4f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/21] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From ac1d3b366c1660d9bd7d3c68f28879feea705f77 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/21] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (64 preceding siblings ...)
  2021-02-16 15:14 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-27 23:24 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (35 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-27 23:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 39377 bytes --]

From 87b29aac6a7e7e1faf031f0222f23d8c4a92bd8b Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/23] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From 97190264efbe20c41192be05905188832a8d07ed Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/23] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 20ea8ab3051a1d91f38df0359c8abf919bbdec31 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/23] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 0ab308819be0e03e9995a30179538b69083359f1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/23] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From 772a761fe235cb052340a00a691b1dfd2cdf3ee4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/23] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From 7056026f3bc60246d9ddb30ee80b5096bca7e77d Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/23] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From 485582a2b312913aab61217c1ba4b69988b6efb9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/23] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 0f7b1cc9ebeb446d44f624961896131087427db2 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/23] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 790887e1fbad044e84637f734d4b1633d206fb4e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/23] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 973c3f7a726dc9c497a19c3f6a50dffc7936d833 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/23] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 3b4c68fe7fcc06d5a0f1cf89d6f9dad7b100d189 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/23] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From 9fa74dd0816e97601d892f7d559e40005a902510 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/23] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 8d431ead44b3b41b463fe56db4c170f9e75c4dca Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/23] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 29d196388e9bf104ea164f9d0700e17a36ffc753 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/23] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From e119f10bac620f7ae3fa4416c5b51243b4b1f4ca Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/23] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 811d2488669d64c38c9d917c9dd1693a768220d9 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/23] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 1c0e6701ed50c87226258cf12f7aa1d4f1fcc3c6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/23] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 06e8463029b57a5ebcd13cd98837bc99557036f6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/23] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From aa87610108221926a28d4e2c119d1f868a776f0b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/23] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 4b54c9ffea49a1f2f4dddc8dec7f1389d0b33166 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/23] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 979f907a23d751b85d327cd03fd0bbd26f4a5416 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/23] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 009f5bdd070cd0c6ccf9406cefc3c4937d58543c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/23] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7d..0d809c8f2f6 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 1f63e63ec60bd72b4e82ab395f608effec99554f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/23] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 00000000000..b4fe592ea5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 00000000000..a560272de2c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b6..c61af884380 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (65 preceding siblings ...)
  2021-02-27 23:24 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (34 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in /etc/66rc.conf. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the 66boot-initial-setup script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (66 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-02-27 23:31 ` mobinmob
                   ` (33 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in `/etc/66rc.conf`. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the `66boot-initial-setup` script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (67 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-02-27 23:31 ` mobinmob
  2021-03-02 21:50 ` [PR PATCH] [Updated] " mobinmob
                   ` (32 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-02-27 23:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/25743#issuecomment-787203836

Comment:
Changes:

- Remove the warning from the start of the configuration file that is linked in `/etc/66rc.conf`. That is a tiny usability improvement. The removal happens automatically if the file is generated by using 66-env, but it is just copied in the `66boot-initial-setup` script.
- Add two upstream patches. The first fixes a potential  issue discovered by testing this PR with voidvault (encrypted root with btrfs subvolumes). The second makes the iptables service more robust, since it will not need an external script to function.
- Rebase onto master.

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (68 preceding siblings ...)
  2021-02-27 23:31 ` mobinmob
@ 2021-03-02 21:50 ` mobinmob
  2021-03-03 20:24 ` mobinmob
                   ` (31 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-03-02 21:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 39377 bytes --]

From 8e9d9eeb45f8c4ce1624bff1e034b5f5256a7695 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/23] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From cb428cdeb0859d710da2dc37530816b6a11f65ff Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/23] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From 74f926b24a8317e43c63daa2cffc56ad58e8bffb Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/23] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 052beb3b9c3704de22ad1e1f5a1113b83fabedf1 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/23] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From efd30a1bc9f03fde8f16f737a04bd8923f522efa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/23] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From bf2b967605bcbd09c4b770e04d849a0d1bc2be2f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/23] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From aed9b88f701d41db743f4db965390fc185ee1dec Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/23] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 077ee341c2676dcf47aed0ff01da77abebce71e7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/23] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 777385b70c0d54352d17ffc4c1ad1cbe726e0e53 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/23] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 35d00adf0a45fbab15ef7586b1f558e6fccc4d79 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/23] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 5e9ee119f01183a2b6e57839907aac2f5563a7ef Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/23] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From fb0e4f8e594e4db8b4f63d2281f67c0564254c09 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/23] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From 1958b6bf1c4612dc138ea261383b5f8aeb7e12de Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/23] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From aeef5ade436af50162f24f760e55d66bdcc43186 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/23] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 084926131661280c0c990667bcc388f3552c161b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/23] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b68fd3dbf3b4164dc66fa4dbc05dfa99eb00418b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/23] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 6d57b40c9b8988a9230eea7ae717f0399a03301c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/23] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From b4c561a4a071e3157aa8e7242a61657c1e32637b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/23] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From ddaac651554029e62154fdebb671d55e4f55617e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/23] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer="mobinmob <mobinmob@disroot.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/mobinmob/void-66-services/"
 distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
-checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678
 
-post_install() {
+do_install() {
+	vmkdir usr
+	vcopy usr /
+	chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check"
 	vlicense LICENSE
 	vlicense AUTHORS
 }

From 6fa3319e7e98c8d5cf5fcbb896d83f37134f2ec3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:53:45 +0200
Subject: [PATCH 20/23] files/66boot-initial-setup: small typo fix.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index e8679bd7de0..513f614df7d 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -5,7 +5,7 @@
 user=$(id -u)
 s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
 
-# Infromataion for the user, in case of failure. 66 output is informative, this
+# Information for the user, in case of failure. 66 output is informative, this
 # is just a pointer to the docs.
 msg_trees() {
 	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"

From 34fd22bc6c36624441e44b7bb90914eeecf3028c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 16 Feb 2021 17:13:44 +0200
Subject: [PATCH 21/23] files/runit: add /usr/sbin to PATH again...

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c0c16f5c1d..35890b9fe7b 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -10,7 +10,7 @@
 @execute = (
 exec 2>&1
 
-PATH=/usr/bin
+PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"

From 51f8061587f78b5455cb538d7253582c80945739 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:22:41 +0100
Subject: [PATCH 22/23] 66boot-initial-setup: remove the warning from the conf
 file.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 513f614df7d..0d809c8f2f6 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -17,8 +17,10 @@ msg_trees() {
 # Enable the boot@system service in the boot tree.
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
-#  though /etc/66rc.conf.
-[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
+# though /etc/66rc.conf. Also, remove the warning in the first lines of the file.
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \
+warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \
+ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 6721421ba8eb498dd087a418e00f708125b4f70f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 28 Feb 2021 00:23:54 +0100
Subject: [PATCH 23/23] use upstream patches for local-iptables and
 devices-crypttab.

---
 ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++
 ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  |  1 +
 3 files changed, 54 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
 create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff

diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
new file mode 100644
index 00000000000..b4fe592ea5a
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff
@@ -0,0 +1,13 @@
+diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab
+index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644
+--- a/module/boot@/service/system/devices/devices-crypttab
++++ b/module/boot@/service/system/devices/devices-crypttab
+@@ -4,7 +4,7 @@
+ @description = "Active encrypted devices"
+ @user = ( root )
+ @options = ( !log )
+-@depends = ( udevadm )
++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm )
+ 
+ [start]
+ @execute =
diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
new file mode 100644
index 00000000000..a560272de2c
--- /dev/null
+++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff
@@ -0,0 +1,40 @@
+diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables
+index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644
+--- a/module/boot@/service/local/firewall/local-iptables
++++ b/module/boot@/service/local/firewall/local-iptables
+@@ -20,19 +20,28 @@
+ )
+ 
+ [stop]
++@build = custom
++@shebang = "/usr/bin/bash -c"
+ @execute =
+ (
+-    if { 66-yeller -cdp local-iptables -1 /dev/console stops... }
+-    if -nt {
+ 
+-        execl-toc -x ${script_file}
+-        ${script_file}
++    exec 2>&1
+ 
+-    }
+-    66-yeller -fcdp local-iptables -1 /dev/console crashed!
++    66-yeller -cdp local-iptables -1 /dev/console stops...
++
++    if ! type -p iptables &>/dev/null; then
++      66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program"
++    fi
++
++    while read -r table; do
++        tables+=("/usr/share/iptables/empty-$table.rules")
++    done <"/proc/net/ip_tables_names"
++
++    if (( ${#tables[*]} )); then
++        cat "${tables[@]}" | iptables-restore
++    fi
+ )
+ 
+ [environment]
+ script_conf=!/etc/iptables/iptables.rules
+-script_file=!/usr/lib/iptables/scripts/iptables-flush
+ 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1876f0852b6..c61af884380 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
 checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
+patch_args=" -Np1"
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

^ permalink raw reply	[flat|nested] 103+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] New package: boot-66serv-2.3.0
  2020-10-19 19:14 [PR PATCH] [WIP] New package: boot-66serv-2.2.0 mobinmob
                   ` (69 preceding siblings ...)
  2021-03-02 21:50 ` [PR PATCH] [Updated] " mobinmob
@ 2021-03-03 20:24 ` mobinmob
  2021-03-03 22:37 ` mobinmob
                   ` (30 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: mobinmob @ 2021-03-03 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 944 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages boot-66serv
https://github.com/void-linux/void-packages/pull/25743

[WIP] New package: boot-66serv-2.3.0
This PR is the continuation of the packaging and integration work @teldra has done on https://github.com/void-linux/void-packages/pull/23122, which is based on the work @zenfailure has done on https://github.com/void-linux/void-packages/pull/21142. They have  done pretty much all the basic work needed -and then some- to integrate @Obarun 's work with void's packaging.

In this PR I will continue their work, try to make the configuration and switch from one init to the other as smooth as possible and package the frontend service files from https://github.com/mobinmob/void-66-services once they are ready.

A patch file from https://github.com/void-linux/void-packages/pull/25743.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boot-66serv-25743.patch --]
[-- Type: text/x-diff, Size: 41788 bytes --]

From 47206f508787c0ed8f33d6e3377b3ad01465a7f4 Mon Sep 17 00:00:00 2001
From: teldra <teldra@rotce.de>
Date: Mon, 22 Jun 2020 01:43:05 +0200
Subject: [PATCH 01/25] New package: boot-66serv-2.2.1

based on:
https://github.com/void-linux/void-packages/pull/23122
https://github.com/void-linux/void-packages/pull/21142

[ci-skip]
---
 srcpkgs/boot-66serv/files/66               |  2 ++
 srcpkgs/boot-66serv/files/runit            | 16 ++++++++++++
 srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++
 srcpkgs/boot-66serv/files/tty@             | 12 +++++++++
 srcpkgs/boot-66serv/template               | 30 ++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/66
 create mode 100644 srcpkgs/boot-66serv/files/runit
 create mode 100755 srcpkgs/boot-66serv/files/switch-initutils
 create mode 100644 srcpkgs/boot-66serv/files/tty@
 create mode 100644 srcpkgs/boot-66serv/template

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
new file mode 100644
index 00000000000..c82ece19fc5
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66
@@ -0,0 +1,2 @@
+#!/usr/bin/execlineb -P
+66-boot -b "Booting Voidlinux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
new file mode 100644
index 00000000000..9c25c7dff43
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/runit
@@ -0,0 +1,16 @@
+[main]
+@type = longrun
+@version = @VERSION@
+@description = "runit"
+@user = (root)
+@options = ( log )
+
+[start]
+@execute = ( /etc/runit/2 )
+
+[stop]
+@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+
+[logger]
+@backup = 3 
+@maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
new file mode 100755
index 00000000000..3919274b0f7
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -0,0 +1,22 @@
+# This service automatically moves 
+# /usr/bin/{reboot,poweroff,halt,shutdown}
+# so that if started with 66, users can shutdown etc. with it.
+# It automatically moves everything back if started with
+# runit again.
+# This is run by runit and 66
+
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+	for i in reboot poweroff halt shutdown; do
+		if ! test -e /usr/bin/${i}.runit; then
+			mv /usr/bin/${i} /usr/bin/${i}.runit
+			ln -s /etc/66/${i} /usr/bin/${i}
+		fi
+	done
+else
+	for i in reboot poweroff halt shutdown; do
+		if test -e /usr/bin/${i}.runit; then
+			rm /usr/bin/${i}
+			mv /usr/bin/${i}.runit /usr/bin/${i} 
+		fi
+	done
+fi
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
new file mode 100644
index 00000000000..7b72f625d84
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -0,0 +1,12 @@
+[main]
+@type = classic
+@version = @VERSION@
+@description = "Launch @I"
+@user = ( root )
+@options = ( env )
+
+[start]
+@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
+
+[environment]
+cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
new file mode 100644
index 00000000000..1a57510f3cf
--- /dev/null
+++ b/srcpkgs/boot-66serv/template
@@ -0,0 +1,30 @@
+# Template file for 'boot-66serv'
+pkgname=boot-66serv
+version=2.2.1
+revision=1
+wrksrc=${pkgname}-v${version}
+build_style=gnu-configure
+configure_args="--HOSTNAME=voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=Europe/Madrid"
+make_install_target="install install-man install-html"
+hostmakedepends="lowdown"
+makedepends="file"
+depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
+short_desc="Stage 1 boot for 66"
+maintainer="mobinmob <mobinmob@disroot.org>"
+# previous maintainer="teldra <teldra@rotce.de>"
+license="ISC"
+homepage="https://framagit.org/Obarun/boot-66serv"
+conf_files="/etc/66/rc.local"
+distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
+checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+
+post_install() {
+	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	vbin ${FILESDIR}/66
+	vlicense LICENSE
+	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+}

From f4687eeb4a15f29e9c1644259326e0d6601cf1da Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 8 Nov 2020 17:08:32 +0200
Subject: [PATCH 02/25] improve runit service frontend file.

---
 srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++--
 srcpkgs/boot-66serv/template    |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9c25c7dff43..c5e36bbfa4f 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -6,10 +6,24 @@
 @options = ( log )
 
 [start]
-@execute = ( /etc/runit/2 )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+PATH=/usr/bin:/usr/sbin
+
+runlevel=66
+
+runsvchdir "${runlevel}"
+mkdir -p /run/runit/runsvdir
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+
+exec env - PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+
+ )
 
 [stop]
-@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
 
 [logger]
 @backup = 3 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 1a57510f3cf..f953ead216e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
 distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
 checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
 
+make_dirs="/etc/runit/runsvdir/66 0750 root root"
+
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66

From cfab5918de488ac97a293ca910dc336643a63e4c Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 24 Nov 2020 01:54:26 +0200
Subject: [PATCH 03/25] make [stop] do its job :P

---
 srcpkgs/boot-66serv/files/runit | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index c5e36bbfa4f..fe741ff2bd8 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -23,7 +23,11 @@ exec env - PATH=$PATH \
  )
 
 [stop]
-@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
+@build = custom
+@shebang = ( "/bin/sh" )
+@execute = ( 
+ sv force-stop /var/service/*
+ sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 61cf4cd4cb06a283773cd8ce6be847d661b87919 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 25 Nov 2020 21:24:43 +0200
Subject: [PATCH 04/25] Separate switch-initutils code for runit and 66, and
 document both consistently.

---
 srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++-------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils
index 3919274b0f7..b596b3ba95f 100755
--- a/srcpkgs/boot-66serv/files/switch-initutils
+++ b/srcpkgs/boot-66serv/files/switch-initutils
@@ -1,22 +1,14 @@
-# This service automatically moves 
-# /usr/bin/{reboot,poweroff,halt,shutdown}
-# so that if started with 66, users can shutdown etc. with it.
-# It automatically moves everything back if started with
-# runit again.
-# This is run by runit and 66
+# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of 66 it deletes them and moves the runit 
+# utilities in their place. It runs by default. There is a similar 
+# oneshot service for 66 that does the opposite and should be enabled.
+# The script make sure that the user has the proper utilities for the 
+# init system they are currently running.
+
+for i in reboot poweroff halt shutdown; do
+	if test -e /usr/bin/${i}.runit; then
+		rm /usr/bin/${i}
+		mv /usr/bin/${i}.runit /usr/bin/${i} 
+	fi
+done
 
-if grep -q "init=/usr/bin/66" /proc/cmdline; then
-	for i in reboot poweroff halt shutdown; do
-		if ! test -e /usr/bin/${i}.runit; then
-			mv /usr/bin/${i} /usr/bin/${i}.runit
-			ln -s /etc/66/${i} /usr/bin/${i}
-		fi
-	done
-else
-	for i in reboot poweroff halt shutdown; do
-		if test -e /usr/bin/${i}.runit; then
-			rm /usr/bin/${i}
-			mv /usr/bin/${i}.runit /usr/bin/${i} 
-		fi
-	done
-fi

From ee08788f0d7adfffc19c84ab8f69bcbf10c5fbd4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:47:29 +0200
Subject: [PATCH 05/25] add the 66 frontend file in the package.

---
 srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66

diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66
new file mode 100644
index 00000000000..1bf6c724745
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/switch-initutils-66
@@ -0,0 +1,28 @@
+
+# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown}
+# and if they are part of runit-void it renames them and copies the 66 
+# utilities in their place. It must be enabled, especially if one
+# changes between the two init systems. There is a similar script for
+# runit core-services that does the opposite and runs by default with runit. 
+# The service makes sure that the user has the proper utilities for the 
+# init system they are currently running. 
+
+[main]
+@type = oneshot
+@version = @VERSION@
+@description = "Switch initutils"
+@user = ( root )
+
+[start]
+@build = custom
+@shebang = "/bin/sh -c"
+@execute = ( 
+if grep -q "init=/usr/bin/66" /proc/cmdline; then
+       for i in reboot poweroff halt shutdown; do
+               if ! test -e /usr/bin/${i}.runit; then
+                       mv /usr/bin/${i} /usr/bin/${i}.runit
+                       cp /etc/66/${i} /usr/bin/${i}
+               fi
+       done
+fi
+)

From fb214c1b4c3b52b15cbf8597e5f2c008f198d371 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Tue, 15 Dec 2020 23:51:22 +0200
Subject: [PATCH 06/25] install switch-initutils for 66 and change how the
 '@version' key is set.

---
 srcpkgs/boot-66serv/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f953ead216e..fa659c37010 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -25,8 +25,12 @@ post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
 	vlicense LICENSE
+	# @version should be incremented only when there is a change in the specific
+	# frontend service file.
 	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit"
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
+	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
 }

From d49d78bb2917542c76a67fb586927d7e0fa48b2e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 28 Dec 2020 23:57:01 +0200
Subject: [PATCH 07/25] New package: void-66-services-0.0.1

---
 srcpkgs/void-66-services/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/void-66-services/template

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
new file mode 100644
index 00000000000..7ed84c93713
--- /dev/null
+++ b/srcpkgs/void-66-services/template
@@ -0,0 +1,17 @@
+# Template file for 'void-66-services'
+pkgname=void-66-services
+version=0.0.1
+revision=1
+build_style=gnu-makefile
+depends="66"
+short_desc="66 service frontend files for voidlinux"
+maintainer="mobinmob <mobinmob@disroot.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/mobinmob/void-66-services/"
+distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz"
+checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95
+
+post_install() {
+	vlicense LICENSE
+	vlicense AUTHORS
+}

From 7a301a2d91316f5c7d13e85d3900ba627c2b2ccd Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 16:22:47 +0200
Subject: [PATCH 08/25] more work on the runit service.

---
 srcpkgs/boot-66serv/files/runit | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index fe741ff2bd8..d3d60bb82dd 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -1,5 +1,5 @@
 [main]
-@type = longrun
+@type = classic
 @version = @VERSION@
 @description = "runit"
 @user = (root)
@@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin
 runlevel=66
 
 runsvchdir "${runlevel}"
-mkdir -p /run/runit/runsvdir
-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
-
-exec env - PATH=$PATH \
-    runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+s6-mkdir -v -p /run/runit/runsvdir
+s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
+exec s6-env PATH=$PATH \
+    runsvdir -P /run/runit/runsvdir/current
  )
 
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = ( 
- sv force-stop /var/service/*
- sv exit /var/service/* )
+	sv force-stop /var/service/*
+	sv exit /var/service/* )
 
 [logger]
 @backup = 3 

From 8698f6592540c763c492863ad12965476ca9f19f Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 3 Jan 2021 17:13:57 +0200
Subject: [PATCH 09/25] add -i switch to s6-env: the /etc/runit/2 script uses -
 which is non-standard but in gnu coreutils and busybox does the same as -i.

---
 srcpkgs/boot-66serv/files/runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index d3d60bb82dd..362266bad06 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -17,7 +17,7 @@ runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
 s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
 
-exec s6-env PATH=$PATH \
+exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
  )
 

From 2dbabb16042397485d07d6d14552da1157333931 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 23 Jan 2021 22:07:22 +0200
Subject: [PATCH 10/25] boot-66serv: update to 2.3.0 adapt to new 66 version.

---
 srcpkgs/boot-66serv/files/runit | 10 ++++------
 srcpkgs/boot-66serv/files/tty@  |  1 -
 srcpkgs/boot-66serv/template    |  8 ++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 362266bad06..3a0f89f8707 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -3,12 +3,11 @@
 @version = @VERSION@
 @description = "runit"
 @user = (root)
-@options = ( log )
 
 [start]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
+@execute = (
 PATH=/usr/bin:/usr/sbin
 
 runlevel=66
@@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \
 [stop]
 @build = custom
 @shebang = ( "/bin/sh" )
-@execute = ( 
-	sv force-stop /var/service/*
-	sv exit /var/service/* )
+@execute = ( sv force-stop /var/service/* }
+ sv exit /var/service/* )
 
 [logger]
-@backup = 3 
+@backup = 3
 @maxsize = 1000000
diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
index 7b72f625d84..f4a783bde6c 100644
--- a/srcpkgs/boot-66serv/files/tty@
+++ b/srcpkgs/boot-66serv/files/tty@
@@ -3,7 +3,6 @@
 @version = @VERSION@
 @description = "Launch @I"
 @user = ( root )
-@options = ( env )
 
 [start]
 @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index fa659c37010..c088b82dd9e 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -1,6 +1,6 @@
 # Template file for 'boot-66serv'
 pkgname=boot-66serv
-version=2.2.1
+version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
@@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
 # previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
-homepage="https://framagit.org/Obarun/boot-66serv"
+homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"
-distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
-checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
+distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2"
+checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 

From 0d24eaa638de08589a8b8bdd7776006a93cb86d7 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 1 Feb 2021 19:20:01 +0200
Subject: [PATCH 11/25] remove tty@ frontend service file - no longer needed.

---
 srcpkgs/boot-66serv/files/tty@ | 11 -----------
 srcpkgs/boot-66serv/template   |  2 --
 2 files changed, 13 deletions(-)
 delete mode 100644 srcpkgs/boot-66serv/files/tty@

diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@
deleted file mode 100644
index f4a783bde6c..00000000000
--- a/srcpkgs/boot-66serv/files/tty@
+++ /dev/null
@@ -1,11 +0,0 @@
-[main]
-@type = classic
-@version = @VERSION@
-@description = "Launch @I"
-@user = ( root )
-
-[start]
-@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
-
-[environment]
-cmd_args=!-J 38400
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index c088b82dd9e..4747249557d 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -27,8 +27,6 @@ post_install() {
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/
-	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@"
 	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
 	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils

From ad90bd54dc8d10b4b937e13c7c59fe315ff72721 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Wed, 3 Feb 2021 02:13:34 +0200
Subject: [PATCH 12/25] create symlink in /etc/66conf.rc that points to the
 conf file of boot@system.

---
 srcpkgs/boot-66serv/template | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4747249557d..4fce1c84b8a 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root"
 post_install() {
 	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
 	vbin ${FILESDIR}/66
+	# Create symlink for the boot@system service configuration file
+	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
 	vlicense LICENSE
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.

From bc71d03b541848c9ecac342b6cdafcbf5f4e0454 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 21:47:25 +0200
Subject: [PATCH 13/25] add 66boot-initial-setup script, small fixes in the
 template.

---
 .../boot-66serv/files/66boot-initial-setup    | 33 +++++++++++++++++++
 srcpkgs/boot-66serv/template                  | 19 ++++++++---
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
new file mode 100644
index 00000000000..8d289de798b
--- /dev/null
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Script must run as root, otherwise it creates trees
+# as the user.
+user=$(id -u)
+s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1
+
+# Infromataion for the user, in case of failure. 66 output is informative, this
+# is just a pointer to the docs.
+msg_trees() {
+	printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n"
+	exit 1
+}
+
+# Create the mandatory boot tree.
+66-tree -n boot || msg_trees 
+# Enable the boot@system service in the boot tree.
+66-enable -F -t boot boot@system || msg_trees
+# Copy the default boot@conf so that is will survive updates and be accesible
+#  though /etc/66rc.conf.
+cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+
+# Create default tree, enable it and make it current.
+66-tree -nEc default || msg_trees
+# Enable switch-initutils oneshot service in the default tree.
+66-enable switch-initutils || msg_trees
+
+# Create and enable runit tree.
+66-tree -nE runit || msg_trees
+# Enable the runit service in the runit tree.
+66-enable -t runit runit || msg_trees
+# Start runit tree after the default tree.
+66-tree -S default runit || msg_trees
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4fce1c84b8a..4c3e1f5cca7 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba
 make_dirs="/etc/runit/runsvdir/66 0750 root root"
 
 post_install() {
-	vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
-	vbin ${FILESDIR}/66
+
+	# Install the switch-initutils core service for runit.
+	vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
+	# Install the 66 wrapper for 66-boot
+	vbin "${FILESDIR}"/66
+	# Install the 66boot-initial-setup utility
+	vbin "${FILESDIR}"/66boot-initial-setup
 	# Create symlink for the boot@system service configuration file
 	ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf"
-	vlicense LICENSE
+
+	# Install runit and switch-initutils services for 66
 	# @version should be incremented only when there is a change in the specific
 	# frontend service file.
-	vinstall ${FILESDIR}/runit 644 usr/share/66/service/
+	vinstall "${FILESDIR}"/runit 644 usr/share/66/service/
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit"
-	vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils
+	vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils
 	vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils"
+
+	# Install license file
+	vlicense LICENSE
 }

From 2c01d3b32fef2861848ac289a734914167d26b9b Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Thu, 4 Feb 2021 22:20:01 +0200
Subject: [PATCH 14/25] Fixes proposed by @ericonr.

---
 srcpkgs/boot-66serv/files/66    | 2 +-
 srcpkgs/boot-66serv/files/runit | 2 +-
 srcpkgs/boot-66serv/template    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66
index c82ece19fc5..2e5bb6a10a5 100644
--- a/srcpkgs/boot-66serv/files/66
+++ b/srcpkgs/boot-66serv/files/66
@@ -1,2 +1,2 @@
 #!/usr/bin/execlineb -P
-66-boot -b "Booting Voidlinux" -m
+66-boot -b "Booting Void Linux" -m
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 3a0f89f8707..9f0f36d73c3 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,7 +8,7 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin:/usr/sbin
+PATH=/usr/bin
 
 runlevel=66
 
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 4c3e1f5cca7..0efd5480a01 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -12,7 +12,6 @@ makedepends="file"
 depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools"
 short_desc="Stage 1 boot for 66"
 maintainer="mobinmob <mobinmob@disroot.org>"
-# previous maintainer="teldra <teldra@rotce.de>"
 license="ISC"
 homepage="https://framagit.org/pkg/obmods/boot-66serv"
 conf_files="/etc/66/rc.local"

From 8dc72073971b34d33eef1324b41550e545a0b7b4 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 5 Feb 2021 01:24:11 +0200
Subject: [PATCH 15/25] fixes in the template, 66boot-initial-setup and the
 runit service

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 srcpkgs/boot-66serv/files/runit                | 7 +++++--
 srcpkgs/boot-66serv/template                   | 5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 8d289de798b..4d1e42ee747 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees
+if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees
diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit
index 9f0f36d73c3..9c0c16f5c1d 100644
--- a/srcpkgs/boot-66serv/files/runit
+++ b/srcpkgs/boot-66serv/files/runit
@@ -8,13 +8,16 @@
 @build = custom
 @shebang = ( "/bin/sh" )
 @execute = (
-PATH=/usr/bin
+exec 2>&1
 
+PATH=/usr/bin
 runlevel=66
 
 runsvchdir "${runlevel}"
 s6-mkdir -v -p /run/runit/runsvdir
-s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
+s6-rmrf /var/service/current
+s6-rmrf /var/service/supervise
 
 exec s6-env -i PATH=$PATH \
     runsvdir -P /run/runit/runsvdir/current
diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 0efd5480a01..f4467c0f0c0 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -4,8 +4,9 @@ version=2.3.0
 revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
-configure_args="--HOSTNAME=voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=Europe/Madrid"
+configure_args="--HOSTNAME=!voidlinux --TTY=!4
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+	--SWAP=!yes"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 8676a2bf20169d23b3a0012f1d4651334ef97160 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sat, 6 Feb 2021 02:46:03 +0200
Subject: [PATCH 16/25] do not enable swap in the template - created problems
 when no classic swap partition/file is available (trident/zfs).

---
 srcpkgs/boot-66serv/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index f4467c0f0c0..2192a410f9c 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,8 +5,7 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
-	--SWAP=!yes"
+	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From 74e86b2586ddd9db38d293f0a8624c772e13ca3a Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 13:12:25 +0200
Subject: [PATCH 17/25] files/66boot-initial-setup : small change to make more
 readable.

---
 srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup
index 4d1e42ee747..e8679bd7de0 100644
--- a/srcpkgs/boot-66serv/files/66boot-initial-setup
+++ b/srcpkgs/boot-66serv/files/66boot-initial-setup
@@ -18,7 +18,7 @@ msg_trees() {
 66-enable -F -t boot boot@system || msg_trees
 # Copy the default boot@conf so that is will survive updates and be accesible
 #  though /etc/66rc.conf.
-if test ! -f /etc/66/conf/boot@system/version/boot@system; then  cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi 
+[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
 
 # Create default tree, enable it and make it current.
 66-tree -nEc default || msg_trees

From 4d37ae64af7add7aec8c164ac1feba0c7b101732 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 8 Feb 2021 19:05:47 +0200
Subject: [PATCH 18/25] change the default zfs import method to zpoolcache -
 thanks @gspe!

---
 srcpkgs/boot-66serv/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template
index 2192a410f9c..1876f0852b6 100644
--- a/srcpkgs/boot-66serv/template
+++ b/srcpkgs/boot-66serv/template
@@ -5,7 +5,8 @@ revision=1
 wrksrc=${pkgname}-v${version}
 build_style=gnu-configure
 configure_args="--HOSTNAME=!voidlinux --TTY=!4
-	--KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no"
+ --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no
+ --ZFS_IMPORT=!zpoolcache"
 make_install_target="install install-man install-html"
 hostmakedepends="lowdown"
 makedepends="file"

From b1ca83aee7ed0b9444dd022faaf09b3eb499a4aa Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 00:50:04 +0200
Subject: [PATCH 19/25] void-66-services: update to 0.0.2.

---
 srcpkgs/void-66-services/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template
index 7ed84c93713..343809e845e 100644
--- a/srcpkgs/void-66-services/template
+++ b/srcpkgs/void-66-services/template
@@ -1,17 +1,19 @@
 # Template file for 'void-66-services'
 pkgname=void-66-services
-version=0.0.1
+version=0.0.2
 revision=1
-build_style=gnu-makefile
 depends="66"
 short_desc="66 service frontend files for voidlinux"
 maintainer