summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2012-03-07 21:59:19 +0000
committerPatrick McLean <chutzpah@gentoo.org>2012-03-07 21:59:19 +0000
commit00ba14af05cd3ffdf3681862390a7121fa1e8fc8 (patch)
tree61548a98b294437f5ec0f48490bd133d67725d17 /net-dns
parentMarking perl-Pod-Simple-3.160.0-r2 ppc64 for bug 391499 (diff)
downloadgentoo-2-00ba14af05cd3ffdf3681862390a7121fa1e8fc8.tar.gz
gentoo-2-00ba14af05cd3ffdf3681862390a7121fa1e8fc8.tar.bz2
gentoo-2-00ba14af05cd3ffdf3681862390a7121fa1e8fc8.zip
Version bump, rework configuration a bit to use a helper function. Add lua and script USE flags, and enable dhcpv6 if both the dhcp and ipv6 USE flags are enabled. Drop some older versions. Update copyright headers.
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/dnsmasq/ChangeLog14
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.52.ebuild72
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.55.ebuild73
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.56.ebuild73
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild6
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.57.ebuild6
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.59.ebuild6
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.60.ebuild109
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-init-r225
-rw-r--r--net-dns/dnsmasq/files/resolvconf.dnsmasq142
-rw-r--r--net-dns/dnsmasq/metadata.xml3
11 files changed, 157 insertions, 372 deletions
diff --git a/net-dns/dnsmasq/ChangeLog b/net-dns/dnsmasq/ChangeLog
index a5da36522fb4..7a83027bea9a 100644
--- a/net-dns/dnsmasq/ChangeLog
+++ b/net-dns/dnsmasq/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-dns/dnsmasq
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/ChangeLog,v 1.211 2011/12/04 10:28:47 swegener Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/ChangeLog,v 1.212 2012/03/07 21:59:18 chutzpah Exp $
+
+*dnsmasq-2.60 (07 Mar 2012)
+
+ 07 Mar 2012; Patrick McLean <chutzpah@gentoo.org> -dnsmasq-2.52.ebuild,
+ -dnsmasq-2.55.ebuild, -dnsmasq-2.56.ebuild, dnsmasq-2.57.ebuild,
+ dnsmasq-2.57-r1.ebuild, dnsmasq-2.59.ebuild, +dnsmasq-2.60.ebuild,
+ +files/dnsmasq-init-r2, -files/resolvconf.dnsmasq, metadata.xml:
+ Version bump, rework configuration a bit to use a helper function. Add lua
+ and script USE flags, and enable dhcpv6 if both the dhcp and ipv6 USE flags
+ are enabled. Drop some older versions. Update copyright headers.
04 Dec 2011; Sven Wegener <swegener@gentoo.org> files/dnsmasq-init,
files/dnsmasq-init-r1:
diff --git a/net-dns/dnsmasq/dnsmasq-2.52.ebuild b/net-dns/dnsmasq/dnsmasq-2.52.ebuild
deleted file mode 100644
index d016ea085129..000000000000
--- a/net-dns/dnsmasq/dnsmasq-2.52.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.52.ebuild,v 1.8 2011/02/16 19:33:07 chutzpah Exp $
-
-EAPI=2
-
-inherit eutils toolchain-funcs flag-o-matic
-
-MY_P="${P/_/}"
-MY_PV="${PV/_/}"
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="dbus +dhcp ipv6 nls tftp"
-
-RDEPEND="dbus? ( sys-apps/dbus )
- nls? (
- sys-devel/gettext
- net-dns/libidn
- )"
-
-DEPEND="${RDEPEND}
- || ( app-arch/xz-utils app-arch/lzma-utils )"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
- sed -i '/^AWK/s:nawk:gawk:' Makefile #214865
-
- # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
- epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
-}
-
-src_configure() {
- use tftp || append-flags -DNO_TFTP
- use dhcp || append-flags -DNO_DHCP
- use ipv6 || append-flags -DNO_IPV6
- use dbus && sed -i '$ a #define HAVE_DBUS' src/config.h
-}
-
-src_compile() {
- emake \
- PREFIX=/usr \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- all$(use nls && echo "-i18n") || die
-}
-
-src_install() {
- emake \
- PREFIX=/usr \
- MANDIR=/usr/share/man \
- DESTDIR="${D}" \
- install$(use nls && echo "-i18n") || die
-
- dodoc CHANGELOG FAQ
- dohtml *.html
-
- newinitd "${FILESDIR}"/dnsmasq-init dnsmasq
- newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq
- insinto /etc
- newins dnsmasq.conf.example dnsmasq.conf
-
- if use dbus ; then
- insinto /etc/dbus-1/system.d
- doins dbus/dnsmasq.conf
- fi
-}
diff --git a/net-dns/dnsmasq/dnsmasq-2.55.ebuild b/net-dns/dnsmasq/dnsmasq-2.55.ebuild
deleted file mode 100644
index 5dcb02cf3922..000000000000
--- a/net-dns/dnsmasq/dnsmasq-2.55.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.55.ebuild,v 1.3 2011/02/16 19:33:07 chutzpah Exp $
-
-EAPI=2
-
-inherit eutils toolchain-funcs flag-o-matic
-
-MY_P="${P/_/}"
-MY_PV="${PV/_/}"
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="dbus +dhcp ipv6 nls tftp"
-
-RDEPEND="dbus? ( sys-apps/dbus )
- nls? (
- sys-devel/gettext
- net-dns/libidn
- )"
-
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- || ( app-arch/xz-utils app-arch/lzma-utils )"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
- sed -i '/^AWK/s:nawk:gawk:' Makefile #214865
-
- # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
- epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
-}
-
-src_configure() {
- use tftp || append-flags -DNO_TFTP
- use dhcp || append-flags -DNO_DHCP
- use ipv6 || append-flags -DNO_IPV6
- use dbus && sed -i '$ a #define HAVE_DBUS' src/config.h
-}
-
-src_compile() {
- emake \
- PREFIX=/usr \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- all$(use nls && echo "-i18n") || die
-}
-
-src_install() {
- emake \
- PREFIX=/usr \
- MANDIR=/usr/share/man \
- DESTDIR="${D}" \
- install$(use nls && echo "-i18n") || die
-
- dodoc CHANGELOG FAQ
- dohtml *.html
-
- newinitd "${FILESDIR}"/dnsmasq-init dnsmasq
- newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq
- insinto /etc
- newins dnsmasq.conf.example dnsmasq.conf
-
- if use dbus ; then
- insinto /etc/dbus-1/system.d
- doins dbus/dnsmasq.conf
- fi
-}
diff --git a/net-dns/dnsmasq/dnsmasq-2.56.ebuild b/net-dns/dnsmasq/dnsmasq-2.56.ebuild
deleted file mode 100644
index e6874062a4fd..000000000000
--- a/net-dns/dnsmasq/dnsmasq-2.56.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.56.ebuild,v 1.1 2011/02/16 19:33:07 chutzpah Exp $
-
-EAPI=2
-
-inherit eutils toolchain-funcs flag-o-matic
-
-MY_P="${P/_/}"
-MY_PV="${PV/_/}"
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="dbus +dhcp ipv6 nls tftp"
-
-RDEPEND="dbus? ( sys-apps/dbus )
- nls? (
- sys-devel/gettext
- net-dns/libidn
- )"
-
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- || ( app-arch/xz-utils app-arch/lzma-utils )"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
- sed -i '/^AWK/s:nawk:gawk:' Makefile #214865
-
- # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
- epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
-}
-
-src_configure() {
- use tftp || append-flags -DNO_TFTP
- use dhcp || append-flags -DNO_DHCP
- use ipv6 || append-flags -DNO_IPV6
- use dbus && sed -i '$ a #define HAVE_DBUS' src/config.h
-}
-
-src_compile() {
- emake \
- PREFIX=/usr \
- CC="$(tc-getCC)" \
- CFLAGS="${CFLAGS}" \
- all$(use nls && echo "-i18n") || die
-}
-
-src_install() {
- emake \
- PREFIX=/usr \
- MANDIR=/usr/share/man \
- DESTDIR="${D}" \
- install$(use nls && echo "-i18n") || die
-
- dodoc CHANGELOG FAQ
- dohtml *.html
-
- newinitd "${FILESDIR}"/dnsmasq-init dnsmasq
- newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq
- insinto /etc
- newins dnsmasq.conf.example dnsmasq.conf
-
- if use dbus ; then
- insinto /etc/dbus-1/system.d
- doins dbus/dnsmasq.conf
- fi
-}
diff --git a/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild
index 7441438b26c6..f801a024618b 100644
--- a/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild
+++ b/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild,v 1.2 2011/05/22 19:39:43 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57-r1.ebuild,v 1.3 2012/03/07 21:59:18 chutzpah Exp $
EAPI=4
@@ -26,7 +26,7 @@ RDEPEND="dbus? ( sys-apps/dbus )
DEPEND="${RDEPEND}
dev-util/pkgconfig
- || ( app-arch/xz-utils app-arch/lzma-utils )"
+ || ( app-arch/xz-utils app-arch/lzma )"
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/net-dns/dnsmasq/dnsmasq-2.57.ebuild b/net-dns/dnsmasq/dnsmasq-2.57.ebuild
index 2a03d148645c..98a0d80ad129 100644
--- a/net-dns/dnsmasq/dnsmasq-2.57.ebuild
+++ b/net-dns/dnsmasq/dnsmasq-2.57.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57.ebuild,v 1.7 2011/05/22 23:57:47 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57.ebuild,v 1.8 2012/03/07 21:59:18 chutzpah Exp $
EAPI=2
@@ -26,7 +26,7 @@ RDEPEND="dbus? ( sys-apps/dbus )
DEPEND="${RDEPEND}
dev-util/pkgconfig
- || ( app-arch/xz-utils app-arch/lzma-utils )"
+ || ( app-arch/xz-utils app-arch/lzma )"
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/net-dns/dnsmasq/dnsmasq-2.59.ebuild b/net-dns/dnsmasq/dnsmasq-2.59.ebuild
index b445a7a73556..e37c259d32e0 100644
--- a/net-dns/dnsmasq/dnsmasq-2.59.ebuild
+++ b/net-dns/dnsmasq/dnsmasq-2.59.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.59.ebuild,v 1.1 2011/11/09 01:32:08 chutzpah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.59.ebuild,v 1.2 2012/03/07 21:59:18 chutzpah Exp $
EAPI=4
@@ -27,7 +27,7 @@ RDEPEND="dbus? ( sys-apps/dbus )
DEPEND="${RDEPEND}
dev-util/pkgconfig
- || ( app-arch/xz-utils app-arch/lzma-utils )"
+ || ( app-arch/xz-utils app-arch/lzma )"
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/net-dns/dnsmasq/dnsmasq-2.60.ebuild b/net-dns/dnsmasq/dnsmasq-2.60.ebuild
new file mode 100644
index 000000000000..043249e9d70e
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.60.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.60.ebuild,v 1.1 2012/03/07 21:59:18 chutzpah Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P="${P/_/}"
+MY_PV="${PV/_/}"
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="conntrack dbus +dhcp idn ipv6 lua nls script tftp"
+
+RDEPEND="dbus? ( sys-apps/dbus )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua )
+ conntrack? ( net-libs/libnetfilter_conntrack )
+ nls? (
+ sys-devel/gettext
+ net-dns/libidn
+ )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ || ( app-arch/xz-utils app-arch/lzma )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+REQUIRED_USE="lua? ( script )"
+
+use_have() {
+ local NO_ONLY=""
+ if [ $1 == '-n' ]; then
+ NO_ONLY=1
+ shift
+ fi
+
+ local UWORD=${2:-$1}
+ UWORD=${UWORD^^*}
+
+ if ! use ${1}; then
+ echo " -DNO_${UWORD}"
+ elif [ -z "${NO_ONLY}" ]; then
+ echo " -DHAVE_${UWORD}"
+ fi
+}
+
+pkg_setup() {
+ enewgroup dnsmasq
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+ # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
+ epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+}
+
+src_configure() {
+ COPTS="$(use_have conntrack)"
+ COPTS+="$(use_have dbus)"
+ COPTS+="$(use_have -n dhcp)"
+ COPTS+="$(use_have idn)"
+ COPTS+="$(use_have -n ipv6)"
+ COPTS+="$(use_have lua luascript)"
+ COPTS+="$(use_have -n script)"
+ COPTS+="$(use_have -n tftp)"
+ COPTS+="$(use ipv6 && use dhcp || echo " -DNO_DHCP6")"
+}
+
+src_compile() {
+ emake \
+ PREFIX=/usr \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ COPTS="${COPTS}" \
+ all$(use nls && echo "-i18n")
+}
+
+src_install() {
+ emake \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ DESTDIR="${D}" \
+ install$(use nls && echo "-i18n")
+
+ dodoc CHANGELOG CHANGELOG.archive FAQ
+ dodoc -r logo
+
+ dodoc CHANGELOG FAQ
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/dnsmasq-init-r2 dnsmasq
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 dnsmasq
+
+ insinto /etc
+ newins dnsmasq.conf.example dnsmasq.conf
+
+ if use dbus ; then
+ insinto /etc/dbus-1/system.d
+ doins dbus/dnsmasq.conf
+ fi
+}
diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r2 b/net-dns/dnsmasq/files/dnsmasq-init-r2
new file mode 100644
index 000000000000..08e747d1534b
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r2
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init-r2,v 1.1 2012/03/07 21:59:19 chutzpah Exp $
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+start_stop_daemon_args="--retry TERM/3/TERM/5"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${command} --pidfile ${pidfile}
+ eend $?
+}
diff --git a/net-dns/dnsmasq/files/resolvconf.dnsmasq b/net-dns/dnsmasq/files/resolvconf.dnsmasq
deleted file mode 100644
index 6895403fc288..000000000000
--- a/net-dns/dnsmasq/files/resolvconf.dnsmasq
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/sh
-# Copyright 2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# dnsmasq-resolv.conf updater
-# Written by Roy Marples (uberlord@gentoo.org)
-
-# This is very important!
-# We assume that we are a local dns cache - after all, why would a server
-# use resolvconf?
-# Now that we have assumed this, we also assume that generic DHCP clients
-# will enter their domains and search domains ONLY in the "search" field
-# in their resolv.confs and VPN clients will put the domain they are for
-# into the domain field only.
-# This allows dnsmasq to forward domains for a specific VPN domain to the
-# VPN nameserver and everything else to the standard name servers.
-
-# A sample dnsmasq config that works as above is like so
-#domain-needed
-#interface=lo
-#resolv-file=/etc/dnsmasq-resolv.conf
-#conf-file=/etc/dnsmasq-resolvconf.conf
-
-# The last step is to configure dns configuration for /etc/resolv.conf
-# for the lo interface. In Gentoo we set it up like so in /etc/conf.d/net
-#dns_servers_lo="127.0.0.1"
-
-# Load our variables from resolvconf
-VARS="$(resolvconf -v)"
-eval "${VARS}"
-
-DNSMASQRESOLV="/etc/dnsmasq-resolv.conf"
-DNSMASQCONF="/etc/dnsmasq-resolvconf.conf"
-
-NEWCONF="# Generated by resolvconf\n"
-NEWRESOLV="${NEWCONF}"
-
-# Using DBUS means that we never have to restart the daemon
-# This is important as it means we should not drop DNS queries
-# whilst changing DNS options around. However, DBUS support is optional
-# so we need to validate a few things first.
-# Check for DBus support in the binary
-DBUS=no
-if dnsmasq --version 2>/dev/null | \
-grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" \
-; then
- # Sanity - check that dnsmasq and dbus are running
- if [ -x /etc/init.d/dbus -a -x /etc/init.d/dnsmasq ] ; then
- if /etc/init.d/dbus --quiet status && /etc/init.d/dnsmasq --quiet status ; then
- DBUS=yes
- NEWCONF="${NEWCONF}\n# Domain specific servers will be sent over dbus\n\nenable-dbus\n"
- fi
- fi
-fi
-
-uniqify() {
- local result=
- while [ -n "$1" ] ; do
- case " ${result} " in
- *" $1 "*) ;;
- *) result="${result} $1" ;;
- esac
- shift
- done
- echo "${result# *}"
-}
-
-# If we only have domain information then put it in search too
-[ -z "${NEWSEARCH}" -a -z "${NEWNS}" ] && NEWSEARCH="${NEWDOMAIN}"
-
-for N in ${NEWSEARCH} ; do
- case " ${NEWSL} " in
- *" ${N%,*} "*) ;;
- *) NEWSL="${NEWSL} ${N%,*}" ;;
- esac
- case "\n${NEWRESOLV}\n" in
- *"\nnameserver ${N#*,}\n"*) ;;
- *) NEWRESOLV="${NEWRESOLV}nameserver ${N#*,}\n" ;;
- esac
-done
-for N in ${NEWNS} ; do
- case "\n${NEWRESOLV}\n" in
- *"\nnameserver ${N}\n") ;;
- *) NEWRESOLV="${NEWRESOLV}nameserver ${N}\n" ;;
- esac
-done
-[ -n "${NEWSL}" ] && NEWRESOLV="${NEWRESOLV}search${NEWSL}\n"
-
-DBUSDEST=
-for DN in $(uniqify ${NEWDOMAIN}) ; do
- if [ "${DBUS}" = "yes" ] ; then
- IP=${DN#*,}
- SIFS=${IFS-y} OIFS=$IFS
- IFS=.
- set -- ${IP}
- NUM="0x$(printf "%02x" $1 $2 $3 $4)"
- if [ "${SIFS}" = "y" ] ; then
- IFS=$OIFS
- else
- unset IFS
- fi
- DBUSDEST="${DBUSDEST} uint32:$(printf "%d" ${NUM}) string:${DN%,*}"
- else
- NEWCONF="${NEWCONF}server=/${DN%,*}/${DN#*,}\n"
- fi
-done
-
-RELOAD="no"
-if [ -e "${DNSMASQCONF}" ] ; then
- if [ "$(cat "${DNSMASQCONF}")" != "$(printf "${NEWCONF}")" ] ; then
- RELOAD="yes"
- printf "${NEWCONF}" > "${DNSMASQCONF}"
- fi
-else
- RELOAD="yes"
- printf "${NEWCONF}" > "${DNSMASQCONF}"
-fi
-if [ -e "${DNSMASQRESOLV}" ] ; then
- if [ "$(cat "${DNSMASQRESOLV}")" != "$(printf "${NEWRESOLV}")" ] ; then
- RELOAD="yes"
- printf "${NEWRESOLV}" > "${DNSMASQRESOLV}"
- fi
-else
- # dnsmasq polls this file so no need to set RELOAD="yes"
- printf "${NEWRESOLV}" > "${DNSMASQRESOLV}"
-fi
-
-if [ "${RELOAD}" = "yes" -a -x /etc/init.d/dnsmasq ] ; then
- /etc/init.d/dnsmasq --quiet --nodeps conditionalrestart
-fi
-
-if [ "${DBUS}" = "yes" ] ; then
- if [ "${RELOAD}" != "yes" -a -x /etc/init.d/dnsmasq ] ; then
- /etc/init.d/dnsmasq --quiet reload
- fi
- # Send even if emtpy so old servers are cleared
- dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
- /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers \
- ${DBUSDEST}
-fi
-
-# vim: ts=4 :
diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml
index 1e40ae7bd4de..50cbff9742b9 100644
--- a/net-dns/dnsmasq/metadata.xml
+++ b/net-dns/dnsmasq/metadata.xml
@@ -6,9 +6,10 @@
<name>Patrick McLean</name>
</maintainer>
<use>
+ <flag name='conntrack'>Add support for Linux conntrack connection marking.</flag>
<flag name='dhcp'>Enable support for reading ISC DHCPd lease files</flag>
+ <flag name='script'>Enable support for calling scripts when leases change</flag>
<flag name='tftp'>Enables built in TFTP server for netbooting</flag>
- <flag name='conntrack'>Add support for Linux conntrack connection marking.</flag>
</use>
</pkgmetadata>