Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/roy]: src/external/bsd/openresolv/dist Import openresolv-3.9.2 with the ...



details:   https://anonhg.NetBSD.org/src/rev/d65d9ad79e01
branches:  roy
changeset: 454201:d65d9ad79e01
user:      roy <roy%NetBSD.org@localhost>
date:      Sun Sep 08 20:46:17 2019 +0000

description:
Import openresolv-3.9.2 with the following changes:
  *  dnsmasq: clear cache after updating servers via dbus
  *  pdns_recursor: Fix global forwards (thus now installed by default)
  *  man: layout and misc fixes

diffstat:

 external/bsd/openresolv/dist/.gitignore           |    3 +
 external/bsd/openresolv/dist/LICENSE              |    2 +-
 external/bsd/openresolv/dist/Makefile             |   25 ++-
 external/bsd/openresolv/dist/configure            |   88 ++++++-----
 external/bsd/openresolv/dist/dnsmasq.in           |    4 +-
 external/bsd/openresolv/dist/pdns_recursor.in     |   17 +-
 external/bsd/openresolv/dist/resolvconf.conf.5.in |  155 ++++++++++++++-------
 external/bsd/openresolv/dist/resolvconf.in        |    2 +-
 8 files changed, 186 insertions(+), 110 deletions(-)

diffs (truncated from 525 to 300 lines):

diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/.gitignore
--- a/external/bsd/openresolv/dist/.gitignore   Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/.gitignore   Sun Sep 08 20:46:17 2019 +0000
@@ -1,3 +1,5 @@
+config.mk
+
 resolvconf
 resolvconf.8
 resolvconf.conf.5
@@ -6,4 +8,5 @@
 libc
 named
 pdnsd
+pdns_recursor
 unbound
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/LICENSE
--- a/external/bsd/openresolv/dist/LICENSE      Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/LICENSE      Sun Sep 08 20:46:17 2019 +0000
@@ -1,4 +1,4 @@
-Copyright (c) 2007-2017 Roy Marples <roy%marples.name@localhost>
+Copyright (c) 2007-2019 Roy Marples <roy%marples.name@localhost>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/Makefile
--- a/external/bsd/openresolv/dist/Makefile     Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/Makefile     Sun Sep 08 20:46:17 2019 +0000
@@ -10,6 +10,7 @@
 LIBEXECDIR?=   /libexec/resolvconf
 VARDIR?=       /var/run/resolvconf
 
+ECHO?=         echo
 INSTALL?=      install
 SED?=          sed
 
@@ -20,7 +21,7 @@
 MANMODE?=      0444
 
 RESOLVCONF=    resolvconf resolvconf.8 resolvconf.conf.5
-SUBSCRIBERS=   libc dnsmasq named pdnsd unbound
+SUBSCRIBERS=   libc dnsmasq named pdnsd pdns_recursor unbound
 TARGET=                ${RESOLVCONF} ${SUBSCRIBERS}
 SRCS=          ${TARGET:C,$,.in,} # pmake
 SRCS:=         ${TARGET:=.in} # gmake
@@ -79,11 +80,6 @@
 
 install: proginstall maninstall
 
-import:
-       rm -rf /tmp/${DISTPREFIX}
-       ${INSTALL} -d /tmp/${DISTPREFIX}
-       cp README ${SRCS} /tmp/${DISTPREFIX}
-
 dist-git:
        git archive --prefix=${DISTPREFIX}/ ${GITREF} | xz >${DISTFILE}
 
@@ -103,3 +99,20 @@
        ${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
        chmod 644 ${DISTINFOSIGN}
        ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
+
+import: dist
+       rm -rf /tmp/${DISTPREFIX}
+       ${INSTALL} -d /tmp/${DISTPREFIX}
+       tar xvJpf ${DISTFILE} -C /tmp
+
+_import-src:
+       rm -rf ${DESTDIR}/*
+       ${INSTALL} -d ${DESTDIR}
+       cp LICENSE README.md ${SRCS} resolvconf.conf ${DESTDIR};
+       cp resolvconf.8.in resolvconf.conf.5.in ${DESTDIR};
+       @${ECHO}
+       @${ECHO} "============================================================="
+       @${ECHO} "openresolv-${VERSION} imported to ${DESTDIR}"
+
+import-src:
+       ${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else  echo /tmp/${DISTPREFIX}; fi`
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/configure
--- a/external/bsd/openresolv/dist/configure    Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/configure    Sun Sep 08 20:46:17 2019 +0000
@@ -44,42 +44,8 @@
        esac
 done
 
-if [ -z "$LIBEXECDIR" ]; then
-       printf "Checking for directory /libexec ... "
-       if [ -d /libexec ]; then
-               echo "yes"
-               LIBEXECDIR=$PREFIX/libexec/resolvconf
-       else
-               echo "no"
-               LIBEXECDIR=$PREFIX/lib/resolvconf
-       fi
-fi
-if [ -z "$RUNDIR" ]; then
-       printf "Checking for directory /run ... "
-       if [ -d /run ]; then
-               echo "yes"
-               RUNDIR=/run
-       else
-               echo "no"
-               RUNDIR=/var/run
-       fi
-fi     
-
 : ${SED:=sed}
 
-: ${SYSCONFDIR:=$PREFIX/etc}
-: ${SBINDIR:=$PREFIX/sbin}
-: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
-: ${STATEDIR:=/var}
-: ${RUNDIR:=$STATEDIR/run}
-: ${MANDIR:=${PREFIX:-/usr}/share/man}
-
-eval SYSCONFDIR="$SYSCONFDIR"
-eval SBINDIR="$SBINDIR"
-eval LIBEXECDIR="$LIBEXECDIR"
-eval VARDIR="$RUNDIR/resolvconf"
-eval MANDIR="$MANDIR"
-
 CONFIG_MK=config.mk
 
 if [ -z "$BUILD" ]; then
@@ -121,7 +87,19 @@
 echo "# $OS" >$CONFIG_MK
 
 case "$OS" in
-freebsd*)
+dragonfly*)
+       # This means /usr HAS to be mounted not via dhcpcd
+       : ${LIBEXECDIR:=${PREFIX:-/usr}/libexec/resolvconf}
+       ;;
+linux*)
+       # cksum does't support -a and netpgp is rare
+       echo "CKSUM=            sha256sum --tag" >>$CONFIG_MK
+       echo "PGP=              gpg2" >>$CONFIG_MK
+       ;;
+esac
+
+case "$OS" in
+dragonfly*|freebsd*)
        # On FreeBSD, /etc/init.d/foo status returns 0 if foo is not enabled
        # regardless of if it's not running.
        # So we force onestatus to work around this silly bug.
@@ -129,13 +107,43 @@
                STATUSARG="onestatus"
        fi
        ;;
-linux*)
-       # cksum does't support -a and netpgp is rare
-       echo "CKSUM=            sha256sum --tag" >>$CONFIG_MK
-       echo "PGP=              gpg2" >>$CONFIG_MK
-       ;;
 esac
 
+
+if [ -z "$LIBEXECDIR" ]; then
+       printf "Checking for directory /libexec ... "
+       if [ -d /libexec ]; then
+               echo "yes"
+               LIBEXECDIR=$PREFIX/libexec/resolvconf
+       else
+               echo "no"
+               LIBEXECDIR=$PREFIX/lib/resolvconf
+       fi
+fi
+if [ -z "$RUNDIR" ]; then
+       printf "Checking for directory /run ... "
+       if [ -d /run ]; then
+               echo "yes"
+               RUNDIR=/run
+       else
+               echo "no"
+               RUNDIR=/var/run
+       fi
+fi
+
+: ${SYSCONFDIR:=$PREFIX/etc}
+: ${SBINDIR:=$PREFIX/sbin}
+: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf}
+: ${STATEDIR:=/var}
+: ${RUNDIR:=$STATEDIR/run}
+: ${MANDIR:=${PREFIX:-/usr}/share/man}
+
+eval SYSCONFDIR="$SYSCONFDIR"
+eval SBINDIR="$SBINDIR"
+eval LIBEXECDIR="$LIBEXECDIR"
+eval VARDIR="$RUNDIR/resolvconf"
+eval MANDIR="$MANDIR"
+
 for x in SYSCONFDIR SBINDIR LIBEXECDIR VARDIR MANDIR RESTARTCMD RCDIR STATUSARG
 do
        eval v=\$$x
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/dnsmasq.in
--- a/external/bsd/openresolv/dist/dnsmasq.in   Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/dnsmasq.in   Sun Sep 08 20:46:17 2019 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2007-2016 Roy Marples
+# Copyright (c) 2007-2019 Roy Marples
 # All rights reserved
 
 # dnsmasq subscriber for resolvconf
@@ -206,4 +206,6 @@
        dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
                /uk/org/thekelleys/dnsmasq uk.org.thekelleys.$method \
                $dbusdest
+       dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
+               /uk/org/thekelleys/dnsmasq uk.org.thekelleys.ClearCache
 fi
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/pdns_recursor.in
--- a/external/bsd/openresolv/dist/pdns_recursor.in     Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/pdns_recursor.in     Sun Sep 08 20:46:17 2019 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2009-2011 Roy Marples
+# Copyright (c) 2009-2019 Roy Marples
 # All rights reserved
 
 # PowerDNS Recursor subscriber for resolvconf
@@ -33,17 +33,14 @@
 NL="
 "
 
-: ${pdns_service:=pdns_recursor}
+: ${pdns_service:=pdns-recursor}
 
 newzones=
 
-# pds_recursor does not present support global forward servers, which
-# does limit it's usefulness somewhat.
-# If it did, the below code can be enabled, or something like it.
-#for n in $NAMESERVERS; do
-#      newzones="$newzones${newzones:+,}$n"
-#done
-#[ -n "$newzones" ] && newzones=".=$newzones$NL"
+for n in $NAMESERVERS; do
+       newzones="$newzones${newzones:+,}$n"
+done
+[ -n "$newzones" ] && newzones="+.=$newzones$NL"
 
 for d in $DOMAINS; do
        newns=
@@ -71,7 +68,7 @@
                eval $pdns_restart
        elif [ -n "$RESTARTCMD" ]; then
                set -- ${pdns_service}
-               eval $RESTARTCMD
+               eval "$RESTARTCMD"
        else
                @SBINDIR@/resolvconf -r ${pdns_service}
        fi
diff -r ac7d78e1eedc -r d65d9ad79e01 external/bsd/openresolv/dist/resolvconf.conf.5.in
--- a/external/bsd/openresolv/dist/resolvconf.conf.5.in Wed Sep 04 13:27:50 2019 +0000
+++ b/external/bsd/openresolv/dist/resolvconf.conf.5.in Sun Sep 08 20:46:17 2019 +0000
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 29, 2016
+.Dd September 8, 2019
 .Dt RESOLVCONF.CONF 5
 .Os
 .Sh NAME
@@ -64,11 +64,15 @@
 .It Sy interface_order
 These interfaces will always be processed first.
 If unset, defaults to the following:-
-.D1 lo lo[0-9]*
+.Bd -compact -literal -offset indent
+lo lo[0-9]*
+.Ed
 .It Sy dynamic_order
 These interfaces will be processed next, unless they have a metric.
 If unset, defaults to the following:-
-.D1 tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.Bd -compact -literal -offset indent
+tap[0-9]* tun[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]*
+.Ed
 .It Sy inclusive_interfaces
 Ignore any exclusive marking for these interfaces.
 This is handy when 3rd party integrations force the
@@ -76,7 +80,9 @@
 option and you want to disable it easily.
 .It Sy local_nameservers
 If unset, defaults to the following:-
-.D1 127.* 0.0.0.0 255.255.255.255 ::1
+.Bd -compact -literal -offset indent
+127.* 0.0.0.0 255.255.255.255 ::1
+.Ed
 .It Sy search_domains
 Prepend search domains to the dynamically generated list.
 .It Sy search_domains_append
@@ -118,16 +124,24 @@
 .Va $keyword Ns / Ns Va $match Ns / Ns Va $replacement
 .Pp
 Example, given this resolv.conf:
-.D1 domain foo.org
-.D1 search foo.org dead.beef
-.D1 nameserver 1.2.3.4



Home | Main Index | Thread Index | Old Index