Your message dated Tue, 16 Jul 2019 16:34:36 +0000
with message-id <[email protected]>
and subject line Bug#930758: fixed in runit 2.1.2-32
has caused the Debian Bug report #930758,
regarding runit: Add a test for switching init (systemd-->runit)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
930758: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930758
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: runit
Version: 2.1.2-31
Severity: wishlist
Tags: patch
-- System Information:
Debian Release: 10.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.20.3-van (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)
Versions of packages runit depends on:
ii libc6 2.28-10
ii runit-helper 2.8.10
ii sysuser-helper 1.3.3
Versions of packages runit recommends:
ii runit-init 2.1.2-30
runit suggests no packages.
-- Configuration Files:
/etc/runit/3 changed [not included]
-- no debconf information
Hi,
while experimenting with autopkgtest i manage to write a small test
that, starting from a systemd qemu machine, installs runit-init and reboot into
it, checking if there is a working getty to login with and if essential
services (syslog, udev ..) are up.
While the test is very simple it could be useful to have something like
this around to make sure that the compat layer in /run/initctl will not
get broken (by systemd) and that some future development in stage1/2 will not
break the runit-init boot.
I have tested it on my pc, the last attach is the output of the test
Lorenzo
>From d02fbb0e7e3a66ca463bf96b9f5fb1057856fe60 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <[email protected]>
Date: Thu, 20 Jun 2019 00:47:17 +0200
Subject: [PATCH 1/3] Provide a service for a getty on serial tty
Provide a getty-ttyS0 service; this is needed by autopkgtest
for connecting with the testbed (qemu), otherwise a reboot into
a runit-init VM will fail the test.
---
debian/getty-ttyS0/run | 8 ++++++++
debian/runit.install | 1 +
2 files changed, 9 insertions(+)
create mode 100755 debian/getty-ttyS0/run
diff --git a/debian/getty-ttyS0/run b/debian/getty-ttyS0/run
new file mode 100755
index 0000000..31dccf6
--- /dev/null
+++ b/debian/getty-ttyS0/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+NAME=getty-ttyS0
+if pgrep -x agetty -t ttyS0; then
+ sv d getty-ttyS0
+ echo "already another getty on ttyS0"
+fi
+exec 2>&1
+exec chpst -P fgetty /dev/ttyS0
diff --git a/debian/runit.install b/debian/runit.install
index 40a9466..a9a72fe 100644
--- a/debian/runit.install
+++ b/debian/runit.install
@@ -21,5 +21,6 @@ runit-2.1.2/src/runit /sbin
debian/contrib/shutdown /lib/runit
debian/contrib/runlevel /lib/runit
debian/sulogin/run /etc/runit/runsvdir/single/sulogin
+debian/getty-ttyS0/run /etc/sv/getty-ttyS0
debian/contrib/lib/async-timeout /lib/runit
debian/contrib/lib/run_sysv_scripts /lib/runit
--
2.20.1
>From 374b79ae1c811b668668f22f57e77a6d352670a4 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <[email protected]>
Date: Mon, 17 Jun 2019 14:43:55 +0200
Subject: [PATCH 2/3] Prepare source for autopkgtest
Add a stanza in debian/control and a debian/tests directory
needed for autopkgtest
---
debian/control | 1 +
debian/tests/control | 1 +
2 files changed, 2 insertions(+)
create mode 100644 debian/tests/control
diff --git a/debian/control b/debian/control
index 23300e5..0764231 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: bash-completion,
doc-base,
Vcs-Browser: https://salsa.debian.org/debian/runit
Vcs-Git: https://salsa.debian.org/debian/runit.git
+Testsuite: autopkgtest
Package: runit
Architecture: any
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1 @@
+
--
2.20.1
>From b37238455025ca36c7795c96d934205016cde026 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <[email protected]>
Date: Mon, 17 Jun 2019 16:05:00 +0200
Subject: [PATCH 3/3] add a test for switching to runit-init
Add a smoke test for the switch systemd --> runit-init
---
debian/tests/control | 8 +++++-
debian/tests/init-switch | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 1 deletion(-)
create mode 100755 debian/tests/init-switch
diff --git a/debian/tests/control b/debian/tests/control
index 8d1c8b6..02565b5 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1 +1,7 @@
-
+Tests: init-switch
+Depends: runit,
+ runit-init,
+ getty-run,
+ fgetty,
+ psmisc,
+Restrictions: needs-root, isolation-machine, breaks-testbed
diff --git a/debian/tests/init-switch b/debian/tests/init-switch
new file mode 100755
index 0000000..1e09238
--- /dev/null
+++ b/debian/tests/init-switch
@@ -0,0 +1,60 @@
+ #!/bin/sh
+ set -e
+
+
+ if [ -z "$AUTOPKGTEST_REBOOT_MARK" ]; then
+ if [ -d /run/systemd/system ]; then
+ init=systemd
+ elif [ -e /run/initctl ]; then
+ init=sysv
+ else
+ init=unknown-init
+ fi
+ echo "testbed is running with $init"
+
+ if [ -e /tmp/autopkgtest-reboot ]; then
+ echo "enabling the serial getty"
+ ln -s /etc/sv/getty-ttyS0 /etc/service/
+ echo "Done"
+ /tmp/autopkgtest-reboot-prepare runit
+ echo "reboot"
+ reboot
+ else
+ echo "testbed does not support reboot"
+ echo "can't perform this test"
+ exit 1
+ fi
+ else
+ echo "detecting runit-init"
+ if [ -e /run/runit.stopit ]; then
+ echo "OK"
+ else
+ echo "init is not runit" && exit 1
+ fi
+ # searching for runsvdir is pointless, since autopkgtest use serial getty
+ #to connect with the qemu-system, and getty-S0 starts only after runsvdir..
+ #echo "detecting runsvdir"
+ #if pidof runsvdir; then
+ # echo "OK"
+ #else
+ # echo "stage 2 failed to start runsvdir" && exit 1
+ #fi
+ echo "detecting gettys"
+ if pidof fgetty; then
+ echo "OK"
+ else
+ echo " no getty to perform login with " && exit 1
+ fi
+ echo "Detecting active services.."
+ sv status /etc/service/*
+ service udev status
+ service rsyslog status
+ service cron status
+ service dbus status
+ #service --status-all # not usable since some services will exit nonzero
with [?]
+ # we can test also ssh-server here if runit-init will recommend it
+ echo "OK"
+ echo "switching to runit init complete"
+ fi
+ echo "test done"
+
--
2.20.1
$ autopkgtest ./runit-init_2.1.2-32_all.deb ./runit_2.1.2-32_amd64.deb
./getty-run_2.1.2-32_all.deb ./runit -- qemu ./debian-unstable.img
autopkgtest [01:29:40]: version 5.10
autopkgtest [01:29:40]: host lorenz; command line: /usr/bin/autopkgtest
./runit-init_2.1.2-32_all.deb ./runit_2.1.2-32_amd64.deb
./getty-run_2.1.2-32_all.deb ./runit -- qemu ./debian-unstable.img
autopkgtest [01:29:55]: testbed dpkg architecture: amd64
autopkgtest [01:29:58]: testbed running kernel: Linux 4.19.0-5-amd64 #1 SMP
Debian 4.19.37-3 (2019-05-15)
autopkgtest [01:29:58]: @@@@@@@@@@@@@@@@@@@@ built-tree ./runit
autopkgtest [01:29:58]: testing package runit version 2.1.2-32
autopkgtest [01:29:58]: test init-switch: preparing testbed
Get:1 file:/tmp/autopkgtest.OMXnlL/binaries InRelease
Ign:1 file:/tmp/autopkgtest.OMXnlL/binaries InRelease
Get:2 file:/tmp/autopkgtest.OMXnlL/binaries Release [816 B]
Get:2 file:/tmp/autopkgtest.OMXnlL/binaries Release [816 B]
Get:3 file:/tmp/autopkgtest.OMXnlL/binaries Release.gpg
Ign:3 file:/tmp/autopkgtest.OMXnlL/binaries Release.gpg
Get:4 file:/tmp/autopkgtest.OMXnlL/binaries Packages [3921 B]
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libpam-systemd:amd64 < 241-5 @ii mK Ib >
Broken libpam-systemd:amd64 Depends on systemd-sysv:amd64 < 241-5 @ii mR >
Considering systemd-sysv:amd64 3 as a solution to libpam-systemd:amd64 7
Added systemd-sysv:amd64 to the remove list
Fixing libpam-systemd:amd64 via keep of systemd-sysv:amd64
Investigating (1) runit-init:amd64 < none -> 2.1.2-32 @un uN Ib >
Broken runit-init:amd64 Conflicts on systemd-sysv:amd64 < 241-5 @ii mK >
Considering systemd-sysv:amd64 3 as a solution to runit-init:amd64 106
Added systemd-sysv:amd64 to the remove list
Fixing runit-init:amd64 via remove of systemd-sysv:amd64
Investigating (1) libpam-systemd:amd64 < 241-5 @ii mK Ib >
Broken libpam-systemd:amd64 Depends on systemd-sysv:amd64 < 241-5 @ii mR >
Considering systemd-sysv:amd64 3 as a solution to libpam-systemd:amd64 7
Added systemd-sysv:amd64 to the remove list
Fixing libpam-systemd:amd64 via keep of systemd-sysv:amd64
Investigating (2) runit-init:amd64 < none -> 2.1.2-32 @un uN Ib >
Broken runit-init:amd64 Conflicts on systemd-sysv:amd64 < 241-5 @ii mK >
Considering systemd-sysv:amd64 3 as a solution to runit-init:amd64 106
Added systemd-sysv:amd64 to the remove list
Fixing runit-init:amd64 via remove of systemd-sysv:amd64
Investigating (2) libpam-systemd:amd64 < 241-5 @ii mK Ib >
Broken libpam-systemd:amd64 Depends on systemd-sysv:amd64 < 241-5 @ii mR >
Considering systemd-sysv:amd64 106 as a solution to libpam-systemd:amd64 7
Removing libpam-systemd:amd64 rather than change systemd-sysv:amd64
Done
Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following additional packages will be installed:
fgetty getty-run initscripts insserv psmisc runit runit-helper runit-init
startpar sysuser-helper sysv-rc
Suggested packages:
bootchart2
The following packages will be REMOVED:
libpam-systemd systemd-sysv
The following NEW packages will be installed:
fgetty getty-run initscripts insserv psmisc runit runit-helper runit-init
startpar sysuser-helper sysv-rc
0 upgraded, 11 newly installed, 2 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 408 kB/578 kB of archives.
After this operation, 1403 kB of additional disk space will be used.
Get:1 file:/tmp/autopkgtest.OMXnlL/binaries runit 2.1.2-32 [124 kB]
Get:2 file:/tmp/autopkgtest.OMXnlL/binaries runit-init 2.1.2-32 [27.3 kB]
Get:3 file:/tmp/autopkgtest.OMXnlL/binaries getty-run 2.1.2-32 [19.0 kB]
Get:4 http://deb.debian.org/debian unstable/main amd64 runit-helper all 2.8.6
[4900 B]
Get:5 http://deb.debian.org/debian unstable/main amd64 sysuser-helper all 1.3.3
[3844 B]
Get:6 http://deb.debian.org/debian unstable/main amd64 insserv amd64 1.18.0-2
[64.8 kB]
Get:7 http://deb.debian.org/debian unstable/main amd64 startpar amd64 0.61-1
[20.7 kB]
Get:8 http://deb.debian.org/debian unstable/main amd64 sysv-rc all 2.93-8 [71.0
kB]
Get:9 http://deb.debian.org/debian unstable/main amd64 initscripts amd64 2.93-8
[93.8 kB]
Get:10 http://deb.debian.org/debian unstable/main amd64 fgetty amd64 0.7-6
[22.8 kB]
Get:11 http://deb.debian.org/debian unstable/main amd64 psmisc amd64 23.2-1
[126 kB]
Fetched 408 kB in 1s (624 kB/s)
Selecting previously unselected package runit-helper.
(Reading database ... 18667 files and directories currently installed.)
Preparing to unpack .../runit-helper_2.8.6_all.deb ...
Unpacking runit-helper (2.8.6) ...
Selecting previously unselected package sysuser-helper.
Preparing to unpack .../sysuser-helper_1.3.3_all.deb ...
Unpacking sysuser-helper (1.3.3) ...
Selecting previously unselected package runit.
Preparing to unpack .../binaries/./runit.deb ...
runit: setting up for runsvchdir
runit: current symlink succesfully created
Unpacking runit (2.1.2-32) ...
(Reading database ... 18745 files and directories currently installed.)
Removing libpam-systemd:amd64 (241-5) ...
dpkg: systemd-sysv: dependency problems, but removing anyway as you requested:
init depends on systemd-sysv | sysvinit-core | runit-init; however:
Package systemd-sysv is to be removed.
Package sysvinit-core is not installed.
Package runit-init is not installed.
Removing systemd-sysv (241-5) ...
Selecting previously unselected package runit-init.
(Reading database ... 18722 files and directories currently installed.)
Preparing to unpack .../0-runit-init.deb ...
Unpacking runit-init (2.1.2-32) ...
Selecting previously unselected package getty-run.
Preparing to unpack .../1-getty-run.deb ...
Unpacking getty-run (2.1.2-32) ...
Selecting previously unselected package insserv.
Preparing to unpack .../2-insserv_1.18.0-2_amd64.deb ...
Unpacking insserv (1.18.0-2) ...
Selecting previously unselected package startpar.
Preparing to unpack .../3-startpar_0.61-1_amd64.deb ...
Unpacking startpar (0.61-1) ...
Selecting previously unselected package sysv-rc.
Preparing to unpack .../4-sysv-rc_2.93-8_all.deb ...
Unpacking sysv-rc (2.93-8) ...
Selecting previously unselected package initscripts.
Preparing to unpack .../5-initscripts_2.93-8_amd64.deb ...
Unpacking initscripts (2.93-8) ...
Selecting previously unselected package fgetty.
Preparing to unpack .../6-fgetty_0.7-6_amd64.deb ...
Unpacking fgetty (0.7-6) ...
Selecting previously unselected package psmisc.
Preparing to unpack .../7-psmisc_23.2-1_amd64.deb ...
Unpacking psmisc (23.2-1) ...
Setting up runit-helper (2.8.6) ...
Setting up psmisc (23.2-1) ...
Setting up startpar (0.61-1) ...
Setting up insserv (1.18.0-2) ...
insserv: FATAL: service mountkernfs has to exists for service udev
insserv: FATAL: service urandom has to exists for service networking
insserv: FATAL: service mountdevsubfs has to exists for service hwclock
insserv: exiting now!
Setting up sysuser-helper (1.3.3) ...
Setting up getty-run (2.1.2-32) ...
Setting up sysv-rc (2.93-8) ...
Setting up fgetty (0.7-6) ...
Setting up initscripts (2.93-8) ...
Setting up runit (2.1.2-32) ...
Setting up runit-init (2.1.2-32) ...
Setting up autopkgtest-satdep (0) ...
Processing triggers for systemd (241-5) ...
(Reading database ... 18938 files and directories currently installed.)
Removing autopkgtest-satdep (0) ...
autopkgtest [01:30:16]: test init-switch: [-----------------------
Killed
testbed is running with systemd
enabling the serial getty
Done
autopkgtest [01:30:17]: test process requested preparation for reboot with
marker runit
autopkgtest-virt-qemu [01:30:18]: state saved, waiting for testbed to reboot...
detecting runit-init
OK
detecting gettys
1348 1339 1338 1337 1336 1335 1334
OK
Detecting active services..
run: /etc/service/getty-tty1: (pid 1337) 5s
run: /etc/service/getty-tty2: (pid 1339) 5s
run: /etc/service/getty-tty3: (pid 1334) 5s
run: /etc/service/getty-tty4: (pid 1348) 5s
run: /etc/service/getty-tty5: (pid 1335) 5s
run: /etc/service/getty-tty6: (pid 1336) 5s
run: /etc/service/getty-ttyS0: (pid 1338) 5s
systemd-udevd is running.
rsyslogd is running.
cron is running.
dbus is running.
OK
switching to runit init complete
test done
autopkgtest [01:30:34]: test init-switch: -----------------------]
autopkgtest [01:30:35]: test init-switch: - - - - - - - - - - results - - - -
- - - - - -
init-switch PASS
autopkgtest [01:30:36]: @@@@@@@@@@@@@@@@@@@@ summary
init-switch PASS
qemu-system-x86_64: terminating on signal 15 from pid 26125 (/usr/bin/python3)
--- End Message ---
--- Begin Message ---
Source: runit
Source-Version: 2.1.2-32
We believe that the bug you reported is fixed in the latest version of
runit, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dmitry Bogatov <[email protected]> (supplier of updated runit package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Tue, 16 Jul 2019 16:12:38 +0000
Source: runit
Architecture: source
Version: 2.1.2-32
Distribution: unstable
Urgency: medium
Maintainer: Dmitry Bogatov <[email protected]>
Changed-By: Dmitry Bogatov <[email protected]>
Closes: 930758
Changes:
runit (2.1.2-32) unstable; urgency=medium
.
[ Lorenzo Puliti ]
* [864c1683] Provide a service for a getty on serial tty
* [d3726e3b] Add smoke test for systemd --> runit-init switch
(Closes: #930758)
.
[ Dmitry Bogatov ]
* Upload to unstable.
* [5f2b9505] Conflict with libnss-systemd to avoid #931356
* [d6070a78] Add lintian overrides for lintian=2.16.0
* [f586cf00] Move manpage of /usr/bin/mk-runscript to section 8
* [d31c145d] Add ${runit:Breaks} into debian/control
* [568a5c17] Bump debhelper compat to 12
* [917937d4] Bump standards version to 4.4.0 (no changes needed)
* [3e429f27] Set target distribution to unstable in CI config
Checksums-Sha1:
744417d7f49324e6f9f3fb9223ce667345d6fcff 2221 runit_2.1.2-32.dsc
e7baae2e785019f9db3c82213390fd6cf9183692 37248 runit_2.1.2-32.debian.tar.xz
7ce376632485cb9f4837539661e4a2f89fa8be5b 6065 runit_2.1.2-32_source.buildinfo
Checksums-Sha256:
56288a24b7d3eb0a3df1579bfed7a47355292f74876707c64d1acbdaa37b2f11 2221
runit_2.1.2-32.dsc
cbdb8f5ae4d912d46e56d05d46e648b2cd087f286e191d4cfeecf3930d1ae880 37248
runit_2.1.2-32.debian.tar.xz
513998618bd540abee0891cd555c13dca785078c723c130ce54c78ad40e795f6 6065
runit_2.1.2-32_source.buildinfo
Files:
72e0e2e926a2d99c1874f0c41cbd925a 2221 admin optional runit_2.1.2-32.dsc
ef2bfafce52b2a84b1d94510439d008d 37248 admin optional
runit_2.1.2-32.debian.tar.xz
65c6977d72c9aec2876a15def6b63ee2 6065 admin optional
runit_2.1.2-32_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJHBAEBCgAxFiEEhnHVzDbtdH7ktKj4SBLY3qgmEeYFAl0t95wTHGthY3Rpb25A
a2VlbWFpbC5tZQAKCRBIEtjeqCYR5vJ5D/4kcqnabq3H1o5YEjo3znpzGBLSOBCg
CBdBAgBDV71CdSG1EVycLNnYMYvn4qRCSvRY7nMNrKB7VYNkqyCPBQxwdcqlaIii
3U7I1v3Y6F6X6TwVmj350kvXOKZjLb/HiLwCdk8eb8vri2yYGdwe1b2+um49rXTe
IkSF6aIKEZB+4CWs0/y45u+QMdS3tSE3pIV3zeBkvIr6HffjfaMNfC98XF678Pcx
i4zOqn2RTDW+gh1umN6i7aAiKvwLLAO/vD0Rt6gfHQJLhx2o+QNZRfPzPfhxf1ce
sTI32yFSeV6khyejbsRcLxkrPiuEZP9SecE0dzyTIsvbEWcgB8Hk0UtRT3v8zCWx
t/nugeL7IE3K7MkAsjGTzJq4cFyJJ6Ktt+2nK9wSQIt1z0TFUWyjWbIOrNrZqFqP
DkKzx9vOuya2AAJFfDRD/KP93g/zAXEfzxBq2r68M6ufWZAGQb5mEk2MAl6nIt1A
zcTSBFzbXoiJfQQJPIMHUeTueQ52gpMMqm9n9R2akpFueF5d3WscONXgtZSmHX+f
IA6Ti2R1EHD/5KqbPWmmCni96aqVNQzyOIAtLqkXwAlRNdfljHm70RW9bR/VI4wE
ePaPxrYZI+zFNo58APTE14IkUHeCuGvEyy55GM0WR/v9Z4oSzURNC0qvE+NaAfGW
8Re/ORbQCMivyg==
=vbzw
-----END PGP SIGNATURE-----
--- End Message ---