diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-01-08 11:36:55 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-01-08 11:37:12 -0500 |
commit | 18123eb68a785b48a82fe451894933b16f02533b (patch) | |
tree | 67c0034aaab29fe6d4f09b1495302b8fb9299850 /net-dns | |
parent | net-dns/rbldnsd: add upstream metadata. (diff) | |
download | gentoo-18123eb68a785b48a82fe451894933b16f02533b.tar.gz gentoo-18123eb68a785b48a82fe451894933b16f02533b.tar.bz2 gentoo-18123eb68a785b48a82fe451894933b16f02533b.zip |
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
Diffstat (limited to 'net-dns')
-rw-r--r-- | net-dns/rbldnsd/files/rbldnsd-0.998-fix-huge-zone-OOM.patch | 60 | ||||
-rw-r--r-- | net-dns/rbldnsd/rbldnsd-0.998-r2.ebuild (renamed from net-dns/rbldnsd/rbldnsd-0.998-r1.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 000000000000..7a4d2da7187f --- /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 index d20b87d363b5..170b373122bd 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() { |