From 82b554a14d4c448811613cff9e0ea6d1e90abcdd Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 22 Jun 2020 01:43:05 +0200 Subject: [PATCH 01/29] New package: boot-66serv-2.2.1 based on: https://github.com/void-linux/void-packages/pull/23122 https://github.com/void-linux/void-packages/pull/21142 [ci-skip] --- srcpkgs/boot-66serv/files/66 | 2 ++ srcpkgs/boot-66serv/files/runit | 16 ++++++++++++ srcpkgs/boot-66serv/files/switch-initutils | 22 ++++++++++++++++ srcpkgs/boot-66serv/files/tty@ | 12 +++++++++ srcpkgs/boot-66serv/template | 30 ++++++++++++++++++++++ 5 files changed, 82 insertions(+) create mode 100644 srcpkgs/boot-66serv/files/66 create mode 100644 srcpkgs/boot-66serv/files/runit create mode 100755 srcpkgs/boot-66serv/files/switch-initutils create mode 100644 srcpkgs/boot-66serv/files/tty@ create mode 100644 srcpkgs/boot-66serv/template diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66 new file mode 100644 index 000000000000..c82ece19fc5e --- /dev/null +++ b/srcpkgs/boot-66serv/files/66 @@ -0,0 +1,2 @@ +#!/usr/bin/execlineb -P +66-boot -b "Booting Voidlinux" -m diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit new file mode 100644 index 000000000000..9c25c7dff436 --- /dev/null +++ b/srcpkgs/boot-66serv/files/runit @@ -0,0 +1,16 @@ +[main] +@type = longrun +@version = @VERSION@ +@description = "runit" +@user = (root) +@options = ( log ) + +[start] +@execute = ( /etc/runit/2 ) + +[stop] +@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } ) + +[logger] +@backup = 3 +@maxsize = 1000000 diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils new file mode 100755 index 000000000000..3919274b0f7f --- /dev/null +++ b/srcpkgs/boot-66serv/files/switch-initutils @@ -0,0 +1,22 @@ +# This service automatically moves +# /usr/bin/{reboot,poweroff,halt,shutdown} +# so that if started with 66, users can shutdown etc. with it. +# It automatically moves everything back if started with +# runit again. +# This is run by runit and 66 + +if grep -q "init=/usr/bin/66" /proc/cmdline; then + for i in reboot poweroff halt shutdown; do + if ! test -e /usr/bin/${i}.runit; then + mv /usr/bin/${i} /usr/bin/${i}.runit + ln -s /etc/66/${i} /usr/bin/${i} + fi + done +else + for i in reboot poweroff halt shutdown; do + if test -e /usr/bin/${i}.runit; then + rm /usr/bin/${i} + mv /usr/bin/${i}.runit /usr/bin/${i} + fi + done +fi diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@ new file mode 100644 index 000000000000..7b72f625d84f --- /dev/null +++ b/srcpkgs/boot-66serv/files/tty@ @@ -0,0 +1,12 @@ +[main] +@type = classic +@version = @VERSION@ +@description = "Launch @I" +@user = ( root ) +@options = ( env ) + +[start] +@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } ) + +[environment] +cmd_args=!-J 38400 diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template new file mode 100644 index 000000000000..1a57510f3cfb --- /dev/null +++ b/srcpkgs/boot-66serv/template @@ -0,0 +1,30 @@ +# Template file for 'boot-66serv' +pkgname=boot-66serv +version=2.2.1 +revision=1 +wrksrc=${pkgname}-v${version} +build_style=gnu-configure +configure_args="--HOSTNAME=voidlinux --TTY=!4 + --KEYMAP=!us --TZ=Europe/Madrid" +make_install_target="install install-man install-html" +hostmakedepends="lowdown" +makedepends="file" +depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools" +short_desc="Stage 1 boot for 66" +maintainer="mobinmob " +# previous maintainer="teldra " +license="ISC" +homepage="https://framagit.org/Obarun/boot-66serv" +conf_files="/etc/66/rc.local" +distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz" +checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d + +post_install() { + vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh + vbin ${FILESDIR}/66 + vlicense LICENSE + vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/ + vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@" + vinstall ${FILESDIR}/runit 644 usr/share/66/service/ + vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit" +} From da538387912cdd0045baabbcf7f2c582694025e1 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 8 Nov 2020 17:08:32 +0200 Subject: [PATCH 02/29] improve runit service frontend file. --- srcpkgs/boot-66serv/files/runit | 18 ++++++++++++++++-- srcpkgs/boot-66serv/template | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index 9c25c7dff436..c5e36bbfa4fe 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -6,10 +6,24 @@ @options = ( log ) [start] -@execute = ( /etc/runit/2 ) +@build = custom +@shebang = ( "/bin/sh" ) +@execute = ( +PATH=/usr/bin:/usr/sbin + +runlevel=66 + +runsvchdir "${runlevel}" +mkdir -p /run/runit/runsvdir +ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current + +exec env - PATH=$PATH \ + runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' + + ) [stop] -@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } ) +@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } ) [logger] @backup = 3 diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 1a57510f3cfb..f953ead216ec 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local" distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz" checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d +make_dirs="/etc/runit/runsvdir/66 0750 root root" + post_install() { vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh vbin ${FILESDIR}/66 From 8116815591a85a64f55b3accaf20fbaa250e1a70 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Tue, 24 Nov 2020 01:54:26 +0200 Subject: [PATCH 03/29] make [stop] do its job :P --- srcpkgs/boot-66serv/files/runit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index c5e36bbfa4fe..fe741ff2bd8f 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -23,7 +23,11 @@ exec env - PATH=$PATH \ ) [stop] -@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } ) +@build = custom +@shebang = ( "/bin/sh" ) +@execute = ( + sv force-stop /var/service/* + sv exit /var/service/* ) [logger] @backup = 3 From 3c9aeeb3e0c827c730e891877d3662f1ccdab269 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Wed, 25 Nov 2020 21:24:43 +0200 Subject: [PATCH 04/29] Separate switch-initutils code for runit and 66, and document both consistently. --- srcpkgs/boot-66serv/files/switch-initutils | 34 +++++++++------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/srcpkgs/boot-66serv/files/switch-initutils b/srcpkgs/boot-66serv/files/switch-initutils index 3919274b0f7f..b596b3ba95f6 100755 --- a/srcpkgs/boot-66serv/files/switch-initutils +++ b/srcpkgs/boot-66serv/files/switch-initutils @@ -1,22 +1,14 @@ -# This service automatically moves -# /usr/bin/{reboot,poweroff,halt,shutdown} -# so that if started with 66, users can shutdown etc. with it. -# It automatically moves everything back if started with -# runit again. -# This is run by runit and 66 +# This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown} +# and if they are part of 66 it deletes them and moves the runit +# utilities in their place. It runs by default. There is a similar +# oneshot service for 66 that does the opposite and should be enabled. +# The script make sure that the user has the proper utilities for the +# init system they are currently running. + +for i in reboot poweroff halt shutdown; do + if test -e /usr/bin/${i}.runit; then + rm /usr/bin/${i} + mv /usr/bin/${i}.runit /usr/bin/${i} + fi +done -if grep -q "init=/usr/bin/66" /proc/cmdline; then - for i in reboot poweroff halt shutdown; do - if ! test -e /usr/bin/${i}.runit; then - mv /usr/bin/${i} /usr/bin/${i}.runit - ln -s /etc/66/${i} /usr/bin/${i} - fi - done -else - for i in reboot poweroff halt shutdown; do - if test -e /usr/bin/${i}.runit; then - rm /usr/bin/${i} - mv /usr/bin/${i}.runit /usr/bin/${i} - fi - done -fi From 093da533c5d5a2c9c40c57db9120760c6d9f3b65 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Tue, 15 Dec 2020 23:47:29 +0200 Subject: [PATCH 05/29] add the 66 frontend file in the package. --- srcpkgs/boot-66serv/files/switch-initutils-66 | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 srcpkgs/boot-66serv/files/switch-initutils-66 diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66 new file mode 100644 index 000000000000..1bf6c7247455 --- /dev/null +++ b/srcpkgs/boot-66serv/files/switch-initutils-66 @@ -0,0 +1,28 @@ + +# This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown} +# and if they are part of runit-void it renames them and copies the 66 +# utilities in their place. It must be enabled, especially if one +# changes between the two init systems. There is a similar script for +# runit core-services that does the opposite and runs by default with runit. +# The service makes sure that the user has the proper utilities for the +# init system they are currently running. + +[main] +@type = oneshot +@version = @VERSION@ +@description = "Switch initutils" +@user = ( root ) + +[start] +@build = custom +@shebang = "/bin/sh -c" +@execute = ( +if grep -q "init=/usr/bin/66" /proc/cmdline; then + for i in reboot poweroff halt shutdown; do + if ! test -e /usr/bin/${i}.runit; then + mv /usr/bin/${i} /usr/bin/${i}.runit + cp /etc/66/${i} /usr/bin/${i} + fi + done +fi +) From 4d20ab937473014e6f94047ef6af8713188d8d63 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Tue, 15 Dec 2020 23:51:22 +0200 Subject: [PATCH 06/29] install switch-initutils for 66 and change how the '@version' key is set. --- srcpkgs/boot-66serv/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index f953ead216ec..fa659c37010d 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -25,8 +25,12 @@ post_install() { vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh vbin ${FILESDIR}/66 vlicense LICENSE + # @version should be incremented only when there is a change in the specific + # frontend service file. vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/ - vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/tty@" + vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@" vinstall ${FILESDIR}/runit 644 usr/share/66/service/ - vsed -i "s/@VERSION@/${version}/" "${DESTDIR}/usr/share/66/service/runit" + vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit" + vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils + vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils" } From bc2edfa5ac43c4dd754a2803e099db4786506255 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 28 Dec 2020 23:57:01 +0200 Subject: [PATCH 07/29] New package: void-66-services-0.0.1 --- srcpkgs/void-66-services/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/void-66-services/template diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template new file mode 100644 index 000000000000..7ed84c937134 --- /dev/null +++ b/srcpkgs/void-66-services/template @@ -0,0 +1,17 @@ +# Template file for 'void-66-services' +pkgname=void-66-services +version=0.0.1 +revision=1 +build_style=gnu-makefile +depends="66" +short_desc="66 service frontend files for voidlinux" +maintainer="mobinmob " +license="BSD-2-Clause" +homepage="https://github.com/mobinmob/void-66-services/" +distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz" +checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95 + +post_install() { + vlicense LICENSE + vlicense AUTHORS +} From 62cb7985b079fb4ceed1d4fad96a0f1300984fd9 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 3 Jan 2021 16:22:47 +0200 Subject: [PATCH 08/29] more work on the runit service. --- srcpkgs/boot-66serv/files/runit | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index fe741ff2bd8f..d3d60bb82dd8 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -1,5 +1,5 @@ [main] -@type = longrun +@type = classic @version = @VERSION@ @description = "runit" @user = (root) @@ -14,20 +14,19 @@ PATH=/usr/bin:/usr/sbin runlevel=66 runsvchdir "${runlevel}" -mkdir -p /run/runit/runsvdir -ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current - -exec env - PATH=$PATH \ - runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' +s6-mkdir -v -p /run/runit/runsvdir +s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current +exec s6-env PATH=$PATH \ + runsvdir -P /run/runit/runsvdir/current ) [stop] @build = custom @shebang = ( "/bin/sh" ) @execute = ( - sv force-stop /var/service/* - sv exit /var/service/* ) + sv force-stop /var/service/* + sv exit /var/service/* ) [logger] @backup = 3 From 447d5dc1fddaf693770fa3c21e558ebef4a92f4b Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 3 Jan 2021 17:13:57 +0200 Subject: [PATCH 09/29] add -i switch to s6-env: the /etc/runit/2 script uses - which is non-standard but in gnu coreutils and busybox does the same as -i. --- srcpkgs/boot-66serv/files/runit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index d3d60bb82dd8..362266bad06a 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -17,7 +17,7 @@ runsvchdir "${runlevel}" s6-mkdir -v -p /run/runit/runsvdir s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current -exec s6-env PATH=$PATH \ +exec s6-env -i PATH=$PATH \ runsvdir -P /run/runit/runsvdir/current ) From 4513539f283d25a6450f99caccab8f779b0887b9 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sat, 23 Jan 2021 22:07:22 +0200 Subject: [PATCH 10/29] boot-66serv: update to 2.3.0 adapt to new 66 version. --- srcpkgs/boot-66serv/files/runit | 10 ++++------ srcpkgs/boot-66serv/files/tty@ | 1 - srcpkgs/boot-66serv/template | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index 362266bad06a..3a0f89f87077 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -3,12 +3,11 @@ @version = @VERSION@ @description = "runit" @user = (root) -@options = ( log ) [start] @build = custom @shebang = ( "/bin/sh" ) -@execute = ( +@execute = ( PATH=/usr/bin:/usr/sbin runlevel=66 @@ -24,10 +23,9 @@ exec s6-env -i PATH=$PATH \ [stop] @build = custom @shebang = ( "/bin/sh" ) -@execute = ( - sv force-stop /var/service/* - sv exit /var/service/* ) +@execute = ( sv force-stop /var/service/* } + sv exit /var/service/* ) [logger] -@backup = 3 +@backup = 3 @maxsize = 1000000 diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@ index 7b72f625d84f..f4a783bde6c2 100644 --- a/srcpkgs/boot-66serv/files/tty@ +++ b/srcpkgs/boot-66serv/files/tty@ @@ -3,7 +3,6 @@ @version = @VERSION@ @description = "Launch @I" @user = ( root ) -@options = ( env ) [start] @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } ) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index fa659c37010d..c088b82dd9e2 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -1,6 +1,6 @@ # Template file for 'boot-66serv' pkgname=boot-66serv -version=2.2.1 +version=2.3.0 revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure @@ -14,10 +14,10 @@ short_desc="Stage 1 boot for 66" maintainer="mobinmob " # previous maintainer="teldra " license="ISC" -homepage="https://framagit.org/Obarun/boot-66serv" +homepage="https://framagit.org/pkg/obmods/boot-66serv" conf_files="/etc/66/rc.local" -distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz" -checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d +distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2" +checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba make_dirs="/etc/runit/runsvdir/66 0750 root root" From 51f21567678aecf845ad31fc79d64b275e5c8b35 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 1 Feb 2021 19:20:01 +0200 Subject: [PATCH 11/29] remove tty@ frontend service file - no longer needed. --- srcpkgs/boot-66serv/files/tty@ | 11 ----------- srcpkgs/boot-66serv/template | 2 -- 2 files changed, 13 deletions(-) delete mode 100644 srcpkgs/boot-66serv/files/tty@ diff --git a/srcpkgs/boot-66serv/files/tty@ b/srcpkgs/boot-66serv/files/tty@ deleted file mode 100644 index f4a783bde6c2..000000000000 --- a/srcpkgs/boot-66serv/files/tty@ +++ /dev/null @@ -1,11 +0,0 @@ -[main] -@type = classic -@version = @VERSION@ -@description = "Launch @I" -@user = ( root ) - -[start] -@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } ) - -[environment] -cmd_args=!-J 38400 diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index c088b82dd9e2..4747249557de 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -27,8 +27,6 @@ post_install() { vlicense LICENSE # @version should be incremented only when there is a change in the specific # frontend service file. - vinstall ${FILESDIR}/tty@ 644 usr/share/66/service/ - vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/tty@" vinstall ${FILESDIR}/runit 644 usr/share/66/service/ vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit" vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils From 7ce2e8d0e94b554f7f1c38e36edd75da3044437f Mon Sep 17 00:00:00 2001 From: mobinmob Date: Wed, 3 Feb 2021 02:13:34 +0200 Subject: [PATCH 12/29] create symlink in /etc/66conf.rc that points to the conf file of boot@system. --- srcpkgs/boot-66serv/template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 4747249557de..4fce1c84b8a0 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -24,6 +24,8 @@ make_dirs="/etc/runit/runsvdir/66 0750 root root" post_install() { vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh vbin ${FILESDIR}/66 + # Create symlink for the boot@system service configuration file + ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf" vlicense LICENSE # @version should be incremented only when there is a change in the specific # frontend service file. From 55c502dfa240add1f750a05b6b45d7219d6eed6b Mon Sep 17 00:00:00 2001 From: mobinmob Date: Thu, 4 Feb 2021 21:47:25 +0200 Subject: [PATCH 13/29] add 66boot-initial-setup script, small fixes in the template. --- .../boot-66serv/files/66boot-initial-setup | 33 +++++++++++++++++++ srcpkgs/boot-66serv/template | 19 ++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/boot-66serv/files/66boot-initial-setup diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup new file mode 100644 index 000000000000..8d289de798bf --- /dev/null +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -0,0 +1,33 @@ +#!/bin/sh + +# Script must run as root, otherwise it creates trees +# as the user. +user=$(id -u) +s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1 + +# Infromataion for the user, in case of failure. 66 output is informative, this +# is just a pointer to the docs. +msg_trees() { + printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n" + exit 1 +} + +# Create the mandatory boot tree. +66-tree -n boot || msg_trees +# Enable the boot@system service in the boot tree. +66-enable -F -t boot boot@system || msg_trees +# Copy the default boot@conf so that is will survive updates and be accesible +# though /etc/66rc.conf. +cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees + +# Create default tree, enable it and make it current. +66-tree -nEc default || msg_trees +# Enable switch-initutils oneshot service in the default tree. +66-enable switch-initutils || msg_trees + +# Create and enable runit tree. +66-tree -nE runit || msg_trees +# Enable the runit service in the runit tree. +66-enable -t runit runit || msg_trees +# Start runit tree after the default tree. +66-tree -S default runit || msg_trees diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 4fce1c84b8a0..4c3e1f5cca76 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -22,15 +22,24 @@ checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba make_dirs="/etc/runit/runsvdir/66 0750 root root" post_install() { - vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh - vbin ${FILESDIR}/66 + + # Install the switch-initutils core service for runit. + vinstall "${FILESDIR}"/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh + # Install the 66 wrapper for 66-boot + vbin "${FILESDIR}"/66 + # Install the 66boot-initial-setup utility + vbin "${FILESDIR}"/66boot-initial-setup # Create symlink for the boot@system service configuration file ln -s /etc/66/conf/boot@system/version/boot@system "${DESTDIR}/etc/66rc.conf" - vlicense LICENSE + + # Install runit and switch-initutils services for 66 # @version should be incremented only when there is a change in the specific # frontend service file. - vinstall ${FILESDIR}/runit 644 usr/share/66/service/ + vinstall "${FILESDIR}"/runit 644 usr/share/66/service/ vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit" - vinstall ${FILESDIR}/switch-initutils-66 644 usr/share/66/service/ switch-initutils + vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils" + + # Install license file + vlicense LICENSE } From b22125bfcccc058e2571693062ea9e12a0b84466 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Thu, 4 Feb 2021 22:20:01 +0200 Subject: [PATCH 14/29] Fixes proposed by @ericonr. --- srcpkgs/boot-66serv/files/66 | 2 +- srcpkgs/boot-66serv/files/runit | 2 +- srcpkgs/boot-66serv/template | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/srcpkgs/boot-66serv/files/66 b/srcpkgs/boot-66serv/files/66 index c82ece19fc5e..2e5bb6a10a5f 100644 --- a/srcpkgs/boot-66serv/files/66 +++ b/srcpkgs/boot-66serv/files/66 @@ -1,2 +1,2 @@ #!/usr/bin/execlineb -P -66-boot -b "Booting Voidlinux" -m +66-boot -b "Booting Void Linux" -m diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index 3a0f89f87077..9f0f36d73c3c 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -8,7 +8,7 @@ @build = custom @shebang = ( "/bin/sh" ) @execute = ( -PATH=/usr/bin:/usr/sbin +PATH=/usr/bin runlevel=66 diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 4c3e1f5cca76..0efd5480a012 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -12,7 +12,6 @@ makedepends="file" depends="s6 s6-rc s6-linux-utils s6-portable-utils 66 66-tools" short_desc="Stage 1 boot for 66" maintainer="mobinmob " -# previous maintainer="teldra " license="ISC" homepage="https://framagit.org/pkg/obmods/boot-66serv" conf_files="/etc/66/rc.local" From 5462b7ad1e8e07c35217624e84b19a94c70b505f Mon Sep 17 00:00:00 2001 From: mobinmob Date: Fri, 5 Feb 2021 01:24:11 +0200 Subject: [PATCH 15/29] fixes in the template, 66boot-initial-setup and the runit service --- srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +- srcpkgs/boot-66serv/files/runit | 7 +++++-- srcpkgs/boot-66serv/template | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup index 8d289de798bf..4d1e42ee7472 100644 --- a/srcpkgs/boot-66serv/files/66boot-initial-setup +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -18,7 +18,7 @@ msg_trees() { 66-enable -F -t boot boot@system || msg_trees # Copy the default boot@conf so that is will survive updates and be accesible # though /etc/66rc.conf. -cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system || msg_trees +if test ! -f /etc/66/conf/boot@system/version/boot@system; then cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi # Create default tree, enable it and make it current. 66-tree -nEc default || msg_trees diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index 9f0f36d73c3c..9c0c16f5c1d4 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -8,13 +8,16 @@ @build = custom @shebang = ( "/bin/sh" ) @execute = ( -PATH=/usr/bin +exec 2>&1 +PATH=/usr/bin runlevel=66 runsvchdir "${runlevel}" s6-mkdir -v -p /run/runit/runsvdir -s6-ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current +ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current +s6-rmrf /var/service/current +s6-rmrf /var/service/supervise exec s6-env -i PATH=$PATH \ runsvdir -P /run/runit/runsvdir/current diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 0efd5480a012..f4467c0f0c0e 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -4,8 +4,9 @@ version=2.3.0 revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure -configure_args="--HOSTNAME=voidlinux --TTY=!4 - --KEYMAP=!us --TZ=Europe/Madrid" +configure_args="--HOSTNAME=!voidlinux --TTY=!4 + --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no + --SWAP=!yes" make_install_target="install install-man install-html" hostmakedepends="lowdown" makedepends="file" From 78ade2fceab8197644d619ce2e6e7a83c7166779 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sat, 6 Feb 2021 02:46:03 +0200 Subject: [PATCH 16/29] do not enable swap in the template - created problems when no classic swap partition/file is available (trident/zfs). --- srcpkgs/boot-66serv/template | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index f4467c0f0c0e..2192a410f9cd 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -5,8 +5,7 @@ revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure configure_args="--HOSTNAME=!voidlinux --TTY=!4 - --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no - --SWAP=!yes" + --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no" make_install_target="install install-man install-html" hostmakedepends="lowdown" makedepends="file" From d19250a77c5211902559843ff47ed50e9c45b963 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 8 Feb 2021 13:12:25 +0200 Subject: [PATCH 17/29] files/66boot-initial-setup : small change to make more readable. --- srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup index 4d1e42ee7472..e8679bd7de02 100644 --- a/srcpkgs/boot-66serv/files/66boot-initial-setup +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -18,7 +18,7 @@ msg_trees() { 66-enable -F -t boot boot@system || msg_trees # Copy the default boot@conf so that is will survive updates and be accesible # though /etc/66rc.conf. -if test ! -f /etc/66/conf/boot@system/version/boot@system; then cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system ; fi +[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system # Create default tree, enable it and make it current. 66-tree -nEc default || msg_trees From f930d6d22dbff50749d12e9d483c4f57b678e2dc Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 8 Feb 2021 19:05:47 +0200 Subject: [PATCH 18/29] change the default zfs import method to zpoolcache - thanks @gspe! --- srcpkgs/boot-66serv/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 2192a410f9cd..1876f0852b68 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -5,7 +5,8 @@ revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure configure_args="--HOSTNAME=!voidlinux --TTY=!4 - --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no" + --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no + --ZFS_IMPORT=!zpoolcache" make_install_target="install install-man install-html" hostmakedepends="lowdown" makedepends="file" From ef3cfd33afab73eaa877d6ce259df054d4c2b300 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 15 Feb 2021 00:50:04 +0200 Subject: [PATCH 19/29] void-66-services: update to 0.0.2. --- srcpkgs/void-66-services/template | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/srcpkgs/void-66-services/template b/srcpkgs/void-66-services/template index 7ed84c937134..343809e845e4 100644 --- a/srcpkgs/void-66-services/template +++ b/srcpkgs/void-66-services/template @@ -1,17 +1,19 @@ # Template file for 'void-66-services' pkgname=void-66-services -version=0.0.1 +version=0.0.2 revision=1 -build_style=gnu-makefile depends="66" short_desc="66 service frontend files for voidlinux" maintainer="mobinmob " license="BSD-2-Clause" homepage="https://github.com/mobinmob/void-66-services/" distfiles="https://github.com/mobinmob/void-66-services/archive/v${version}.tar.gz" -checksum=ca223594ebae8e7a79e16f150bbebd44878143c07b928c9985020b5183175b95 +checksum=020b3a2cc5c1bafa7328a5d2db7be8baf08ecef8d4a9c8440c78c3db7f342678 -post_install() { +do_install() { + vmkdir usr + vcopy usr / + chmod +x "${DESTDIR}/usr/share/66/service/dbus/data/check" vlicense LICENSE vlicense AUTHORS } From a7042bb8a0f5c9b7dac478465f0d4c89bad9ac66 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 15 Feb 2021 00:53:45 +0200 Subject: [PATCH 20/29] files/66boot-initial-setup: small typo fix. --- srcpkgs/boot-66serv/files/66boot-initial-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup index e8679bd7de02..513f614df7de 100644 --- a/srcpkgs/boot-66serv/files/66boot-initial-setup +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -5,7 +5,7 @@ user=$(id -u) s6-test "$user" -ne 0 && printf "You need to run this script as root! \n" && exit 1 -# Infromataion for the user, in case of failure. 66 output is informative, this +# Information for the user, in case of failure. 66 output is informative, this # is just a pointer to the docs. msg_trees() { printf "Some trees and/or files are already present in the system.\nIf you want to remove them, consult the 66-tree documentation.\n" From 8b54cb8216149c5bed84e206a2b0739fc41f6c47 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Tue, 16 Feb 2021 17:13:44 +0200 Subject: [PATCH 21/29] files/runit: add /usr/sbin to PATH again... --- srcpkgs/boot-66serv/files/runit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/files/runit b/srcpkgs/boot-66serv/files/runit index 9c0c16f5c1d4..35890b9fe7b7 100644 --- a/srcpkgs/boot-66serv/files/runit +++ b/srcpkgs/boot-66serv/files/runit @@ -10,7 +10,7 @@ @execute = ( exec 2>&1 -PATH=/usr/bin +PATH=/usr/bin:/usr/sbin runlevel=66 runsvchdir "${runlevel}" From 42016609e2d1d613d5bb51262c28e993d0970e46 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 28 Feb 2021 00:22:41 +0100 Subject: [PATCH 22/29] 66boot-initial-setup: remove the warning from the conf file. --- srcpkgs/boot-66serv/files/66boot-initial-setup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup index 513f614df7de..0d809c8f2f6d 100644 --- a/srcpkgs/boot-66serv/files/66boot-initial-setup +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -17,8 +17,10 @@ msg_trees() { # Enable the boot@system service in the boot tree. 66-enable -F -t boot boot@system || msg_trees # Copy the default boot@conf so that is will survive updates and be accesible -# though /etc/66rc.conf. -[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system +# though /etc/66rc.conf. Also, remove the warning in the first lines of the file. +[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \ +warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \ + [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf # Create default tree, enable it and make it current. 66-tree -nEc default || msg_trees From 8ccecb8673b50023ab7c2eaaab224a7737fd70fc Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 28 Feb 2021 00:23:54 +0100 Subject: [PATCH 23/29] use upstream patches for local-iptables and devices-crypttab. --- ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 ++++++ ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 +++++++++++++++++++ srcpkgs/boot-66serv/template | 1 + 3 files changed, 54 insertions(+) create mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff create mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff new file mode 100644 index 000000000000..b4fe592ea5a1 --- /dev/null +++ b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff @@ -0,0 +1,13 @@ +diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab +index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644 +--- a/module/boot@/service/system/devices/devices-crypttab ++++ b/module/boot@/service/system/devices/devices-crypttab +@@ -4,7 +4,7 @@ + @description = "Active encrypted devices" + @user = ( root ) + @options = ( !log ) +-@depends = ( udevadm ) ++@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm ) + + [start] + @execute = diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff new file mode 100644 index 000000000000..a560272de2c6 --- /dev/null +++ b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff @@ -0,0 +1,40 @@ +diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables +index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644 +--- a/module/boot@/service/local/firewall/local-iptables ++++ b/module/boot@/service/local/firewall/local-iptables +@@ -20,19 +20,28 @@ + ) + + [stop] ++@build = custom ++@shebang = "/usr/bin/bash -c" + @execute = + ( +- if { 66-yeller -cdp local-iptables -1 /dev/console stops... } +- if -nt { + +- execl-toc -x ${script_file} +- ${script_file} ++ exec 2>&1 + +- } +- 66-yeller -fcdp local-iptables -1 /dev/console crashed! ++ 66-yeller -cdp local-iptables -1 /dev/console stops... ++ ++ if ! type -p iptables &>/dev/null; then ++ 66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program" ++ fi ++ ++ while read -r table; do ++ tables+=("/usr/share/iptables/empty-$table.rules") ++ done <"/proc/net/ip_tables_names" ++ ++ if (( ${#tables[*]} )); then ++ cat "${tables[@]}" | iptables-restore ++ fi + ) + + [environment] + script_conf=!/etc/iptables/iptables.rules +-script_file=!/usr/lib/iptables/scripts/iptables-flush + diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 1876f0852b68..c61af8843800 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -18,6 +18,7 @@ homepage="https://framagit.org/pkg/obmods/boot-66serv" conf_files="/etc/66/rc.local" distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2" checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba +patch_args=" -Np1" make_dirs="/etc/runit/runsvdir/66 0750 root root" From 2bb1347cd6bc57da744c80a7610678097065224f Mon Sep 17 00:00:00 2001 From: mobinmob Date: Wed, 3 Mar 2021 22:22:43 +0200 Subject: [PATCH 24/29] template: Create the log dir with proper permissions at installation: normally it is created on first run, but it can fail. --- srcpkgs/boot-66serv/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index c61af8843800..ed10d74a67e9 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -20,7 +20,8 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba patch_args=" -Np1" -make_dirs="/etc/runit/runsvdir/66 0750 root root" +make_dirs="/etc/runit/runsvdir/66 0750 root root + /var/log/66 0750 _s6log _s6log" post_install() { From 089ab05cbee6bd6c1e4c524801a7226527551331 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Wed, 3 Mar 2021 22:23:39 +0200 Subject: [PATCH 25/29] files/66boot-initial-setup: clean and improve the script: -use a variable for the new configuration file. --- srcpkgs/boot-66serv/files/66boot-initial-setup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/boot-66serv/files/66boot-initial-setup b/srcpkgs/boot-66serv/files/66boot-initial-setup index 0d809c8f2f6d..d466a1b88658 100644 --- a/srcpkgs/boot-66serv/files/66boot-initial-setup +++ b/srcpkgs/boot-66serv/files/66boot-initial-setup @@ -18,9 +18,10 @@ msg_trees() { 66-enable -F -t boot boot@system || msg_trees # Copy the default boot@conf so that is will survive updates and be accesible # though /etc/66rc.conf. Also, remove the warning in the first lines of the file. -[ ! -f /etc/66/conf/boot@system/version/boot@system ] && cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system && \ +new_conf="/etc/66/conf/boot@system/version/boot@system" +[ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \ warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \ - [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' /etc/66rc.conf + [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf" # Create default tree, enable it and make it current. 66-tree -nEc default || msg_trees From d8c78695052d730b0b8b7fdb5a082d72bc8eee36 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Tue, 16 Mar 2021 21:18:44 +0200 Subject: [PATCH 26/29] New package: scandir-66serv-0.3.1. --- srcpkgs/scandir-66serv/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/scandir-66serv/template diff --git a/srcpkgs/scandir-66serv/template b/srcpkgs/scandir-66serv/template new file mode 100644 index 000000000000..a064a1c9b962 --- /dev/null +++ b/srcpkgs/scandir-66serv/template @@ -0,0 +1,17 @@ +# Template file for 'scandir-66serv' +pkgname=scandir-66serv +version=0.3.1 +revision=1 +wrksrc="${pkgname}-v${version}" +build_style=configure +depends="66 66-tools" +short_desc="66 module that enables user services" +maintainer="mobinmob " +license="ISC" +homepage="https://framagit.org/pkg/obmods/scandir-66serv" +distfiles="https://framagit.org/pkg/obmods/scandir-66serv/-/archive/v${version}/scandir-66serv-v${version}.tar.bz2" +checksum=2a5bb9ff80f7bf8e6caaccd243eb1f077a4e7ef12314aeca539673fbc92b9756 + +post_install() { + vlicense LICENSE +} From f8b76eade9472c7a6a159aae8cebf2eda5880b32 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sun, 21 Mar 2021 17:22:00 +0200 Subject: [PATCH 27/29] files/switch-initutils-66: make the service more robust. --- srcpkgs/boot-66serv/files/switch-initutils-66 | 15 +++++++++------ srcpkgs/boot-66serv/template | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/srcpkgs/boot-66serv/files/switch-initutils-66 b/srcpkgs/boot-66serv/files/switch-initutils-66 index 1bf6c7247455..4239b7b53cc3 100644 --- a/srcpkgs/boot-66serv/files/switch-initutils-66 +++ b/srcpkgs/boot-66serv/files/switch-initutils-66 @@ -17,12 +17,15 @@ @build = custom @shebang = "/bin/sh -c" @execute = ( + +poweroff_util=$(readlink -f /usr/bin/poweroff) + if grep -q "init=/usr/bin/66" /proc/cmdline; then - for i in reboot poweroff halt shutdown; do - if ! test -e /usr/bin/${i}.runit; then - mv /usr/bin/${i} /usr/bin/${i}.runit - cp /etc/66/${i} /usr/bin/${i} - fi - done + if [ "$poweroff_util" != /usr/bin/poweroff ]; then + for i in reboot poweroff halt shutdown; do + mv /usr/bin/${i} /usr/bin/${i}.runit + cp /etc/66/${i} /usr/bin/${i} + done + fi fi ) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index ed10d74a67e9..26e9dada5db4 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -40,7 +40,7 @@ post_install() { vinstall "${FILESDIR}"/runit 644 usr/share/66/service/ vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/runit" vinstall "${FILESDIR}"/switch-initutils-66 644 usr/share/66/service/ switch-initutils - vsed -i "s/@VERSION@/0.0.1/" "${DESTDIR}/usr/share/66/service/switch-initutils" + vsed -i "s/@VERSION@/0.0.2/" "${DESTDIR}/usr/share/66/service/switch-initutils" # Install license file vlicense LICENSE From a079d0129a1a495eaff33e9849d793883c2d99d7 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Mon, 22 Mar 2021 22:48:57 +0200 Subject: [PATCH 28/29] remove unneeded lines in template, use upstream fixes. --- ...202f5583369daa6f2ccbc0bafab3738e47d66.diff | 13 - ...6e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff | 40 ---- .../patches/upstream-20210322.diff | 222 ++++++++++++++++++ srcpkgs/boot-66serv/template | 6 +- 4 files changed, 224 insertions(+), 57 deletions(-) delete mode 100644 srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff delete mode 100644 srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff create mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff diff --git a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff b/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff deleted file mode 100644 index b4fe592ea5a1..000000000000 --- a/srcpkgs/boot-66serv/patches/d41202f5583369daa6f2ccbc0bafab3738e47d66.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab -index 5b808f288a2d2f780b7966485ddb9cd561f856ba..80f4c031d9f35515aef6b10f27fd067ee75d0f90 100644 ---- a/module/boot@/service/system/devices/devices-crypttab -+++ b/module/boot@/service/system/devices/devices-crypttab -@@ -4,7 +4,7 @@ - @description = "Active encrypted devices" - @user = ( root ) - @options = ( !log ) --@depends = ( udevadm ) -+@depends = ( udevadm devices-brtfs devices-dmraid devices-lvm ) - - [start] - @execute = diff --git a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff b/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff deleted file mode 100644 index a560272de2c6..000000000000 --- a/srcpkgs/boot-66serv/patches/f046e12f7e07a1874cdcd2b791b68b3c8e1e7f85.diff +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables -index 2ba35fb7e02b122b93f00c023ee673fbbb7b1bbe..27e224344d3c70be674a018124d1f5490a43f8f2 100644 ---- a/module/boot@/service/local/firewall/local-iptables -+++ b/module/boot@/service/local/firewall/local-iptables -@@ -20,19 +20,28 @@ - ) - - [stop] -+@build = custom -+@shebang = "/usr/bin/bash -c" - @execute = - ( -- if { 66-yeller -cdp local-iptables -1 /dev/console stops... } -- if -nt { - -- execl-toc -x ${script_file} -- ${script_file} -+ exec 2>&1 - -- } -- 66-yeller -fcdp local-iptables -1 /dev/console crashed! -+ 66-yeller -cdp local-iptables -1 /dev/console stops... -+ -+ if ! type -p iptables &>/dev/null; then -+ 66-yeller -fcdp local-iptables -1 /dev/console "unable to find iptables program" -+ fi -+ -+ while read -r table; do -+ tables+=("/usr/share/iptables/empty-$table.rules") -+ done <"/proc/net/ip_tables_names" -+ -+ if (( ${#tables[*]} )); then -+ cat "${tables[@]}" | iptables-restore -+ fi - ) - - [environment] - script_conf=!/etc/iptables/iptables.rules --script_file=!/usr/lib/iptables/scripts/iptables-flush - diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff new file mode 100644 index 000000000000..16f93d1ee8d1 --- /dev/null +++ b/srcpkgs/boot-66serv/patches/upstream-20210322.diff @@ -0,0 +1,222 @@ +diff --git a/configure b/configure +index fba297a..7a0a8da 100755 +--- a/configure ++++ b/configure +@@ -23,8 +23,8 @@ Fine tuning of the installation directories: + --with-system-module=DIR 66 module intallation directory [DATAROOTDIR/$package_macro_dir/module] + --with-system-script=DIR 66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script] + --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf] +- --with-skeleton=DIR 66 skeleton files directory installation [SYSDIR/$package_macro_dir] +- ++ --with-skeleton=DIR 66 skeleton files directory installation [SYSDIR/$package_macro_dir] ++ + Fine tunning of boot configuration: + --HOSTNAME=VALUE hostname of the system [obarunS6] + --HARDWARECLOCK=VALUE set the hardware clock [UTC] +@@ -50,7 +50,7 @@ Fine tunning of boot configuration: + --DMRAID=BOOLEAN mount dmraid devices [!no] + --BTRFS=BOOLEAN mount btrfs devices [!no] + --ZFS=BOOLEAN mount zfs devices [!no] +- --ZFS_IMPORT=VALUE use scan or zpoolcache method for zfs pools importation [!scan] ++ --ZFS_IMPORT=VALUE use scan or zpoolcache method for zfs pools importation [!zpoolcache] + --CRYPTTAB=BOOLEAN use crypttab by default [!no] + --FIREWALL=VALUE use iptables|ip6tables|nftables|ebtables|arptables [] + --CGROUPS=BOOLEAN mount cgroups [!yes] +@@ -66,17 +66,17 @@ Fine tunning of boot configuration: + --POPULATE_DEV=BOOLEAN populate dev directory [!yes] + --POPULATE_RUN=BOOLEAN populate run directory [!yes] + --POPULATE_TMP=BOOLEAN populate tmp directory [!yes] +- +- ++ ++ + Use yes or no with lowercase character to set BOOLEAN values. +- ++ + Empty value is a commented one and not used at all. + + An exclamation mark '!' at the begin of the value unexport the variable + for the environment after the use. This is avoid to poluate the environment + with tempory variables. You need to single-quote the options as + follow: +- ./configure --KEYMAP='!us' ++ ./configure --KEYMAP='!us' + + EOF + exit 0 +@@ -120,9 +120,9 @@ stripdir () { + + testval () { + if test -z ${1}; then +- return 0 ; ++ return 0 ; + else +- return 1 ; ++ return 1 ; + fi + } + +@@ -165,7 +165,7 @@ LVM='!no' + DMRAID='!no' + BTRFS='!no' + ZFS='!no' +-ZFS_IMPORT='!scan' ++ZFS_IMPORT='!zpoolcache' + CRYPTTAB='!no' + FIREWALL= + CGROUPS='!yes' +@@ -256,20 +256,20 @@ fi + + if test -z "$sysconfdir" ; then + if test "$sysconfdir" = '$sysconfdir' ; then +- sysconfdir = '/etc' ++ sysconfdir = '/etc' + fi + if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then +- adm_conf = '$sysconfdir/$package_macro_dir/conf' ++ adm_conf = '$sysconfdir/$package_macro_dir/conf' + fi + if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then +- skel_directory = '$sysconfdir/$package_macro_dir' ++ skel_directory = '$sysconfdir/$package_macro_dir' + fi + fi + + # Expand installation directories + stripdir prefix + for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \ +- service_directory module_directory script_directory skel_directory adm_conf ; do ++ service_directory module_directory script_directory skel_directory adm_conf ; do + eval tmp=\${$i} + eval $i=$tmp + stripdir $i +@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do + done + + for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \ +- KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \ +- TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \ +- FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \ +- CRYPTTAB FIREWALL \ +- CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \ +- MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do ++ KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \ ++ TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \ ++ FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \ ++ CRYPTTAB FIREWALL \ ++ CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \ ++ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do + eval tmp=\${$i} + if testval $tmp; then + eval $i='${i}=\"\\#${i}=\"' +diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables +index 2ba35fb..4364a2f 100644 +--- a/module/boot@/service/local/firewall/local-iptables ++++ b/module/boot@/service/local/firewall/local-iptables +@@ -20,19 +20,29 @@ + ) + + [stop] ++@build = custom ++@shebang = "/usr/bin/bash -c" + @execute = + ( +- if { 66-yeller -cdp local-iptables -1 /dev/console stops... } +- if -nt { + +- execl-toc -x ${script_file} +- ${script_file} ++ exec 2>&1 + +- } +- 66-yeller -fcdp local-iptables -1 /dev/console crashed! ++ 66-yeller -cdp local-iptables -1 /dev/console stops... ++ ++ if ! type -p iptables &>/dev/null; then ++ 66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program ++ exit 111 ++ fi ++ ++ while read -r table; do ++ tables+=("/usr/share/iptables/empty-$table.rules") ++ done <"/proc/net/ip_tables_names" ++ ++ if (( ${#tables[*]} )); then ++ cat "${tables[@]}" | iptables-restore ++ fi + ) + + [environment] + script_conf=!/etc/iptables/iptables.rules +-script_file=!/usr/lib/iptables/scripts/iptables-flush + +diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg +index 934cd9f..fe38ef4 100644 +--- a/module/boot@/service/local/local-dmesg ++++ b/module/boot@/service/local/local-dmesg +@@ -34,5 +34,5 @@ local-rc ) + ) + + [environment] +-cmd_args=!--console-off -T ++cmd_args=!-T + cmd_log=!/var/log/dmesg.log +diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap +index fc7e2db..1b5b4e8 100644 +--- a/module/boot@/service/mount/mount-swap ++++ b/module/boot@/service/mount/mount-swap +@@ -10,12 +10,16 @@ + @execute = + ( + if { 66-yeller -cdp mount-swap -1 /dev/console starts... } +- if -nt { + +- swapon -a ++ foreground { ++ ++ if -nt { + ++ swapon -a ++ ++ } ++ 66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap! + } +- 66-yeller -fcdp mount-swap -1 /dev/console crashed! + ) + + [stop] +diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab +index 5b808f2..76ef6d5 100644 +--- a/module/boot@/service/system/devices/devices-crypttab ++++ b/module/boot@/service/system/devices/devices-crypttab +@@ -4,7 +4,7 @@ + @description = "Active encrypted devices" + @user = ( root ) + @options = ( !log ) +-@depends = ( udevadm ) ++@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm ) + + [start] + @execute = +@@ -15,13 +15,16 @@ + execl-toc -e ${script_conf} + if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } } + +- if { 66-which -q vgchange } +- if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... } +- if -nt { ++ foreground { + +- vgchange --sysinit -a y ++ if { 66-which -q vgchange } ++ if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... } ++ if -nt { ++ ++ vgchange --sysinit -a y ++ } ++ 66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices + } +- 66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices + } + 66-yeller -fcdp devices-crypttab -1 /dev/console crashed! + ) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 26e9dada5db4..2ba5a8e6c63a 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -5,8 +5,7 @@ revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure configure_args="--HOSTNAME=!voidlinux --TTY=!4 - --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no - --ZFS_IMPORT=!zpoolcache" + --KEYMAP=!us --TZ=!Europe/Madrid --TMPFILE=!no" make_install_target="install install-man install-html" hostmakedepends="lowdown" makedepends="file" @@ -20,8 +19,7 @@ distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boo checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba patch_args=" -Np1" -make_dirs="/etc/runit/runsvdir/66 0750 root root - /var/log/66 0750 _s6log _s6log" +make_dirs="/etc/runit/runsvdir/66 0750 root root" post_install() { From ec7b534a8ce82b6eeb3f184094b2c0a1dacc7c7d Mon Sep 17 00:00:00 2001 From: mobinmob Date: Fri, 28 May 2021 23:24:18 +0300 Subject: [PATCH 29/29] update boot-66serv to 2.3.1. --- .../patches/upstream-20210322.diff | 222 ------------------ srcpkgs/boot-66serv/template | 5 +- 2 files changed, 2 insertions(+), 225 deletions(-) delete mode 100644 srcpkgs/boot-66serv/patches/upstream-20210322.diff diff --git a/srcpkgs/boot-66serv/patches/upstream-20210322.diff b/srcpkgs/boot-66serv/patches/upstream-20210322.diff deleted file mode 100644 index 16f93d1ee8d1..000000000000 --- a/srcpkgs/boot-66serv/patches/upstream-20210322.diff +++ /dev/null @@ -1,222 +0,0 @@ -diff --git a/configure b/configure -index fba297a..7a0a8da 100755 ---- a/configure -+++ b/configure -@@ -23,8 +23,8 @@ Fine tuning of the installation directories: - --with-system-module=DIR 66 module intallation directory [DATAROOTDIR/$package_macro_dir/module] - --with-system-script=DIR 66 script installation directory of scripts [DATAROOTDIR/$package_macro_dir/script] - --with-sysadmin-service-conf=DIR 66 sysadmin service configuration file directory [SYSDIR/$package_macro_dir/conf] -- --with-skeleton=DIR 66 skeleton files directory installation [SYSDIR/$package_macro_dir] -- -+ --with-skeleton=DIR 66 skeleton files directory installation [SYSDIR/$package_macro_dir] -+ - Fine tunning of boot configuration: - --HOSTNAME=VALUE hostname of the system [obarunS6] - --HARDWARECLOCK=VALUE set the hardware clock [UTC] -@@ -50,7 +50,7 @@ Fine tunning of boot configuration: - --DMRAID=BOOLEAN mount dmraid devices [!no] - --BTRFS=BOOLEAN mount btrfs devices [!no] - --ZFS=BOOLEAN mount zfs devices [!no] -- --ZFS_IMPORT=VALUE use scan or zpoolcache method for zfs pools importation [!scan] -+ --ZFS_IMPORT=VALUE use scan or zpoolcache method for zfs pools importation [!zpoolcache] - --CRYPTTAB=BOOLEAN use crypttab by default [!no] - --FIREWALL=VALUE use iptables|ip6tables|nftables|ebtables|arptables [] - --CGROUPS=BOOLEAN mount cgroups [!yes] -@@ -66,17 +66,17 @@ Fine tunning of boot configuration: - --POPULATE_DEV=BOOLEAN populate dev directory [!yes] - --POPULATE_RUN=BOOLEAN populate run directory [!yes] - --POPULATE_TMP=BOOLEAN populate tmp directory [!yes] -- -- -+ -+ - Use yes or no with lowercase character to set BOOLEAN values. -- -+ - Empty value is a commented one and not used at all. - - An exclamation mark '!' at the begin of the value unexport the variable - for the environment after the use. This is avoid to poluate the environment - with tempory variables. You need to single-quote the options as - follow: -- ./configure --KEYMAP='!us' -+ ./configure --KEYMAP='!us' - - EOF - exit 0 -@@ -120,9 +120,9 @@ stripdir () { - - testval () { - if test -z ${1}; then -- return 0 ; -+ return 0 ; - else -- return 1 ; -+ return 1 ; - fi - } - -@@ -165,7 +165,7 @@ LVM='!no' - DMRAID='!no' - BTRFS='!no' - ZFS='!no' --ZFS_IMPORT='!scan' -+ZFS_IMPORT='!zpoolcache' - CRYPTTAB='!no' - FIREWALL= - CGROUPS='!yes' -@@ -256,20 +256,20 @@ fi - - if test -z "$sysconfdir" ; then - if test "$sysconfdir" = '$sysconfdir' ; then -- sysconfdir = '/etc' -+ sysconfdir = '/etc' - fi - if test "$adm_conf" = '$sysconfdir/$package_macro_dir/conf' ; then -- adm_conf = '$sysconfdir/$package_macro_dir/conf' -+ adm_conf = '$sysconfdir/$package_macro_dir/conf' - fi - if test "$skel_directory" = '$sysconfdir/$package_macro_dir' ; then -- skel_directory = '$sysconfdir/$package_macro_dir' -+ skel_directory = '$sysconfdir/$package_macro_dir' - fi - fi - - # Expand installation directories - stripdir prefix - for i in exec_prefix bindir libdir sysconfdir datarootdir mandir livedir \ -- service_directory module_directory script_directory skel_directory adm_conf ; do -+ service_directory module_directory script_directory skel_directory adm_conf ; do - eval tmp=\${$i} - eval $i=$tmp - stripdir $i -@@ -290,12 +290,12 @@ for i in service_directory module_directory script_directory mandir; do - done - - for i in HOSTNAME HARDWARECLOCK TZ SETUPCONSOLE TTY \ -- KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \ -- TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \ -- FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \ -- CRYPTTAB FIREWALL \ -- CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \ -- MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do -+ KEYMAP FONT FONT_MAP FONT_UNIMAP UDEV SYSCTL FORCECHCK LOCAL CONTAINER \ -+ TMPFILE MODULE_KERNEL MODULE_SYSTEM RANDOMSEED \ -+ FSTAB SWAP LVM DMRAID BTRFS ZFS ZFS_IMPORT \ -+ CRYPTTAB FIREWALL \ -+ CGROUPS MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP \ -+ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP ; do - eval tmp=\${$i} - if testval $tmp; then - eval $i='${i}=\"\\#${i}=\"' -diff --git a/module/boot@/service/local/firewall/local-iptables b/module/boot@/service/local/firewall/local-iptables -index 2ba35fb..4364a2f 100644 ---- a/module/boot@/service/local/firewall/local-iptables -+++ b/module/boot@/service/local/firewall/local-iptables -@@ -20,19 +20,29 @@ - ) - - [stop] -+@build = custom -+@shebang = "/usr/bin/bash -c" - @execute = - ( -- if { 66-yeller -cdp local-iptables -1 /dev/console stops... } -- if -nt { - -- execl-toc -x ${script_file} -- ${script_file} -+ exec 2>&1 - -- } -- 66-yeller -fcdp local-iptables -1 /dev/console crashed! -+ 66-yeller -cdp local-iptables -1 /dev/console stops... -+ -+ if ! type -p iptables &>/dev/null; then -+ 66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program -+ exit 111 -+ fi -+ -+ while read -r table; do -+ tables+=("/usr/share/iptables/empty-$table.rules") -+ done <"/proc/net/ip_tables_names" -+ -+ if (( ${#tables[*]} )); then -+ cat "${tables[@]}" | iptables-restore -+ fi - ) - - [environment] - script_conf=!/etc/iptables/iptables.rules --script_file=!/usr/lib/iptables/scripts/iptables-flush - -diff --git a/module/boot@/service/local/local-dmesg b/module/boot@/service/local/local-dmesg -index 934cd9f..fe38ef4 100644 ---- a/module/boot@/service/local/local-dmesg -+++ b/module/boot@/service/local/local-dmesg -@@ -34,5 +34,5 @@ local-rc ) - ) - - [environment] --cmd_args=!--console-off -T -+cmd_args=!-T - cmd_log=!/var/log/dmesg.log -diff --git a/module/boot@/service/mount/mount-swap b/module/boot@/service/mount/mount-swap -index fc7e2db..1b5b4e8 100644 ---- a/module/boot@/service/mount/mount-swap -+++ b/module/boot@/service/mount/mount-swap -@@ -10,12 +10,16 @@ - @execute = - ( - if { 66-yeller -cdp mount-swap -1 /dev/console starts... } -- if -nt { - -- swapon -a -+ foreground { -+ -+ if -nt { - -+ swapon -a -+ -+ } -+ 66-yeller -cdp mount-swap -1 /dev/console unable to activate the swap! - } -- 66-yeller -fcdp mount-swap -1 /dev/console crashed! - ) - - [stop] -diff --git a/module/boot@/service/system/devices/devices-crypttab b/module/boot@/service/system/devices/devices-crypttab -index 5b808f2..76ef6d5 100644 ---- a/module/boot@/service/system/devices/devices-crypttab -+++ b/module/boot@/service/system/devices/devices-crypttab -@@ -4,7 +4,7 @@ - @description = "Active encrypted devices" - @user = ( root ) - @options = ( !log ) --@depends = ( udevadm ) -+@depends = ( udevadm devices-btrfs devices-dmraid devices-lvm ) - - [start] - @execute = -@@ -15,13 +15,16 @@ - execl-toc -e ${script_conf} - if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } } - -- if { 66-which -q vgchange } -- if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... } -- if -nt { -+ foreground { - -- vgchange --sysinit -a y -+ if { 66-which -q vgchange } -+ if { 66-yeller -cdp devices-crypttab -1 /dev/console LVM detected -- activates... } -+ if -nt { -+ -+ vgchange --sysinit -a y -+ } -+ 66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices - } -- 66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices - } - 66-yeller -fcdp devices-crypttab -1 /dev/console crashed! - ) diff --git a/srcpkgs/boot-66serv/template b/srcpkgs/boot-66serv/template index 2ba5a8e6c63a..01f7cdd1beaf 100644 --- a/srcpkgs/boot-66serv/template +++ b/srcpkgs/boot-66serv/template @@ -1,6 +1,6 @@ # Template file for 'boot-66serv' pkgname=boot-66serv -version=2.3.0 +version=2.3.1 revision=1 wrksrc=${pkgname}-v${version} build_style=gnu-configure @@ -16,8 +16,7 @@ license="ISC" homepage="https://framagit.org/pkg/obmods/boot-66serv" conf_files="/etc/66/rc.local" distfiles="https://framagit.org/pkg/obmods/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.bz2" -checksum=03b692700030eaae1e882b6df97e84cbbf0180e067291342d5ed9117047475ba -patch_args=" -Np1" +checksum=b6fd72c1a662bb4ee15a27885e2967196966772a02595006730f56a87f85a679 make_dirs="/etc/runit/runsvdir/66 0750 root root"