[arch-commits] Commit in openresolv/trunk (PKGBUILD fs33801.patch)
Jan Steffens
heftig at archlinux.org
Sun Aug 24 22:34:43 UTC 2014
Date: Monday, August 25, 2014 @ 00:34:43
Author: heftig
Revision: 220639
Update FS#33801 patch, fixing FS#41668
Modified:
openresolv/trunk/PKGBUILD
openresolv/trunk/fs33801.patch
---------------+
PKGBUILD | 7 -
fs33801.patch | 201 +++++++++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 175 insertions(+), 33 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-08-24 21:07:46 UTC (rev 220638)
+++ PKGBUILD 2014-08-24 22:34:43 UTC (rev 220639)
@@ -4,7 +4,7 @@
pkgname=openresolv
pkgver=3.5.7
-pkgrel=1
+pkgrel=2
pkgdesc="resolv.conf management framework (resolvconf)"
arch=(any)
url="http://roy.marples.name/projects/openresolv"
@@ -16,7 +16,7 @@
source=("http://roy.marples.name/downloads/openresolv/${pkgname}-${pkgver}.tar.bz2"
fs33801.patch)
md5sums=('4de84738d29d54b910f5600ffd12b62c'
- '584f58b7d26419e725fe5495ed330f70')
+ 'f98e53fdaf0b294f154eea99caaec7a0')
prepare() {
cd $pkgname-$pkgver
@@ -26,8 +26,7 @@
build() {
cd $pkgname-$pkgver
- ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/resolvconf \
- --sbindir=/usr/bin
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/resolvconf --sbindir=/usr/bin
}
package() {
Modified: fs33801.patch
===================================================================
--- fs33801.patch 2014-08-24 21:07:46 UTC (rev 220638)
+++ fs33801.patch 2014-08-24 22:34:43 UTC (rev 220639)
@@ -1,19 +1,116 @@
-diff -u -r openresolv-3.5.7/dnsmasq.in openresolv-3.5.7-systemd/dnsmasq.in
+diff -u -Nr openresolv-3.5.7/configure openresolv-3.5.7-fs33801/configure
+--- openresolv-3.5.7/configure 2014-04-30 11:02:23.000000000 +0200
++++ openresolv-3.5.7-fs33801/configure 2014-08-25 00:26:17.733879048 +0200
+@@ -7,6 +7,7 @@
+ HOST=
+ TARGET=
+ RESTARTCMD=
++RELOADCMD=
+ RCDIR=
+
+ for x do
+@@ -33,6 +34,7 @@
+ --target) TARGET=$var;;
+ --libdir) LIBDIR=$var;;
+ --restartcmd) RESTARTCMD=$var;;
++ --reloadcmd) RELOADCMD=$var;;
+ --includedir) eval INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }$var";;
+ --datadir|--infodir) ;; # ignore autotools
+ --disable-maintainer-mode|--disable-dependency-tracking) ;;
+@@ -60,7 +62,7 @@
+ echo "no"
+ RUNDIR=/var/run
+ fi
+-fi
++fi
+
+ : ${SED:=sed}
+
+@@ -68,7 +70,6 @@
+ : ${SBINDIR:=$PREFIX/sbin}
+ : ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
+ : ${STATEDIR:=/var}
+-: ${RUNDIR:=$STATEDIR/run}
+ : ${MANDIR:=${PREFIX:-/usr}/share/man}
+
+ eval SYSCONFDIR="$SYSCONFDIR"
+@@ -117,7 +118,7 @@
+ rm -rf $CONFIG_MK
+ echo "# $OS" >$CONFIG_MK
+
+-for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR; do
++for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RUNDIR; do
+ eval v=\$$x
+ # Make files look nice for import
+ l=$((10 - ${#x}))
+@@ -126,26 +127,30 @@
+ echo "$x=$t $v" >>$CONFIG_MK
+ done
+
+-if [ -z "$RESTARTCMD" ]; then
++if [ -z "$RESTARTCMD" -o -z "$RELOADCMD" ]; then
+ printf "Checking for systemd ... "
+ if [ -x /bin/systemctl ]; then
+- RESTARTCMD="/bin/systemctl try-restart \1"
++ : ${RESTARTCMD:="/bin/systemctl --fail --no-block try-restart \1"}
++ : ${RELOADCMD:="/bin/systemctl --fail --no-block reload \1"}
+ echo "yes"
+ elif [ -x /usr/bin/systemctl ]; then
+- RESTARTCMD="/usr/bin/systemctl try-restart \1"
++ : ${RESTARTCMD:="/usr/bin/systemctl --fail --no-block try-restart \1"}
++ : ${RELOADCMD:="/usr/bin/systemctl --fail --no-block reload \1"}
+ echo "yes"
+ else
+ echo "no"
+ fi
+ fi
+
++: ${RELOADCMD:='[ -s "\2" ] \&\& kill -HUP \\`cat "\2"\\` 2>/dev/null'}
++
+ # Arch upgraded to systemd, so this check has to be just after systemd
+ # but higher than the others
+ if [ -z "$RESTARTCMD" ]; then
+ printf "Checking for Arch ... "
+ if [ -e /etc/arch-release -a -d /etc/rc.d ]; then
+ RCDIR=/etc/rc.d
+- RESTARTCMD="[ -e /var/run/daemons/\1 ] \&\& /etc/rc.d/\1 restart"
++ RESTARTCMD="[ -e $RUNDIR/daemons/\1 ] \&\& /etc/rc.d/\1 restart"
+ echo "yes"
+ else
+ echo "no"
+@@ -203,11 +208,13 @@
+ echo "RCDIR= $RCDIR" >>$CONFIG_MK
+ # Work around bug in the dash shell as "echo 'foo \1'" does bad things
+ printf "%s\n" "RESTARTCMD= $RESTARTCMD" >>$CONFIG_MK
++printf "%s\n" "RELOADCMD= $RELOADCMD" >>$CONFIG_MK
+
+ echo
+ echo " SYSCONFDIR = $SYSCONFDIR"
+ echo " SBINDIR = $SBINDIR"
+ echo " LIBEXECDIR = $LIBEXECDIR"
+-echo " VARDIR = $RUNDIR"
++echo " RUNDIR = $RUNDIR"
++echo " VARDIR = $VARDIR"
+ echo " MANDIR = $MANDIR"
+ echo
+diff -u -Nr openresolv-3.5.7/dnsmasq.in openresolv-3.5.7-fs33801/dnsmasq.in
--- openresolv-3.5.7/dnsmasq.in 2014-04-30 11:02:23.000000000 +0200
-+++ openresolv-3.5.7-systemd/dnsmasq.in 2014-07-26 01:36:58.217567587 +0200
-@@ -33,10 +33,9 @@
++++ openresolv-3.5.7-fs33801/dnsmasq.in 2014-08-25 00:26:17.733879048 +0200
+@@ -33,10 +33,11 @@
NL="
"
-: ${dnsmasq_pid:=/var/run/dnsmasq.pid}
-[ -s "$dnsmasq_pid" ] || dnsmasq_pid=/var/run/dnsmasq/dnsmasq.pid
++: ${dnsmasq_pid:=@RUNDIR@/dnsmasq.pid}
++[ -s "$dnsmasq_pid" ] || : ${dnsmasq_pid:=@RUNDIR@/dnsmasq/dnsmasq.pid}
: ${dnsmasq_service:=dnsmasq}
: ${dnsmasq_restart:=@RESTARTCMD ${dnsmasq_service}@}
-+: ${dnsmasq_reload:=/usr/bin/systemctl reload ${dnsmasq_service}}
++: ${dnsmasq_reload:=@RELOADCMD ${dnsmasq_service} ${dnsmasq_pid}@}
newconf="# Generated by resolvconf$NL"
newresolv="$newconf"
-@@ -182,7 +181,7 @@
+@@ -182,7 +183,7 @@
eval $dnsmasq_restart
fi
if $dbus; then
@@ -22,52 +119,98 @@
# Send even if empty so old servers are cleared
if $dbus_ex; then
method=SetDomainServers
-diff -u -r openresolv-3.5.7/resolvconf.conf.5.in openresolv-3.5.7-systemd/resolvconf.conf.5.in
+diff -u -Nr openresolv-3.5.7/Makefile openresolv-3.5.7-fs33801/Makefile
+--- openresolv-3.5.7/Makefile 2014-04-30 11:02:23.000000000 +0200
++++ openresolv-3.5.7-fs33801/Makefile 2014-08-25 00:26:17.983877830 +0200
+@@ -10,11 +10,13 @@
+ SBINDIR?= /sbin
+ SYSCONFDIR?= /etc
+ LIBEXECDIR?= /libexec/resolvconf
+-VARDIR?= /var/run/resolvconf
++RUNDIR?= /var/run
++VARDIR?= ${RUNDIR}/resolvconf
+ RCDIR?= /etc/rc.d
+ RESTARTCMD?= if ${RCDIR}/\1 status >/dev/null 2>\&1; then \
+ ${RCDIR}/\1 restart; \
+ fi
++RELOADCMD?= [ -s "\2" ] \&\& kill -HUP \\`cat "\2"\\` 2>/dev/null
+
+ INSTALL?= install
+ SED?= sed
+@@ -32,17 +34,19 @@
+ SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}:g'
+ SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
+ SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
++SED_RUNDIR= -e 's:@RUNDIR@:${RUNDIR}:g'
+ SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g'
+ SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g'
+ SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g'
++SED_RELOADCMD= -e 's:@RELOADCMD \([^ ]*\) \(.*\)@:${RELOADCMD}:g'
+
+ .SUFFIXES: .in
+
+ all: ${TARGET}
+
+ .in:
+- ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+- ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
++ ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} ${SED_RUNDIR} \
++ ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} ${SED_RELOADCMD} \
+ $< > $@
+
+ clean:
+diff -u -Nr openresolv-3.5.7/resolvconf.8.in openresolv-3.5.7-fs33801/resolvconf.8.in
+--- openresolv-3.5.7/resolvconf.8.in 2014-04-30 11:02:23.000000000 +0200
++++ openresolv-3.5.7-fs33801/resolvconf.8.in 2014-08-25 00:26:17.983877830 +0200
+@@ -110,7 +110,7 @@
+ This only needs to be called if the initial system boot sequence does not
+ automatically clean it out; for example the state directory is moved
+ somewhere other than
+-.Pa /var/run .
++.Pa @RUNDIR@ .
+ If used, it should only be called once as early in the system boot sequence
+ as possible and before
+ .Nm
+diff -u -Nr openresolv-3.5.7/resolvconf.conf.5.in openresolv-3.5.7-fs33801/resolvconf.conf.5.in
--- openresolv-3.5.7/resolvconf.conf.5.in 2014-04-30 11:02:23.000000000 +0200
-+++ openresolv-3.5.7-systemd/resolvconf.conf.5.in 2014-07-26 01:37:46.080706147 +0200
-@@ -216,8 +216,8 @@
- Location of the dnsmasq service.
- .It Sy dnsmasq_restart
++++ openresolv-3.5.7-fs33801/resolvconf.conf.5.in 2014-08-25 00:26:17.983877830 +0200
+@@ -218,6 +218,8 @@
Command to restart the dnsmasq service.
--.It Sy dnsmasq_pid
--Location of the dnsmasq pidfile.
+ .It Sy dnsmasq_pid
+ Location of the dnsmasq pidfile.
+.It Sy dnsmasq_reload
+Command to reload the dnsmasq service.
.It Sy libc_service
Location of the libc service.
.It Sy libc_restart
-@@ -230,10 +230,8 @@
- Command to restart the pdnsd service.
- .It Sy unbound_service
- Location of the unbound service.
--.It Sy unbound_restart
--Command to restart the unbound service.
--.It Sy unbound_pid
--Location of the unbound pidfile.
+@@ -234,6 +236,8 @@
+ Command to restart the unbound service.
+ .It Sy unbound_pid
+ Location of the unbound pidfile.
+.It Sy unbound_reload
+Command to reload the unbound service.
.El
.Sh SEE ALSO
.Xr resolv.conf 5
-diff -u -r openresolv-3.5.7/unbound.in openresolv-3.5.7-systemd/unbound.in
+diff -u -Nr openresolv-3.5.7/unbound.in openresolv-3.5.7-fs33801/unbound.in
--- openresolv-3.5.7/unbound.in 2014-04-30 11:02:23.000000000 +0200
-+++ openresolv-3.5.7-systemd/unbound.in 2014-07-26 01:36:58.217567587 +0200
-@@ -33,9 +33,8 @@
++++ openresolv-3.5.7-fs33801/unbound.in 2014-08-25 00:26:17.983877830 +0200
+@@ -33,9 +33,10 @@
NL="
"
-: ${unbound_pid:=/var/run/unbound.pid}
++: ${unbound_pid:=@RUNDIR@/unbound.pid}
: ${unbound_service:=unbound}
--: ${unbound_restart:=@RESTARTCMD ${unbound_service}@}
-+: ${unbound_reload:=/usr/bin/systemctl reload-or-try-restart ${unbound_service}}
+ : ${unbound_restart:=@RESTARTCMD ${unbound_service}@}
++: ${unbound_reload:=@RELOADCMD ${unbound_service} ${unbound_pid}@}
newconf="# Generated by resolvconf$NL"
for d in $DOMAINS; do
-@@ -67,12 +66,5 @@
- [ "$(cat "$unbound_conf")" != "$(printf %s "$newconf")" ]
+@@ -68,11 +69,5 @@
then
printf %s "$newconf" >"$unbound_conf"
-- # If we can't sent a HUP then force a restart
+ # If we can't sent a HUP then force a restart
- if [ -s "$unbound_pid" ]; then
- if ! kill -HUP $(cat "$unbound_pid") 2>/dev/null; then
- eval $unbound_restart
@@ -75,5 +218,5 @@
- else
- eval $unbound_restart
- fi
-+ eval $unbound_reload
++ eval $unbound_reload || eval $unbound_restart
fi
More information about the arch-commits
mailing list