public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/files/, net-dns/rbldnsd/
@ 2015-09-27 13:20 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2015-09-27 13:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f777c44ad2cc10e275fe56a01fb74db290b047e4
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 27 13:18:40 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Sep 27 13:18:56 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f777c44a

net-dns/rbldnsd: remove old versions and files.

Package-Manager: portage-2.2.20.1

 net-dns/rbldnsd/Manifest                           |  1 -
 net-dns/rbldnsd/files/confd                        | 20 -------
 net-dns/rbldnsd/files/example                      | 23 --------
 net-dns/rbldnsd/files/initd                        | 20 -------
 .../rbldnsd/files/rbldnsd-0.996b-asneeded.patch    | 11 ----
 net-dns/rbldnsd/rbldnsd-0.996b.ebuild              | 51 ----------------
 net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild           | 67 ----------------------
 7 files changed, 193 deletions(-)

diff --git a/net-dns/rbldnsd/Manifest b/net-dns/rbldnsd/Manifest
index f7cc9b5..6e88d40 100644
--- a/net-dns/rbldnsd/Manifest
+++ b/net-dns/rbldnsd/Manifest
@@ -1,2 +1 @@
 DIST rbldnsd-0.997a.tar.gz 144771 SHA256 9c17c6bde6995058204a66805444039d31523a7d4ef40cec059e505a0882a8ef SHA512 9a3e1a0ad2cd9dd08bcc114c70213a875e984f3761fa32c44fe544d8173f54330fe355ad229a120e64b8f4c8286187d0baa055526d3a85bc846df070bb213529 WHIRLPOOL b453396c9876fd4972c6028b5916ae9717d60d555e5bb33bc97f0a8910ee516a80d1a3cb6030a3850ec304794f4a00fd9f3dced0d5c7fd1388e7d87d53fedb24
-DIST rbldnsd_0.996b.tar.gz 113128 SHA256 475afe5be8729a76b7c23e2f3d5ce1c773775140406a58bfb7477fac5a528342 SHA512 ff5060d719becd7b1e08cd86f213830a1232774abce3de56599743c9e44b4e3d59e7f9ace18d2619c967038aad728908091efb2ac1591a5ca6c7aa9f84d3a084 WHIRLPOOL 1016bb55746fe772b44705ad65b9153971cc34a737697e3b5d2a0cd8972341e9ecacf8e9c28285a2729c18181891d38569b3b8e5a72e7b3ab6b175d2f123098b

diff --git a/net-dns/rbldnsd/files/confd b/net-dns/rbldnsd/files/confd
deleted file mode 100644
index ccbe1e9..0000000
--- a/net-dns/rbldnsd/files/confd
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# options for rbldnsd
-#
-# for initial testing, copy example zone file to /var/db/rbldnsd
-# NOTE: make sure nothing listens on 127.0.0.1:53
-#
-# OPTIONS="-q -r /var/db/rbldnsd -b 127.0.0.1 \
-#	-u rbldns -p /var/run/rbldnsd.pid \
-#	rbl.example.com:ip4set:example"
-
-# check if it works by executing
-# dig @localhost 1.0.0.127.rbl.example.com. any
-# - or -
-# host -a 1.0.0.127.rbl.example.com. localhost
-
-# the result should include something like
-
-# ANSWER SECTION:
-# 1.0.0.127.rbl.example.com. 2100 IN      A       127.0.0.2
-# 1.0.0.127.rbl.example.com. 2100 IN      TXT     "spam received, see http://rbl.example.com/lookup?127.0.0.1"

diff --git a/net-dns/rbldnsd/files/example b/net-dns/rbldnsd/files/example
deleted file mode 100644
index ab3458e..0000000
--- a/net-dns/rbldnsd/files/example
+++ /dev/null
@@ -1,23 +0,0 @@
-# SOA and NS record
-$SOA 1800 rbl.example.com abuse.example.com 0 600 600 86400 600
-
-# note: NS record should have reasonably longer TTL
-$NS  86400 rbl.example.com
-
-# default value if LHS of key is omitted:
-:127.0.0.2:spam received, see http://rbl.example.com/lookup?$
-
-# a key without value: returns the default value above
-127.0.0.1
-
-# CIDR notation:
-10.200/16
-
-# without netmask, it works as well: same as 10.201/16
-10.201
-
-# whitelisting:
-!10.202.0.1
-
-# domain-based DNSBL:
-evil.example.com

diff --git a/net-dns/rbldnsd/files/initd b/net-dns/rbldnsd/files/initd
deleted file mode 100644
index 29de000..0000000
--- a/net-dns/rbldnsd/files/initd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2002 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-depend() {
-	need net 
-}
-
-start() {
-	ebegin "Starting rbldnsd-server"
-	start-stop-daemon --start --quiet --pidfile /var/run/rbldnsd.pid --exec /usr/sbin/rbldnsd -- ${OPTIONS}
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping rbldnsd-server"
-	start-stop-daemon --stop --quiet --pidfile /var/run/rbldnsd.pid --exec /usr/sbin/rbldnsd
-	eend $?
-}
-

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch b/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch
deleted file mode 100644
index 77af1d9..0000000
--- a/net-dns/rbldnsd/files/rbldnsd-0.996b-asneeded.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.lib.orig	2009-01-04 16:52:52.112984801 +0100
-+++ configure.lib	2009-01-04 16:53:07.680980305 +0100
-@@ -105,7 +105,7 @@
- # run a compiler
- ac_run_compiler() {
-   rm -f conftest*; cat >conftest.c
--  ac_run $CC $CFLAGS "$@" conftest.c
-+  ac_run $CC $CFLAGS conftest.c "$@"
- }
- 
- ac_compile() {

diff --git a/net-dns/rbldnsd/rbldnsd-0.996b.ebuild b/net-dns/rbldnsd/rbldnsd-0.996b.ebuild
deleted file mode 100644
index 48f541d..0000000
--- a/net-dns/rbldnsd/rbldnsd-0.996b.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils toolchain-funcs user
-
-DESCRIPTION="a DNS daemon which is designed to serve DNSBL zones"
-HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html"
-SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${PN}_${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~sparc x86 ~x86-fbsd"
-IUSE="ipv6 zlib"
-
-RDEPEND="zlib? ( sys-libs/zlib )"
-DEPEND=""
-
-src_unpack() {
-	unpack ${A}
-	cd "${S}"
-	epatch "${FILESDIR}"/${P}-asneeded.patch
-}
-
-src_compile() {
-	# econf doesn't work
-	./configure \
-		$(use_enable ipv6) \
-		$(use_enable zlib) || die "./configure failed"
-
-	emake CC="$(tc-getCC)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
-		|| die "emake failed"
-}
-
-src_install() {
-	dosbin rbldnsd || die "dosbin failed"
-	doman rbldnsd.8
-	keepdir /var/db/rbldnsd
-	dodoc CHANGES* TODO NEWS README* "${FILESDIR}"/example
-	newinitd "${FILESDIR}"/initd rbldnsd
-	newconfd "${FILESDIR}"/confd rbldnsd
-}
-
-pkg_postinst() {
-	enewgroup rbldns
-	enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
-	chown rbldns:rbldns /var/db/rbldnsd
-
-	elog "for testing purpose, example zone file has been installed"
-	elog "Look in /usr/share/doc/${PF}/"
-}

diff --git a/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild b/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild
deleted file mode 100644
index d67487c..0000000
--- a/net-dns/rbldnsd/rbldnsd-0.997a-r1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils toolchain-funcs user python-single-r1
-
-DESCRIPTION="DNS server designed to serve blacklist zones"
-HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html"
-SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~sparc x86 ~x86-fbsd"
-IUSE="ipv6 test zlib"
-
-REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
-	test? ( ${PYTHON_DEPS}
-		dev-python/pydns:2[${PYTHON_USEDEP}] )"
-
-src_prepare() {
-	epatch "${FILESDIR}/${P}-robust-ipv6-test-support.patch"
-	epatch "${FILESDIR}/${P}-format-security-compile-fix.patch"
-}
-
-src_configure() {
-	# The ./configure file is handwritten and doesn't support a `make
-	# install` target, so there are no --prefix options. The econf
-	# function appends those automatically, so we can't use it.
-	./configure \
-		$(use_enable ipv6) \
-		$(use_enable zlib) \
-		|| die "./configure failed"
-}
-
-src_compile() {
-	emake \
-		AR="$(tc-getAR)" \
-		CC="$(tc-getCC)" \
-		RANLIB="$(tc-getRANLIB)"
-}
-
-src_test() {
-	emake check \
-		CC="$(tc-getCC)" \
-		PYTHON="${PYTHON}"
-}
-
-src_install() {
-	dosbin rbldnsd
-	doman rbldnsd.8
-	keepdir /var/db/rbldnsd
-	dodoc CHANGES* TODO NEWS README*
-	newinitd "${FILESDIR}"/initd-${PV} rbldnsd
-	newconfd "${FILESDIR}"/confd-${PV} rbldnsd
-}
-
-pkg_postinst() {
-	enewgroup rbldns
-	enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
-	chown rbldns:rbldns /var/db/rbldnsd
-}


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

* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/files/, net-dns/rbldnsd/
@ 2019-11-29 20:49 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2019-11-29 20:49 UTC (permalink / raw
  To: gentoo-commits

commit:     f6d0308c27d9ee57792810823d3ba55ed548ceae
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 29 20:47:48 2019 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Nov 29 20:48:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6d0308c

net-dns/rbldnsd: remove "unused" rbldnsd-0.998.ebuild and patch.

Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 net-dns/rbldnsd/Manifest                           |  1 -
 ...bldnsd-0.997a-format-security-compile-fix.patch | 30 ----------
 net-dns/rbldnsd/rbldnsd-0.998.ebuild               | 66 ----------------------
 3 files changed, 97 deletions(-)

diff --git a/net-dns/rbldnsd/Manifest b/net-dns/rbldnsd/Manifest
index 667a95cc392..92fedd673bb 100644
--- a/net-dns/rbldnsd/Manifest
+++ b/net-dns/rbldnsd/Manifest
@@ -1,2 +1 @@
-DIST rbldnsd-0.998.tar.gz 145363 BLAKE2B e698f5b99ed1deae1aedda1952c19eb6189cbdcc71ecfa043faada966d30eee93e158dfeb059603dc493a665a7c56c84ff6ee636fc9eec7de38eb0bc73ed26db SHA512 7b6fb106f8188b2ce6e05b622cf90a393a4642f00faa5bddc184ce02dbd2beee9d8de22cb09ae53a25c475f28f99d13fbf6252f0d4c1d72bf47ba23f769e7074
 DIST rbldnsd-0.998b.tar.gz 154022 BLAKE2B f0bf03bef69853d45c3546c6fd3e58ffb95e76192ecb64f71f6799c6041749b1d117bed2bb21edbf1dec81d1684334b3af7d60b35d49089efb3a5e28752be6db SHA512 9b9c8694824a99b4ad120a22dbe4b05351867434e43ed0d8137990d3ece90ed67349965b6ed0450066d6663c1858545774c733b0d7afff304095de500ba30175

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch
deleted file mode 100644
index 03da010336e..00000000000
--- a/net-dns/rbldnsd/files/rbldnsd-0.997a-format-security-compile-fix.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5d3455065f84fe1ef4673552a27d2e6e8f02c97a Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Mon, 22 Sep 2014 10:09:27 -0400
-Subject: [PATCH 1/1] Fix compilation with -Werror=format-security.
-
-The dslog() function takes an optional format string, analogous to
-e.g. printf(), and a list of arguments to be substituted into the
-format string. A call to dslog() in do_reload() omitted the format
-string causing GCC to throw a format-security warning. To silence the
-warning, a trivial format string of "%s" was provided.
----
- rbldnsd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rbldnsd.c b/rbldnsd.c
-index abf1d01..e791231 100644
---- a/rbldnsd.c
-+++ b/rbldnsd.c
-@@ -959,7 +959,7 @@ static int do_reload(int do_fork) {
- # undef kb
-   }
- #endif /* NO_MEMINFO */
--  dslog(LOG_INFO, 0, ibuf);
-+  dslog(LOG_INFO, 0, "%s", ibuf);
- 
-   check_expires();
- 
--- 
-1.8.5.5
-

diff --git a/net-dns/rbldnsd/rbldnsd-0.998.ebuild b/net-dns/rbldnsd/rbldnsd-0.998.ebuild
deleted file mode 100644
index e6463eb22ef..00000000000
--- a/net-dns/rbldnsd/rbldnsd-0.998.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils toolchain-funcs user python-any-r1
-
-DESCRIPTION="DNS server designed to serve blacklist zones"
-HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html"
-SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~sparc x86"
-IUSE="ipv6 test zlib"
-
-RDEPEND="zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
-	test? (
-		${PYTHON_DEPS}
-		$(python_gen_any_dep 'dev-python/pydns:2[${PYTHON_USEDEP}]')
-	)"
-
-src_prepare() {
-	epatch "${FILESDIR}/rbldnsd-0.997a-robust-ipv6-test-support.patch"
-	epatch "${FILESDIR}/rbldnsd-0.997a-format-security-compile-fix.patch"
-}
-
-src_configure() {
-	# The ./configure file is handwritten and doesn't support a `make
-	# install` target, so there are no --prefix options. The econf
-	# function appends those automatically, so we can't use it.
-	./configure \
-		$(use_enable ipv6) \
-		$(use_enable zlib) \
-		|| die "./configure failed"
-}
-
-src_compile() {
-	emake \
-		AR="$(tc-getAR)" \
-		CC="$(tc-getCC)" \
-		RANLIB="$(tc-getRANLIB)"
-}
-
-src_test() {
-	emake check \
-		CC="$(tc-getCC)" \
-		PYTHON="${PYTHON}"
-}
-
-src_install() {
-	dosbin rbldnsd
-	doman rbldnsd.8
-	keepdir /var/db/rbldnsd
-	dodoc CHANGES* TODO NEWS README*
-	newinitd "${FILESDIR}"/initd-0.997a rbldnsd
-	newconfd "${FILESDIR}"/confd-0.997a rbldnsd
-}
-
-pkg_postinst() {
-	enewgroup rbldns
-	enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
-	chown rbldns:rbldns /var/db/rbldnsd
-}


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

* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/files/, net-dns/rbldnsd/
@ 2020-05-02 11:17 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2020-05-02 11:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d17b37ba9ddaa5fd66bb2e93adeed13b74418e04
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat May  2 11:15:18 2020 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat May  2 11:15:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d17b37ba

net-dns/rbldnsd: prune the version with the python-2.7 test suite.

Closes: https://bugs.gentoo.org/715180
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../rbldnsd-0.997a-robust-ipv6-test-support.patch  | 329 ---------------------
 net-dns/rbldnsd/rbldnsd-0.998b.ebuild              |  68 -----
 2 files changed, 397 deletions(-)

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch b/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch
deleted file mode 100644
index e1ac1535dc9..00000000000
--- a/net-dns/rbldnsd/files/rbldnsd-0.997a-robust-ipv6-test-support.patch
+++ /dev/null
@@ -1,329 +0,0 @@
-diff --git a/NEWS b/NEWS
-index 8d8bdd9..4d8c01d 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,6 +1,19 @@
- This file describes user-visible changes in rbldnsd.
- Newer news is at the top.
- 
-+Next release
-+
-+ - fix tests for systems without ipv6 support, or when ipv6 is
-+   disabled in rbldnsd at compile-time
-+
-+ - fix tests for API change in pydns >= 2.3.6
-+
-+ - It is no longer an error to request binding to a particular
-+   address/port more than once. (The subsequent requests are simply
-+   ignored.) (This avoids confusion on certain systems/configurations
-+   where gethostbyname("localhost") can return 127.0.0.1 multiple
-+   times.)
-+
- 0.997a (23 Jul 2013)
- 
-  - minor fixes/changes in packaging, no code changes.
-diff --git a/rbldnsd.c b/rbldnsd.c
-index abf1d01..8322bdd 100644
---- a/rbldnsd.c
-+++ b/rbldnsd.c
-@@ -203,10 +203,79 @@ static volatile int signalled;
- #define SIGNALLED_ZSTATS	0x10
- #define SIGNALLED_TERM		0x20
- 
-+static inline int sockaddr_in_equal(const struct sockaddr_in *addr1,
-+                                    const struct sockaddr_in *addr2)
-+{
-+  return (addr1->sin_port == addr2->sin_port
-+          && addr1->sin_addr.s_addr == addr2->sin_addr.s_addr);
-+}
-+
-+#ifndef NO_IPv6
-+static inline int sockaddr_in6_equal(const struct sockaddr_in6 *addr1,
-+                                     const struct sockaddr_in6 *addr2)
-+{
-+  if (memcmp(addr1->sin6_addr.s6_addr, addr2->sin6_addr.s6_addr, 16) != 0)
-+    return 0;
-+  return (addr1->sin6_port == addr2->sin6_port
-+          && addr1->sin6_flowinfo == addr2->sin6_flowinfo
-+          && addr1->sin6_scope_id == addr2->sin6_scope_id);
-+}
-+#endif
-+
-+static inline int sockaddr_equal(const struct sockaddr *addr1,
-+                                 const struct sockaddr *addr2)
-+{
-+  if (addr1->sa_family != addr2->sa_family)
-+    return 0;
-+  switch (addr1->sa_family) {
-+  case AF_INET:
-+    return sockaddr_in_equal((const struct sockaddr_in *)addr1,
-+                             (const struct sockaddr_in *)addr2);
-+#ifndef NO_IPv6
-+    return sockaddr_in6_equal((const struct sockaddr_in6 *)addr1,
-+                              (const struct sockaddr_in6 *)addr2);
-+#endif
-+    default:
-+      error(0, "unknown address family (%d)", addr1->sa_family);
-+  }
-+}
-+
-+/* already_bound(addr, addrlen)
-+ *
-+ * Determine whether we've already bound to a particular address.
-+ * This is here mostly to deal with the fact that on certain systems,
-+ * gethostbyname()/getaddrinfo() can return a duplicate 127.0.0.1
-+ * for 'localhost'.  See
-+ *   - https://sourceware.org/bugzilla/show_bug.cgi?id=4980
-+ *   - https://bugzilla.redhat.com/show_bug.cgi?id=496300
-+ */
-+static int already_bound(const struct sockaddr *addr, socklen_t addrlen) {
-+#ifdef NO_IPv6
-+  struct sockaddr_in addr_buf;
-+#else
-+  struct sockaddr_in6 addr_buf;
-+#endif
-+  struct sockaddr *boundaddr = (struct sockaddr *)&addr_buf;
-+  socklen_t buflen;
-+  int i;
-+
-+  for (i = 0; i < numsock; i++) {
-+    buflen = sizeof(addr_buf);
-+    if (getsockname(sock[i], boundaddr, &buflen) < 0)
-+      error(errno, "getsockname failed");
-+    if (buflen == addrlen && sockaddr_equal(boundaddr, addr))
-+      return 1;
-+  }
-+  return 0;
-+}
-+
- #ifdef NO_IPv6
- static void newsocket(struct sockaddr_in *sin) {
-   int fd;
-   const char *host = ip4atos(ntohl(sin->sin_addr.s_addr));
-+
-+  if (already_bound((struct sockaddr *)sin, sizeof(*sin)))
-+    return;
-   if (numsock >= MAXSOCK)
-     error(0, "too many listening sockets (%d max)", MAXSOCK);
-   fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-@@ -223,6 +292,8 @@ static int newsocket(struct addrinfo *ai) {
-   int fd;
-   char host[NI_MAXHOST], serv[NI_MAXSERV];
- 
-+  if (already_bound(ai->ai_addr, ai->ai_addrlen))
-+    return 1;
-   if (numsock >= MAXSOCK)
-     error(0, "too many listening sockets (%d max)", MAXSOCK);
-   fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-diff --git a/rbldnsd.py b/rbldnsd.py
-index 9300ef2..4b78dee 100644
---- a/rbldnsd.py
-+++ b/rbldnsd.py
-@@ -2,6 +2,7 @@
- 
- 
- """
-+import errno
- from itertools import count
- import subprocess
- from tempfile import NamedTemporaryFile, TemporaryFile
-@@ -12,6 +13,14 @@ try:
-     import DNS
- except ImportError:
-     raise RuntimeError("The pydns library is not installed")
-+try:
-+    from DNS import SocketError as DNS_SocketError
-+except ImportError:
-+    class DNS_SocketError(Exception):
-+        """ Dummy, never raised.
-+
-+        (Older versions of pydns before 2.3.6 do not raise SocketError.)
-+        """
- 
- DUMMY_ZONE_HEADER = """
- $SOA 0 example.org. hostmaster.example.com. 0 1h 1h 2d 1h
-@@ -113,7 +122,6 @@ class Rbldnsd(object):
-                                                  stderr=self.stderr)
- 
-         # wait for rbldnsd to start responding
--        time.sleep(0.1)
-         for retry in count():
-             if daemon.poll() is not None:
-                 raise DaemonError(
-@@ -124,12 +132,18 @@ class Rbldnsd(object):
-                 break
-             except QueryRefused:
-                 break
-+            except DNS_SocketError as ex:
-+                # pydns >= 2.3.6
-+                wrapped_error = ex.args[0]
-+                if wrapped_error.errno != errno.ECONNREFUSED:
-+                    raise
-             except DNS.DNSError as ex:
-+                # pydns < 2.3.6
-                 if str(ex) != 'no working nameservers found':
-                     raise
--                elif retries > 10:
--                    raise DaemonError(
--                        "rbldnsd does not seem to be responding")
-+            if retry > 10:
-+                raise DaemonError("rbldnsd does not seem to be responding")
-+            time.sleep(0.1)
- 
-     def _stop_daemon(self):
-         daemon = self._daemon
-@@ -150,6 +164,22 @@ class Rbldnsd(object):
-             raise DaemonError("rbldnsd exited with code %d"
-                               % daemon.returncode)
- 
-+    @property
-+    def no_ipv6(self):
-+        """ Was rbldnsd compiled with -DNO_IPv6?
-+        """
-+        # If rbldnsd was compiled with -DNO_IPv6, the (therefore
-+        # unsupported) '-6' command-line switch will not be described
-+        # in the help message
-+        cmd = [self.daemon_bin, '-h']
-+        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-+        help_message = proc.stdout.readlines()
-+        if proc.wait() != 0:
-+            raise subprocess.CalledProcessError(proc.returncode, cmd)
-+        return not any(line.lstrip().startswith('-6 ')
-+                       for line in help_message)
-+
-+
- class TestRbldnsd(unittest.TestCase):
-     def test(self):
-         rbldnsd = Rbldnsd()
-diff --git a/test_acl.py b/test_acl.py
-index d93ca0a..10bed1c 100644
---- a/test_acl.py
-+++ b/test_acl.py
-@@ -1,5 +1,8 @@
- """ Tests for the acl dataset
- """
-+from functools import wraps
-+import socket
-+import sys
- from tempfile import NamedTemporaryFile
- import unittest
- 
-@@ -9,6 +12,35 @@ __all__ = [
-     'TestAclDataset',
-     ]
- 
-+try:
-+    from unittest import skipIf
-+except ImportError:
-+    # hokey replacement (for python <= 2.6)
-+    def skipIf(condition, reason):
-+        if condition:
-+            def decorate(f):
-+                @wraps(f)
-+                def skipped(*args, **kw):
-+                    sys.stderr.write("skipped test: %s " % reason)
-+                return skipped
-+            return decorate
-+        else:
-+            return lambda f: f
-+
-+def _have_ipv6():
-+    # Check for IPv6 support
-+    if not getattr(socket, 'has_ipv6', False):
-+        return False                    # no python support for ipv6
-+    elif Rbldnsd().no_ipv6:
-+        return False                    # rbldnsd compiled with -DNO_IPv6
-+    try:
-+        socket.socket(socket.AF_INET6, socket.SOCK_DGRAM).close()
-+    except socket.error:
-+        return False                    # no kernel (or libc) support for ipv6?
-+    return True
-+
-+no_ipv6 = not _have_ipv6()
-+
- def daemon(acl, addr='localhost'):
-     """ Create an Rbldnsd instance with given ACL
-     """
-@@ -33,11 +65,13 @@ class TestAclDataset(unittest.TestCase):
-                     addr='127.0.0.1') as dnsd:
-             self.assertEqual(dnsd.query('test.example.com'), 'Success')
- 
-+    @skipIf(no_ipv6, "IPv6 unsupported")
-     def test_refuse_ipv6(self):
-         with daemon(acl=["::1 :refuse"],
-                     addr='::1') as dnsd:
-             self.assertRaises(QueryRefused, dnsd.query, 'test.example.com')
- 
-+    @skipIf(no_ipv6, "IPv6 unsupported")
-     def test_pass_ipv6(self):
-         with daemon(acl=[ "0/0 :refuse",
-                           "0::1 :pass" ],
-diff --git a/test_ip4trie.py b/test_ip4trie.py
-index fe9e78f..2cce09b 100644
---- a/test_ip4trie.py
-+++ b/test_ip4trie.py
-@@ -9,7 +9,7 @@ __all__ = [
-     ]
- 
- def ip4trie(zone_data):
--    """ Run rbldnsd with an ip6trie dataset
-+    """ Run rbldnsd with an ip4trie dataset
-     """
-     dnsd = Rbldnsd()
-     dnsd.add_dataset('ip4trie', ZoneFile(zone_data))
-diff --git a/test_ip6trie.py b/test_ip6trie.py
-index d3600db..377c5dd 100644
---- a/test_ip6trie.py
-+++ b/test_ip6trie.py
-@@ -15,15 +15,6 @@ def ip6trie(zone_data):
-     dnsd.add_dataset('ip6trie', ZoneFile(zone_data))
-     return dnsd
- 
--def rfc3152(ip6addr, domain='example.com'):
--    from socket import inet_pton, AF_INET6
--    from struct import unpack
--
--    bytes = unpack("16B", inet_pton(AF_INET6, ip6addr))
--    nibbles = '.'.join("%x.%x" % (byte & 0xf, (byte >> 4) & 0xf)
--                       for byte in reversed(bytes))
--    return "%s.%s" % (nibbles, domain)
--
- class TestIp6TrieDataset(unittest.TestCase):
-     def test_exclusion(self):
-         with ip6trie(["dead::/16 listed",
-@@ -31,5 +22,35 @@ class TestIp6TrieDataset(unittest.TestCase):
-             self.assertEqual(dnsd.query(rfc3152("dead::beef")), None)
-             self.assertEqual(dnsd.query(rfc3152("dead::beee")), "listed")
- 
-+
-+def rfc3152(ip6addr, domain='example.com'):
-+    return "%s.%s" % ('.'.join(reversed(_to_nibbles(ip6addr))), domain)
-+
-+def _to_nibbles(ip6addr):
-+    """ Convert ip6 address (in rfc4291 notation) to a sequence of nibbles
-+
-+    NB: We avoid the use of socket.inet_pton(AF_INET6, ip6addr) here
-+    because it fails (with 'error: can't use AF_INET6, IPv6 is
-+    disabled') when python has been compiled without IPv6 support. See
-+    http://www.corpit.ru/pipermail/rbldnsd/2013q3/001181.html
-+
-+    """
-+    def _split_words(addr):
-+        return [ int(w, 16) for w in addr.split(':') ] if addr else []
-+
-+    if '::' in ip6addr:
-+        head, tail = [ _split_words(s) for s in ip6addr.split('::', 1) ]
-+        nzeros = 8 - len(head) - len(tail)
-+        assert nzeros >= 0
-+        words = head + [ 0 ] * nzeros + tail
-+    else:
-+        words = _split_words(ip6addr)
-+
-+    assert len(words) == 8
-+    for word in words:
-+        assert 0 <= word <= 0xffff
-+
-+    return ''.join("%04x" % word for word in words)
-+
- if __name__ == '__main__':
-     unittest.main()

diff --git a/net-dns/rbldnsd/rbldnsd-0.998b.ebuild b/net-dns/rbldnsd/rbldnsd-0.998b.ebuild
deleted file mode 100644
index 9fb92e9d2ad..00000000000
--- a/net-dns/rbldnsd/rbldnsd-0.998b.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python2_7 )
-
-inherit toolchain-funcs user python-any-r1
-
-DESCRIPTION="DNS server designed to serve blacklist zones"
-HOMEPAGE="https://rbldnsd.io/"
-SRC_URI="https://github.com/spamhaus/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 hppa ~sparc x86"
-IUSE="ipv6 test zlib"
-RESTRICT="!test? ( test )"
-
-RDEPEND="zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	test? (
-		${RDEPEND}
-		${PYTHON_DEPS}
-		$(python_gen_any_dep 'dev-python/pydns:2[${PYTHON_USEDEP}]')
-	)"
-
-PATCHES=(
-	"${FILESDIR}/rbldnsd-0.997a-robust-ipv6-test-support.patch"
-)
-
-src_configure() {
-	# The ./configure file is handwritten and doesn't support a `make
-	# install` target, so there are no --prefix options. The econf
-	# function appends those automatically, so we can't use it.
-	./configure \
-		$(use_enable ipv6) \
-		$(use_enable zlib) \
-		|| die "./configure failed"
-}
-
-src_compile() {
-	emake \
-		AR="$(tc-getAR)" \
-		CC="$(tc-getCC)" \
-		RANLIB="$(tc-getRANLIB)"
-}
-
-src_test() {
-	emake check \
-		CC="$(tc-getCC)" \
-		PYTHON="${PYTHON}"
-}
-
-src_install() {
-	einstalldocs
-	dosbin rbldnsd
-	doman rbldnsd.8
-	keepdir /var/db/rbldnsd
-	newinitd "${FILESDIR}"/initd-0.997a rbldnsd
-	newconfd "${FILESDIR}"/confd-0.997a rbldnsd
-}
-
-pkg_preinst() {
-	enewgroup rbldns
-	enewuser rbldns -1 -1 -1 rbldns
-	fowners rbldns:rbldns /var/db/rbldnsd
-}


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

* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/files/, net-dns/rbldnsd/
@ 2024-02-16 12:48 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2024-02-16 12:48 UTC (permalink / raw
  To: gentoo-commits

commit:     2beb33a4103e9767c7864a773456e1e04a63e67b
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 12:28:31 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 12:48:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2beb33a4

net-dns/rbldnsd: update EAPI 7 -> 8, add upstream PR patches

I've got three PRs sitting upstream for years now but they've gone
AWOL. I'm tired of looking at the bugs. Let's just patch.

Closes: https://bugs.gentoo.org/874456
Closes: https://bugs.gentoo.org/924368
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 net-dns/rbldnsd/files/rbldnsd-0.998b-cstd.patch    | 193 +++++++++++++++++++++
 .../rbldnsd/files/rbldnsd-0.998b-mallinfo2.patch   |  59 +++++++
 .../rbldnsd/files/rbldnsd-0.998b-sys-poll.patch    |  54 ++++++
 net-dns/rbldnsd/rbldnsd-0.998b-r3.ebuild           |  61 +++++++
 4 files changed, 367 insertions(+)

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998b-cstd.patch b/net-dns/rbldnsd/files/rbldnsd-0.998b-cstd.patch
new file mode 100644
index 000000000000..e5e17e334b05
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998b-cstd.patch
@@ -0,0 +1,193 @@
+From c1f9d0a5d112d2298ed4f3c696ea34c9b0c24ba6 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 16 Feb 2024 07:43:54 -0500
+Subject: [PATCH 1/1] configure{,.lib},rbldnsd_util.c: future proof the
+ ./configure script
+
+https://github.com/spamhaus/rbldnsd/pull/28
+---
+ configure      | 38 ++++++++++++++++++++++----------------
+ configure.lib  |  2 +-
+ rbldnsd_util.c |  4 ++--
+ 3 files changed, 25 insertions(+), 19 deletions(-)
+
+diff --git a/configure b/configure
+index b0cb655..6470c9e 100755
+--- a/configure
++++ b/configure
+@@ -90,7 +90,7 @@ else
+   if ac_yesno "sizes of standard integer types" \
+      ac_compile_run <<EOF
+ #include <stdio.h>
+-int main() {
++int main(int argc, char **argv) {
+   printf("#define SIZEOF_SHORT %d\n", sizeof(short));
+   printf("#define SIZEOF_INT %d\n", sizeof(int));
+   printf("#define SIZEOF_LONG %d\n", sizeof(long));
+@@ -105,7 +105,7 @@ EOF
+   if ac_yesno "for long long" \
+      ac_compile_run <<EOF
+ #include <stdio.h>
+-int main() {
++int main(int argc, char **argv) {
+   long long x;
+   printf("#define SIZEOF_LONG_LONG %d\n", sizeof(long long));
+   return 0;
+@@ -120,7 +120,7 @@ fi
+ 
+ if ac_compile_run_v "whether C compiler defines __SIZEOF_POINTER__" <<EOF
+ #include <stdio.h>
+-int main() {
++int main(int argc, char **argv) {
+ #ifdef __SIZEOF_POINTER__
+   return 0;
+ #else
+@@ -136,7 +136,7 @@ fi
+ 
+ if ac_verbose "byte order" "big-endian" "little-endian" \
+    ac_compile_run <<EOF
+-int main() {
++int main(int argc, char **argv) {
+   long one = 1;
+   if (*(char *)&one)
+     return 1; /* little-endian */
+@@ -150,8 +150,8 @@ fi
+ has_inline=
+ for c in inline __inline; do
+   if ac_compile_v "for $c" <<EOF
+-static $c int foo() { return 0; }
+-int main() { return foo(); }
++static $c int foo(void) { return 0; }
++int main(int argc, char **argv) { return foo(); }
+ EOF
+   then
+     has_inline=$c
+@@ -165,7 +165,7 @@ fi
+ if ac_compile_v "for socklen_t" <<EOF
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-int foo() { socklen_t len; len = 0; return len; }
++int foo(void) { socklen_t len; len = 0; return len; }
+ EOF
+ then :
+ else
+@@ -173,7 +173,13 @@ else
+ fi
+ 
+ if ac_library_find_v 'connect()' "" "-lsocket -lnsl" <<EOF
+-int main() { gethostbyname(); connect(); return 0; }
++#include <netdb.h>
++#include <sys/socket.h>
++int main(int argc, char **argv) {
++  gethostbyname("");
++  connect(0, (const struct sockaddr *)0, (socklen_t)0);
++  return 0;
++}
+ EOF
+ then :
+ else
+@@ -189,7 +195,7 @@ if ac_link_v "for IPv6" <<EOF
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+-int main() {
++int main(int argc, char **argv) {
+   char h[200];
+   char s[200];
+   struct sockaddr_in6 sa;
+@@ -211,7 +217,7 @@ if ac_link_v "for mallinfo()" <<EOF
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <malloc.h>
+-int main() {
++int main(int argc, char **argv) {
+   struct mallinfo mi = mallinfo();
+   return 0;
+ }
+@@ -224,7 +230,7 @@ fi
+ if ac_link_v "for poll()" <<EOF
+ #include <sys/types.h>
+ #include <sys/poll.h>
+-int main() {
++int main(int argc, char **argv) {
+   struct pollfd pfd[2];
+   return poll(pfd, 2, 10);
+ }
+@@ -251,7 +257,7 @@ int test(char *fmt, ...) {
+   vsnprintf(buf, sizeof(buf), fmt, ap);
+   return 0;
+ }
+-int main() {
++int main(int argc, char **argv) {
+   test("test%d", 40);
+   return 0;
+ }
+@@ -265,7 +271,7 @@ if ac_link_v "for writev()/readv()" <<EOF
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <sys/uio.h>
+-int main() {
++int main(int argc, char **argv) {
+   struct iovec iov;
+   return writev(1, &iov, 1) && readv(1, &iov, 1);
+ }
+@@ -278,7 +284,7 @@ fi
+ if ac_link_v "for setitimer()" <<EOF
+ #include <sys/types.h>
+ #include <sys/time.h>
+-int main() {
++int main(int argc, char **argv) {
+   struct itimerval itv;
+   itv.it_interval.tv_sec  = itv.it_value.tv_sec  = 10;
+   itv.it_interval.tv_usec = itv.it_value.tv_usec = 20;
+@@ -296,7 +302,7 @@ elif ac_link_v "for zlib support" -lz <<EOF
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <zlib.h>
+-int main() {
++int main(int argc, char **argv) {
+   z_stream z;
+   int r;
+   r = inflateInit2(&z, 0);
+@@ -319,7 +325,7 @@ elif [ n = "$enable_dso" ]; then
+   echo "#define NO_DSO		1	/* option disabled */" >>confdef.h
+ elif ac_link_v "for dlopen() in -dl with -rdynamic" -ldl -rdynamic <<EOF
+ #include <dlfcn.h>
+-int main() {
++int main(int argc, char **argv) {
+   void *handle, *func;
+   handle = dlopen("testfile", RTLD_NOW);
+   func = dlsym(handle, "function");
+diff --git a/configure.lib b/configure.lib
+index 39cf423..6b7245f 100644
+--- a/configure.lib
++++ b/configure.lib
+@@ -178,7 +178,7 @@ EOF
+   if ac_yesno "whether the C compiler ($ccld)
+            can produce executables" \
+      ac_compile_run <<EOF
+-int main() { return 0; }
++int main(int argc, char **argv) { return 0; }
+ EOF
+   then :
+   else
+diff --git a/rbldnsd_util.c b/rbldnsd_util.c
+index c6d628d..1402a67 100644
+--- a/rbldnsd_util.c
++++ b/rbldnsd_util.c
+@@ -50,10 +50,10 @@ char *parse_time(char *s, unsigned *tp) {
+     case 'w': case 'W': m *= 7;		/* week */
+     case 'd': case 'D': m *= 24;	/* day */
+     case 'h': case 'H': m *= 60;	/* hours */
+-    case 'm': case 'M': m *= 60;	/* minues */
++    case 'm': case 'M': m *= 60;	/* minutes */
+       if (0xffffffffu / m < *tp) return NULL;
+       *tp *= m;
+-    case 's': case 'S':			/* secounds */
++    case 's': case 'S':			/* seconds */
+       ++s;
+       break;
+   }
+-- 
+2.43.0
+

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998b-mallinfo2.patch b/net-dns/rbldnsd/files/rbldnsd-0.998b-mallinfo2.patch
new file mode 100644
index 000000000000..8ce5cb11afa6
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998b-mallinfo2.patch
@@ -0,0 +1,59 @@
+From 43e23bf396751cf92252cfef031d4cab2a2fe792 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 16 Feb 2024 07:38:20 -0500
+Subject: [PATCH 2/2] configure,rbldnsd.c: replace mallinfo() with mallinfo2()
+
+The mallinfo() function from malloc.h is deprecated, and has been
+replaced by mallinfo2(). Additionally, the "mallinfo" struct that it
+returns has been replaced by a "mallinfo2" struct. The only difference
+between the two is that the newer struct contains members of type
+size_t rather than int, which proved to be too small (leading to
+overflows).
+
+The call to ssprintf() that prints this information has been updated
+to use the "z" length modifier, which is C99, but which is probably
+safe by now. Other C99 features are already being used by rbldnsd.
+---
+ configure | 4 ++--
+ rbldnsd.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index 5686b0a..42fcf9a 100755
+--- a/configure
++++ b/configure
+@@ -213,12 +213,12 @@ else
+ fi
+ fi # enable_ipv6?
+ 
+-if ac_link_v "for mallinfo()" <<EOF
++if ac_link_v "for mallinfo2()" <<EOF
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <malloc.h>
+ int main(int argc, char **argv) {
+-  struct mallinfo mi = mallinfo();
++  struct mallinfo2 mi = mallinfo2();
+   return 0;
+ }
+ EOF
+diff --git a/rbldnsd.c b/rbldnsd.c
+index 8ea25a2..d0cb43e 100644
+--- a/rbldnsd.c
++++ b/rbldnsd.c
+@@ -951,10 +951,10 @@ static int do_reload(int do_fork) {
+ #endif /* NO_TIMES */
+ #ifndef NO_MEMINFO
+   {
+-    struct mallinfo mi = mallinfo();
++    struct mallinfo2 mi = mallinfo2();
+ # define kb(x) ((mi.x + 512)>>10)
+     ip += ssprintf(ibuf + ip, sizeof(ibuf) - ip,
+-          ", mem arena=%d free=%d mmap=%d Kb",
++          ", mem arena=%zd free=%zd mmap=%zd Kb",
+           kb(arena), kb(fordblks), kb(hblkhd));
+ # undef kb
+   }
+-- 
+2.43.0
+

diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998b-sys-poll.patch b/net-dns/rbldnsd/files/rbldnsd-0.998b-sys-poll.patch
new file mode 100644
index 000000000000..ccf53d7e8072
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998b-sys-poll.patch
@@ -0,0 +1,54 @@
+From 9a4eeaec16ebd7e5a493fe0a10c371b60ecf813c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 16 Feb 2024 07:36:24 -0500
+Subject: [PATCH 1/2] configure,rbldnsd.c: include <poll.h> instead of
+ <sys/poll.h>
+
+As far back as 1997, the Single UNIX Specification (that later became
+POSIX) has said that <poll.h> is the file that provides poll() and
+friends:
+
+  https://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.h.html
+
+Most implementations also support the old <sys/poll.h>, but musl, for
+example, raises a warning about its usage:
+
+  https://git.musl-libc.org/cgit/musl/tree/include/sys/poll.h
+
+This commit updates <sys/poll.h> to <poll.h> in two places.
+
+Closes: https://github.com/spamhaus/rbldnsd/issues/25
+---
+ configure | 2 +-
+ rbldnsd.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 6470c9e..5686b0a 100755
+--- a/configure
++++ b/configure
+@@ -229,7 +229,7 @@ fi
+ 
+ if ac_link_v "for poll()" <<EOF
+ #include <sys/types.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ int main(int argc, char **argv) {
+   struct pollfd pfd[2];
+   return poll(pfd, 2, 10);
+diff --git a/rbldnsd.c b/rbldnsd.c
+index e791231..8ea25a2 100644
+--- a/rbldnsd.c
++++ b/rbldnsd.c
+@@ -27,7 +27,7 @@
+ # include <sys/select.h>
+ #endif
+ #ifndef NO_POLL
+-# include <sys/poll.h>
++# include <poll.h>
+ #endif
+ #ifndef NO_MEMINFO
+ # include <malloc.h>
+-- 
+2.43.0
+

diff --git a/net-dns/rbldnsd/rbldnsd-0.998b-r3.ebuild b/net-dns/rbldnsd/rbldnsd-0.998b-r3.ebuild
new file mode 100644
index 000000000000..cf702d80d5e1
--- /dev/null
+++ b/net-dns/rbldnsd/rbldnsd-0.998b-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="DNS server designed to serve blacklist zones"
+HOMEPAGE="https://rbldnsd.io/"
+SRC_URI="https://github.com/spamhaus/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86"
+IUSE="ipv6 zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	acct-group/rbldns
+	acct-user/rbldns
+"
+
+# The test suite was dropped from the ebuild because it requires
+# python-2.7, and it will crash if you try to run it now.
+RESTRICT=test
+
+PATCHES=(
+	"${FILESDIR}/rbldnsd-0.998b-cstd.patch"
+	"${FILESDIR}/rbldnsd-0.998b-sys-poll.patch"
+	"${FILESDIR}/rbldnsd-0.998b-mallinfo2.patch"
+)
+
+src_configure() {
+	# The ./configure file is handwritten and doesn't support a `make
+	# install` target, so there are no --prefix options. The econf
+	# function appends those automatically, so we can't use it. We
+	# Have to set $CC here, too (and not just in the call to emake),
+	# because the ./configure script checks for it.
+	CC="$(tc-getCC)" ./configure \
+		$(use_enable ipv6) \
+		$(use_enable zlib) \
+		|| die "./configure failed"
+}
+
+src_compile() {
+	emake \
+		AR="$(tc-getAR)" \
+		CC="$(tc-getCC)" \
+		RANLIB="$(tc-getRANLIB)"
+}
+
+src_install() {
+	einstalldocs
+	dosbin rbldnsd
+	doman rbldnsd.8
+	newinitd "${FILESDIR}"/initd-0.997a rbldnsd
+	newconfd "${FILESDIR}"/confd-0.997a rbldnsd
+	diropts -g rbldns -o rbldns -m 0750
+	keepdir /var/db/rbldnsd
+}


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

end of thread, other threads:[~2024-02-16 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 12:48 [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/files/, net-dns/rbldnsd/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2020-05-02 11:17 Michael Orlitzky
2019-11-29 20:49 Michael Orlitzky
2015-09-27 13:20 Michael Orlitzky

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