From 25e131ac86f3f6ba433a4d0d01b216de8036940d Mon Sep 17 00:00:00 2001 From: Robert Förster Date: Mon, 29 May 2017 13:13:26 +0200 Subject: net-misc/oidentd: bump to EAPI 6, add fedora masquerading patches also adding a dependency on the selinux policy for this package, as well as adding myself as maintainer Closes: https://github.com/gentoo/gentoo/pull/4611 Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- .../files/oidentd-2.0.8-bind-to-ipv6-too.patch | 4 +- .../files/oidentd-2.0.8-log-conntrack-fails.patch | 52 ++++++++++++++++++ .../oidentd-2.0.8-no-conntrack-masquerading.patch | 41 ++++++++++++++ net-misc/oidentd/metadata.xml | 20 ++++--- net-misc/oidentd/oidentd-2.0.8-r5.ebuild | 12 +++-- net-misc/oidentd/oidentd-2.0.8-r6.ebuild | 63 ++++++++++++++++++++++ 6 files changed, 180 insertions(+), 12 deletions(-) create mode 100644 net-misc/oidentd/files/oidentd-2.0.8-log-conntrack-fails.patch create mode 100644 net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch create mode 100644 net-misc/oidentd/oidentd-2.0.8-r6.ebuild (limited to 'net-misc/oidentd') diff --git a/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch b/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch index b3b0e5100337..2652622cdd4f 100644 --- a/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch +++ b/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch @@ -1,7 +1,7 @@ Patch to bind to ipv6 socket as well Patch supplied by Fabian Knittel ---- oidentd-2.0.8//src/oidentd_inet_util.c 2006-05-22 02:31:19.000000000 +0200 -+++ oidentd-2.0.8.new//src/oidentd_inet_util.c 2010-03-01 20:26:11.000000000 +0100 +--- oidentd-2.0.8/src/oidentd_inet_util.c 2006-05-22 02:31:19.000000000 +0200 ++++ oidentd-2.0.8.new/src/oidentd_inet_util.c 2010-03-01 20:26:11.000000000 +0100 @@ -60,6 +60,12 @@ #ifdef WANT_IPV6 case AF_INET6: diff --git a/net-misc/oidentd/files/oidentd-2.0.8-log-conntrack-fails.patch b/net-misc/oidentd/files/oidentd-2.0.8-log-conntrack-fails.patch new file mode 100644 index 000000000000..d29479ec0284 --- /dev/null +++ b/net-misc/oidentd/files/oidentd-2.0.8-log-conntrack-fails.patch @@ -0,0 +1,52 @@ +From 612f1d85dd59fc39b124392df38586769ebc8add Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 11 Mar 2016 10:00:59 +0100 +Subject: [PATCH] Log Linux core_init failures as normal error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Opening Linux conntracking table file failure for different reason than +missing the file is fatal for deamon initizalization. But the failure +was logged inly in debugging build. + +This patch makes the fatal error visible in normal log. + +https://bugzilla.redhat.com/show_bug.cgi?id=1316308 +Signed-off-by: Petr Písař +--- + src/kernel/linux.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/kernel/linux.c b/src/kernel/linux.c +index 8bf265f..9103dbf 100644 +--- a/src/kernel/linux.c ++++ b/src/kernel/linux.c +@@ -73,21 +73,21 @@ bool core_init(void) { + masq_fp = fopen(MASQFILE, "r"); + if (masq_fp == NULL) { + if (errno != ENOENT) { +- debug("fopen: %s: %s", MASQFILE, strerror(errno)); ++ o_log(NORMAL, "fopen: %s: %s", MASQFILE, strerror(errno)); + return false; + } + + masq_fp = fopen(CONNTRACK, "r"); + if (masq_fp == NULL) { + if (errno != ENOENT) { +- debug("fopen: %s: %s", CONNTRACK, strerror(errno)); ++ o_log(NORMAL, "fopen: %s: %s", CONNTRACK, strerror(errno)); + return false; + } + + masq_fp = fopen(NFCONNTRACK, "r"); + if (masq_fp == NULL) { + if (errno != ENOENT) { +- debug("fopen: %s: %s", NFCONNTRACK, strerror(errno)); ++ o_log(NORMAL, "fopen: %s: %s", NFCONNTRACK, strerror(errno)); + return false; + } + masq_fp = fopen("/dev/null", "r"); +-- +2.5.0 + diff --git a/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch b/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch new file mode 100644 index 000000000000..92ef02523160 --- /dev/null +++ b/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch @@ -0,0 +1,41 @@ +From 20a63ad8a90c36397cceedd34887298890dbafa3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 11 Mar 2016 10:38:10 +0100 +Subject: [PATCH] Linux: Do not open conntracking table if masquerading is not + enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The contracking table was always opened. This is unnecessary because +the table is used only when masquerading feature is requested on run +time. + +This patch skips opening the conntracking table on Linux if +masquerading is not requested. + +https://bugzilla.redhat.com/show_bug.cgi?id=1316308 +Signed-off-by: Petr Písař +--- + src/kernel/linux.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/kernel/linux.c b/src/kernel/linux.c +index 9103dbf..859f554 100644 +--- a/src/kernel/linux.c ++++ b/src/kernel/linux.c +@@ -70,6 +70,11 @@ bool netfilter; + */ + bool core_init(void) { + #ifdef MASQ_SUPPORT ++ if (!opt_enabled(MASQ)) { ++ masq_fp = NULL; ++ return true; ++ } ++ + masq_fp = fopen(MASQFILE, "r"); + if (masq_fp == NULL) { + if (errno != ENOENT) { +-- +2.5.0 + diff --git a/net-misc/oidentd/metadata.xml b/net-misc/oidentd/metadata.xml index d2a75a6ff73b..3be9f1f5f13d 100644 --- a/net-misc/oidentd/metadata.xml +++ b/net-misc/oidentd/metadata.xml @@ -1,10 +1,18 @@ - - Enable support for masqueraded/NAT connections - - - ojnk - + + Dessa@gmake.de + Robert Förster + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Enable support for masqueraded/NAT connections + + + ojnk + diff --git a/net-misc/oidentd/oidentd-2.0.8-r5.ebuild b/net-misc/oidentd/oidentd-2.0.8-r5.ebuild index 52eef485cdc2..1a328a04f7ab 100644 --- a/net-misc/oidentd/oidentd-2.0.8-r5.ebuild +++ b/net-misc/oidentd/oidentd-2.0.8-r5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -14,10 +14,14 @@ SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~s390 ~sh sparc x86 ~x86-fbsd" IUSE="debug ipv6 masquerade" +PATCHES=( + "${FILESDIR}/${P}-masquerading.patch" + "${FILESDIR}/${P}-bind-to-ipv6-too.patch" + "${FILESDIR}/${P}-gcc5.patch" +) + src_prepare() { - epatch "${FILESDIR}/${P}-masquerading.patch" \ - "${FILESDIR}/${P}-bind-to-ipv6-too.patch" \ - "${FILESDIR}/${P}-gcc5.patch" + epatch -p1 "${PATCHES[@]}" } src_configure() { diff --git a/net-misc/oidentd/oidentd-2.0.8-r6.ebuild b/net-misc/oidentd/oidentd-2.0.8-r6.ebuild new file mode 100644 index 000000000000..5330a191234e --- /dev/null +++ b/net-misc/oidentd/oidentd-2.0.8-r6.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd + +DESCRIPTION="Another (RFC1413 compliant) ident daemon" +HOMEPAGE="http://ojnk.sourceforge.net/" +SRC_URI="mirror://sourceforge/ojnk/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="debug ipv6 masquerade selinux" + +DEPEND="" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-oident )" + +DOCS=( AUTHORS ChangeLog README TODO NEWS "${FILESDIR}"/${PN}_masq.conf "${FILESDIR}"/${PN}.conf ) + +PATCHES=( + "${FILESDIR}/${P}-masquerading.patch" + "${FILESDIR}/${P}-bind-to-ipv6-too.patch" + "${FILESDIR}/${P}-gcc5.patch" + "${FILESDIR}/${P}-log-conntrack-fails.patch" + "${FILESDIR}/${P}-no-conntrack-masquerading.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~INET_TCP_DIAG" + + if use kernel_linux; then + linux-info_pkg_setup + fi +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable ipv6) \ + $(use_enable masquerade masq) \ + $(use_enable masquerade nat) +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}-2.0.7-init ${PN} + newconfd "${FILESDIR}"/${PN}-2.0.7-confd ${PN} + + systemd_newunit "${FILESDIR}"/${PN}_at.service ${PN}@.service + systemd_dounit "${FILESDIR}"/${PN}.socket + systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() { + echo + elog "Example configuration files are in /usr/share/doc/${PF}" + echo +} -- cgit v1.2.3-65-gdbad