summaryrefslogtreecommitdiff
path: root/net-misc/iputils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /net-misc/iputils
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'net-misc/iputils')
-rw-r--r--net-misc/iputils/Manifest7
-rw-r--r--net-misc/iputils/files/iputils-20210722-optional-tests.patch202
-rw-r--r--net-misc/iputils/iputils-20210722.ebuild10
-rw-r--r--net-misc/iputils/iputils-99999999.ebuild5
-rw-r--r--net-misc/iputils/metadata.xml2
5 files changed, 220 insertions, 6 deletions
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index e873f745469d..d121a377396a 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,8 +1,9 @@
+AUX iputils-20210722-optional-tests.patch 5276 BLAKE2B c485d39b06916acdaaec6f98ffeb718afbfd630af7220c7dfb408855a8862c2b121bbf4482621f633b86f1b94df78afc54157d99f2ff28cff833ae263aae5e78 SHA512 59d7ff881c03d7c03f5f41d2015f03175456487d9802999173f4705b3cfd7819957258e68a0b932fd9901f418bca866252d4a673d66f08b9e179a07ae84e8c40
DIST iputils-20210202.tar.gz 513055 BLAKE2B 37f3c10ff3918d40fe2eae1e4b19ed711b97c30cd2d682e42f484a11a28ab7c93975a51fbb7a8b1c1d725fc9051ae773bc2e81b9d80a2dd0e6ff55867d54875d SHA512 af600fe74e1b78c0da66c378f55eb468d62206aaae1864693f7ec79833c9c0de95843573d1792627695f08ecfcdb4e79c354065daf178d393fcc6ef9a8a5d526
DIST iputils-20210722.tar.gz 530745 BLAKE2B 4d6a2afaea1027e7992d374bbaa300f952f56225c998ecc6c3d332fef046dd8032e5afaff1cdc916d048f9d84cc8a85736a26a3176e66e111e02c9dbfcb0f195 SHA512 8f85bf468f8ef1e2832e9bbf9009552df4a6d723dd130fa0d5b2aa3bae617c972f936143c2370c3b4ce2ba2499828c91a299ee42cf81fa81aabe10552db2b328
DIST iputils-manpages-20210202.tar.xz 19204 BLAKE2B b9d43962890ae5fe9e4c21fb23c8911c22cbfb35a28521a2f0611d7813e4c21979f6b309569cdb57dd9b3a30653278982194ca08a815cfb41566a379930d124b SHA512 d5cced9a5e4acffbe35d20a796d038336d06f512c3ee47bc6e37782b4645d5c35b16e18aaae298547b60fe644e5608efe7847f2de6175bfcd39128d230ee4cd1
DIST iputils-manpages-20210722.tar.xz 19208 BLAKE2B 7d6b126debeee2a4e5437b7d26a9fee5c759ae72fa9b7acb1a04bb673f14af742f5580aad6ae1c34048933d95d09c4adcf024fabdc20851297131877cbfa10d0 SHA512 c1521e76f5b8cb99d7226ca1bd916b1861b6c0f9655ad0e396dd8d997be6cdc37ee0e81ac325ea4ebb3b349b394e7f1c45081ddc25b778fd294928a7b2dc0415
EBUILD iputils-20210202.ebuild 4210 BLAKE2B b090f1cd2ceff44eefe1491c796ee6851bfdc78aff2cdadadd808fdc554b6876e164d5d4c89819401e6f2c25b0177d9886700c3abaae042f52fbe707df156a29 SHA512 83f5a2327619765b9d768534ea688fde8099e45162209da26465ef6abe6f49483255ce9c1c862d3f9f2e18eeeffae7f3af0ca8291f2e0a744bee0f88669c3670
-EBUILD iputils-20210722.ebuild 4347 BLAKE2B 2f525b08abd351e4d45e5db6b8e84ad506a0e7e19e8194a95d9bbc6c052af689706288eafd3d00d9e9c42b93a2cb7c6e272732ce07a3b5e43f99455595e81b1b SHA512 0f21935212e8116a386aa6fee2aa5ee9019d78628727ff68223c557573170bbbbd22a279ac07e7041f198bb1ce9b12b0aa4562058747e73f4f9395f3096a7fea
-EBUILD iputils-99999999.ebuild 4347 BLAKE2B 2f525b08abd351e4d45e5db6b8e84ad506a0e7e19e8194a95d9bbc6c052af689706288eafd3d00d9e9c42b93a2cb7c6e272732ce07a3b5e43f99455595e81b1b SHA512 0f21935212e8116a386aa6fee2aa5ee9019d78628727ff68223c557573170bbbbd22a279ac07e7041f198bb1ce9b12b0aa4562058747e73f4f9395f3096a7fea
-MISC metadata.xml 1509 BLAKE2B 800c6f657d331ad2f73fbd3e6a199732549f89ba31188e8caf5612008b89f60c6a7fb925f2740fcca07d3772f12ea9c5590de834e77201730b848a877061a97a SHA512 5b358f53068f6a49f00141c47f75fde84fe609fd6652e3e717b97b9d36abbfb80ea52c1ef8c2e3a850ab3724f1d4a87093b2bfc1ee5497d082ce1937dc3aa83d
+EBUILD iputils-20210722.ebuild 4520 BLAKE2B 8c7f435fc634299e5ba49c106c1539f037f7a5ee03a7a63a76c5940da1a92a2077aa127ea5ccf91fa7df372e3e16aaf2b53f8edf0f11568768b8f87e4dd3b946 SHA512 0fc37933864740e24c398d1cb4760697bc8dc48657dcc28d241794e4cc495f86f751e59f21e363d10667a2ec94dc4b517f5cc3cf8ed8b380d75a9955f511bca6
+EBUILD iputils-99999999.ebuild 4440 BLAKE2B e752bc9085ee4a631a7c93b6f5a533bc2ea88009020aa336add86167cb68296a418e436af05469e06e8d11f6c49bf7bff9534e8258258d8eda5674e7011481bf SHA512 2b30c9bd6a5470381d016ab68338de9da471ebb0f351a19585543a33b77ab4f586a13590f592fc7b5c92a976d04ee9988c6da3d7d83ff15a55f295535021ac52
+MISC metadata.xml 1510 BLAKE2B 773a096616c325fdef0d4fc5e5cc887d47ab3433be7efdcbfaf99e4d04f82d589ab759a7493e1cd10e80cc047c5288ee2200f7b21cfa24ab801f5b84688f5fd8 SHA512 4e207561d2d42f4bd07b6ded0729688883b6f8fa38d15734ab42ca66b1baac98bf283a71fb80f210f7a1732611e987e85084e615c4ef727126faa29acd154ae9
diff --git a/net-misc/iputils/files/iputils-20210722-optional-tests.patch b/net-misc/iputils/files/iputils-20210722-optional-tests.patch
new file mode 100644
index 000000000000..d6c4e98c0800
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20210722-optional-tests.patch
@@ -0,0 +1,202 @@
+https://github.com/iputils/iputils/commit/3163c49f9f4ad473a00d8a345ee334a028376011.patch
+https://bugs.gentoo.org/807973
+
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 23 Jul 2021 16:32:46 +0200
+Subject: [PATCH] meson: Make tests optional
+
+Now can be disabled with -DSKIP_TESTS=true.
+
+It allows to avoid meson error during build when ip isn't installed.
+
+Closes: #359
+
+Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: Heiko Becker <heirecka@exherbo.org>
+[ pvorel: Rename variable TEST => SKIP_TESTS, default false, adjust
+the description ]
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -72,3 +72,6 @@ option('INSTALL_SYSTEMD_UNITS', type: 'boolean', value: false,
+
+ option('USE_GETTEXT', type: 'boolean', value: true,
+ description: 'Enable I18N')
++
++option('SKIP_TESTS', type: 'boolean', value: false,
++ description: 'Skip tests during build')
+--- a/ping/meson.build
++++ b/ping/meson.build
+@@ -27,86 +27,6 @@ if (setcap_ping)
+ )
+ endif
+
+-##### TESTS #####
+-
+-# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
+-
+-# GitHub CI does not have working IPv6
+-# https://github.com/actions/virtual-environments/issues/668
+-ipv6_dst = []
+-ipv6_switch = []
+-r = run_command('ip', '-6', 'a')
+-if r.stdout().strip().contains('::1')
+- message('IPv6 enabled')
+- ipv6_dst = [ '::1' ]
+- ipv6_switch = [ '-6' ]
+-else
+- message('WARNING: IPv6 disabled')
++if not get_option('SKIP_TESTS')
++ subdir('test')
+ endif
+-
+-run_as_root = false
+-r = run_command('id', '-u')
+-if r.stdout().strip().to_int() == 0
+- message('running as root')
+- run_as_root = true
+-else
+- message('running as normal user')
+-endif
+-
+-foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
+- foreach switch : [ '', '-4' ] + ipv6_switch
+- args = [ '-c1', dst ]
+- should_fail = false
+-
+- if switch != ''
+- args = [switch] + args
+- if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
+- should_fail = true
+- endif
+- endif
+-
+- name = 'ping ' + ' '.join(args)
+- test(name, ping, args : args, should_fail : should_fail)
+- endforeach
+-endforeach
+-
+-ping_tests_opt = [
+- [ '-c1' ],
+- [ '-c5', '-i0.1' ],
+- [ '-c1', '-I', 'lo' ],
+- [ '-c1', '-w1' ],
+- [ '-c1', '-W1' ],
+- [ '-c1', '-W1.1' ],
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+- foreach args : ping_tests_opt
+- args += [ dst ]
+- name = 'ping ' + ' '.join(args)
+- test(name, ping, args : args)
+- endforeach
+-endforeach
+-
+-ping_tests_opt_fail = [
+- [ '-c1.1' ],
+- [ '-I', 'nonexisting' ],
+- [ '-w0.1' ],
+- [ '-w0,1' ],
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+- foreach args : ping_tests_opt_fail
+- args += [ dst ]
+- name = 'ping ' + ' '.join(args)
+- test(name, ping, args : args, should_fail : true)
+- endforeach
+-endforeach
+-
+-ping_tests_user_fail = [
+- [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+- foreach args : ping_tests_user_fail
+- args += [ dst ]
+- name = 'ping ' + ' '.join(args)
+- test(name, ping, args : args, should_fail : not run_as_root)
+- endforeach
+-endforeach
+--- /dev/null
++++ b/ping/test/meson.build
+@@ -0,0 +1,81 @@
++# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
++
++# GitHub CI does not have working IPv6
++# https://github.com/actions/virtual-environments/issues/668
++ipv6_dst = []
++ipv6_switch = []
++r = run_command('ip', '-6', 'a')
++if r.stdout().strip().contains('::1')
++ message('IPv6 enabled')
++ ipv6_dst = [ '::1' ]
++ ipv6_switch = [ '-6' ]
++else
++ message('WARNING: IPv6 disabled')
++endif
++
++run_as_root = false
++r = run_command('id', '-u')
++if r.stdout().strip().to_int() == 0
++ message('running as root')
++ run_as_root = true
++else
++ message('running as normal user')
++endif
++
++foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
++ foreach switch : [ '', '-4' ] + ipv6_switch
++ args = [ '-c1', dst ]
++ should_fail = false
++
++ if switch != ''
++ args = [switch] + args
++ if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
++ should_fail = true
++ endif
++ endif
++
++ name = 'ping ' + ' '.join(args)
++ test(name, ping, args : args, should_fail : should_fail)
++ endforeach
++endforeach
++
++ping_tests_opt = [
++ [ '-c1' ],
++ [ '-c5', '-i0.1' ],
++ [ '-c1', '-I', 'lo' ],
++ [ '-c1', '-w1' ],
++ [ '-c1', '-W1' ],
++ [ '-c1', '-W1.1' ],
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++ foreach args : ping_tests_opt
++ args += [ dst ]
++ name = 'ping ' + ' '.join(args)
++ test(name, ping, args : args)
++ endforeach
++endforeach
++
++ping_tests_opt_fail = [
++ [ '-c1.1' ],
++ [ '-I', 'nonexisting' ],
++ [ '-w0.1' ],
++ [ '-w0,1' ],
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++ foreach args : ping_tests_opt_fail
++ args += [ dst ]
++ name = 'ping ' + ' '.join(args)
++ test(name, ping, args : args, should_fail : true)
++ endforeach
++endforeach
++
++ping_tests_user_fail = [
++ [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++ foreach args : ping_tests_user_fail
++ args += [ dst ]
++ name = 'ping ' + ' '.join(args)
++ test(name, ping, args : args, should_fail : not run_as_root)
++ endforeach
++endforeach
diff --git a/net-misc/iputils/iputils-20210722.ebuild b/net-misc/iputils/iputils-20210722.ebuild
index 0e3d015bdb90..b89114ba0788 100644
--- a/net-misc/iputils/iputils-20210722.ebuild
+++ b/net-misc/iputils/iputils-20210722.ebuild
@@ -28,10 +28,12 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
LICENSE="BSD GPL-2+ rdisc"
SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static tftpd tracepath traceroute6"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static test tftpd tracepath traceroute6"
+RESTRICT="!test? ( test )"
BDEPEND="
virtual/pkgconfig
+ test? ( sys-apps/iproute2 )
nls? ( sys-devel/gettext )
"
@@ -62,6 +64,11 @@ if [[ ${PV} == "99999999" ]] ; then
"
fi
+PATCHES=(
+ # Upstream; drop on bump
+ "${FILESDIR}"/${P}-optional-tests.patch
+)
+
src_prepare() {
default
@@ -88,6 +95,7 @@ src_configure() {
-DNO_SETCAP_OR_SUID="true"
-Dsystemdunitdir="$(systemd_get_systemunitdir)"
-DUSE_GETTEXT="$(usex nls true false)"
+ $(meson_use !test SKIP_TESTS)
)
if [[ "${PV}" == 99999999 ]] ; then
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index 0e3d015bdb90..fe97d131c7f4 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -28,10 +28,12 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
LICENSE="BSD GPL-2+ rdisc"
SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static tftpd tracepath traceroute6"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static test tftpd tracepath traceroute6"
+RESTRICT="!test? ( test )"
BDEPEND="
virtual/pkgconfig
+ test? ( sys-apps/iproute2 )
nls? ( sys-devel/gettext )
"
@@ -88,6 +90,7 @@ src_configure() {
-DNO_SETCAP_OR_SUID="true"
-Dsystemdunitdir="$(systemd_get_systemunitdir)"
-DUSE_GETTEXT="$(usex nls true false)"
+ $(meson_use !test SKIP_TESTS)
)
if [[ "${PV}" == 99999999 ]] ; then
diff --git a/net-misc/iputils/metadata.xml b/net-misc/iputils/metadata.xml
index 11c6f638649b..b6ebdf9c592a 100644
--- a/net-misc/iputils/metadata.xml
+++ b/net-misc/iputils/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>