public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2016-12-12 21:45 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2016-12-12 21:45 UTC (permalink / raw
  To: gentoo-commits

commit:     925002ee75b909709a1aad8f59e38372c364e4b4
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 12 21:42:28 2016 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Dec 12 21:45:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=925002ee

Revert "net-dns/dnsmasq: Revision bump, add patch to fix caching of bound sockets"

This reverts commit b833afd6410c2e7dde0cae40ac20d218a5ae425e.

Gentoo-Bug: 602254

 net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild             | 193 ---------------------
 ...-binding-upstream-servers-to-an-interface.patch | 135 --------------
 2 files changed, 328 deletions(-)

diff --git a/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild
deleted file mode 100644
index 8a754fc..00000000
--- a/net-dns/dnsmasq/dnsmasq-2.76-r1.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit eutils toolchain-funcs flag-o-matic user systemd
-
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
-
-LICENSE="|| ( GPL-2 GPL-3 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn +inotify ipv6 lua nls script selinux static tftp"
-DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
-for dm_lingua in ${DM_LINGUAS}; do
-	IUSE+=" linguas_${dm_lingua}"
-done
-
-CDEPEND="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="${CDEPEND}
-	app-arch/xz-utils
-	dnssec? (
-		dev-libs/nettle[gmp]
-		static? (
-			dev-libs/nettle[static-libs(+)]
-		)
-	)
-	virtual/pkgconfig"
-
-RDEPEND="${CDEPEND}
-	dnssec? (
-		!static? (
-			dev-libs/nettle[gmp]
-		)
-	)
-	selinux? ( sec-policy/selinux-dnsmasq )
-"
-
-REQUIRED_USE="dhcp-tools? ( dhcp )
-	lua? ( script )"
-
-PATCHES=(
-	"${FILESDIR}/${P}-handle-binding-upstream-servers-to-an-interface.patch"
-)
-
-use_have() {
-	local useflag no_only uword
-	if [[ $1 == '-n' ]]; then
-		no_only=1
-		shift
-	fi
-	useflag="${1}"
-	shift
-
-	uword="${1:-${useflag}}"
-	shift
-
-	while [[ ${uword} ]]; do
-		uword="${uword^^}"
-
-		if ! use "${useflag}"; then
-			printf " -DNO_%s" "${uword}"
-		elif [[ -z "${no_only}" ]]; then
-			printf " -DHAVE_%s" "${uword}"
-		fi
-		uword="${1}"
-		shift
-	done
-}
-
-pkg_pretend() {
-	if use static; then
-		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
-		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
-	fi
-}
-
-pkg_setup() {
-	enewgroup dnsmasq
-	enewuser dnsmasq -1 -1 /dev/null dnsmasq
-}
-
-src_prepare() {
-	default
-
-	sed -i -r 's:lua5.[0-9]+:lua:' Makefile
-	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
-}
-
-src_configure() {
-	COPTS="$(use_have -n auth-dns auth)"
-	COPTS+="$(use_have conntrack)"
-	COPTS+="$(use_have dbus)"
-	COPTS+="$(use_have idn)"
-	COPTS+="$(use_have -n inotify)"
-	COPTS+="$(use_have -n dhcp dhcp dhcp6)"
-	COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
-	COPTS+="$(use_have lua luascript)"
-	COPTS+="$(use_have -n script)"
-	COPTS+="$(use_have -n tftp)"
-	COPTS+="$(use_have dnssec)"
-	COPTS+="$(use_have static dnssec_static)"
-}
-
-src_compile() {
-	emake \
-		PREFIX="${EPREFIX}/usr" \
-		MANDIR="${EPREFIX}/usr/share/man" \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		COPTS="${COPTS}" \
-		CONFFILE="${EPREFIX}/etc/${PN}.conf" \
-		all$(use nls && echo "-i18n")
-
-	use dhcp-tools && emake -C contrib/lease-tools \
-		PREFIX="${EPREFIX}/usr" \
-		MANDIR="${EPREFIX}/usr/share/man" \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		all
-}
-
-src_install() {
-	local lingua puid
-	emake \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		COPTS="${COPTS}" \
-		DESTDIR="${ED}" \
-		install$(use nls && echo "-i18n")
-
-	for lingua in ${DM_LINGUAS}; do
-		use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
-	done
-	[[ -d "${ED}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/
-
-	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
-	dodoc -r logo
-
-	docinto html/
-	dodoc *.html
-
-	newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
-	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
-
-	insinto /etc
-	newins dnsmasq.conf.example dnsmasq.conf
-
-	insinto /usr/share/dnsmasq
-	doins trust-anchors.conf
-
-	if use dhcp; then
-		dodir /var/lib/misc
-		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
-	fi
-	if use dbus; then
-		insinto /etc/dbus-1/system.d
-		doins dbus/dnsmasq.conf
-	fi
-
-	if use dhcp-tools; then
-		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
-		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
-	fi
-
-	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
-}
-
-pkg_preinst() {
-	# temporary workaround to (hopefully) prevent leases file from being removed
-	[[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
-}
-
-pkg_postinst() {
-	# temporary workaround to (hopefully) prevent leases file from being removed
-	[[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
-}

diff --git a/net-dns/dnsmasq/files/dnsmasq-2.76-handle-binding-upstream-servers-to-an-interface.patch b/net-dns/dnsmasq/files/dnsmasq-2.76-handle-binding-upstream-servers-to-an-interface.patch
deleted file mode 100644
index 463c935..00000000
--- a/net-dns/dnsmasq/files/dnsmasq-2.76-handle-binding-upstream-servers-to-an-interface.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 2675f2061525bc954be14988d64384b74aa7bf8b Mon Sep 17 00:00:00 2001
-From: Beniamino Galvani <bgalvani@redhat.com>
-Date: Sun, 28 Aug 2016 20:44:05 +0100
-Subject: [PATCH] Handle binding upstream servers to an interface
- (--server=1.2.3.4@eth0) when the named interface is
- destroyed and recreated in the kernel.
-
----
- CHANGELOG     |    5 +++++
- src/dnsmasq.h |    1 +
- src/network.c |   31 +++++++++++++++++++++++++++++--
- 3 files changed, 35 insertions(+), 2 deletions(-)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index 2731cc4..5bcce38 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -30,6 +30,11 @@ version 2.77
- 	    and are now converted to names like
- 	    <prefix>--ffff-1-2-3-4.<domain>
- 
-+	    Handle binding upstream servers to an interface 
-+	    (--server=1.2.3.4@eth0) when the named interface
-+	    is destroyed and recreated in the kernel. Thanks to 
-+	    Beniamino Galvani for the patch.
-+
- 
- version 2.76
-             Include 0.0.0.0/8 in DNS rebind checks. This range 
-diff --git a/src/dnsmasq.h b/src/dnsmasq.h
-index 27385a9..f239ce5 100644
---- a/src/dnsmasq.h
-+++ b/src/dnsmasq.h
-@@ -488,6 +488,7 @@ struct serverfd {
-   int fd;
-   union mysockaddr source_addr;
-   char interface[IF_NAMESIZE+1];
-+  unsigned int ifindex, used;
-   struct serverfd *next;
- };
- 
-diff --git a/src/network.c b/src/network.c
-index e7722fd..ddf8d31 100644
---- a/src/network.c
-+++ b/src/network.c
-@@ -1204,6 +1204,7 @@ int local_bind(int fd, union mysockaddr *addr, char *intname, int is_tcp)
- static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname)
- {
-   struct serverfd *sfd;
-+  unsigned int ifindex = 0;
-   int errsave;
- 
-   /* when using random ports, servers which would otherwise use
-@@ -1224,11 +1225,15 @@ static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname)
- 	return NULL;
- #endif
-     }
-+
-+  if (intname && strlen(intname) != 0)
-+    ifindex = if_nametoindex(intname); /* index == 0 when not binding to an interface */
-       
-   /* may have a suitable one already */
-   for (sfd = daemon->sfds; sfd; sfd = sfd->next )
-     if (sockaddr_isequal(&sfd->source_addr, addr) &&
--	strcmp(intname, sfd->interface) == 0)
-+	strcmp(intname, sfd->interface) == 0 &&
-+	ifindex == sfd->ifindex) 
-       return sfd;
-   
-   /* need to make a new one. */
-@@ -1250,11 +1255,13 @@ static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname)
-       errno = errsave;
-       return NULL;
-     }
--    
-+
-   strcpy(sfd->interface, intname); 
-   sfd->source_addr = *addr;
-   sfd->next = daemon->sfds;
-+  sfd->ifindex = ifindex;
-   daemon->sfds = sfd;
-+
-   return sfd; 
- }
- 
-@@ -1429,12 +1436,16 @@ void check_servers(void)
- {
-   struct irec *iface;
-   struct server *serv;
-+  struct serverfd *sfd, *tmp, **up;
-   int port = 0, count;
- 
-   /* interface may be new since startup */
-   if (!option_bool(OPT_NOWILD))
-     enumerate_interfaces(0);
-   
-+  for (sfd = daemon->sfds; sfd; sfd = sfd->next)
-+    sfd->used = 0;
-+
- #ifdef HAVE_DNSSEC
-  /* Disable DNSSEC validation when using server=/domain/.... servers
-     unless there's a configured trust anchor. */
-@@ -1505,6 +1516,8 @@ void check_servers(void)
- 	      serv->flags |= SERV_MARK;
- 	      continue;
- 	    }
-+
-+	  serv->sfd->used = 1;
- 	}
-       
-       if (!(serv->flags & SERV_NO_REBIND) && !(serv->flags & SERV_LITERAL_ADDRESS))
-@@ -1547,6 +1560,20 @@ void check_servers(void)
-   if (count - 1 > SERVERS_LOGGED)
-     my_syslog(LOG_INFO, _("using %d more nameservers"), count - SERVERS_LOGGED - 1);
- 
-+  /* Remove unused sfds */
-+  for (sfd = daemon->sfds, up = &daemon->sfds; sfd; sfd = tmp)
-+    {
-+       tmp = sfd->next;
-+       if (!sfd->used) 
-+	{
-+	  *up = sfd->next;
-+	  close(sfd->fd);
-+	  free(sfd);
-+	} 
-+      else
-+	up = &sfd->next;
-+    }
-+  
-   cleanup_servers();
- }
- 
--- 
-1.7.10.4
-


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2017-10-02 16:38 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2017-10-02 16:38 UTC (permalink / raw
  To: gentoo-commits

commit:     5383e3fce7a501407d7a2e8c41efa766d3df2d67
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  2 16:37:09 2017 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Oct  2 16:37:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5383e3fc

net-dns/dnsmasq: Version bump for #632692

Security version bump for these CVEs:
CVE-2017-14491
CVE-2017-14492
CVE-2017-14493
CVE-2017-14494
CVE-2017-14495
CVE-2017-14496

Also make the relad action use start-stop-daemon.

Bug: https://bugs.gentoo.org/632692
Closes: https://bugs.gentoo.org/629284
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 net-dns/dnsmasq/Manifest                   |   1 +
 net-dns/dnsmasq/dnsmasq-2.78.ebuild        | 198 +++++++++++++++++++++++++++++
 net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 |  29 +++++
 net-dns/dnsmasq/files/dnsmasq-init-r3      |  23 ++++
 4 files changed, 251 insertions(+)

diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
index 241b1aa59f7..66d995931eb 100644
--- a/net-dns/dnsmasq/Manifest
+++ b/net-dns/dnsmasq/Manifest
@@ -1,2 +1,3 @@
 DIST dnsmasq-2.76.tar.xz 480796 SHA256 4b92698dee19ca0cb2a8f2e48f1d2dffd01a21eb15d1fbed4cf085630c8c9f96 SHA512 8a930f3e7cdc0c291ce89bea8128a4b8438b9aa9e660a2ac037e0baa4c5c74f4482a8f83b0410066a759444b3c4e1cf62a9beb625e38509690227996de10e06a WHIRLPOOL e0710f879fd6f8e27581b8c400704660941601cd2077f32d7c2b3f9791c6be8404469770e74f7e1a03880507a32a30c19b89f6a953a757ad01305f829448f0bc
 DIST dnsmasq-2.77.tar.xz 487244 SHA256 6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a SHA512 6ca98a71a8fdfd606e29c58b34dadfa63148c39f931570cca67a287e044d52c6ec2f8acbf5620ada3312e9db3a2fd63877188d829c070beaa730607e3309e768 WHIRLPOOL 94a4fdc23d81fe38456756d81e53f1258ccd360c4d22952c889f2d5f76d401696587a5362f5aacd1ef86799874ac9eae3c3879d0fe81b66beeafb2f3ce0e01d0
+DIST dnsmasq-2.78.tar.xz 489172 SHA256 89949f438c74b0c7543f06689c319484bd126cc4b1f8c745c742ab397681252b SHA512 9b79b84e5a768d52f90f6335ccef2c404ecd7a13e78e49f4cd0755fffc6cf34d0dc96ad4c72cad1dab3c5743a8d0d789b3e9b6e625b03c5675bb898ca61a698b WHIRLPOOL 3fdde3511c39b5f42a8166936576b60f7114a54388e317136ef9c4b5770c02106706dc0612361b18d25fa16a340e613c98aa78973e2dc038dc93f2a664d27606

diff --git a/net-dns/dnsmasq/dnsmasq-2.78.ebuild b/net-dns/dnsmasq/dnsmasq-2.78.ebuild
new file mode 100644
index 00000000000..ce866b6dcf4
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.78.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +id idn libidn2 +inotify"
+IUSE+=" ipv6 lua nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+for dm_lingua in "${DM_LINGUAS[@]}"; do
+	IUSE+=" linguas_${dm_lingua}"
+done
+
+CDEPEND="dbus? ( sys-apps/dbus )
+	idn? (
+		!libidn2? ( net-dns/libidn )
+		libidn2? ( >=net-dns/libidn2-2.0 )
+	)
+	lua? ( dev-lang/lua:* )
+	conntrack? ( net-libs/libnetfilter_conntrack )
+	nls? ( sys-devel/gettext )
+"
+
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	dnssec? (
+		dev-libs/nettle[gmp]
+		static? ( dev-libs/nettle[static-libs(+)] )
+	)
+	virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+	dnssec? (
+		!static? (
+			dev-libs/nettle[gmp]
+		)
+	)
+	selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+	lua? ( script )
+	libidn2? ( idn )"
+
+use_have() {
+	local useflag no_only uword
+	if [[ $1 == '-n' ]]; then
+		no_only=1
+		shift
+	fi
+	useflag="${1}"
+	shift
+
+	uword="${1:-${useflag}}"
+	shift
+
+	while [[ ${uword} ]]; do
+		uword="${uword^^}"
+
+		if ! use "${useflag}"; then
+			echo -n " -DNO_${uword}"
+		elif [[ -z "${no_only}" ]]; then
+			echo -n " -DHAVE_${uword}"
+		fi
+		uword="${1}"
+		shift
+	done
+}
+
+pkg_pretend() {
+	if use static; then
+		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+	fi
+}
+
+pkg_setup() {
+	enewgroup dnsmasq
+	enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+	default
+
+	sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+	COPTS="$(use_have -n auth-dns auth)"
+	COPTS+="$(use_have conntrack)"
+	COPTS+="$(use_have dbus)"
+	COPTS+="$(use libidn2 || use_have idn)"
+	COPTS+="$(use_have libidn2)"
+	COPTS+="$(use_have -n inotify)"
+	COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+	COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+	COPTS+="$(use_have -n id id)"
+	COPTS+="$(use_have lua luascript)"
+	COPTS+="$(use_have -n script)"
+	COPTS+="$(use_have -n tftp)"
+	COPTS+="$(use_have dnssec)"
+	COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		COPTS="${COPTS}" \
+		CONFFILE="/etc/${PN}.conf" \
+		all$(use nls && echo "-i18n")
+
+	use dhcp-tools && emake -C contrib/lease-tools \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		all
+}
+
+src_install() {
+	local lingua puid
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		COPTS="${COPTS}" \
+		DESTDIR="${D}" \
+		install$(use nls && echo "-i18n")
+
+	for lingua in "${DM_LINGUAS[@]}"; do
+		use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
+	done
+	[[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+	dodoc -r logo
+
+	docinto html/
+	dodoc *.html
+
+	newinitd "${FILESDIR}"/dnsmasq-init-r3 ${PN}
+	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+	insinto /etc
+	newins dnsmasq.conf.example dnsmasq.conf
+
+	insinto /usr/share/dnsmasq
+	doins trust-anchors.conf
+
+	if use dhcp; then
+		dodir /var/lib/misc
+		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r2 ${PN}
+	fi
+	if use dbus; then
+		insinto /etc/dbus-1/system.d
+		doins dbus/dnsmasq.conf
+	fi
+
+	if use dhcp-tools; then
+		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+		if use ipv6; then
+			dosbin contrib/lease-tools/dhcp_release6
+			doman contrib/lease-tools/dhcp_release6.1
+		fi
+	fi
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+	# temporary workaround to (hopefully) prevent leases file from being removed
+	[[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+	# temporary workaround to (hopefully) prevent leases file from being removed
+	[[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2
new file mode 100644
index 00000000000..610ce7a5d2e
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r2
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+	provide dns
+	need localmount net
+	after bootmisc
+	use logger
+}
+
+start_pre() {
+	checkpath --owner dnsmasq:dnsmasq \
+		--mode 0644 \
+		--file /var/lib/misc/dnsmasq.leases
+}
+
+reload() {
+	ebegin "Reloading ${RC_SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r3 b/net-dns/dnsmasq/files/dnsmasq-init-r3
new file mode 100644
index 00000000000..9d58b26fa5e
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r3
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+	provide dns
+	need localmount net
+	after bootmisc
+	use logger
+}
+
+reload() {
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2018-03-19 18:12 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2018-03-19 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     36950876fc0da1b5ced6a6c58508f5bc2c8be572
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 18:10:03 2018 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 18:11:38 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36950876

net-dns/dnsmasq: Version bump to 2.79

Closes: https://bugs.gentoo.org/586454
Closes: https://bugs.gentoo.org/633496
Closes: https://bugs.gentoo.org/643670
Gentoo-Bug: https://bugs.gentoo.org/645704
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-dns/dnsmasq/Manifest                   |   1 +
 net-dns/dnsmasq/dnsmasq-2.79.ebuild        | 198 +++++++++++++++++++++++++++++
 net-dns/dnsmasq/files/dnsmasq-init-dhcp-r3 |  35 +++++
 net-dns/dnsmasq/files/dnsmasq-init-r4      |  29 +++++
 net-dns/dnsmasq/files/dnsmasq.logrotate    |   7 +
 5 files changed, 270 insertions(+)

diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
index 0c1296ae6cf..1a7044b3e9e 100644
--- a/net-dns/dnsmasq/Manifest
+++ b/net-dns/dnsmasq/Manifest
@@ -1 +1,2 @@
 DIST dnsmasq-2.78.tar.xz 489172 BLAKE2B 996b59181c4b582b74c91be073e62f0756d2e4c67ee36ff825b6973699f60e44959bb0451bbb8623f277e5a8378cda987a300eee6ec9398ae99284b302da2747 SHA512 9b79b84e5a768d52f90f6335ccef2c404ecd7a13e78e49f4cd0755fffc6cf34d0dc96ad4c72cad1dab3c5743a8d0d789b3e9b6e625b03c5675bb898ca61a698b
+DIST dnsmasq-2.79.tar.xz 493036 BLAKE2B 91152c52aef06def74151f6fbae9153d25261ba5e6a728cbab503c074967963e40dce39d93a0fbe4c5497c9313ac24d495cc8233934c00d4ab82aefe83b01ccd SHA512 2c06212696ab55e1584f6133872f5b196013509e4b1822d0457787b456e14341afdde887749e370a2e512124cb4138f012f4601b08690707be4acc7cf2f2876f

diff --git a/net-dns/dnsmasq/dnsmasq-2.79.ebuild b/net-dns/dnsmasq/dnsmasq-2.79.ebuild
new file mode 100644
index 00000000000..5af2dbb6c98
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.79.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic user systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec id idn libidn2 +inotify"
+IUSE+=" ipv6 lua nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+CDEPEND="dbus? ( sys-apps/dbus )
+	idn? (
+		!libidn2? ( net-dns/libidn )
+		libidn2? ( >=net-dns/libidn2-2.0 )
+	)
+	lua? ( dev-lang/lua:* )
+	conntrack? ( net-libs/libnetfilter_conntrack )
+	nls? ( sys-devel/gettext )
+"
+
+DEPEND="${CDEPEND}
+	app-arch/xz-utils
+	dnssec? (
+		dev-libs/nettle[gmp]
+		static? ( dev-libs/nettle[static-libs(+)] )
+	)
+	virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+	dnssec? (
+		!static? (
+			dev-libs/nettle[gmp]
+		)
+	)
+	selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="dhcp-tools? ( dhcp )
+	lua? ( script )
+	libidn2? ( idn )"
+
+use_have() {
+	local useflag no_only uword
+	if [[ $1 == '-n' ]]; then
+		no_only=1
+		shift
+	fi
+	useflag="${1}"
+	shift
+
+	uword="${1:-${useflag}}"
+	shift
+
+	while [[ ${uword} ]]; do
+		uword="${uword^^}"
+
+		if ! use "${useflag}"; then
+			printf -- " -DNO_%s" "${uword}"
+		elif [[ -z "${no_only}" ]]; then
+			printf -- " -DHAVE_%s" "${uword}"
+		fi
+		uword="${1}"
+		shift
+	done
+}
+
+pkg_pretend() {
+	if use static; then
+		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
+	fi
+}
+
+pkg_setup() {
+	enewgroup dnsmasq
+	enewuser dnsmasq -1 -1 /dev/null dnsmasq
+}
+
+src_prepare() {
+	default
+
+	sed -i -r 's:lua5.[0-9]+:lua:' Makefile
+	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
+}
+
+src_configure() {
+	COPTS="$(use_have -n auth-dns auth)"
+	COPTS+="$(use_have conntrack)"
+	COPTS+="$(use_have dbus)"
+	COPTS+="$(use libidn2 || use_have idn)"
+	COPTS+="$(use_have libidn2)"
+	COPTS+="$(use_have -n inotify)"
+	COPTS+="$(use_have -n dhcp dhcp dhcp6)"
+	COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
+	COPTS+="$(use_have -n id id)"
+	COPTS+="$(use_have lua luascript)"
+	COPTS+="$(use_have -n script)"
+	COPTS+="$(use_have -n tftp)"
+	COPTS+="$(use_have dnssec)"
+	COPTS+="$(use_have static dnssec_static)"
+}
+
+src_compile() {
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		COPTS="${COPTS}" \
+		CONFFILE="/etc/${PN}.conf" \
+		all$(use nls && echo "-i18n")
+
+	use dhcp-tools && emake -C contrib/lease-tools \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		all
+}
+
+src_install() {
+	local lingua puid
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		COPTS="${COPTS}" \
+		DESTDIR="${D}" \
+		install$(use nls && echo "-i18n")
+
+	for lingua in "${DM_LINGUAS[@]}"; do
+		has ${lingua} ${LINGUAS-${lingua}} \
+			|| rm -rf "${D}"/usr/share/locale/${lingua}
+	done
+	[[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
+
+	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+	dodoc -r logo
+
+	docinto html/
+	dodoc *.html
+
+	newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN}
+	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/dnsmasq.logrotate ${PN}
+
+	insinto /etc
+	newins dnsmasq.conf.example dnsmasq.conf
+
+	insinto /usr/share/dnsmasq
+	doins trust-anchors.conf
+
+	if use dhcp; then
+		keepdir /var/lib/misc
+		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN}
+	fi
+	if use dbus; then
+		insinto /etc/dbus-1/system.d
+		doins dbus/dnsmasq.conf
+	fi
+
+	if use dhcp-tools; then
+		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+		if use ipv6; then
+			dosbin contrib/lease-tools/dhcp_release6
+			doman contrib/lease-tools/dhcp_release6.1
+		fi
+	fi
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+	# temporary workaround to (hopefully) prevent leases file from being removed
+	[[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+	# temporary workaround to (hopefully) prevent leases file from being removed
+	[[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r3 b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r3
new file mode 100644
index 00000000000..5a356b22b25
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-dhcp-r3
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload rotate"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+	provide dns
+	need localmount net
+	after bootmisc
+	use logger
+}
+
+start_pre() {
+	checkpath --owner dnsmasq:dnsmasq \
+		--mode 0644 \
+		--file /var/lib/misc/dnsmasq.leases
+}
+
+reload() {
+	ebegin "Reloading ${RC_SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}
+
+rotate() {
+	ebegin "Reopening ${RC_SVCNAME} log file"
+	start-stop-daemon --signal USR2 --pidfile "${pidfile}"
+	eend $?
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq-init-r4 b/net-dns/dnsmasq/files/dnsmasq-init-r4
new file mode 100644
index 00000000000..559cb1e89d4
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-init-r4
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload rotate"
+
+pidfile="/var/run/dnsmasq.pid"
+command="/usr/sbin/dnsmasq"
+command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
+retry="TERM/3/TERM/5"
+
+depend() {
+	provide dns
+	need localmount net
+	after bootmisc
+	use logger
+}
+
+reload() {
+	ebegin "Reloading ${RC_SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}
+
+rotate() {
+	ebegin "Reopening ${RC_SVCNAME} log file"
+	start-stop-daemon --signal USR2 --pidfile "${pidfile}"
+	eend $?
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq.logrotate b/net-dns/dnsmasq/files/dnsmasq.logrotate
new file mode 100644
index 00000000000..d689f8f875b
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq.logrotate
@@ -0,0 +1,7 @@
+/var/log/dnsmasq.log {
+	create 640 dnsmasq root
+	notifempty
+	postrotate
+		test -r /var/run/dnsmasq.pid && kill -USR2 "$(head -n1 /var/run/dnsmasq.pid)"
+	endscript
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2019-08-14  1:00 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2019-08-14  1:00 UTC (permalink / raw
  To: gentoo-commits

commit:     872fbe5391c7714bd4fc869c92c711b34049e1f0
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Aug 14 01:00:28 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Aug 14 01:00:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=872fbe53

net-dns/dnsmasq: Patch fix build with linux-headers 5.2 (bug #690788)

Closes: https://bugs.gentoo.org/690788
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild             |  5 ++++-
 .../files/dnsmasq-2.80-linux-headers-5.2.patch     | 25 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
index 20c55be8ff0..e73c42b41c1 100644
--- a/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
+++ b/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
@@ -1,5 +1,4 @@
 # Copyright 1999-2019 Gentoo Authors
-# Copyright 2017-2018 Sony Interactive Entertainment Inc.
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -58,6 +57,10 @@ REQUIRED_USE="dhcp-tools? ( dhcp )
 	lua? ( script )
 	libidn2? ( idn )"
 
+PATCHES=(
+	"${FILESDIR}/dnsmasq-2.80-linux-headers-5.2.patch"
+)
+
 use_have() {
 	local useflag no_only uword
 	if [[ ${1} == '-n' ]]; then

diff --git a/net-dns/dnsmasq/files/dnsmasq-2.80-linux-headers-5.2.patch b/net-dns/dnsmasq/files/dnsmasq-2.80-linux-headers-5.2.patch
new file mode 100644
index 00000000000..21bd7cd39ff
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.80-linux-headers-5.2.patch
@@ -0,0 +1,25 @@
+From 3052ce208acf602f0163166dcefb7330d537cedb Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Wed, 24 Jul 2019 17:34:48 +0100
+Subject: [PATCH] Fix build after y2038 changes in glib.
+
+SIOCGSTAMP is defined in linux/sockios.h, not asm/sockios.h now.
+---
+ src/dnsmasq.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/dnsmasq.h b/src/dnsmasq.h
+index ff3204a..3ef04ad 100644
+--- a/src/dnsmasq.h
++++ b/src/dnsmasq.h
+@@ -137,6 +137,7 @@ typedef unsigned long long u64;
+ #endif
+ 
+ #if defined(HAVE_LINUX_NETWORK)
++#include <linux/sockios.h>
+ #include <linux/capability.h>
+ /* There doesn't seem to be a universally-available 
+    userspace header for these. */
+-- 
+1.7.10.4
+


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2020-04-01 17:21 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2020-04-01 17:21 UTC (permalink / raw
  To: gentoo-commits

commit:     5d2cde891f94eed8019bde4deb0612af08cb0d30
Author:     Allen-Webb <allenwebb <AT> google <DOT> com>
AuthorDate: Wed Apr  1 14:44:02 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Apr  1 17:19:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d2cde89

net-dns/dnsmasq-2.80-r2: Revbump, fix CVE-2019-14834

Bug: https://bugs.gentoo.org/715764
Signed-off-by: Allen-Webb <allenwebb <AT> google.com>
Closes: https://github.com/gentoo/gentoo/pull/15197
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 ...smasq-2.80-r1.ebuild => dnsmasq-2.80-r2.ebuild} |  1 +
 .../files/dnsmasq-2.80-cve-2019-14834.patch        | 39 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.80-r2.ebuild
similarity index 98%
rename from net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
rename to net-dns/dnsmasq/dnsmasq-2.80-r2.ebuild
index ba0e02d6731..42e58c51d0b 100644
--- a/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
+++ b/net-dns/dnsmasq/dnsmasq-2.80-r2.ebuild
@@ -56,6 +56,7 @@ REQUIRED_USE="dhcp-tools? ( dhcp )
 PATCHES=(
 	"${FILESDIR}/dnsmasq-2.80-nettle-3.5.patch"
 	"${FILESDIR}/dnsmasq-2.80-linux-headers-5.2.patch"
+	"${FILESDIR}/dnsmasq-2.80-cve-2019-14834.patch"
 )
 
 use_have() {

diff --git a/net-dns/dnsmasq/files/dnsmasq-2.80-cve-2019-14834.patch b/net-dns/dnsmasq/files/dnsmasq-2.80-cve-2019-14834.patch
new file mode 100644
index 00000000000..a44ceabece7
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.80-cve-2019-14834.patch
@@ -0,0 +1,39 @@
+Fix memory leak in helper.c
+
+Thanks to Xu Mingjie <xumingjie1995@outlook.com> for spotting this.
+
+author: Simon Kelley <simon@thekelleys.org.uk>	
+commit-url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=69bc94779c2f035a9fffdb5327a54c3aeca73ed5
+diff --git a/src/helper.c b/src/helper.c
+index 33ba120..c392eec 100644 (file)
+--- a/src/helper.c
++++ b/src/helper.c
+@@ -80,7 +80,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
+   pid_t pid;
+   int i, pipefd[2];
+   struct sigaction sigact;
+-
++  unsigned char *alloc_buff = NULL;
++  
+   /* create the pipe through which the main program sends us commands,
+      then fork our process. */
+   if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
+@@ -186,11 +187,16 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
+       struct script_data data;
+       char *p, *action_str, *hostname = NULL, *domain = NULL;
+       unsigned char *buf = (unsigned char *)daemon->namebuff;
+-      unsigned char *end, *extradata, *alloc_buff = NULL;
++      unsigned char *end, *extradata;
+       int is6, err = 0;
+       int pipeout[2];
+ 
+-      free(alloc_buff);
++      /* Free rarely-allocated memory from previous iteration. */
++      if (alloc_buff)
++       {
++         free(alloc_buff);
++         alloc_buff = NULL;
++       }
+       
+       /* we read zero bytes when pipe closed: this is our signal to exit */ 
+       if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1))


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2021-01-26  0:55 Patrick McLean
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McLean @ 2021-01-26  0:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6bd2fd66446383b5f4c40ca35404003c8010c2c3
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Tue Jan 26 00:52:03 2021 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 00:54:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bd2fd66

net-dns/dnsmasq: Version bump to 2.84

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 net-dns/dnsmasq/Manifest                           |   1 +
 net-dns/dnsmasq/dnsmasq-2.84-r100.ebuild           | 217 +++++++++++++++++++++
 net-dns/dnsmasq/dnsmasq-2.84.ebuild                | 212 ++++++++++++++++++++
 .../files/dnsmasq-2.84-version-string.patch        |  13 ++
 4 files changed, 443 insertions(+)

diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
index 48a71d9fcdd..5c828b66a97 100644
--- a/net-dns/dnsmasq/Manifest
+++ b/net-dns/dnsmasq/Manifest
@@ -1,3 +1,4 @@
 DIST dnsmasq-2.81.tar.xz 510648 BLAKE2B 07861888df11f6e2e02d1b80f4e82a407b558ddb34e016f7bda5cb449ee870db000683264b2e36987ece16d50ab773f239bf12dd3468b9529ae4dccd77ecb8ee SHA512 85550c9782fef9b0710d0e233523ed1fe26e877a8bc53fcea3f7cf1fb17c3a79c46f284a99dab2bdaf6a107ea3f1a71cec476ab6d4e1b936da6591aaef42c88e
 DIST dnsmasq-2.82.tar.xz 509904 BLAKE2B 4df3778b2ec6775a6147f66d53b8dd7068d97872c6e5d3a16716faeb0ca489331560c77d6fa9cc913af0d7e0320a6ef463c690bb9e3fdbd8c266ed273e5a5403 SHA512 faf36efdaa3abe84994e46aea018b0a324218d42814baac056ca635f6d03f1301e7b4d958f92b272a8e3a7ac358f3a4e2606129a217587b471aedb3ce23e903b
 DIST dnsmasq-2.83.tar.xz 513880 BLAKE2B 16220fd7eac03f3ba70b014ace3c9775a85b31cdbabd7680d88a87697453a54bfec4c553207477f416032e679dbdaf3ca6c8bb56b72ee423540e0bedf0621865 SHA512 1eaade775dc19658afe825407c10456ab954b82034644bb19af2594d737ceae17ff2cee7f1f917e8e8b2dadbfbcb83dd8b842c0693fcac71487a5fade1eb4b05
+DIST dnsmasq-2.84.tar.xz 514216 BLAKE2B 2bca97c16bcf32e0126eb50dc14b82a1f37e1635ebd1dc205e9a92455640fcbb98c093be725768ba9ced84443e451775f8556a164c82967e09e1df4bf7fc901b SHA512 e84bdcdf3cf35f08e8492eb5aa89ee6543233bdb821d01f164783bd6d0913ec01c513e85e2109352c77e77142a1a94bedcd3361f37d7b2a9a5d35a02448e85c6

diff --git a/net-dns/dnsmasq/dnsmasq-2.84-r100.ebuild b/net-dns/dnsmasq/dnsmasq-2.84-r100.ebuild
new file mode 100644
index 00000000000..a96c17c5fb2
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.84-r100.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit toolchain-funcs flag-o-matic lua-single systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2"
+IUSE+=" +inotify ipv6 lua nettlehash nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+BDEPEND="
+	app-arch/xz-utils
+	virtual/pkgconfig
+	nls? ( sys-devel/gettext )
+"
+
+COMMON_DEPEND="
+	acct-group/dnsmasq
+	acct-user/dnsmasq
+	dbus? ( sys-apps/dbus:= )
+	idn? (
+		!libidn2? ( net-dns/libidn:0= )
+		libidn2? ( >=net-dns/libidn2-2.0:= )
+	)
+	lua? ( ${LUA_DEPS} )
+	conntrack? ( net-libs/libnetfilter_conntrack:= )
+	nls? ( sys-devel/gettext )
+"
+
+DEPEND="${COMMON_DEPEND}
+	dnssec? (
+		dev-libs/nettle:=[gmp]
+		static? ( >=dev-libs/nettle-3.4[static-libs(+)] )
+	)
+"
+
+RDEPEND="${COMMON_DEPEND}
+	dnssec? (
+		!static? ( >=dev-libs/nettle-3.4:=[gmp] )
+	)
+	selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="
+	dhcp-tools? ( dhcp )
+	dnssec? ( !nettlehash )
+	lua? (
+		script
+		${LUA_REQUIRED_USE}
+	)
+	libidn2? ( idn )
+"
+
+PATCHES=(
+	"${FILESDIR}/dnsmasq-2.84-version-string.patch"
+)
+
+use_have() {
+	local no_only
+	if [[ ${1} == '-n' ]]; then
+		no_only=1
+		shift
+	fi
+	local useflag="${1}"
+	shift
+
+	local uword="${1:-${useflag}}"
+	shift
+
+	while [[ ${uword} ]]; do
+		uword="${uword^^}"
+
+		if ! use "${useflag}"; then
+			printf -- " -DNO_%s" "${uword}"
+		elif [[ -z "${no_only}" ]]; then
+			printf -- " -DHAVE_%s" "${uword}"
+		fi
+		uword="${1}"
+		shift
+	done
+}
+
+pkg_pretend() {
+	if use static; then
+		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \
+			"in this case the static USE flag does nothing."
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die
+	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \
+		dnsmasq.conf.example || die
+}
+
+src_configure() {
+	COPTS=(
+		$(use_have -n auth-dns auth)
+		$(use_have conntrack)
+		$(use_have dbus)
+		$(use libidn2 || use_have idn)
+		$(use_have libidn2)
+		$(use_have -n inotify)
+		$(use_have -n dhcp dhcp dhcp6)
+		$(use_have -n ipv6 ipv6 dhcp6)
+		$(use_have -n id id)
+		$(use_have lua luascript)
+		$(use_have -n script)
+		$(use_have -n tftp)
+		$(use_have dnssec)
+		$(use_have nettlehash)
+		$(use_have static dnssec_static)
+		$(use_have -n dumpfile)
+	)
+}
+
+src_compile() {
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		COPTS="${COPTS[*]}" \
+		CONFFILE="/etc/${PN}.conf" \
+		all$(use nls && printf -- "-i18n\n")
+
+	use dhcp-tools && emake -C contrib/lease-tools \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		all
+}
+
+src_install() {
+	local lingua puid
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		COPTS="${COPTS[*]}" \
+		DESTDIR="${ED}" \
+		install$(use nls && printf -- "-i18n\n")
+
+	for lingua in "${DM_LINGUAS[@]}"; do
+		has ${lingua} ${LINGUAS-${lingua}} \
+			|| rm -rf "${ED}"/usr/share/locale/${lingua}
+	done
+	[[ -d "${D}"/usr/share/locale/ ]] && \
+		rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/
+
+	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+	dodoc -r logo
+
+	docinto html/
+	dodoc *.html
+
+	newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN}
+	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/dnsmasq.logrotate ${PN}
+
+	insinto /etc
+	newins dnsmasq.conf.example dnsmasq.conf
+
+	insinto /usr/share/dnsmasq
+	doins trust-anchors.conf
+
+	if use dhcp; then
+		keepdir /var/lib/misc
+		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN}
+	fi
+	if use dbus; then
+		insinto /etc/dbus-1/system.d
+		doins dbus/dnsmasq.conf
+	fi
+
+	if use dhcp-tools; then
+		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+		if use ipv6; then
+			dosbin contrib/lease-tools/dhcp_release6
+			doman contrib/lease-tools/dhcp_release6.1
+		fi
+	fi
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+	[[ -f /var/lib/misc/dnsmasq.leases ]] && \
+		cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+	[[ -f "${T}"/dnsmasq.leases ]] && \
+		cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}

diff --git a/net-dns/dnsmasq/dnsmasq-2.84.ebuild b/net-dns/dnsmasq/dnsmasq-2.84.ebuild
new file mode 100644
index 00000000000..eee292c64ac
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.84.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="Small forwarding DNS server"
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2"
+IUSE+=" +inotify ipv6 lua nettlehash nls script selinux static tftp"
+
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
+
+BDEPEND="
+	app-arch/xz-utils
+	virtual/pkgconfig
+	nls? ( sys-devel/gettext )
+"
+
+COMMON_DEPEND="
+	acct-group/dnsmasq
+	acct-user/dnsmasq
+	dbus? ( sys-apps/dbus:= )
+	idn? (
+		!libidn2? ( net-dns/libidn:0= )
+		libidn2? ( >=net-dns/libidn2-2.0:= )
+	)
+	lua? ( dev-lang/lua:0= )
+	conntrack? ( net-libs/libnetfilter_conntrack:= )
+	nls? ( sys-devel/gettext )
+"
+
+DEPEND="${COMMON_DEPEND}
+	dnssec? (
+		dev-libs/nettle:=[gmp]
+		static? ( >=dev-libs/nettle-3.4[static-libs(+)] )
+	)
+"
+
+RDEPEND="${COMMON_DEPEND}
+	dnssec? (
+		!static? ( >=dev-libs/nettle-3.4:=[gmp] )
+	)
+	selinux? ( sec-policy/selinux-dnsmasq )
+"
+
+REQUIRED_USE="
+	dhcp-tools? ( dhcp )
+	dnssec? ( !nettlehash )
+	lua? ( script )
+	libidn2? ( idn )
+"
+
+PATCHES=(
+	"${FILESDIR}/dnsmasq-2.84-version-string.patch"
+)
+
+use_have() {
+	local no_only
+	if [[ ${1} == '-n' ]]; then
+		no_only=1
+		shift
+	fi
+	local useflag="${1}"
+	shift
+
+	local uword="${1:-${useflag}}"
+	shift
+
+	while [[ ${uword} ]]; do
+		uword="${uword^^}"
+
+		if ! use "${useflag}"; then
+			printf -- " -DNO_%s" "${uword}"
+		elif [[ -z "${no_only}" ]]; then
+			printf -- " -DHAVE_%s" "${uword}"
+		fi
+		uword="${1}"
+		shift
+	done
+}
+
+pkg_pretend() {
+	if use static; then
+		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
+		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \
+			"in this case the static USE flag does nothing."
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die
+	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \
+		dnsmasq.conf.example || die
+}
+
+src_configure() {
+	COPTS=(
+		$(use_have -n auth-dns auth)
+		$(use_have conntrack)
+		$(use_have dbus)
+		$(use libidn2 || use_have idn)
+		$(use_have libidn2)
+		$(use_have -n inotify)
+		$(use_have -n dhcp dhcp dhcp6)
+		$(use_have -n ipv6 ipv6 dhcp6)
+		$(use_have -n id id)
+		$(use_have lua luascript)
+		$(use_have -n script)
+		$(use_have -n tftp)
+		$(use_have dnssec)
+		$(use_have nettlehash)
+		$(use_have static dnssec_static)
+		$(use_have -n dumpfile)
+	)
+}
+
+src_compile() {
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		COPTS="${COPTS[*]}" \
+		CONFFILE="/etc/${PN}.conf" \
+		all$(use nls && printf -- "-i18n\n")
+
+	use dhcp-tools && emake -C contrib/lease-tools \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		CC="$(tc-getCC)" \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		all
+}
+
+src_install() {
+	local lingua puid
+	emake \
+		PREFIX=/usr \
+		MANDIR=/usr/share/man \
+		COPTS="${COPTS[*]}" \
+		DESTDIR="${ED}" \
+		install$(use nls && printf -- "-i18n\n")
+
+	for lingua in "${DM_LINGUAS[@]}"; do
+		has ${lingua} ${LINGUAS-${lingua}} \
+			|| rm -rf "${ED}"/usr/share/locale/${lingua}
+	done
+	[[ -d "${D}"/usr/share/locale/ ]] && \
+		rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/
+
+	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
+	dodoc -r logo
+
+	docinto html/
+	dodoc *.html
+
+	newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN}
+	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/dnsmasq.logrotate ${PN}
+
+	insinto /etc
+	newins dnsmasq.conf.example dnsmasq.conf
+
+	insinto /usr/share/dnsmasq
+	doins trust-anchors.conf
+
+	if use dhcp; then
+		keepdir /var/lib/misc
+		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN}
+	fi
+	if use dbus; then
+		insinto /etc/dbus-1/system.d
+		doins dbus/dnsmasq.conf
+	fi
+
+	if use dhcp-tools; then
+		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
+		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
+		if use ipv6; then
+			dosbin contrib/lease-tools/dhcp_release6
+			doman contrib/lease-tools/dhcp_release6.1
+		fi
+	fi
+
+	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+}
+
+pkg_preinst() {
+	[[ -f /var/lib/misc/dnsmasq.leases ]] && \
+		cp /var/lib/misc/dnsmasq.leases "${T}"
+}
+
+pkg_postinst() {
+	[[ -f "${T}"/dnsmasq.leases ]] && \
+		cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
+}

diff --git a/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch b/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch
new file mode 100644
index 00000000000..bd37dbbfe75
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch
@@ -0,0 +1,13 @@
+diff --git a/bld/get-version b/bld/get-version
+index e472aab..3bf0b87 100755
+--- a/bld/get-version
++++ b/bld/get-version
+@@ -28,7 +28,7 @@ else
+      vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]`
+ 
+      if [ $? -eq 0 ]; then
+-         echo "${vers}" | sort -r | head -n 1 | sed 's/^v//'
++         echo "${vers}" | sort | head -n 1 | sed 's/^v//'
+      else
+          cat $1/VERSION
+      fi


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/
@ 2021-05-25 13:33 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2021-05-25 13:33 UTC (permalink / raw
  To: gentoo-commits

commit:     6109df8405c78516589580b6d0867c000072752e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May 25 13:33:03 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 25 13:33:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6109df84

net-dns/dnsmasq: security cleanup

Bug: https://bugs.gentoo.org/782130
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 net-dns/dnsmasq/Manifest                           |   2 -
 net-dns/dnsmasq/dnsmasq-2.83-r101.ebuild           | 217 --------------------
 net-dns/dnsmasq/dnsmasq-2.84-r101.ebuild           | 221 ---------------------
 .../files/dnsmasq-2.84-version-string.patch        |  13 --
 4 files changed, 453 deletions(-)

diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
index f65dc2f4d6e..8a4d81c60fb 100644
--- a/net-dns/dnsmasq/Manifest
+++ b/net-dns/dnsmasq/Manifest
@@ -1,3 +1 @@
-DIST dnsmasq-2.83.tar.xz 513880 BLAKE2B 16220fd7eac03f3ba70b014ace3c9775a85b31cdbabd7680d88a87697453a54bfec4c553207477f416032e679dbdaf3ca6c8bb56b72ee423540e0bedf0621865 SHA512 1eaade775dc19658afe825407c10456ab954b82034644bb19af2594d737ceae17ff2cee7f1f917e8e8b2dadbfbcb83dd8b842c0693fcac71487a5fade1eb4b05
-DIST dnsmasq-2.84.tar.xz 514216 BLAKE2B 2bca97c16bcf32e0126eb50dc14b82a1f37e1635ebd1dc205e9a92455640fcbb98c093be725768ba9ced84443e451775f8556a164c82967e09e1df4bf7fc901b SHA512 e84bdcdf3cf35f08e8492eb5aa89ee6543233bdb821d01f164783bd6d0913ec01c513e85e2109352c77e77142a1a94bedcd3361f37d7b2a9a5d35a02448e85c6
 DIST dnsmasq-2.85.tar.xz 518316 BLAKE2B b7c081132c65d67b65f797bdbc603930c1509717bc1b5209b12f72fa3f01b4bae2f26a5387f95ef20317cd3d60e097c0b8bef5e019a35013f3ed2acce9fe9e89 SHA512 8beefe76b46f7d561f40d0900ba68b260a199cb62ab5b653746e3a1104c04fb8899b9e7a160a1be4fe8782bfb1607b556e9ffb9c25c4e99653e4bc74fcc03b09

diff --git a/net-dns/dnsmasq/dnsmasq-2.83-r101.ebuild b/net-dns/dnsmasq/dnsmasq-2.83-r101.ebuild
deleted file mode 100644
index d1c269b7660..00000000000
--- a/net-dns/dnsmasq/dnsmasq-2.83-r101.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit toolchain-funcs flag-o-matic lua-single systemd
-
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
-
-LICENSE="|| ( GPL-2 GPL-3 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
-
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2"
-IUSE+=" +inotify ipv6 lua nettlehash nls script selinux static tftp"
-
-DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
-
-BDEPEND="
-	app-arch/xz-utils
-	virtual/pkgconfig
-	nls? ( sys-devel/gettext )
-"
-
-COMMON_DEPEND="
-	acct-group/dnsmasq
-	acct-user/dnsmasq
-	dbus? ( sys-apps/dbus:= )
-	idn? (
-		!libidn2? ( net-dns/libidn:0= )
-		libidn2? ( >=net-dns/libidn2-2.0:= )
-	)
-	lua? ( ${LUA_DEPS} )
-	conntrack? ( net-libs/libnetfilter_conntrack:= )
-	nls? ( sys-devel/gettext )
-"
-
-DEPEND="${COMMON_DEPEND}
-	dnssec? (
-		dev-libs/nettle:=[gmp]
-		static? ( >=dev-libs/nettle-3.4[static-libs(+)] )
-	)
-"
-
-RDEPEND="${COMMON_DEPEND}
-	dnssec? (
-		!static? ( >=dev-libs/nettle-3.4:=[gmp] )
-	)
-	selinux? ( sec-policy/selinux-dnsmasq )
-"
-
-REQUIRED_USE="
-	dhcp-tools? ( dhcp )
-	dnssec? ( !nettlehash )
-	lua? (
-		script
-		${LUA_REQUIRED_USE}
-	)
-	libidn2? ( idn )
-"
-
-use_have() {
-	local no_only
-	if [[ ${1} == '-n' ]]; then
-		no_only=1
-		shift
-	fi
-	local useflag="${1}"
-	shift
-
-	local uword="${1:-${useflag}}"
-	shift
-
-	while [[ ${uword} ]]; do
-		uword="${uword^^}"
-
-		if ! use "${useflag}"; then
-			printf -- " -DNO_%s" "${uword}"
-		elif [[ -z "${no_only}" ]]; then
-			printf -- " -DHAVE_%s" "${uword}"
-		fi
-		uword="${1}"
-		shift
-	done
-}
-
-pkg_setup() {
-	use lua && lua-single_pkg_setup
-}
-
-pkg_pretend() {
-	if use static; then
-		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
-		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \
-			"in this case the static USE flag does nothing."
-	fi
-}
-
-src_prepare() {
-	default
-
-	sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die
-	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \
-		dnsmasq.conf.example || die
-}
-
-src_configure() {
-	COPTS=(
-		$(use_have -n auth-dns auth)
-		$(use_have conntrack)
-		$(use_have dbus)
-		$(use libidn2 || use_have idn)
-		$(use_have libidn2)
-		$(use_have -n inotify)
-		$(use_have -n dhcp dhcp dhcp6)
-		$(use_have -n ipv6 ipv6 dhcp6)
-		$(use_have -n id id)
-		$(use_have lua luascript)
-		$(use_have -n script)
-		$(use_have -n tftp)
-		$(use_have dnssec)
-		$(use_have nettlehash)
-		$(use_have static dnssec_static)
-		$(use_have -n dumpfile)
-	)
-}
-
-src_compile() {
-	emake \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		COPTS="${COPTS[*]}" \
-		CONFFILE="/etc/${PN}.conf" \
-		all$(use nls && printf -- "-i18n\n")
-
-	use dhcp-tools && emake -C contrib/lease-tools \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		all
-}
-
-src_install() {
-	local lingua puid
-	emake \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		COPTS="${COPTS[*]}" \
-		DESTDIR="${ED}" \
-		install$(use nls && printf -- "-i18n\n")
-
-	for lingua in "${DM_LINGUAS[@]}"; do
-		has ${lingua} ${LINGUAS-${lingua}} \
-			|| rm -rf "${ED}"/usr/share/locale/${lingua}
-	done
-	[[ -d "${D}"/usr/share/locale/ ]] && \
-		rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/
-
-	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
-	dodoc -r logo
-
-	docinto html/
-	dodoc *.html
-
-	newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN}
-	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/dnsmasq.logrotate ${PN}
-
-	insinto /etc
-	newins dnsmasq.conf.example dnsmasq.conf
-
-	insinto /usr/share/dnsmasq
-	doins trust-anchors.conf
-
-	if use dhcp; then
-		keepdir /var/lib/misc
-		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN}
-	fi
-	if use dbus; then
-		insinto /etc/dbus-1/system.d
-		doins dbus/dnsmasq.conf
-	fi
-
-	if use dhcp-tools; then
-		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
-		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
-		if use ipv6; then
-			dosbin contrib/lease-tools/dhcp_release6
-			doman contrib/lease-tools/dhcp_release6.1
-		fi
-	fi
-
-	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
-}
-
-pkg_preinst() {
-	[[ -f /var/lib/misc/dnsmasq.leases ]] && \
-		cp /var/lib/misc/dnsmasq.leases "${T}"
-}
-
-pkg_postinst() {
-	[[ -f "${T}"/dnsmasq.leases ]] && \
-		cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
-}

diff --git a/net-dns/dnsmasq/dnsmasq-2.84-r101.ebuild b/net-dns/dnsmasq/dnsmasq-2.84-r101.ebuild
deleted file mode 100644
index 3ca7420ed50..00000000000
--- a/net-dns/dnsmasq/dnsmasq-2.84-r101.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit toolchain-funcs flag-o-matic lua-single systemd
-
-DESCRIPTION="Small forwarding DNS server"
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
-
-LICENSE="|| ( GPL-2 GPL-3 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2"
-IUSE+=" +inotify ipv6 lua nettlehash nls script selinux static tftp"
-
-DM_LINGUAS=(de es fi fr id it no pl pt_BR ro)
-
-BDEPEND="
-	app-arch/xz-utils
-	virtual/pkgconfig
-	nls? ( sys-devel/gettext )
-"
-
-COMMON_DEPEND="
-	acct-group/dnsmasq
-	acct-user/dnsmasq
-	dbus? ( sys-apps/dbus:= )
-	idn? (
-		!libidn2? ( net-dns/libidn:0= )
-		libidn2? ( >=net-dns/libidn2-2.0:= )
-	)
-	lua? ( ${LUA_DEPS} )
-	conntrack? ( net-libs/libnetfilter_conntrack:= )
-	nls? ( sys-devel/gettext )
-"
-
-DEPEND="${COMMON_DEPEND}
-	dnssec? (
-		dev-libs/nettle:=[gmp]
-		static? ( >=dev-libs/nettle-3.4[static-libs(+)] )
-	)
-"
-
-RDEPEND="${COMMON_DEPEND}
-	dnssec? (
-		!static? ( >=dev-libs/nettle-3.4:=[gmp] )
-	)
-	selinux? ( sec-policy/selinux-dnsmasq )
-"
-
-REQUIRED_USE="
-	dhcp-tools? ( dhcp )
-	dnssec? ( !nettlehash )
-	lua? (
-		script
-		${LUA_REQUIRED_USE}
-	)
-	libidn2? ( idn )
-"
-
-PATCHES=(
-	"${FILESDIR}/dnsmasq-2.84-version-string.patch"
-)
-
-use_have() {
-	local no_only
-	if [[ ${1} == '-n' ]]; then
-		no_only=1
-		shift
-	fi
-	local useflag="${1}"
-	shift
-
-	local uword="${1:-${useflag}}"
-	shift
-
-	while [[ ${uword} ]]; do
-		uword="${uword^^}"
-
-		if ! use "${useflag}"; then
-			printf -- " -DNO_%s" "${uword}"
-		elif [[ -z "${no_only}" ]]; then
-			printf -- " -DHAVE_%s" "${uword}"
-		fi
-		uword="${1}"
-		shift
-	done
-}
-
-pkg_setup() {
-	use lua && lua-single_pkg_setup
-}
-
-pkg_pretend() {
-	if use static; then
-		einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
-		use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \
-			"in this case the static USE flag does nothing."
-	fi
-}
-
-src_prepare() {
-	default
-
-	sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die
-	sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \
-		dnsmasq.conf.example || die
-}
-
-src_configure() {
-	COPTS=(
-		$(use_have -n auth-dns auth)
-		$(use_have conntrack)
-		$(use_have dbus)
-		$(use libidn2 || use_have idn)
-		$(use_have libidn2)
-		$(use_have -n inotify)
-		$(use_have -n dhcp dhcp dhcp6)
-		$(use_have -n ipv6 ipv6 dhcp6)
-		$(use_have -n id id)
-		$(use_have lua luascript)
-		$(use_have -n script)
-		$(use_have -n tftp)
-		$(use_have dnssec)
-		$(use_have nettlehash)
-		$(use_have static dnssec_static)
-		$(use_have -n dumpfile)
-	)
-}
-
-src_compile() {
-	emake \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		COPTS="${COPTS[*]}" \
-		CONFFILE="/etc/${PN}.conf" \
-		all$(use nls && printf -- "-i18n\n")
-
-	use dhcp-tools && emake -C contrib/lease-tools \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		CC="$(tc-getCC)" \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CFLAGS="${CFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		all
-}
-
-src_install() {
-	local lingua puid
-	emake \
-		PREFIX=/usr \
-		MANDIR=/usr/share/man \
-		COPTS="${COPTS[*]}" \
-		DESTDIR="${ED}" \
-		install$(use nls && printf -- "-i18n\n")
-
-	for lingua in "${DM_LINGUAS[@]}"; do
-		has ${lingua} ${LINGUAS-${lingua}} \
-			|| rm -rf "${ED}"/usr/share/locale/${lingua}
-	done
-	[[ -d "${D}"/usr/share/locale/ ]] && \
-		rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/
-
-	dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
-	dodoc -r logo
-
-	docinto html/
-	dodoc *.html
-
-	newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN}
-	newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/dnsmasq.logrotate ${PN}
-
-	insinto /etc
-	newins dnsmasq.conf.example dnsmasq.conf
-
-	insinto /usr/share/dnsmasq
-	doins trust-anchors.conf
-
-	if use dhcp; then
-		keepdir /var/lib/misc
-		newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN}
-	fi
-	if use dbus; then
-		insinto /etc/dbus-1/system.d
-		doins dbus/dnsmasq.conf
-	fi
-
-	if use dhcp-tools; then
-		dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time}
-		doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1
-		if use ipv6; then
-			dosbin contrib/lease-tools/dhcp_release6
-			doman contrib/lease-tools/dhcp_release6.1
-		fi
-	fi
-
-	systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
-}
-
-pkg_preinst() {
-	[[ -f /var/lib/misc/dnsmasq.leases ]] && \
-		cp /var/lib/misc/dnsmasq.leases "${T}"
-}
-
-pkg_postinst() {
-	[[ -f "${T}"/dnsmasq.leases ]] && \
-		cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
-}

diff --git a/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch b/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch
deleted file mode 100644
index bd37dbbfe75..00000000000
--- a/net-dns/dnsmasq/files/dnsmasq-2.84-version-string.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/bld/get-version b/bld/get-version
-index e472aab..3bf0b87 100755
---- a/bld/get-version
-+++ b/bld/get-version
-@@ -28,7 +28,7 @@ else
-      vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]`
- 
-      if [ $? -eq 0 ]; then
--         echo "${vers}" | sort -r | head -n 1 | sed 's/^v//'
-+         echo "${vers}" | sort | head -n 1 | sed 's/^v//'
-      else
-          cat $1/VERSION
-      fi


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-25 13:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-01 17:21 [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/, net-dns/dnsmasq/files/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2021-05-25 13:33 Thomas Deutschmann
2021-01-26  0:55 Patrick McLean
2019-08-14  1:00 Patrick McLean
2018-03-19 18:12 Patrick McLean
2017-10-02 16:38 Patrick McLean
2016-12-12 21:45 Patrick McLean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox