summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-16 06:30:40 +0000
committerSam James <sam@gentoo.org>2022-05-16 19:56:38 +0000
commit1e9321ab9798ddf673ce2f8b2e3d820399aae75c (patch)
treecdc50b637d51869d9bf4d550003016441a082b1f /net-analyzer
parentdev-libs/libdnet: add 1.16.1 (diff)
downloadgentoo-1e9321ab9798ddf673ce2f8b2e3d820399aae75c.tar.gz
gentoo-1e9321ab9798ddf673ce2f8b2e3d820399aae75c.tar.bz2
gentoo-1e9321ab9798ddf673ce2f8b2e3d820399aae75c.zip
net-analyzer/arping: add 2.23
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/arping/Manifest1
-rw-r--r--net-analyzer/arping/arping-2.23.ebuild60
-rw-r--r--net-analyzer/arping/arping-9999.ebuild48
-rw-r--r--net-analyzer/arping/files/arping-2.23-configure.ac-seccomp-disable.patch31
4 files changed, 126 insertions, 14 deletions
diff --git a/net-analyzer/arping/Manifest b/net-analyzer/arping/Manifest
index fb1a565d27c9..a871acf0f729 100644
--- a/net-analyzer/arping/Manifest
+++ b/net-analyzer/arping/Manifest
@@ -1,2 +1,3 @@
DIST arping-2.21.tar.gz 50067 BLAKE2B 67b76cc48e9717117dbf43702df7f422634ed40196ec44d273a773610618922ddf7de47ffdf32cb7296db1dbce0a696c57b7992e6ad11f6fddf52a16212154fc SHA512 e976ce1a3ec0e4f57bbded09c6a07934e21df66ce7931422c420f5335dafcd88968f03ba6987d192dcdf51cca89180c86337aff50806713c7b04cb13e3e83504
DIST arping-2.22.tar.gz 50152 BLAKE2B 2215773b922219537339550e8034bb6eca82974469ebd0e399c73bd259ef4ff7a4510d9a5ff108cef3dac492477c54fc2517c2dfd4035158d0269f03c0e2a0b5 SHA512 0b36fff2c14c1ff89453ba63eea04de3343fcb19da7dbc1c8749bc926e441c54915cd628d54171d449e66e92663e31f12e057c30a80cd49c4412650e2cd00ef3
+DIST arping-2.23.tar.gz 51911 BLAKE2B 8b0d34522957a83d0a66b47576fa0ecbd1e4fc86537df6d2737510bdb1a4ea3d30feb664077790a8f70be9cf2cdcdc30a648261e9a6a30401ce85274c45ccf12 SHA512 45295fd68717379d18fcff4270c70e0d9df3cae175f0c2a9f1e8e88e3046f5109e7a95bb717be329af8d6002c9a2338efd39831a652c0b425b75058287fa35df
diff --git a/net-analyzer/arping/arping-2.23.ebuild b/net-analyzer/arping/arping-2.23.ebuild
new file mode 100644
index 000000000000..f143eadf7e1e
--- /dev/null
+++ b/net-analyzer/arping/arping-2.23.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools fcaps
+
+DESCRIPTION="A utility to see if a specific IP is taken and what MAC owns it"
+HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ThomasHabets/arping"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ThomasHabets/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+ S="${WORKDIR}/${PN}-${P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="2"
+IUSE="+seccomp test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="net-libs/libpcap
+ net-libs/libnet:1.1
+ sys-libs/libcap
+ seccomp? ( sys-libs/libseccomp )
+ !net-misc/iputils[arping(+)]"
+DEPEND="${RDEPEND}
+ test? (
+ dev-libs/check
+ dev-python/subunit
+ )"
+
+FILECAPS=( cap_net_raw usr/sbin/arping )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.23-configure.ac-seccomp-disable.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ # Controls whether seccomp is used by default
+ $(use_enable seccomp)
+ )
+
+ # Needed to actually make it optional and not automagic
+ # (and we want it optional for the non-seccomp arches, like sparc)
+ export ac_cv_lib_seccomp_seccomp_init=$(usex seccomp)
+ export ac_cv_header_seccomp_h=$(usex seccomp)
+
+ econf "${myeconfargs[@]}"
+}
diff --git a/net-analyzer/arping/arping-9999.ebuild b/net-analyzer/arping/arping-9999.ebuild
index 13d8502fc949..a706dc286849 100644
--- a/net-analyzer/arping/arping-9999.ebuild
+++ b/net-analyzer/arping/arping-9999.ebuild
@@ -1,36 +1,56 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools git-r3 fcaps
+inherit autotools fcaps
DESCRIPTION="A utility to see if a specific IP is taken and what MAC owns it"
HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping"
-EGIT_REPO_URI="https://github.com/ThomasHabets/arping"
-S="${WORKDIR}/${PN}-${P}"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ThomasHabets/arping"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ThomasHabets/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+ S="${WORKDIR}/${PN}-${P}"
+fi
LICENSE="GPL-2"
SLOT="2"
-IUSE="test"
+IUSE="+seccomp test"
RESTRICT="!test? ( test )"
-RDEPEND="
- net-libs/libpcap
+RDEPEND="net-libs/libpcap
net-libs/libnet:1.1
- !net-misc/iputils[arping(+)]
-"
-DEPEND="
- ${RDEPEND}
+ sys-libs/libcap
+ seccomp? ( sys-libs/libseccomp )
+ !net-misc/iputils[arping(+)]"
+DEPEND="${RDEPEND}
test? (
dev-libs/check
dev-python/subunit
- )
-"
+ )"
FILECAPS=( cap_net_raw usr/sbin/arping )
src_prepare() {
default
+
eautoreconf
}
+
+src_configure() {
+ local myeconfargs=(
+ # Controls whether seccomp is used by default
+ $(use_enable seccomp)
+ )
+
+ # Needed to actually make it optional and not automagic
+ # (and we want it optional for the non-seccomp arches, like sparc)
+ export ac_cv_lib_seccomp_seccomp_init=$(usex seccomp)
+ export ac_cv_header_seccomp_h=$(usex seccomp)
+
+ econf "${myeconfargs[@]}"
+}
diff --git a/net-analyzer/arping/files/arping-2.23-configure.ac-seccomp-disable.patch b/net-analyzer/arping/files/arping-2.23-configure.ac-seccomp-disable.patch
new file mode 100644
index 000000000000..53b59da1a961
--- /dev/null
+++ b/net-analyzer/arping/files/arping-2.23-configure.ac-seccomp-disable.patch
@@ -0,0 +1,31 @@
+https://github.com/ThomasHabets/arping/pull/51
+
+From 47622ccc97591f55899f8fff325af241b89df09f Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 16 May 2022 06:24:27 +0000
+Subject: [PATCH] configure.ac: make --disable-seccomp work
+
+The first branch ("[action-if-given]") is taken even if --disable-seccomp
+is passed. So, in that branch, check whether the user disabled it or not.
+
+Without this, we'd get a failure when seccomp is detected but we want
+to disable it:
+```
+./configure --disable-seccomp
+[...]
+checking for library containing clock_gettime... none required
+configure: error: --enable-seccomp given but seccomp libraries not present
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,7 +35,7 @@ AC_CHECK_LIB([pcap], [pcap_open_live], ,[AC_MSG_ERROR([libpcap not found])])
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+
+ AC_ARG_ENABLE([seccomp], [Enable seccomp priv drops by default (-z to turn on, -Z for off)], [
+- if test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
++ if test x"$enableval" != x"no" && test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
+ AC_MSG_ERROR([--enable-seccomp given but seccomp libraries not present])
+ fi
+ AC_DEFINE([DEFAULT_SECCOMP], [1], [Enable seccomp by default])