summaryrefslogtreecommitdiff
path: root/system/s6
diff options
context:
space:
mode:
Diffstat (limited to 'system/s6')
-rw-r--r--system/s6/APKBUILD16
-rw-r--r--system/s6/s6-svscanboot84
-rw-r--r--system/s6/s6.post-upgrade8
3 files changed, 13 insertions, 95 deletions
diff --git a/system/s6/APKBUILD b/system/s6/APKBUILD
index d160e104f..ad5f1f28f 100644
--- a/system/s6/APKBUILD
+++ b/system/s6/APKBUILD
@@ -1,21 +1,20 @@
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=s6
-pkgver=2.8.0.0
-pkgrel=0
+pkgver=2.8.0.1
+pkgrel=1
pkgdesc="skarnet.org's small & secure supervision software suite"
url="https://skarnet.org/software/$pkgname/"
arch="all"
options="!check" # No test suite.
license="ISC"
-_skalibs_version=2.8
+_skalibs_version=2.8.1.0
depends="execline"
makedepends="skalibs-dev>=$_skalibs_version execline-dev"
install="$pkgname.post-upgrade"
subpackages="$pkgname-libs $pkgname-dev $pkgname-libs-dev:libsdev $pkgname-doc"
triggers="$pkgname.trigger=/run/service"
-source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz
- s6-svscanboot"
+source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz"
build() {
cd "$builddir"
@@ -33,9 +32,7 @@ build() {
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
- cp -f "$srcdir/s6-svscanboot" "$pkgdir/lib/s6/s6-svscanboot"
- mkdir -p -m 0755 "$pkgdir/etc/s6/early-services" "$pkgdir/var/lib/s6/services"
- chmod 0755 "$pkgdir/lib/s6/s6-svscanboot"
+ mkdir -p -m 0755 "$pkgdir/var/lib/s6/services"
}
@@ -71,5 +68,4 @@ doc() {
cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}
-sha512sums="e2f2f0fb9481a745fc80b3b8c0aa2de979c0c8dbe066e2402cf7700a08edc32448d7ed3065a19a01a18dc5a12f3abcfd3aba5d2c5fefbbf49fee4a6f8396c106 s6-2.8.0.0.tar.gz
-9c29bc9eee6d5ab502a5a86bb043ebd21e085022efc506a330ae5ab0eadf7038d0a3dc8e025d78d9610cf7ec0ca031887f755486c4cb4e571090ea3a9c1806ac s6-svscanboot"
+sha512sums="03478aed129c1e50b34e0b75d7ff50bd84f62eadee862b6227c4313153d47776e7cbeae728d63209773b91931a2abc8372bb7db4953762807d0ed3d305efd23f s6-2.8.0.1.tar.gz"
diff --git a/system/s6/s6-svscanboot b/system/s6/s6-svscanboot
deleted file mode 100644
index 32eb5f290..000000000
--- a/system/s6/s6-svscanboot
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/execlineb -P
-
-# Basic sanity.
-
-export PATH /usr/bin:/usr/sbin:/bin:/sbin
-umask 022
-
-
-# The live service directories are in /run/services
-# The scandir is /run/service, containing only the catch-all logger and symlinks
-# (and the s6-svscan configuration in /run/service/.s6-svscan)
-
-if { rm -rf /run/service /run/services }
-if { mkdir -p -m 0755 /run/service/.s6-svscan /run/service/s6-svscan-log }
-if
-{
- redirfd -w 1 /run/service/.s6-svscan/crash
- heredoc 0 "#!/bin/execlineb -P\nfalse\n"
- cat
-}
-if
-{
- redirfd -w 1 /run/service/.s6-svscan/finish
- heredoc 0 "#!/bin/execlineb -P\ns6-svc -X -- \"/run/service/s6-svscan-log\"\n"
- cat
-}
-if { cd /run/service/.s6-svscan chmod 0755 crash finish }
-
-
-# Directory for the catch-all logger to store its logs
-
-if { mkdir -p -m 2700 /run/uncaught-logs }
-if { chown catchlog:catchlog /run/uncaught-logs }
-if { chmod 2700 /run/uncaught-logs }
-
-
-# Copy all the early services and link them into the scandir
-
-if { /bin/cp -a /etc/s6/early-services /run/services }
-if
-{
- forbacktickx -pnd"\n" i { ls -1 -U /run/services }
- importas -u i i
- ln -nsf ../services/$i /run/service/$i
-}
-
-
-# Also link the early services defined in sysinit, if any
-
-if
-{
- if -t { test -d /run/early-services }
- forbacktickx -pnd"\n" i { ls -1 -U /run/early-services }
- importas -u i i
- ln -nsf ../early-services/$i /run/service/$i
-}
-
-
-# Create the catch-all logger servicedir directly in the scandir
-# (It's too fundamental to be made configurable as an early service.)
-
-if { rm -f /run/service/s6-svscan-log/fifo }
-if { mkfifo -m 0600 /run/service/s6-svscan-log/fifo }
-if
-{
- redirfd -w 1 /run/service/s6-svscan-log/run
- heredoc 0 "#!/bin/execlineb -P
-redirfd -w 2 /dev/console
-redirfd -rnb 0 fifo
-s6-setuidgid catchlog
-exec -c
-s6-log t /run/uncaught-logs\n"
- cat
-}
-if { chmod 0755 /run/service/s6-svscan-log/run }
-
-
-# All ready, exec into s6-svscan.
-# By default all messages from all services will go to the catch-all logger it spawns.
-
-redirfd -r 0 /dev/null
-redirfd -wnb 1 /run/service/s6-svscan-log/fifo
-fdmove -c 2 1
-s6-svscan -St0 /run/service
diff --git a/system/s6/s6.post-upgrade b/system/s6/s6.post-upgrade
index 0b69f49e7..26d289c27 100644
--- a/system/s6/s6.post-upgrade
+++ b/system/s6/s6.post-upgrade
@@ -1,8 +1,13 @@
#!/bin/sh -e
+newv="$1"
+oldv="$2"
+
rm -f /etc/runlevels/default/s6
-cat <<EOF
+if test `apk version -t "$oldv" 2.8` = "<" ; then
+
+ cat <<EOF
*
* The s6 package has been upgraded. To complete the upgrade, you need to
@@ -16,3 +21,4 @@ cat <<EOF
*
EOF
+fi