community/s6-overlay: ensure run-time script creates required directory

Add patch from upstream to ensure that a required directory is
created at run-time.

Tidyup APKBUILD logic to prevent abuild warning.
This commit is contained in:
Dermot Bradley 2020-12-10 02:56:07 +00:00 committed by Leo
parent 2a4874cd9e
commit 12aac1c7c2
2 changed files with 56 additions and 5 deletions

View File

@ -0,0 +1,38 @@
Subject: catchall logger - make sure the fdholderd supervision directory is created
Date: 21/11/2020
Upstream commit in Master.
---
diff -aur a/etc/s6/init-catchall/init-stage1 b/etc/s6/init-catchall/init-stage1
--- a/etc/s6/init-catchall/init-stage1
+++ b/etc/s6/init-catchall/init-stage1
@@ -25,6 +25,15 @@
if { s6-rmrf /var/run/s6/services }
if { s6-hiercopy /etc/s6/services /var/run/s6/services }
+##
+## ensure s6-fdholderd fifo exists
+##
+
+if { s6-rmrf /var/run/s6/services/s6-fdholderd/supervise }
+if { s6-mkdir -m 0700 /var/run/s6/services/s6-fdholderd/supervise }
+if { s6-rmrf /var/run/s6/services/s6-fdholderd/supervise/control }
+if { s6-mkfifo -m 0600 /var/run/s6/services/s6-fdholderd/supervise/control }
+
##
## fork the "init-stage2" script
diff -aur a/etc/s6/init-no-catchall/init-stage1 b/etc/s6/init-no-catchall/init-stage1
--- a/etc/s6/init-no-catchall/init-stage1
+++ b/etc/s6/init-no-catchall/init-stage1
@@ -10,7 +10,7 @@
##
-## ensure our vital fifo exists
+## ensure s6-fdholderd fifo exists
##
if { s6-rmrf /var/run/s6/services/s6-fdholderd/supervise }

View File

@ -3,7 +3,7 @@
# Maintainer: Dermot Bradley <dermot_bradley@yahoo.com>
pkgname=s6-overlay
pkgver=2.1.0.0
pkgrel=0
pkgrel=1
pkgdesc="s6 overlay for containers"
url="https://github.com/just-containers/s6-overlay/"
arch="noarch"
@ -19,13 +19,26 @@ depends="s6
s6-rc
"
options="!check" # no test suite/unit tests
source="$pkgname-$pkgver.tar.gz::https://github.com/just-containers/s6-overlay/releases/download/v$pkgver/s6-overlay-nobin.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/just-containers/s6-overlay/releases/download/v$pkgver/s6-overlay-nobin.tar.gz
01-ensure-folderd-fifo-exists.patch
"
prepare() {
# The source tarball unpacks straight into the current directory
# and so we create a versioned subdir for the package and move
# the files into it.
mkdir "$srcdir/$pkgname-$pkgver"
mv "$srcdir"/etc "$srcdir"/init "$srcdir"/usr \
"$srcdir/$pkgname-$pkgver"
default_prepare
}
package() {
mkdir -p "$pkgdir"
cp -a "$srcdir"/* "$pkgdir"/
rm "$pkgdir"/$pkgname-$pkgver.tar.gz
cp -a "$srcdir/$pkgname-$pkgver"/* "$pkgdir"/
}
sha512sums="6af21a6e4743fa9125cc19cd9b4c6c527a4634325b3b8c75bf795f3ca191a307649575e6448ed929d5598beab1630350a0cf9abc13c949deb63c1b3e7bf4c2d3 s6-overlay-2.1.0.0.tar.gz"
sha512sums="6af21a6e4743fa9125cc19cd9b4c6c527a4634325b3b8c75bf795f3ca191a307649575e6448ed929d5598beab1630350a0cf9abc13c949deb63c1b3e7bf4c2d3 s6-overlay-2.1.0.0.tar.gz
2e48d4169d4d54c889ccff2a518a96707ebd63c6348fed24adc998abdaa107f1546c4b995542cbd193c8193e5e24fc7c7d52e508578610f4e8a542a264530f8b 01-ensure-folderd-fifo-exists.patch"