pkgsrc-Bugs archive

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

pkg/38186: [PATCH] Update dnsmasq to 2.41 and have optional dbus support



>Number:         38186
>Category:       pkg
>Synopsis:       [PATCH] Update dnsmasq to 2.41 and have optional dbus support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 06 21:05:00 +0000 2008
>Originator:     Roy Marples
>Release:        4.0
>Organization:
>Environment:
NetBSD uberlaptop 4.0 NetBSD 4.0 (GENERIC_LAPTOP) #0: Sun Dec 16 00:27:57 PST 
2007  
builds@wb34:/home/builds/ab/netbsd-4-0-RELEASE/i386/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/i386/compile/GENERIC_LAPTOP
 i386

>Description:
dnsmasq in pkgsrc is a bit old and crusty on version 2.38, and it has a TODO 
entry to update it to 2.40.

Here's a patch that updates it to 2.41 and adds optional DBus support, which I 
use to poke dnsmasq dynmically about new nameservers obtained from my VPN. This 
is handy because the nameserver is always available as a usual restart makes it 
unavailable for a few seconds.
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/dnsmasq/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    23 Feb 2007 15:08:07 -0000      1.4
+++ Makefile    6 Mar 2008 17:19:35 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.4 2007/02/23 15:08:07 wiz Exp $
 #

-DISTNAME=              dnsmasq-2.38
+DISTNAME=              dnsmasq-2.41
 CATEGORIES=            net
 MASTER_SITES=          http://www.thekelleys.org.uk/dnsmasq/

@@ -9,14 +9,41 @@ MAINTAINER=           pancake%phreaker.net@localhost
 HOMEPAGE=              http://www.thekelleys.org.uk/dnsmasq/doc.html
 COMMENT=               Lightweight, easy to configure DNS forwarder

-USE_TOOLS+=            gmake
+USE_TOOLS+=            gmake pkg-config
+
+MAKE_ENV+=             LOCALEDIR=${PREFIX}/${PKGLOCALEDIR}
+INSTALL_MAKE_FLAGS+=   BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/${PKGMANDIR}
+
+EG=                    ${PREFIX}/share/examples/dnsmasq
+RCD_SCRIPTS=           dnsmasq
+CONF_FILES=            ${EG}/dnsmasq.conf.example \
+                       ${PKG_SYSCONFDIR}/dnsmasq.conf
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.dnsmasq
+PKG_SUPPORTED_OPTIONS= dbus
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdbus)
+CONF_FILES+=   ${EG}/dbus/dnsmasq.conf \
+               ${PREFIX}/etc/dbus-1/system.d/dnsmasq.conf
+PLIST_SRC+=    PLIST.dbus
+.endif
+
+pre-configure:
+.if !empty(PKG_OPTIONS:Mdbus)
+       ${ECHO} "#define HAVE_DBUS" >> ${WRKSRC}/src/config.h
+.endif

-RCD_SCRIPTS=   dnsmasq
-CONF_FILES=    ${PREFIX}/share/examples/dnsmasq/dnsmasq.conf.example \
-               ${PKG_SYSCONFDIR}/dnsmasq.conf
 post-install:
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dnsmasq
+       ${INSTALL_DATA_DIR} ${EG}
        ${INSTALL} ${WRKSRC}/dnsmasq.conf.example \
                ${PREFIX}/share/examples/dnsmasq/
+.if !empty(PKG_OPTIONS:Mdbus)
+       ${INSTALL_DATA_DIR} ${EG}/dbus
+       ${INSTALL} ${WRKSRC}/dbus/dnsmasq.conf ${EG}/dbus/dnsmasq.conf
+.endif

+.if !empty(PKG_OPTIONS:Mdbus)
+.include "../../sysutils/dbus/buildlink3.mk"
+.endif
 .include "../../mk/bsd.pkg.mk"
Index: PLIST.dbus
===================================================================
RCS file: PLIST.dbus
diff -N PLIST.dbus
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ PLIST.dbus  6 Mar 2008 17:19:35 -0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/10/18 04:41:59 minskim Exp $
+share/examples/dnsmasq/dbus/dnsmasq.conf
+@dirrm share/examples/dnsmasq/dbus
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/dnsmasq/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    23 Feb 2007 15:08:07 -0000      1.3
+++ distinfo    6 Mar 2008 17:19:35 -0000
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.3 2007/02/23 15:08:07 wiz Exp $

-SHA1 (dnsmasq-2.38.tar.gz) = 267ac7b78e9f48b0d8d65f30fc0faa2a6552ae8c
-RMD160 (dnsmasq-2.38.tar.gz) = bfa7ca4a5ededa2aedd708991b8177274b1db8b7
-Size (dnsmasq-2.38.tar.gz) = 272953 bytes
-SHA1 (patch-aa) = 584464432ddedd1d00b742330a73f8a27c0e8e17
+SHA1 (dnsmasq-2.41.tar.gz) = 18ab4f28a3b9300a04f9a4db9cfc3a5d9bc46c55
+RMD160 (dnsmasq-2.41.tar.gz) = 6f8af9934870d359b4155fca671c07c990c256ed
+Size (dnsmasq-2.41.tar.gz) = 361517 bytes
+SHA1 (patch-aa) = c96945108bb2605ebf6ecc39fa768fecb9213c55
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/net/dnsmasq/patches/patch-aa,v
retrieving revision 1.2
diff -u -p -r1.2 patch-aa
--- patches/patch-aa    23 Feb 2007 15:08:07 -0000      1.2
+++ patches/patch-aa    6 Mar 2008 17:19:35 -0000
@@ -1,14 +1,13 @@
-$NetBSD: patch-aa,v 1.2 2007/02/23 15:08:07 wiz Exp $
+$NetBSD$

---- Makefile.orig      2007-02-06 22:09:40.000000000 +0000
-+++ Makefile
-@@ -1,7 +1,7 @@
- PREFIX?=/usr/local
- BINDIR = ${PREFIX}/sbin
--MANDIR = ${PREFIX}/share/man
--LOCALEDIR = ${PREFIX}/share/locale
-+MANDIR = ${PREFIX}/${PKGMANDIR}
-+LOCALEDIR = ${PREFIX}/${PKGLOCALEDIR}
-
- SRC = src
- PO = po
+--- src/dbus.c 2008-03-06 16:59:06.000000000 +0000
++++ src/dbus.c 2008-03-06 16:59:32.000000000 +0000
+@@ -118,7 +118,7 @@
+           {
+             memcpy(&addr.in6.sin6_addr, p, sizeof(struct in6_addr));
+ #ifdef HAVE_SOCKADDR_SA_LEN
+-              source_addr.in6.sin6_len = addr.in6.sin6_len = sizeof(stuct 
sockaddr_in6);
++              source_addr.in6.sin6_len = addr.in6.sin6_len = sizeof(struct 
sockaddr_in6);
+ #endif
+               source_addr.in6.sin6_family = addr.in6.sin6_family = AF_INET6;
+               addr.in6.sin6_port = htons(NAMESERVER_PORT);




Home | Main Index | Thread Index | Old Index