summaryrefslogtreecommitdiff
path: root/net-misc/ip-sentinel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /net-misc/ip-sentinel
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'net-misc/ip-sentinel')
-rw-r--r--net-misc/ip-sentinel/Manifest4
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch100
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.init4
-rw-r--r--net-misc/ip-sentinel/ip-sentinel-0.12-r1.ebuild77
4 files changed, 182 insertions, 3 deletions
diff --git a/net-misc/ip-sentinel/Manifest b/net-misc/ip-sentinel/Manifest
index 8ecd673e62d4..93dd3169462c 100644
--- a/net-misc/ip-sentinel/Manifest
+++ b/net-misc/ip-sentinel/Manifest
@@ -1,6 +1,8 @@
+AUX ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch 2380 BLAKE2B 72d0d29028903238dad929c5fdc70fee1af4527cc85a5d0972be669bbeba8eec592dc2ca3b628c9c9c5c509204d666d1a95bc3be239a0fbb96c1528e0710351a SHA512 181080886851f1278da981a57c841aa2e618594453d84f714772c5dac872eebc73c2557ec224d0466744db9f40c3c99f77892240ea9f4d8c514c05c717e355bb
AUX ip-sentinel.cfg 278 BLAKE2B bf582820bb9a22a0cb3e5b82ae934697c77d9f777e31ae1bec930a900e1fe36fe805167171f1900490fcc0247d77daee82533160c0d0881b92d9c19c026c3ee6 SHA512 315181c3ad90f677bb2ebca2309ae98cceb33ee74b0bae48138283c77612657a632af05a4467994b5b0981e835262f178515dfe8fb6787b4067ff749f97359d5
AUX ip-sentinel.conf.d 357 BLAKE2B a8f08e6c63e4b1413f9021985086a573c4691c70f3d2f7447e0f23a4bfc80253b32971fff473e7ca1c71ee1f7bed192d2e8cd1ca01385153d156dc4bb1a25e7d SHA512 c35614e812cc0b3caea671cf2703493030f6de96f8b5afc80455c93f3e6181ddaf7eb6c22d8b63244f219b506db4bddfdf9792bf89ec17d7c56d274d003d4506
-AUX ip-sentinel.init 1051 BLAKE2B fc0e0165187d45a28440e8bbb70a915514dab04076c0f4a51d477bb92dd4a4014255562a538ae5a9005cb5d93b59d9f69251d8fb4cec66a76ae47dab5bdb1741 SHA512 025be17c390e0e07b60bd4dcc1c8ed33dbb51f53b1dc4037b25b9a1275c2b7043cf5e147124f3ef11481771c20ad20a0fcd9543cbab5294fd412192ad221257a
+AUX ip-sentinel.init 1047 BLAKE2B 3073e1145b94e93b08400a06ed7a0f0ba4a7d11bd996f4daaf3e27ca857dd2b5c74d30e644ebdc3a5fa1911ef378d3a9306a011d293f5d46d25f989c5f3ac44d SHA512 89729f42d31a81902e957e67089c0e3ead7f8e8f9554ef787bd6c05f210f231d56812a5dcf56d5be58c360dd31fa38873dfa17d1ae0423a80d1e93055853ed75
DIST ip-sentinel-0.12.tar.bz2 165803 BLAKE2B 5b77dc771c432ddb556cc30cc9fce4226fed47958930cad4364af63146f8feeb5177542bccecbd276161acaa2232315022a59b8b83ba7763523886b4cb82b364 SHA512 dfa025fd96260073903ffe33dbaa5a146658dee2b8cb9bc04da0894a8de83207971a7f1e731128e42a0421052cdc352ed43a0298916f521d5f230533266e5077
+EBUILD ip-sentinel-0.12-r1.ebuild 2180 BLAKE2B a848bc02fb3e0e28e3eca77c5303bc6de17b476b82327aa9b7bbb26177441e0ec335316f2d1d7542b6a500511c08a04fc3c5ea6014c98dddda88a1228c6cffd2 SHA512 03f86d872cbafc7c24717c44719e8f468ff4e08748ab7656bb5783f25b803c94ad85736ea454756ff084bbb16084ce60b60c6dbee3d386360e925b19f31f9ae0
EBUILD ip-sentinel-0.12.ebuild 2077 BLAKE2B aa22163ac0e315512e4a197b36c7b2a464875067ca27256b2e091c00f8b7d0647aa64220ebad81a164fc8deb8f76efe5d3444c9685c5fbb625ef8dab50e699f1 SHA512 09d5f004cc90df5f0460b8dfaddcd32e928d9b86e23e616acc784d02b7d77647d36de332c7f5c07cd784866b6c2926df46608123a4fe61543fa2d0765937b09e
MISC metadata.xml 1303 BLAKE2B 7e42bf502035f8efb315fa524c938ff417f26dd88042ee673ffc9ed7aaa7efa52ef7a7ea08b7576bf32b8e213b6107c85b633967c261ead2349e78674793a36e SHA512 9ca404d2b97faf88cf40cf991584dfb1888e78b41817cc6dacfb2ac2bf13afdbb9c8496f61236e85ce2932c12d889975758108df0229760a16fa4478e5c0ffed
diff --git a/net-misc/ip-sentinel/files/ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch b/net-misc/ip-sentinel/files/ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch
new file mode 100644
index 000000000000..051956366fe0
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch
@@ -0,0 +1,100 @@
+From ecf89e635de8778ebbf901279f7672e2c15e4ecb Mon Sep 17 00:00:00 2001
+From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+Date: Fri, 1 Aug 2008 09:20:46 +0200
+Subject: fixed dietlibc compatibility stuff
+
+removed lot of compatibility stuff which was needed for ancient
+dietlibc version.
+---
+ src/compat.h | 31 ++-----------------------------
+ src/util.h | 2 +-
+ src/wrappers.h | 1 +
+ 3 files changed, 4 insertions(+), 30 deletions(-)
+
+diff --git a/src/compat.h b/src/compat.h
+index c180185..c6fb409 100644
+--- a/src/compat.h
++++ b/src/compat.h
+@@ -19,22 +19,8 @@
+ #ifndef H_ENSC_IPSENTINEL_SRC_COMPAT_H
+ #define H_ENSC_IPSENTINEL_SRC_COMPAT_H
+
+-#if defined(__dietlibc__) && !defined(ENSC_DIETLIBC_C99) && defined(__STRICT_ANSI__) && defined(__STDC_VERSION__)
+- // fixed in 0.25+
+-# include <sys/cdefs.h>
+-# undef inline
+-
+-# undef __STRICT_ANSI__
+-# include <stdint.h>
+-# define __STRICT_ANSI__
+-#endif
+-
+ #ifdef __dietlibc__
+- // fixed in 0.27+
+-# define ethhdr ethhdrX
+-# include <net/ethernet.h>
+-# undef ethhdr
+-
++struct ether_addr;
+ # ifndef HAVE_DIET_ETHER_NTOA
+ char * ether_ntoa(struct ether_addr const *addr);
+ # endif
+@@ -44,22 +30,9 @@ struct ether_addr * ether_aton_r(const char *asc, struct ether_addr *addr);
+ # endif
+ #endif
+
+-
+-#ifndef __dietlibc__
+-# include <stropts.h>
+-#else
+-# include <sys/ioctl.h>
+-#endif
+-
+-#ifdef __dietlibc__
+-# define sin XsinX
+-#endif
+-#include <netinet/in.h>
+-#undef sin
+-
+-
+ #ifdef __dietlibc__
+ #include <net/if_arp.h>
++#include <net/ethernet.h>
+ #include <stdint.h>
+
+ struct ether_arp {
+diff --git a/src/util.h b/src/util.h
+index 20381e3..adfe3a6 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -25,7 +25,6 @@
+ #include <unistd.h>
+ #include <net/ethernet.h>
+
+-
+ /*@-namechecks@*/
+ #ifndef __cplusplus
+ # define cAsT_(X) (X))
+@@ -77,6 +76,7 @@ xstrcat(char **dst, size_t *cnt, char const *src)
+ xstrcatn(dst, cnt, src, strlen(src));
+ }
+
++struct in_addr;
+ void writeUInt(int fd, unsigned int nr);
+ void writeMsgTimestamp(int fd);
+ void writeIP(int fd, struct in_addr);
+diff --git a/src/wrappers.h b/src/wrappers.h
+index e1be0ad..5548702 100644
+--- a/src/wrappers.h
++++ b/src/wrappers.h
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
++#include <sys/ioctl.h>
+ #include <fcntl.h>
+ #include <pwd.h>
+ #include <errno.h>
+--
+cgit v1.2.1
+
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.init b/net-misc/ip-sentinel/files/ip-sentinel.init
index 923cedeac13c..c839ca61d69b 100644
--- a/net-misc/ip-sentinel/files/ip-sentinel.init
+++ b/net-misc/ip-sentinel/files/ip-sentinel.init
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
CFG_FILE="/etc/ip-sentinel.cfg"
@@ -40,7 +40,7 @@ restart () {
echo "Please, wait while child process quit..."
while `ps aux | grep -v 'init.d' | grep [i]p-sentinel >/dev/null`
do
- echo -n ". "
+ printf ". "
sleep 1
done
echo "[Done]"
diff --git a/net-misc/ip-sentinel/ip-sentinel-0.12-r1.ebuild b/net-misc/ip-sentinel/ip-sentinel-0.12-r1.ebuild
new file mode 100644
index 000000000000..76e2d1db7e7f
--- /dev/null
+++ b/net-misc/ip-sentinel/ip-sentinel-0.12-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit user
+
+DESCRIPTION="Prevent unauthorized usage of IP addresses"
+HOMEPAGE="https://www.nongnu.org/ip-sentinel/"
+LICENSE="GPL-2"
+SRC_URI="https://savannah.nongnu.org/download/ip-sentinel/${P}.tar.bz2"
+SLOT="0"
+KEYWORDS="~x86"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS )
+PATCHES=(
+ "${FILESDIR}"/${P}-fixed-dietlibc-compat-stuff.patch
+)
+
+pkg_setup() {
+ enewgroup ipsentinel
+ enewuser ipsentinel -1 -1 -1 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."
+}