summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2021-07-12 23:54:09 +0200
committerConrad Kostecki <conikost@gentoo.org>2021-07-13 22:54:43 +0200
commit359a1c9aadb7bd5a72ad94eb8be4476edda68beb (patch)
tree1775a5b05590e3f9e9247cb3fcc7c7a561f8bb1e /net-misc
parentnet-analyzer/smokeping: drop old version (diff)
downloadgentoo-359a1c9aadb7bd5a72ad94eb8be4476edda68beb.tar.gz
gentoo-359a1c9aadb7bd5a72ad94eb8be4476edda68beb.tar.bz2
gentoo-359a1c9aadb7bd5a72ad94eb8be4476edda68beb.zip
net-misc/ip-sentinel: migrate to GLEP 81
Bug: https://bugs.gentoo.org/781422 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/ip-sentinel/ip-sentinel-0.12-r2.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/net-misc/ip-sentinel/ip-sentinel-0.12-r2.ebuild b/net-misc/ip-sentinel/ip-sentinel-0.12-r2.ebuild
new file mode 100644
index 000000000000..44c2ea9d4979
--- /dev/null
+++ b/net-misc/ip-sentinel/ip-sentinel-0.12-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Prevent unauthorized usage of IP addresses"
+HOMEPAGE="https://www.nongnu.org/ip-sentinel/"
+SRC_URI="https://savannah.nongnu.org/download/ip-sentinel/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS )
+PATCHES=( "${FILESDIR}"/${P}-fixed-dietlibc-compat-stuff.patch )
+
+RDEPEND="
+ acct-group/ipsentinel
+ acct-user/ipsentinel
+"
+
+src_prepare() {
+ default
+
+ # disable failing tests
+ echo true > src/testsuite/prioqueue-check.sh
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/ip-sentinel.init ip-sentinel
+ newconfd "${FILESDIR}"/ip-sentinel.conf.d ip-sentinel
+
+ insinto /etc
+ newins "${FILESDIR}"/ip-sentinel.cfg ip-sentinel.cfg
+}
+
+pkg_config() {
+ CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/ip-sentinel 2>/dev/null`
+
+ if [ ! -d "${CHROOT:=/chroot/ip-sentinel}" ] ; then
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/etc"
+ cp -R /etc/ip-sentinel.cfg "${CHROOT}/etc"
+ eend
+
+ if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/ip-sentinel`" ] ; then
+ sed -e '/^#[[:blank:]]\?CHROOT/s/^#[[:blank:]]\?//' \
+ -i /etc/conf.d/ip-sentinel
+ fi
+ else
+ eerror
+ eerror "${CHROOT} already exists. Quitting."
+ eerror
+ fi
+}
+
+pkg_postinst() {
+ elog "You can edit /etc/conf.d/ip-sentinel to customize startup daemon"
+ elog "settings."
+ elog
+ elog "Default ip-sentinel config is in /etc/ip-sentinel.cfg"
+ elog
+ elog "The ip-sentinel ebuild has chroot support."
+ elog "If you like to run ip-sentinel in chroot AND this is a new install OR"
+ elog "your ip-sentinel doesn't already run in chroot, simply run:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Before running the above command you might want to change the chroot"
+ elog "dir in /etc/conf.d/ip-sentinel, otherwise /chroot/ip-sentinel will be used."
+ echo
+ ewarn "And please! DO NOT START THIS DAEMON thoughtlessly."
+ ewarn "If you DO this will BLOCK ALL communication inside your ethernet"
+ ewarn "segment!!! If you have any doubts do not start ip-sentinel."
+}