summaryrefslogtreecommitdiff
path: root/net-dns/dnsmasq
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
commit51af5f0eb4cddbe6aa7953717873691d77aae9ff (patch)
tree1541525274162b033ebbc3ed38abaf335fbbd49a /net-dns/dnsmasq
parent7014a5a3ea0feffab9701fdd6b64cc7667a985af (diff)
gentoo resync : 11.07.2019
Diffstat (limited to 'net-dns/dnsmasq')
-rw-r--r--net-dns/dnsmasq/Manifest2
-rw-r--r--net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild213
-rw-r--r--net-dns/dnsmasq/files/dnsmasq-2.80-nettle-3.5.patch42
3 files changed, 257 insertions, 0 deletions
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
index c92185005d21..8fc6a1500bca 100644
--- a/net-dns/dnsmasq/Manifest
+++ b/net-dns/dnsmasq/Manifest
@@ -1,3 +1,4 @@
+AUX dnsmasq-2.80-nettle-3.5.patch 1494 BLAKE2B e65092e18f8fbaa3b0f8be637b18ec976da1a1752b621ce1e1337bdc85e529ccf4bb21988296cae6574e8ff26983c32731656a751631455713afd93c0f7ea41d SHA512 df64088b22f996ff228fce18dd05b329d9fdf7b02290bc3992546004394e662be7bc416dc718ea866341403234eb20efd5bbf1eec96df1cb6ab099ebfd3fdee4
AUX dnsmasq-init-dhcp-r3 721 BLAKE2B 94a7542419e2c931149edbd5a5167c7fcbe0233e48f3ed854dfe26090b596c4f2549e37d2680bfceb1c6d21f475012f81a2102bde85e7cd609979e555dbcfa3d SHA512 f7a64fb84a7877b5ec629f9ed92419799913b8f2f73594c510aedc083d72c5c1862da7e5aed4485102c3b89ca7217bcca88e7cdde82f5a65d4cd4bb19017c2fe
AUX dnsmasq-init-r4 613 BLAKE2B 7ea82e879f8770c3f4b764a9044ef585cc6e91de793c56733a6af1d9e138ca6e55813ad1720a70d0a5a61f6815d094574ae04f9761b2e2846c6267c6a4e97780 SHA512 72ae659a62c61495dc575fa590cbf1352c4bd4f374a6e0a56fce9c641c163b882d8b8097d27605d102e47df49eb68c456baf7b11009a7bb7db98e99429bd80a6
AUX dnsmasq.confd-r1 170 BLAKE2B 84d5cdb15236c9e1c83fa53d0e401df90e86c6687cc88f9ebba3e2a0987cad2ccf9bb82ac7b1fcd77a81fa6058a3cd3276fb8a8a76e13983628e92be95b39af1 SHA512 9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8
@@ -6,5 +7,6 @@ AUX dnsmasq.service-r1 278 BLAKE2B 3bfe6a01efd5f8338c3bb134a061f8ecbef850293c4a8
DIST dnsmasq-2.79.tar.xz 493036 BLAKE2B 91152c52aef06def74151f6fbae9153d25261ba5e6a728cbab503c074967963e40dce39d93a0fbe4c5497c9313ac24d495cc8233934c00d4ab82aefe83b01ccd SHA512 2c06212696ab55e1584f6133872f5b196013509e4b1822d0457787b456e14341afdde887749e370a2e512124cb4138f012f4601b08690707be4acc7cf2f2876f
DIST dnsmasq-2.80.tar.xz 501072 BLAKE2B 39c9808df43a22e32286105c9e001b2f817a4f68b92b84282eeb8cfeaa61404d64275bbb3f944bec6fac1b015987fba6aeab7a88201446c0cff67f02c8d88d8c SHA512 58e56beb553fc41311e5dc16d8b0eb3b6801e2bdfbcd0e7a6659703f08960b6ad10d48b0b14a4d727636faf35483e01597cff2ae49e7fe9fa9e214f437b1c068
EBUILD dnsmasq-2.79.ebuild 4594 BLAKE2B 28cf745cd261bf067114adc98733f5e00a2f6a10a906d4eaf2175c0457d538d7d96b91fe87a87320c3df27a5c64234ed7d5bbee993070964fa421b8e5b12693c SHA512 eb8ac4fdf747657983909b22baa2e0af5f2299d2a5ab4d97933b185e528cddbb1d4cc7ca14c2efddcd8c6f4ec9861f3c37d9fc59c96b68f55c45a274acf7eff7
+EBUILD dnsmasq-2.80-r1.ebuild 4802 BLAKE2B 0266437b06c4d68ba5a1c391bd1120b0d280164bf7206d6627a3987d513d46182520ae83cdeabaaa0cea4fed0ab80586ca46ba8e360ee0f6668c5e56fd476302 SHA512 478ede62af257f88525f61b51d89e60d8ab329ef859c76dbfaf9f9710668862033c9cde4d090c9cf40daf70d6dca5741449cc6738acd22de9fd7c85db0389dcc
EBUILD dnsmasq-2.80.ebuild 4742 BLAKE2B 4844bb2c2fed9d35ee6358bedf86c9fac3feacedc965628b53687bc22ac672f2a5a7eef90f112a0a1446fb99ce79c7233d2178b5bf7773e8fad23dc2a1557f2b SHA512 a278d6e216bde4d31671481eb7d9ec302789854119229c0852a1204b7b059213ca19ed48b99afe75221e39494c358f537d56a6da1e5275ef563844ff4083e49e
MISC metadata.xml 1247 BLAKE2B cdaa193ae5c90b1f833968bafb1e725be1f67d21ee9025552fe2c153d096f2b4b7cd505aabe3713678426bea2a1059de3eeebd58a9d81793520f2690e5bf4851 SHA512 24cd4320dad43122014b0c5ddd5d65a199ef6d0bb378738180e03e4f0410cc1c21ee46b7973bdadca6e6323f3e9c6ce0073a813d4ecfe3e6bac44645dc9970dc
diff --git a/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild b/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
new file mode 100644
index 000000000000..20c55be8ff0c
--- /dev/null
+++ b/net-dns/dnsmasq/dnsmasq-2.80-r1.ebuild
@@ -0,0 +1,213 @@
+# 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
+
+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 +dumpfile id idn libidn2"
+IUSE+=" +inotify ipv6 lua nls script selinux static tftp"
+
+PATCHES=(
+ "${FILESDIR}/${P}-nettle-3.5.patch"
+)
+
+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="dbus? ( sys-apps/dbus:= )
+ idn? (
+ !libidn2? ( net-dns/libidn:0= )
+ libidn2? ( >=net-dns/libidn2-2.0:= )
+ )
+ lua? ( dev-lang/lua:* )
+ 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 )
+ 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)"
+ "$(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 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() {
+ # 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.80-nettle-3.5.patch b/net-dns/dnsmasq/files/dnsmasq-2.80-nettle-3.5.patch
new file mode 100644
index 000000000000..7d77a21de7cb
--- /dev/null
+++ b/net-dns/dnsmasq/files/dnsmasq-2.80-nettle-3.5.patch
@@ -0,0 +1,42 @@
+From 6fd9aba7abe1e084123bc5002959350897774ace Mon Sep 17 00:00:00 2001
+From: Vladislav Grishenko <themiron@mail.ru>
+Date: Wed, 26 Jun 2019 20:27:11 +0500
+Subject: [PATCH] Fix build with libnettle 3.5
+
+---
+ src/crypto.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/crypto.c b/src/crypto.c
+index 1f1c12b..9cfe371 100644
+--- a/src/crypto.c
++++ b/src/crypto.c
+@@ -296,6 +296,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ static struct ecc_point *key_256 = NULL, *key_384 = NULL;
+ static mpz_t x, y;
+ static struct dsa_signature *sig_struct;
++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
++#define nettle_get_secp_256r1() (&nettle_secp_256r1)
++#define nettle_get_secp_384r1() (&nettle_secp_384r1)
++#endif
+
+ if (!sig_struct)
+ {
+@@ -315,7 +319,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
+ }
+
+ key = key_256;
+@@ -328,7 +332,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
+ if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
+ return 0;
+
+- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
+ }
+
+ key = key_384;