* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/, net-dns/rbldnsd/files/
@ 2017-01-08 16:39 Michael Orlitzky
0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2017-01-08 16:39 UTC (permalink / raw
To: gentoo-commits
commit: 18123eb68a785b48a82fe451894933b16f02533b
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 8 16:36:55 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Jan 8 16:37:12 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18123eb6
net-dns/rbldnsd: new revision to fix an out-of-memory error.
This new revision adds a patch that has already been merged (but not
released) by upstream. It should fix an out-of-memory error that
occurs when trying to load a huge zone.
Additionally, upstream had undergone a non-hostile takeover by the
Spamhaus project, so the HOMEPAGE and SRC_URI have been updated.
Gentoo-Bug: 603330
Package-Manager: portage-2.3.0
.../files/rbldnsd-0.998-fix-huge-zone-OOM.patch | 60 ++++++++++++++++++++++
...nsd-0.998-r1.ebuild => rbldnsd-0.998-r2.ebuild} | 7 +--
2 files changed, 64 insertions(+), 3 deletions(-)
diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch b/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch
new file mode 100644
index 00000000..7a4d2da
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch
@@ -0,0 +1,60 @@
+This upstream patch has been merged but not released. I (mjo) dropped
+a change to the NEWS file to prevent a pointless conflict.
+
+From a1295eefc78b6e8a3c220e164dbfad6dbecc6f6e Mon Sep 17 00:00:00 2001
+From: Antonio Mammita <am@spamteq.com>
+Date: Wed, 21 Dec 2016 16:54:06 +0100
+Subject: [PATCH] Fix for out of memory errors on huge zones. Thanks to Andrew
+ Clayton
+
+---
+ rbldnsd.h | 6 +++---
+ rbldnsd_util.c | 6 +++---
+ 3 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/rbldnsd.h b/rbldnsd.h
+index 6acd8a0..f195a30 100644
+--- a/rbldnsd.h
++++ b/rbldnsd.h
+@@ -367,9 +367,9 @@ extern struct dataset *g_dsacl; /* global acl */
+ extern const char *show_version; /* version.bind CH TXT */
+
+ void oom(void);
+-char *emalloc(unsigned size);
+-char *ezalloc(unsigned size); /* zero-fill */
+-char *erealloc(void *ptr, unsigned size);
++char *emalloc(size_t size);
++char *ezalloc(size_t size); /* zero-fill */
++char *erealloc(void *ptr, size_t size);
+ char *estrdup(const char *str);
+ char *ememdup(const void *buf, unsigned size);
+
+diff --git a/rbldnsd_util.c b/rbldnsd_util.c
+index d17b51b..c6d628d 100644
+--- a/rbldnsd_util.c
++++ b/rbldnsd_util.c
+@@ -460,21 +460,21 @@ dump_a_txt(const char *name, const char *rr,
+
+ #endif
+
+-char *emalloc(unsigned size) {
++char *emalloc(size_t size) {
+ void *ptr = malloc(size);
+ if (!ptr)
+ oom();
+ return ptr;
+ }
+
+-char *ezalloc(unsigned size) {
++char *ezalloc(size_t size) {
+ void *ptr = calloc(1, size);
+ if (!ptr)
+ oom();
+ return ptr;
+ }
+
+-char *erealloc(void *ptr, unsigned size) {
++char *erealloc(void *ptr, size_t size) {
+ void *nptr = realloc(ptr, size);
+ if (!nptr)
+ oom();
diff --git a/net-dns/rbldnsd/rbldnsd-0.998-r1.ebuild b/net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild
similarity index 87%
rename from net-dns/rbldnsd/rbldnsd-0.998-r1.ebuild
rename to net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild
index d20b87d..170b373 100644
--- a/net-dns/rbldnsd/rbldnsd-0.998-r1.ebuild
+++ b/net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -8,8 +8,8 @@ PYTHON_COMPAT=( python2_7 )
inherit 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"
+HOMEPAGE="https://rbldnsd.io/"
+SRC_URI="https://github.com/spamhaus/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -26,6 +26,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/rbldnsd-0.997a-robust-ipv6-test-support.patch"
"${FILESDIR}/rbldnsd-0.997a-format-security-compile-fix.patch"
+ "${FILESDIR}/rbldnsd-0.998-fix-huge-zone-OOM.patch"
)
src_configure() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/, net-dns/rbldnsd/files/
@ 2024-10-04 19:41 Michael Orlitzky
0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2024-10-04 19:41 UTC (permalink / raw
To: gentoo-commits
commit: 1b729405ff0956692a8ee7779025723d74bf346a
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 4 19:16:11 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Oct 4 19:41:10 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b729405
net-dns/rbldnsd: new patch to fix a type signature mismatch
Closes: https://bugs.gentoo.org/940703
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
.../files/rbldnsd-0.998b-emalloc-typesig.patch | 34 +++++++++++
net-dns/rbldnsd/rbldnsd-0.998b-r4.ebuild | 68 ++++++++++++++++++++++
2 files changed, 102 insertions(+)
diff --git a/net-dns/rbldnsd/files/rbldnsd-0.998b-emalloc-typesig.patch b/net-dns/rbldnsd/files/rbldnsd-0.998b-emalloc-typesig.patch
new file mode 100644
index 000000000000..9d66f8514890
--- /dev/null
+++ b/net-dns/rbldnsd/files/rbldnsd-0.998b-emalloc-typesig.patch
@@ -0,0 +1,34 @@
+From 5ba62bded7e26a0a6f3877491c7f102b3cf67e5e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 4 Oct 2024 15:02:09 -0400
+Subject: [PATCH] mempool.c: fix type signature of emalloc()
+
+This file declares emalloc() as,
+
+ void *emalloc(unsigned size);
+
+whereas the actual implementation of emalloc in rbldnsd_util.c is,
+
+ char *emalloc(size_t size);
+
+The mismatch can cause problems for link-time optimization; in
+particular it causes a warning to be raised -Wlto-type-mismatch.
+On Gentoo, for example, we encourage users of LTO to build with
+that warning enabled and promoted to an error.
+---
+ mempool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mempool.c b/mempool.c
+index 2abbf3a..dd0d733 100644
+--- a/mempool.c
++++ b/mempool.c
+@@ -18,7 +18,7 @@
+ #define alignto sizeof(void*)
+ #define alignmask (alignto-1)
+
+-void *emalloc(unsigned size);
++char *emalloc(size_t size);
+
+ #define MEMPOOL_CHUNKSIZE (65536-sizeof(unsigned)*4)
+
diff --git a/net-dns/rbldnsd/rbldnsd-0.998b-r4.ebuild b/net-dns/rbldnsd/rbldnsd-0.998b-r4.ebuild
new file mode 100644
index 000000000000..8d32672045f6
--- /dev/null
+++ b/net-dns/rbldnsd/rbldnsd-0.998b-r4.ebuild
@@ -0,0 +1,68 @@
+# 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
+
+# This check properly includes malloc.h; if mallinfo2
+# is "implicitly defined," then it's not there.
+QA_CONFIG_IMPL_DECL_SKIP=(
+ mallinfo2
+)
+
+PATCHES=(
+ "${FILESDIR}/rbldnsd-0.998b-cstd.patch"
+ "${FILESDIR}/rbldnsd-0.998b-sys-poll.patch"
+ "${FILESDIR}/rbldnsd-0.998b-mallinfo2.patch"
+ "${FILESDIR}/rbldnsd-0.998b-emalloc-typesig.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] 2+ messages in thread
end of thread, other threads:[~2024-10-04 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 19:41 [gentoo-commits] repo/gentoo:master commit in: net-dns/rbldnsd/, net-dns/rbldnsd/files/ Michael Orlitzky
-- strict thread matches above, loose matches on Subject: below --
2017-01-08 16:39 Michael Orlitzky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox