From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7CE3158090 for ; Mon, 16 May 2022 19:57:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 63DC5E08E5; Mon, 16 May 2022 19:57:07 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4A7ABE08E5 for ; Mon, 16 May 2022 19:57:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F2D57341C6E for ; Mon, 16 May 2022 19:57:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D06548C for ; Mon, 16 May 2022 19:57:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1652730998.1e9321ab9798ddf673ce2f8b2e3d820399aae75c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/arping/files/, net-analyzer/arping/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/arping/Manifest net-analyzer/arping/arping-2.23.ebuild net-analyzer/arping/arping-9999.ebuild net-analyzer/arping/files/arping-2.23-configure.ac-seccomp-disable.patch X-VCS-Directories: net-analyzer/arping/ net-analyzer/arping/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1e9321ab9798ddf673ce2f8b2e3d820399aae75c X-VCS-Branch: master Date: Mon, 16 May 2022 19:57:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a25ee155-ef29-4d80-9c44-c75602f0716a X-Archives-Hash: 2b5ccf52f683266ceab421bbd3f4b52c commit: 1e9321ab9798ddf673ce2f8b2e3d820399aae75c Author: Sam James gentoo org> AuthorDate: Mon May 16 06:30:40 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon May 16 19:56:38 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e9321ab net-analyzer/arping: add 2.23 Signed-off-by: Sam James gentoo.org> net-analyzer/arping/Manifest | 1 + net-analyzer/arping/arping-2.23.ebuild | 60 ++++++++++++++++++++++ net-analyzer/arping/arping-9999.ebuild | 48 ++++++++++++----- .../arping-2.23-configure.ac-seccomp-disable.patch | 31 +++++++++++ 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 +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 +--- 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])