From 557750e63d62d369c4c2aba676874195217704e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Thu, 10 Jan 2019 16:00:00 +0100 Subject: [PATCH] [net-misc/oidentd] bump, probably doesn't build --- net-misc/oidentd/Manifest | 2 + net-misc/oidentd/files/oidentd-2.0.7-init | 40 +++++++++++++++++ net-misc/oidentd/files/oidentd-2.2.2-confd | 4 ++ net-misc/oidentd/metadata.xml | 18 ++++++++ net-misc/oidentd/oidentd-2.3.2.ebuild | 52 ++++++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 net-misc/oidentd/Manifest create mode 100644 net-misc/oidentd/files/oidentd-2.0.7-init create mode 100644 net-misc/oidentd/files/oidentd-2.2.2-confd create mode 100644 net-misc/oidentd/metadata.xml create mode 100644 net-misc/oidentd/oidentd-2.3.2.ebuild diff --git a/net-misc/oidentd/Manifest b/net-misc/oidentd/Manifest new file mode 100644 index 0000000..f5561f7 --- /dev/null +++ b/net-misc/oidentd/Manifest @@ -0,0 +1,2 @@ +DIST oidentd-2.0.8.tar.gz 212354 BLAKE2B 46f4c4478822e832885f5f38a2ab5b2132ff5c1e5071fd1dc6050e55992d50bd96be096064996853af69d16316e6aff648c5320714b53b60c038cc9aaedfedda SHA512 86229a4ef9892121c25a7140616e180f862ca34b73ea3ad9f0fbb008f657abb17e9f14c2c25ae14c14bfc14bf1ea10b50fd68318631a9c52227bbfd6e6d43288 +DIST oidentd-2.2.2.tar.gz 260185 BLAKE2B a719413751280d44e134245793c4a88d93dd573d7d85895e341040c2d83a7b201f21f499b931c27e5c0f1d7d0957d730b2cda698ef98b74755e2ca1958457579 SHA512 c5c5040f8955e61e8a7cddd310501d24c3b2a3818e0cd122db85c03dc5b2b18ca7ea4e7edb420df3ad81558a25d4b31c1fea97684a9f53c71c9159014f84678d diff --git a/net-misc/oidentd/files/oidentd-2.0.7-init b/net-misc/oidentd/files/oidentd-2.0.7-init new file mode 100644 index 0000000..5b1ae44 --- /dev/null +++ b/net-misc/oidentd/files/oidentd-2.0.7-init @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +check_config() { + if [ -z "${USER}" ] + then + eerror "Please set \$USER in /etc/conf.d/oidentd!" + return 1 + fi + if [ -z "${GROUP}" ] + then + eerror "Please set \$GROUP in /etc/conf.d/oidentd!" + return 1 + fi + + if [ "$(sysctl -n security.bsd.see_other_uids 2>/dev/null)" = "0" ]; then + eerror "${SVCNAME} cannot work if the sysctl security.bsd.see_other_uids is 0" + return 1 + fi +} + + +start() { + check_config || return 1 + ebegin "Starting oidentd" + OPTIONS="${OPTIONS} -u ${USER} -g ${GROUP}" + start-stop-daemon --start --quiet --exec /usr/sbin/oidentd -- $OPTIONS + eend $? +} + +stop() { + ebegin "Stopping oidentd" + start-stop-daemon --stop --quiet --exec /usr/sbin/oidentd + eend $? +} diff --git a/net-misc/oidentd/files/oidentd-2.2.2-confd b/net-misc/oidentd/files/oidentd-2.2.2-confd new file mode 100644 index 0000000..215b62d --- /dev/null +++ b/net-misc/oidentd/files/oidentd-2.2.2-confd @@ -0,0 +1,4 @@ +# oidentd start-up options +USER="oidentd" +GROUP="oidentd" +OPTIONS="" diff --git a/net-misc/oidentd/metadata.xml b/net-misc/oidentd/metadata.xml new file mode 100644 index 0000000..ed7fbe1 --- /dev/null +++ b/net-misc/oidentd/metadata.xml @@ -0,0 +1,18 @@ + + + + + Dessa@gmake.de + Robert Förster + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Enable support for masqueraded/NAT connections + + + janikrabe/oidentd + + diff --git a/net-misc/oidentd/oidentd-2.3.2.ebuild b/net-misc/oidentd/oidentd-2.3.2.ebuild new file mode 100644 index 0000000..c0914c9 --- /dev/null +++ b/net-misc/oidentd/oidentd-2.3.2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd user + +DESCRIPTION="Another (RFC1413 compliant) ident daemon" +HOMEPAGE="https://oidentd.janikrabe.com/" +SRC_URI="https://files.janikrabe.com/pub/${PN}/releases/${PV}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="debug ipv6 masquerade selinux" + +DEPEND="masquerade? ( + net-libs/libnetfilter_conntrack + sys-libs/libcap-ng )" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-oident )" + +pkg_setup() { + enewgroup oidentd + enewuser oidentd -1 -1 -1 oidentd +} + +src_configure() { + local myconf=( + $(use_enable debug) + $(use_enable ipv6) + $(use_enable masquerade libnfct) + $(use_enable masquerade masq) + $(use_enable masquerade nat) + ) + econf "${myconf[@]}" +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}-2.0.7-init ${PN} + newconfd "${FILESDIR}"/${PN}-2.2.2-confd ${PN} + + systemd_dounit contrib/systemd/${PN}@.service + systemd_dounit contrib/systemd/${PN}.socket + systemd_dounit contrib/systemd/${PN}.service + + sed -i '/ExecStart/ s|$| -u oidentd -g oidentd|' "${D}$(systemd_get_systemunitdir)"/${PN}.service || die + sed -i '/ExecStart/ s|$| -u oidentd -g oidentd|' "${D}$(systemd_get_systemunitdir)"/${PN}@.service || die +}