summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorChanghyeok Bae <changhyeok.bae@gmail.com>2022-01-03 21:24:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-07 14:39:17 +0000
commit32315dcf5a1ffa6241f3de8fb7a49c54d92893c6 (patch)
tree43761fdb052f3ee5199d597c07a9c3df37cdaae7 /meta/recipes-extended
parent6748c9a1ea5fcc18af7d10f3fd4d3c6fc3910954 (diff)
downloadpoky-32315dcf5a1ffa6241f3de8fb7a49c54d92893c6.tar.gz
iputils: update 20210722 to 20211215
traceroute6 and tftpd were removed in iputils. (From OE-Core rev: 9a5c496ac46ada3dde468755d879aab07e487e13) Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-meson-Make-tests-optional.patch220
-rw-r--r--meta/recipes-extended/iputils/iputils_20211215.bb (renamed from meta/recipes-extended/iputils/iputils_20210722.bb)16
2 files changed, 5 insertions, 231 deletions
diff --git a/meta/recipes-extended/iputils/iputils/0001-meson-Make-tests-optional.patch b/meta/recipes-extended/iputils/iputils/0001-meson-Make-tests-optional.patch
deleted file mode 100644
index 9f17cbdb87..0000000000
--- a/meta/recipes-extended/iputils/iputils/0001-meson-Make-tests-optional.patch
+++ /dev/null
@@ -1,220 +0,0 @@
1From d8048d60d30a2efe7883b36626123630ce69b9fc Mon Sep 17 00:00:00 2001
2From: Heiko Becker <heirecka@exherbo.org>
3Date: Fri, 23 Jul 2021 16:32:46 +0200
4Subject: [PATCH] meson: Make tests optional
5
6Now can be disabled with -DSKIP_TESTS=true.
7
8It allows to avoid meson error during build when ip isn't installed.
9
10Closes: #359
11
12Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
13Signed-off-by: Heiko Becker <heirecka@exherbo.org>
14[ pvorel: Rename variable TEST => SKIP_TESTS, default false, adjust
15the description ]
16Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
17
18Upstream-Status: Backport [3163c49f9f4ad473a00d8a345ee334a028376011]
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20---
21 meson_options.txt | 3 ++
22 ping/meson.build | 84 ++-----------------------------------------
23 ping/test/meson.build | 81 +++++++++++++++++++++++++++++++++++++++++
24 3 files changed, 86 insertions(+), 82 deletions(-)
25 create mode 100644 ping/test/meson.build
26
27diff --git a/meson_options.txt b/meson_options.txt
28index ac5f5d9..517667f 100644
29--- a/meson_options.txt
30+++ b/meson_options.txt
31@@ -72,3 +72,6 @@ option('INSTALL_SYSTEMD_UNITS', type: 'boolean', value: false,
32
33 option('USE_GETTEXT', type: 'boolean', value: true,
34 description: 'Enable I18N')
35+
36+option('SKIP_TESTS', type: 'boolean', value: false,
37+ description: 'Skip tests during build')
38diff --git a/ping/meson.build b/ping/meson.build
39index 1e678ec..83ea353 100644
40--- a/ping/meson.build
41+++ b/ping/meson.build
42@@ -27,86 +27,6 @@ if (setcap_ping)
43 )
44 endif
45
46-##### TESTS #####
47-
48-# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
49-
50-# GitHub CI does not have working IPv6
51-# https://github.com/actions/virtual-environments/issues/668
52-ipv6_dst = []
53-ipv6_switch = []
54-r = run_command('ip', '-6', 'a')
55-if r.stdout().strip().contains('::1')
56- message('IPv6 enabled')
57- ipv6_dst = [ '::1' ]
58- ipv6_switch = [ '-6' ]
59-else
60- message('WARNING: IPv6 disabled')
61+if not get_option('SKIP_TESTS')
62+ subdir('test')
63 endif
64-
65-run_as_root = false
66-r = run_command('id', '-u')
67-if r.stdout().strip().to_int() == 0
68- message('running as root')
69- run_as_root = true
70-else
71- message('running as normal user')
72-endif
73-
74-foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
75- foreach switch : [ '', '-4' ] + ipv6_switch
76- args = [ '-c1', dst ]
77- should_fail = false
78-
79- if switch != ''
80- args = [switch] + args
81- if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
82- should_fail = true
83- endif
84- endif
85-
86- name = 'ping ' + ' '.join(args)
87- test(name, ping, args : args, should_fail : should_fail)
88- endforeach
89-endforeach
90-
91-ping_tests_opt = [
92- [ '-c1' ],
93- [ '-c5', '-i0.1' ],
94- [ '-c1', '-I', 'lo' ],
95- [ '-c1', '-w1' ],
96- [ '-c1', '-W1' ],
97- [ '-c1', '-W1.1' ],
98-]
99-foreach dst : [ '127.0.0.1' ] + ipv6_dst
100- foreach args : ping_tests_opt
101- args += [ dst ]
102- name = 'ping ' + ' '.join(args)
103- test(name, ping, args : args)
104- endforeach
105-endforeach
106-
107-ping_tests_opt_fail = [
108- [ '-c1.1' ],
109- [ '-I', 'nonexisting' ],
110- [ '-w0.1' ],
111- [ '-w0,1' ],
112-]
113-foreach dst : [ '127.0.0.1' ] + ipv6_dst
114- foreach args : ping_tests_opt_fail
115- args += [ dst ]
116- name = 'ping ' + ' '.join(args)
117- test(name, ping, args : args, should_fail : true)
118- endforeach
119-endforeach
120-
121-ping_tests_user_fail = [
122- [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
123-]
124-foreach dst : [ '127.0.0.1' ] + ipv6_dst
125- foreach args : ping_tests_user_fail
126- args += [ dst ]
127- name = 'ping ' + ' '.join(args)
128- test(name, ping, args : args, should_fail : not run_as_root)
129- endforeach
130-endforeach
131diff --git a/ping/test/meson.build b/ping/test/meson.build
132new file mode 100644
133index 0000000..43aed75
134--- /dev/null
135+++ b/ping/test/meson.build
136@@ -0,0 +1,81 @@
137+# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
138+
139+# GitHub CI does not have working IPv6
140+# https://github.com/actions/virtual-environments/issues/668
141+ipv6_dst = []
142+ipv6_switch = []
143+r = run_command('ip', '-6', 'a')
144+if r.stdout().strip().contains('::1')
145+ message('IPv6 enabled')
146+ ipv6_dst = [ '::1' ]
147+ ipv6_switch = [ '-6' ]
148+else
149+ message('WARNING: IPv6 disabled')
150+endif
151+
152+run_as_root = false
153+r = run_command('id', '-u')
154+if r.stdout().strip().to_int() == 0
155+ message('running as root')
156+ run_as_root = true
157+else
158+ message('running as normal user')
159+endif
160+
161+foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
162+ foreach switch : [ '', '-4' ] + ipv6_switch
163+ args = [ '-c1', dst ]
164+ should_fail = false
165+
166+ if switch != ''
167+ args = [switch] + args
168+ if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
169+ should_fail = true
170+ endif
171+ endif
172+
173+ name = 'ping ' + ' '.join(args)
174+ test(name, ping, args : args, should_fail : should_fail)
175+ endforeach
176+endforeach
177+
178+ping_tests_opt = [
179+ [ '-c1' ],
180+ [ '-c5', '-i0.1' ],
181+ [ '-c1', '-I', 'lo' ],
182+ [ '-c1', '-w1' ],
183+ [ '-c1', '-W1' ],
184+ [ '-c1', '-W1.1' ],
185+]
186+foreach dst : [ '127.0.0.1' ] + ipv6_dst
187+ foreach args : ping_tests_opt
188+ args += [ dst ]
189+ name = 'ping ' + ' '.join(args)
190+ test(name, ping, args : args)
191+ endforeach
192+endforeach
193+
194+ping_tests_opt_fail = [
195+ [ '-c1.1' ],
196+ [ '-I', 'nonexisting' ],
197+ [ '-w0.1' ],
198+ [ '-w0,1' ],
199+]
200+foreach dst : [ '127.0.0.1' ] + ipv6_dst
201+ foreach args : ping_tests_opt_fail
202+ args += [ dst ]
203+ name = 'ping ' + ' '.join(args)
204+ test(name, ping, args : args, should_fail : true)
205+ endforeach
206+endforeach
207+
208+ping_tests_user_fail = [
209+ [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
210+]
211+foreach dst : [ '127.0.0.1' ] + ipv6_dst
212+ foreach args : ping_tests_user_fail
213+ args += [ dst ]
214+ name = 'ping ' + ' '.join(args)
215+ test(name, ping, args : args, should_fail : not run_as_root)
216+ endforeach
217+endforeach
218--
2192.30.2
220
diff --git a/meta/recipes-extended/iputils/iputils_20210722.bb b/meta/recipes-extended/iputils/iputils_20211215.bb
index d81f787dd8..b6b641344c 100644
--- a/meta/recipes-extended/iputils/iputils_20210722.bb
+++ b/meta/recipes-extended/iputils/iputils_20211215.bb
@@ -1,20 +1,19 @@
1SUMMARY = "Network monitoring tools" 1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ 2DESCRIPTION = "Utilities for the IP protocol, including \
3tracepath, tracepath6, ping, ping6 and arping." 3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "https://github.com/iputils/iputils" 4HOMEPAGE = "https://github.com/iputils/iputils"
5SECTION = "console/network" 5SECTION = "console/network"
6 6
7LICENSE = "BSD-3-Clause & GPLv2+" 7LICENSE = "BSD-3-Clause & GPLv2+"
8 8
9LIC_FILES_CHKSUM = "file://LICENSE;md5=55aa8c9fcad0691cef0ecd420361e390" 9LIC_FILES_CHKSUM = "file://LICENSE;md5=bb64c89bb0e23b72930d2380894c47a1"
10 10
11DEPENDS = "gnutls" 11DEPENDS = "gnutls"
12 12
13SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https \ 13SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https \
14 file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \ 14 file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \
15 file://0001-meson-Make-tests-optional.patch \
16 " 15 "
17SRCREV = "71bb2a6c72e9f658e90ac618c73d873a76bbaa81" 16SRCREV = "1d1e7c43210d8af316a41cb2c53d612a4c16f34d"
18 17
19S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
20 19
@@ -25,7 +24,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>20\d+)"
25CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214" 24CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
26 25
27PACKAGECONFIG ??= "libcap rarpd \ 26PACKAGECONFIG ??= "libcap rarpd \
28 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod traceroute6', '', d)} \ 27 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod', '', d)} \
29 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" 28 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
30PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false -DNO_SETCAP_OR_SUID=true, libcap libcap-native" 29PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false -DNO_SETCAP_OR_SUID=true, libcap libcap-native"
31PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2" 30PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2"
@@ -33,8 +32,6 @@ PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext"
33PACKAGECONFIG[ninfod] = "-DBUILD_NINFOD=true,-DBUILD_NINFOD=false," 32PACKAGECONFIG[ninfod] = "-DBUILD_NINFOD=true,-DBUILD_NINFOD=false,"
34PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false," 33PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false,"
35PACKAGECONFIG[systemd] = "-Dsystemdunitdir=${systemd_system_unitdir},,systemd" 34PACKAGECONFIG[systemd] = "-Dsystemdunitdir=${systemd_system_unitdir},,systemd"
36PACKAGECONFIG[tftpd] = "-DBUILD_TFTPD=true, -DBUILD_TFTPD=false,"
37PACKAGECONFIG[traceroute6] = "-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false,"
38PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt" 35PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt"
39 36
40inherit meson systemd update-alternatives pkgconfig 37inherit meson systemd update-alternatives pkgconfig
@@ -48,8 +45,7 @@ ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
48 45
49SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff ${PN}-rdisc \ 46SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff ${PN}-rdisc \
50 ${@bb.utils.contains('PACKAGECONFIG', 'rarpd', '${PN}-rarpd', '', d)} \ 47 ${@bb.utils.contains('PACKAGECONFIG', 'rarpd', '${PN}-rarpd', '', d)} \
51 ${@bb.utils.contains('PACKAGECONFIG', 'tftpd', '${PN}-tftpd', '', d)} \ 48 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ninfod', '', d)}"
52 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-traceroute6 ${PN}-ninfod', '', d)}"
53PACKAGES += "${SPLITPKGS}" 49PACKAGES += "${SPLITPKGS}"
54 50
55ALLOW_EMPTY:${PN} = "1" 51ALLOW_EMPTY:${PN} = "1"
@@ -59,9 +55,7 @@ FILES:${PN} = ""
59FILES:${PN}-ping = "${base_bindir}/ping.${BPN}" 55FILES:${PN}-ping = "${base_bindir}/ping.${BPN}"
60FILES:${PN}-arping = "${base_bindir}/arping" 56FILES:${PN}-arping = "${base_bindir}/arping"
61FILES:${PN}-tracepath = "${base_bindir}/tracepath" 57FILES:${PN}-tracepath = "${base_bindir}/tracepath"
62FILES:${PN}-traceroute6 = "${base_bindir}/traceroute6"
63FILES:${PN}-clockdiff = "${base_bindir}/clockdiff" 58FILES:${PN}-clockdiff = "${base_bindir}/clockdiff"
64FILES:${PN}-tftpd = "${base_bindir}/tftpd ${sysconfdir}/xinetd.d/tftp"
65FILES:${PN}-rarpd = "${base_sbindir}/rarpd ${systemd_system_unitdir}/rarpd@.service" 59FILES:${PN}-rarpd = "${base_sbindir}/rarpd ${systemd_system_unitdir}/rarpd@.service"
66FILES:${PN}-rdisc = "${base_sbindir}/rdisc" 60FILES:${PN}-rdisc = "${base_sbindir}/rdisc"
67FILES:${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh" 61FILES:${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh"