diff options
author | roy <roy@pkgsrc.org> | 2008-12-19 07:53:43 +0000 |
---|---|---|
committer | roy <roy@pkgsrc.org> | 2008-12-19 07:53:43 +0000 |
commit | a6b0026ba40e9aa6be9f96306cb5e9d6de586999 (patch) | |
tree | 859638192e43e278287fee73d939551c4ea87473 | |
parent | 38b7ce784d799df708b48dbc6d8fcaee0eb02715 (diff) | |
download | pkgsrc-a6b0026ba40e9aa6be9f96306cb5e9d6de586999.tar.gz |
Update to dnsmasq-2.46
Noteable changes include:
NetBSD-5 support
Optional DBus and IPv6 support
ISC leasefile support removed
Support DHCP clients in multiple DNS domains
Re-read /etc/resolv.conf when an "interface up" event occurs
-rw-r--r-- | net/dnsmasq/Makefile | 33 | ||||
-rw-r--r-- | net/dnsmasq/distinfo | 15 | ||||
-rw-r--r-- | net/dnsmasq/options.mk | 16 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-aa | 18 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-ab | 48 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-ac | 10 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-ad | 36 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-ae | 23 | ||||
-rw-r--r-- | net/dnsmasq/patches/patch-af | 13 |
9 files changed, 112 insertions, 100 deletions
diff --git a/net/dnsmasq/Makefile b/net/dnsmasq/Makefile index e514fa16f49..8b408d4e8da 100644 --- a/net/dnsmasq/Makefile +++ b/net/dnsmasq/Makefile @@ -1,25 +1,36 @@ -# $NetBSD: Makefile,v 1.8 2008/11/22 18:59:54 ahoka Exp $ +# $NetBSD: Makefile,v 1.9 2008/12/19 07:53:43 roy Exp $ # -DISTNAME= dnsmasq-2.45 -PKGREVISION= 3 +DISTNAME= dnsmasq-2.46 CATEGORIES= net MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/ -MAINTAINER= pancake@phreaker.net +MAINTAINER= roy@NetBSD.org HOMEPAGE= http://www.thekelleys.org.uk/dnsmasq/doc.html COMMENT= Lightweight, easy to configure DNS forwarder -USE_TOOLS+= gmake +RCD_SCRIPTS= dnsmasq +CONF_FILES= ${PREFIX}/share/examples/dnsmasq/dnsmasq.conf.example \ + ${PKG_SYSCONFDIR}/dnsmasq.conf -RCD_SCRIPTS= dnsmasq -CONF_FILES= ${PREFIX}/share/examples/dnsmasq/dnsmasq.conf.example \ - ${PKG_SYSCONFDIR}/dnsmasq.conf +PKG_DESTDIR_SUPPORT= user-destdir + +.include "options.mk" + +# Override the defaults +CFLAGS+= -DCONFFILE=\\\"${PKG_SYSCONFDIR}/dnsmasq.conf\\\" +BUILD_MAKE_FLAGS+= COPTS="${CFLAGS}" +INSTALL_MAKE_FLAGS+= PREFIX="${PREFIX}" +INSTALL_MAKE_FLAGS+= MANDIR="${PREFIX}/${PKGMANDIR}" +INSTALL_MAKE_FLAGS+= LOCALEDIR="${PREFIX}/${PKGLOCALEDIR}" + +# Upstream wants to use nawk, but awk should work just fine here. +BUILD_MAKE_FLAGS+= AWK="${AWK}" +INSTALL_MAKE_FLAGS+= AWK="${AWK}" -CFLAGS+= -DCONFFILE=\"${PKG_SYSCONFDIR}/dnsmasq.conf\" post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dnsmasq + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/examples/dnsmasq ${INSTALL} ${WRKSRC}/dnsmasq.conf.example \ - ${PREFIX}/share/examples/dnsmasq/ + ${DESTDIR}${PREFIX}/share/examples/dnsmasq/ .include "../../mk/bsd.pkg.mk" diff --git a/net/dnsmasq/distinfo b/net/dnsmasq/distinfo index bad72b2efcd..4f03f39d514 100644 --- a/net/dnsmasq/distinfo +++ b/net/dnsmasq/distinfo @@ -1,9 +1,8 @@ -$NetBSD: distinfo,v 1.7 2008/11/22 18:59:54 ahoka Exp $ +$NetBSD: distinfo,v 1.8 2008/12/19 07:53:43 roy Exp $ -SHA1 (dnsmasq-2.45.tar.gz) = 12f8cffd657f674fbf4bf4f670a0dcb65ea4a5ae -RMD160 (dnsmasq-2.45.tar.gz) = b8ebf9dfeff26c18664a917cd32cb9b6a53852cb -Size (dnsmasq-2.45.tar.gz) = 380877 bytes -SHA1 (patch-aa) = f6d1d9d80a283d4270950031ec67c0b4e37920d7 -SHA1 (patch-ab) = 7bb6cb585f813a5fe9eddfdedda71a14740d8c4d -SHA1 (patch-ac) = a07c71502399a7835cbb8b8e5136553305113e6e -SHA1 (patch-ad) = 297486a45555df6dd1ca995a9e3866dd3368fbb6 +SHA1 (dnsmasq-2.46.tar.gz) = 472ef663b2b433d599f62cb6ca03eb6f7ce25bc2 +RMD160 (dnsmasq-2.46.tar.gz) = 684864b3bb71ea1d054efef0d9489cac12df9e82 +Size (dnsmasq-2.46.tar.gz) = 386318 bytes +SHA1 (patch-ab) = 1762cb1b0acb93ff1ffb65451d6eb430cb5d87c5 +SHA1 (patch-ae) = 155a4665ff70f6987241971077eafcd6f5da1e08 +SHA1 (patch-af) = 4c40ca2509f90afcb52d097f5dde4691d6124c92 diff --git a/net/dnsmasq/options.mk b/net/dnsmasq/options.mk new file mode 100644 index 00000000000..433851d60a8 --- /dev/null +++ b/net/dnsmasq/options.mk @@ -0,0 +1,16 @@ +# $NetBSD: options.mk,v 1.1 2008/12/19 07:53:43 roy Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.dnsmasq + +PKG_SUPPORTED_OPTIONS= dbus inet6 + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mdbus) +CFLAGS+= -DHAVE_DBUS +.include "../../sysutils/dbus/buildlink3.mk" +.endif + +.if empty(PKG_OPTIONS:Minet6) +CFLAGS+= -DNO_IPV6 +.endif diff --git a/net/dnsmasq/patches/patch-aa b/net/dnsmasq/patches/patch-aa deleted file mode 100644 index d8e26e0e5ea..00000000000 --- a/net/dnsmasq/patches/patch-aa +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2008/07/23 23:46:08 tonnerre Exp $ - ---- Makefile.orig 2008-07-20 20:26:07.000000000 +0200 -+++ Makefile -@@ -13,10 +13,10 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see <http://www.gnu.org/licenses/>. - --PREFIX = /usr/local -+PREFIX?= /usr/local - BINDIR = ${PREFIX}/sbin --MANDIR = ${PREFIX}/share/man --LOCALEDIR = ${PREFIX}/share/locale -+MANDIR = ${PREFIX}/${PKGMANDIR} -+LOCALEDIR = ${PREFIX}/${PKGLOCALEDIR} - - SRC = src - PO = po diff --git a/net/dnsmasq/patches/patch-ab b/net/dnsmasq/patches/patch-ab index ecd4987394c..94e20dbcb40 100644 --- a/net/dnsmasq/patches/patch-ab +++ b/net/dnsmasq/patches/patch-ab @@ -1,27 +1,41 @@ -$NetBSD: patch-ab,v 1.1 2008/09/25 20:33:53 ahoka Exp $ +$NetBSD: patch-ab,v 1.2 2008/12/19 07:53:43 roy Exp $ ---- src/config.h.orig 2008-07-20 20:26:32.000000000 +0200 -+++ src/config.h -@@ -38,17 +38,19 @@ +--- src/config.h 2008-11-10 21:47:46.000000000 +0000 ++++ src/config.h 2008-11-18 20:51:27.000000000 +0000 +@@ -38,18 +38,25 @@ # define RESOLVFILE "/etc/resolv.conf" #endif #define RUNFILE "/var/run/dnsmasq.pid" -#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__) -+#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) - # define LEASEFILE "/var/db/dnsmasq.leases" - #elif defined(__sun__) || defined (__sun) - # define LEASEFILE "/var/cache/dnsmasq.leases" - #else - # define LEASEFILE "/var/lib/misc/dnsmasq.leases" - #endif +-# define LEASEFILE "/var/db/dnsmasq.leases" +-#elif defined(__sun__) || defined (__sun) +-# define LEASEFILE "/var/cache/dnsmasq.leases" +-#else +-# define LEASEFILE "/var/lib/misc/dnsmasq.leases" +-#endif -#if defined(__FreeBSD__) -+#ifndef CONFFILE -+# if defined(__FreeBSD__) - # define CONFFILE "/usr/local/etc/dnsmasq.conf" +-# define CONFFILE "/usr/local/etc/dnsmasq.conf" -#else -+# else - # define CONFFILE "/etc/dnsmasq.conf" -+# endif +-# define CONFFILE "/etc/dnsmasq.conf" ++ ++#ifndef LEASEFILE ++# if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) ++# define LEASEFILE "/var/db/dnsmasq.leases" ++# elif defined (__sun) ++# define LEASEFILE "/var/cache/dnsmasq.leases" ++# else ++# define LEASEFILE "/var/lib/misc/dnsmasq.leases" ++# endif ++#endif ++ ++#ifndef CONFFILE ++# if defined(__FreeBSD__) ++# define CONFFILE "/usr/local/etc/dnsmasq.conf" ++# else ++# define CONFFILE "/etc/dnsmasq.conf" ++# endif #endif ++ #define DEFLEASE 3600 /* default lease time, 1 hour */ #define CHUSER "nobody" + #define CHGRP "dip" diff --git a/net/dnsmasq/patches/patch-ac b/net/dnsmasq/patches/patch-ac deleted file mode 100644 index 69f4833cc52..00000000000 --- a/net/dnsmasq/patches/patch-ac +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2008/09/25 20:33:53 ahoka Exp $ - ---- bld/Makefile.orig 2008-07-20 20:26:07.000000000 +0200 -+++ bld/Makefile -@@ -1,4 +1,4 @@ --CFLAGS = -Wall -W -O2 -+CFLAGS += -Wall -W -O2 - - OBJS = cache.o rfc1035.o util.o option.o forward.o isc.o network.o \ - dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \ diff --git a/net/dnsmasq/patches/patch-ad b/net/dnsmasq/patches/patch-ad deleted file mode 100644 index d920281c538..00000000000 --- a/net/dnsmasq/patches/patch-ad +++ /dev/null @@ -1,36 +0,0 @@ ---- src/bpf.c 2008-11-18 14:01:26.000000000 +0000 -+++ src/bpf.c 2008-11-18 14:09:21.000000000 +0000 -@@ -30,7 +30,7 @@ - - int iface_enumerate(void *parm, int (*ipv4_callback)(), int (*ipv6_callback)()) - { -- char *ptr; -+ char *ptr, *end; - struct ifreq *ifr; - struct ifconf ifc; - int fd, errsav, ret = 0; -@@ -62,16 +62,20 @@ - lastlen = ifc.ifc_len; - } - } -- -- for (ptr = ifc.ifc_buf; ptr < ifc.ifc_buf + ifc.ifc_len; ptr += len ) -+ -+ end = ifc.ifc_buf + ifc.ifc_len; -+ for (ptr = ifc.ifc_buf; ptr < end; ptr += len) - { - /* subsequent entries may not be aligned, so copy into - an aligned buffer to avoid nasty complaints about - unaligned accesses. */ - #ifdef HAVE_SOCKADDR_SA_LEN -- len = ((struct ifreq *)ptr)->ifr_addr.sa_len + offsetof(struct ifreq, ifr_ifru); -+ ifr = (struct ifreq *)ptr; -+ if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru)) -+ len = ifr->ifr_addr.sa_len + offsetof(struct ifreq, ifr_ifru); -+ else - #else -- len = sizeof(struct ifreq); -+ len = sizeof(struct ifreq); - #endif - if (!expand_buf(&ifreq, len)) - goto err; diff --git a/net/dnsmasq/patches/patch-ae b/net/dnsmasq/patches/patch-ae new file mode 100644 index 00000000000..523e16cf587 --- /dev/null +++ b/net/dnsmasq/patches/patch-ae @@ -0,0 +1,23 @@ +$NetBSD: patch-ae,v 1.1 2008/12/19 07:53:43 roy Exp $ + +--- src/bpf.c 2008-11-03 16:26:06.000000000 +0000 ++++ src/bpf.c 2008-11-18 20:51:27.000000000 +0000 +@@ -68,11 +68,15 @@ + /* subsequent entries may not be aligned, so copy into + an aligned buffer to avoid nasty complaints about + unaligned accesses. */ +-#ifdef HAVE_SOCKADDR_SA_LEN +- len = ((struct ifreq *)ptr)->ifr_addr.sa_len + offsetof(struct ifreq, ifr_ifru); +-#else ++ + len = sizeof(struct ifreq); ++ ++#ifdef HAVE_SOCKADDR_SA_LEN ++ ifr = (struct ifreq *)ptr; ++ if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru)) ++ len = ifr->ifr_addr.sa_len + offsetof(struct ifreq, ifr_ifru); + #endif ++ + if (!expand_buf(&ifreq, len)) + goto err; + diff --git a/net/dnsmasq/patches/patch-af b/net/dnsmasq/patches/patch-af new file mode 100644 index 00000000000..dbaad69de19 --- /dev/null +++ b/net/dnsmasq/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1 2008/12/19 07:53:43 roy Exp $ + +--- src/rfc1035.c 2008-11-03 16:28:39.000000000 +0000 ++++ src/rfc1035.c 2008-11-18 20:51:27.000000000 +0000 +@@ -25,7 +25,7 @@ + ((size_t)((pp) - (unsigned char *)(header) + (len)) <= (plen)) + + #define ADD_RDLEN(header, pp, plen, len) \ +- (!CHECK_LEN(header, pp, plen, len) ? 0 : (int)((pp) += (len)), 1) ++ (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) + + static int extract_name(HEADER *header, size_t plen, unsigned char **pp, + char *name, int isExtract, int extrabytes) |