Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
Date: Tue, 10 Jul 2018 23:39:20
Message-Id: 1531265893.3ee18d29f9d2f245c8a9acda7a767edd247f7558.whissi@gentoo
1 commit: 3ee18d29f9d2f245c8a9acda7a767edd247f7558
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 10 23:38:13 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 10 23:38:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee18d29
7
8 net-misc/iputils: bump to v20180629
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 net-misc/iputils/Manifest | 2 +
13 net-misc/iputils/files/iputils-20180629-musl.patch | 87 ++++++++++
14 net-misc/iputils/iputils-20180629.ebuild | 178 +++++++++++++++++++++
15 3 files changed, 267 insertions(+)
16
17 diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
18 index 4bd330cb3a8..e2cf5240b90 100644
19 --- a/net-misc/iputils/Manifest
20 +++ b/net-misc/iputils/Manifest
21 @@ -1,2 +1,4 @@
22 DIST iputils-20171016_pre.tar.gz 195254 BLAKE2B 1170db29d53dd8285b11d4df7b7da2ea3bd2be3599a3f0df85ca7e64247f2a534d03e43a2b6267ba4b9c0b65fcc58045151833ae2c1035a839ed728a389804af SHA512 570896fc58d945e08032134701ab6ea02bbf6fff420437bc5f89687cdcce6f3c1c64418a4c5ff54ca3cdc582bae2c95e196b2c8368eba2b163ebf88490aabf99
23 +DIST iputils-20180629.tar.gz 195094 BLAKE2B 81bf6ef427eac0769ea3f95c20294b46c81f9c619551234eb265b3a428998a96cf3df0cdc7499f9eea280c1999e899e87c3f4a863141de251a9c509840bc83b3 SHA512 16b8f5ad1cf88083ebaee0a71fddb14bb0a904336fd0baebfcca86c27ac0773553b21d12790b05cab7661d6432c75bbb1523e871e5e1b77faacd13ccc84f4476
24 DIST iputils-manpages-20171016_pre.tar.xz 29764 BLAKE2B 47def1413b2cdcfba7f924dd7a045063c289c244ba8fb4dc43caf2a8d52032b57ee6d86ee4dffd5351faa3124d4c83a33ca3365866568c2164b374eed9d70ec0 SHA512 31b4b0b4e46d7c98530577392c636e4397917cbe415762145a119e68e3223bc85b9d5afcfe61ae01584a35f6a1a772adffc52deeedc722c474179fa1d208d8d9
25 +DIST iputils-manpages-20180629.tar.xz 29804 BLAKE2B 15983cc97bc6b6853c193f046687f10be11902f7e1d2dc2eec6c58edd1926f10152108d378858b0d7eb2d2908f038965b05515c4927aedc460282a22307883ad SHA512 1c5b0bab8496a3f3d9b5080029221231a497d9a5e91c61bd0ddd0b63fd51572d052801294aafd08e1dc8ad448b82cdaf48c72f0b08cc143f9c144f3db6848d9a
26
27 diff --git a/net-misc/iputils/files/iputils-20180629-musl.patch b/net-misc/iputils/files/iputils-20180629-musl.patch
28 new file mode 100644
29 index 00000000000..48742d96602
30 --- /dev/null
31 +++ b/net-misc/iputils/files/iputils-20180629-musl.patch
32 @@ -0,0 +1,87 @@
33 +commit 5007d7067918fb3d950d34c01d059e5222db679a
34 +Author: Aric Belsito <lluixhi@×××××.com>
35 +AuthorDate: Mon Dec 4 00:10:29 2017 +0100
36 +Commit: Thomas Deutschmann <whissi@g.o>
37 +CommitDate: Wed Jul 11 01:33:28 2018 +0200
38 +
39 + Fix build on MUSL
40 +
41 + Add missing AI_IDN and NI_IDN declarations.
42 +
43 + Bug: https://bugs.gentoo.org/503914
44 + Signed-off-by: Thomas Deutschmann <whissi@g.o>
45 +
46 +diff --git a/arping.c b/arping.c
47 +index c2f2129..d753345 100644
48 +--- a/arping.c
49 ++++ b/arping.c
50 +@@ -44,6 +44,13 @@
51 +
52 + #ifdef USE_IDN
53 + #include <locale.h>
54 ++
55 ++#ifndef AI_IDN
56 ++#define AI_IDN 0x0040
57 ++#endif
58 ++#ifndef AI_CANONIDN
59 ++#define AI_CANONIDN 0x0080
60 ++#endif
61 + #endif
62 +
63 + #include "SNAPSHOT.h"
64 +diff --git a/ping.h b/ping.h
65 +index 3e09685..1e51c67 100644
66 +--- a/ping.h
67 ++++ b/ping.h
68 +@@ -37,6 +37,17 @@
69 +
70 + #ifdef USE_IDN
71 + #include <idn2.h>
72 ++
73 ++#ifndef AI_IDN
74 ++#define AI_IDN 0x0040
75 ++#endif
76 ++#ifndef AI_CANONIDN
77 ++#define AI_CANONIDN 0x0080
78 ++#endif
79 ++#ifndef NI_IDN
80 ++#define NI_IDN 32
81 ++#endif
82 ++
83 + #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
84 + #define getnameinfo_flags NI_IDN
85 + #else
86 +diff --git a/tracepath.c b/tracepath.c
87 +index 53bda16..9558e49 100644
88 +--- a/tracepath.c
89 ++++ b/tracepath.c
90 +@@ -29,6 +29,14 @@
91 +
92 + #ifdef USE_IDN
93 + #include <locale.h>
94 ++
95 ++#ifndef AI_IDN
96 ++#define AI_IDN 0x0040
97 ++#endif
98 ++#ifndef NI_IDN
99 ++#define NI_IDN 32
100 ++#endif
101 ++
102 + #define getnameinfo_flags NI_IDN
103 + #else
104 + #define getnameinfo_flags 0
105 +diff --git a/traceroute6.c b/traceroute6.c
106 +index a1022f9..ab34615 100644
107 +--- a/traceroute6.c
108 ++++ b/traceroute6.c
109 +@@ -246,6 +246,10 @@
110 + #ifdef USE_IDN
111 + #include <locale.h>
112 +
113 ++#ifndef NI_IDN
114 ++#define NI_IDN 32
115 ++#endif
116 ++
117 + #define ADDRINFO_IDN_FLAGS AI_IDN
118 + #define getnameinfo_flags NI_IDN
119 + #else
120
121 diff --git a/net-misc/iputils/iputils-20180629.ebuild b/net-misc/iputils/iputils-20180629.ebuild
122 new file mode 100644
123 index 00000000000..fb577b0efbb
124 --- /dev/null
125 +++ b/net-misc/iputils/iputils-20180629.ebuild
126 @@ -0,0 +1,178 @@
127 +# Copyright 1999-2018 Gentoo Foundation
128 +# Distributed under the terms of the GNU General Public License v2
129 +
130 +# For released versions, we precompile the man/html pages and store
131 +# them in a tarball on our mirrors. This avoids ugly issues while
132 +# building stages, and reduces depedencies.
133 +# To regenerate man/html pages emerge iputils-99999999[doc] with
134 +# EGIT_COMMIT set to release tag and tar ${S}/doc folder.
135 +
136 +EAPI="6"
137 +
138 +inherit flag-o-matic toolchain-funcs fcaps
139 +
140 +MY_PV="${PV/_pre/}"
141 +
142 +PATCHES=(
143 + "${FILESDIR}"/${PN}-20180629-musl.patch
144 +)
145 +
146 +if [[ ${PV} == "99999999" ]] ; then
147 + EGIT_REPO_URI="https://github.com/iputils/iputils.git"
148 + inherit git-r3
149 +else
150 + SRC_URI="https://github.com/iputils/iputils/archive/s${MY_PV}.tar.gz -> ${P}.tar.gz
151 + https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${MY_PV}.tar.xz"
152 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
153 +fi
154 +
155 +DESCRIPTION="Network monitoring tools including ping and ping6"
156 +HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
157 +
158 +LICENSE="BSD GPL-2+ rdisc"
159 +SLOT="0"
160 +IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
161 +
162 +LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
163 + idn? ( net-dns/libidn2:=[static-libs(+)] )
164 + ipv6? (
165 + ssl? (
166 + gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
167 + !gcrypt? (
168 + nettle? ( dev-libs/nettle[static-libs(+)] )
169 + !nettle? (
170 + libressl? ( dev-libs/libressl:0=[static-libs(+)] )
171 + !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
172 + )
173 + )
174 + )
175 + )
176 +"
177 +RDEPEND="arping? ( !net-misc/arping )
178 + rarpd? ( !net-misc/rarpd )
179 + traceroute? ( !net-analyzer/traceroute )
180 + !static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
181 +DEPEND="${RDEPEND}
182 + static? ( ${LIB_DEPEND} )
183 + virtual/os-headers
184 +"
185 +if [[ ${PV} == "99999999" ]] ; then
186 + DEPEND+="app-text/docbook-xml-dtd:4.2
187 + app-text/docbook-xml-dtd:4.5
188 + app-text/docbook-xsl-stylesheets
189 + dev-libs/libxslt:0
190 + "
191 +fi
192 +
193 +[ "${PV}" = "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
194 +
195 +src_prepare() {
196 + use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
197 +
198 + default
199 +}
200 +
201 +src_configure() {
202 + use static && append-ldflags -static
203 +
204 + TARGETS=(
205 + ping
206 + $(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
207 + )
208 + if use ipv6 ; then
209 + TARGETS+=(
210 + $(usex traceroute 'traceroute6' '')
211 + )
212 + fi
213 +
214 + myconf=(
215 + USE_CRYPTO=no
216 + USE_GCRYPT=no
217 + USE_NETTLE=no
218 + )
219 +
220 + if use ipv6 && use ssl ; then
221 + myconf=(
222 + USE_CRYPTO=yes
223 + USE_GCRYPT=$(usex gcrypt)
224 + USE_NETTLE=$(usex nettle)
225 + )
226 + fi
227 +}
228 +
229 +src_compile() {
230 + tc-export CC
231 + emake \
232 + USE_CAP=$(usex caps) \
233 + USE_IDN=$(usex idn) \
234 + IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \
235 + TARGETS="${TARGETS[*]}" \
236 + ${myconf[@]}
237 +
238 + if [[ ${PV} == "99999999" ]] ; then
239 + emake man
240 +
241 + use doc && emake html
242 + fi
243 +}
244 +
245 +src_install() {
246 + into /
247 + dobin ping
248 + dosym ping /bin/ping4
249 + if use ipv6 ; then
250 + dosym ping /bin/ping6
251 + dosym ping.8 /usr/share/man/man8/ping6.8
252 + fi
253 + doman doc/ping.8
254 +
255 + if use arping ; then
256 + dobin arping
257 + doman doc/arping.8
258 + fi
259 +
260 + into /usr
261 +
262 + if use tracepath ; then
263 + dosbin tracepath
264 + doman doc/tracepath.8
265 + dosym tracepath /usr/sbin/tracepath4
266 + fi
267 +
268 + local u
269 + for u in clockdiff rarpd rdisc tftpd ; do
270 + if use ${u} ; then
271 + case ${u} in
272 + clockdiff) dobin ${u};;
273 + *) dosbin ${u};;
274 + esac
275 + doman doc/${u}.8
276 + fi
277 + done
278 +
279 + if use tracepath && use ipv6 ; then
280 + dosym tracepath /usr/sbin/tracepath6
281 + dosym tracepath.8 /usr/share/man/man8/tracepath6.8
282 + fi
283 +
284 + if use traceroute && use ipv6 ; then
285 + dosbin traceroute6
286 + doman doc/traceroute6.8
287 + fi
288 +
289 + if use rarpd ; then
290 + newinitd "${FILESDIR}"/rarpd.init.d rarpd
291 + newconfd "${FILESDIR}"/rarpd.conf.d rarpd
292 + fi
293 +
294 + dodoc INSTALL.md
295 +
296 + use doc && dodoc doc/*.html
297 +}
298 +
299 +pkg_postinst() {
300 + fcaps cap_net_raw \
301 + bin/ping \
302 + $(usex arping 'bin/arping' '') \
303 + $(usex clockdiff 'usr/bin/clockdiff' '')
304 +}