pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/dnsmasq Update to dnsmasq-2.46



details:   https://anonhg.NetBSD.org/pkgsrc/rev/349a8c86bd30
branches:  trunk
changeset: 551713:349a8c86bd30
user:      roy <roy%pkgsrc.org@localhost>
date:      Fri Dec 19 07:53:43 2008 +0000

description:
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

diffstat:

 net/dnsmasq/Makefile         |  33 ++++++++++++++++++++----------
 net/dnsmasq/distinfo         |  15 ++++++-------
 net/dnsmasq/options.mk       |  16 ++++++++++++++
 net/dnsmasq/patches/patch-aa |  18 ----------------
 net/dnsmasq/patches/patch-ab |  48 ++++++++++++++++++++++++++++---------------
 net/dnsmasq/patches/patch-ac |  10 ---------
 net/dnsmasq/patches/patch-ad |  36 ---------------------------------
 net/dnsmasq/patches/patch-ae |  23 +++++++++++++++++++++
 net/dnsmasq/patches/patch-af |  13 +++++++++++
 9 files changed, 112 insertions(+), 100 deletions(-)

diffs (273 lines):

diff -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/Makefile
--- a/net/dnsmasq/Makefile      Fri Dec 19 07:53:25 2008 +0000
+++ b/net/dnsmasq/Makefile      Fri Dec 19 07:53:43 2008 +0000
@@ -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@localhost
+MAINTAINER=            roy%NetBSD.org@localhost
 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"
 
-CFLAGS+=       -DCONFFILE=\"${PKG_SYSCONFDIR}/dnsmasq.conf\"
+# 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}"
+
 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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/distinfo
--- a/net/dnsmasq/distinfo      Fri Dec 19 07:53:25 2008 +0000
+++ b/net/dnsmasq/distinfo      Fri Dec 19 07:53:43 2008 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsmasq/options.mk    Fri Dec 19 07:53:43 2008 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-aa
--- a/net/dnsmasq/patches/patch-aa      Fri Dec 19 07:53:25 2008 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-ab
--- a/net/dnsmasq/patches/patch-ab      Fri Dec 19 07:53:25 2008 +0000
+++ b/net/dnsmasq/patches/patch-ab      Fri Dec 19 07:53:43 2008 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-ac
--- a/net/dnsmasq/patches/patch-ac      Fri Dec 19 07:53:25 2008 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-ad
--- a/net/dnsmasq/patches/patch-ad      Fri Dec 19 07:53:25 2008 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsmasq/patches/patch-ae      Fri Dec 19 07:53:43 2008 +0000
@@ -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 -r e83a7bc61272 -r 349a8c86bd30 net/dnsmasq/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsmasq/patches/patch-af      Fri Dec 19 07:53:43 2008 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index