diff options
author | davidovski <david@davidovski.xyz> | 2022-09-15 23:44:18 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-09-15 23:44:18 +0100 |
commit | 1d77b08d11a459598975cd73a1c9539849c0d815 (patch) | |
tree | bbf56956692a6598e6da1c9c8cacb380706578c2 /repo/openresolv | |
parent | 24998e21676efbd0801bb9a56d167eaf273d44d7 (diff) |
Auto updated packages
Diffstat (limited to 'repo/openresolv')
-rw-r--r-- | repo/openresolv/detect_init-remove-irrelevant.patch | 87 | ||||
-rw-r--r-- | repo/openresolv/openresolv.xibuild | 31 |
2 files changed, 118 insertions, 0 deletions
diff --git a/repo/openresolv/detect_init-remove-irrelevant.patch b/repo/openresolv/detect_init-remove-irrelevant.patch new file mode 100644 index 0000000..e34d037 --- /dev/null +++ b/repo/openresolv/detect_init-remove-irrelevant.patch @@ -0,0 +1,87 @@ +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Sat, 25 Jun 2022 19:51:00 +0200 +Subject: Remove support for init systems we don't have, add support for s6 + +Don't waste resources looking for init systems we don't have in Alpine. + +--- a/resolvconf.in ++++ b/resolvconf.in +@@ -299,74 +299,19 @@ + [ -n "$RESTARTCMD" ] && return 0 + + # Detect the running init system. +- # As systemd and OpenRC can be installed on top of legacy init +- # systems we try to detect them first. + status="@STATUSARG@" + : ${status:=status} +- if [ -x /bin/systemctl ] && [ -S /run/systemd/private ]; then +- RESTARTCMD=' +- if /bin/systemctl --quiet is-active $1.service +- then +- /bin/systemctl restart $1.service +- fi' +- elif [ -x /usr/bin/systemctl ] && [ -S /run/systemd/private ]; then +- RESTARTCMD=' +- if /usr/bin/systemctl --quiet is-active $1.service +- then +- /usr/bin/systemctl restart $1.service +- fi' +- elif [ -x /sbin/rc-service ] && ++ if [ -x /sbin/rc-service ] && + { [ -s /libexec/rc/init.d/softlevel ] || + [ -s /run/openrc/softlevel ]; } + then + RESTARTCMD='/sbin/rc-service -i $1 -- -Ds restart' +- elif [ -x /usr/sbin/invoke-rc.d ]; then +- RCDIR=/etc/init.d +- RESTARTCMD=' +- if /usr/sbin/invoke-rc.d --quiet $1 status >/dev/null 2>&1 +- then +- /usr/sbin/invoke-rc.d $1 restart +- fi' +- elif [ -x /sbin/service ]; then +- # Old RedHat +- RCDIR=/etc/init.d +- RESTARTCMD=' +- if /sbin/service $1; then +- /sbin/service $1 restart +- fi' +- elif [ -x /usr/sbin/service ]; then +- # Could be FreeBSD +- RESTARTCMD=" +- if /usr/sbin/service \$1 $status >/dev/null 2>&1 +- then +- /usr/sbin/service \$1 restart +- fi" + elif [ -x /bin/sv ]; then + RESTARTCMD='/bin/sv status $1 >/dev/null 2>&1 && + /bin/sv try-restart $1' +- elif [ -x /usr/bin/sv ]; then +- RESTARTCMD='/usr/bin/sv status $1 >/dev/null 2>&1 && +- /usr/bin/sv try-restart $1' +- elif [ -e /etc/arch-release ] && [ -d /etc/rc.d ]; then +- RCDIR=/etc/rc.d +- RESTARTCMD=' +- if [ -e /var/run/daemons/$1 ] +- then +- /etc/rc.d/$1 restart +- fi' +- elif [ -e /etc/slackware-version ] && [ -d /etc/rc.d ]; then +- RESTARTCMD=' +- if /etc/rc.d/rc.$1 status >/dev/null 2>&1 +- then +- /etc/rc.d/rc.$1 restart +- fi' +- elif [ -e /etc/rc.d/rc.subr ] && [ -d /etc/rc.d ]; then +- # OpenBSD +- RESTARTCMD=' +- if /etc/rc.d/$1 check >/dev/null 2>&1 +- then +- /etc/rc.d/$1 restart +- fi' ++ # TODO: Test if this works correctly. ++ elif [ -x /bin/s6-svc ] && [ -e /run/s6-rc ]; then ++ RESTARTCMD='/bin/s6-svc -r /run/service/$1' + else + for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do + [ -d $x ] || continue diff --git a/repo/openresolv/openresolv.xibuild b/repo/openresolv/openresolv.xibuild new file mode 100644 index 0000000..f60297b --- /dev/null +++ b/repo/openresolv/openresolv.xibuild @@ -0,0 +1,31 @@ +#!/bin/sh + +NAME="openresolv" +DESC="A framework for managing DNS information" + +MAKEDEPS="make" + +PKG_VER=3.12.0 +SOURCE="http://roy.marples.name/downloads/openresolv/openresolv-$PKG_VER.tar.xz" + +ADDITIONAL=" +detect_init-remove-irrelevant.patch +" + +prepare () { + apply_patches +} + +build() { + ./configure \ + --libexecdir=/lib/resolvconf \ + --mandir=/usr/share/man \ + --rundir=/run \ + --sysconfdir=/etc + make +} + +package() { + make DESTDIR="$PKG_DEST" install +} + |