Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: net-misc/rsync/files/
Date: Mon, 29 Jul 2019 15:43:48
Message-Id: 1564415008.62e4fb550a8dc8beb678f58eef05b04689e0539f.blueness@gentoo
1 commit: 62e4fb550a8dc8beb678f58eef05b04689e0539f
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 29 15:42:51 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 29 15:43:28 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=62e4fb55
7
8 Revert "net-misc/rsync: update ipv6 patch"
9
10 This reverts commit c4c854fbd41c4edb6f512222f52e26b53355957e.
11
12 This commit breaks the configuration phase. Since rsync is critical
13 for stage builds, we are reverting this for now.
14
15 net-misc/rsync/files/rsync-fix-musl-ipv6.patch | 472 ++++++++++++++++++++++++-
16 1 file changed, 455 insertions(+), 17 deletions(-)
17
18 diff --git a/net-misc/rsync/files/rsync-fix-musl-ipv6.patch b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
19 index ca692b5..53d7381 100644
20 --- a/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
21 +++ b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
22 @@ -1,27 +1,25 @@
23 -From 811db086507aceaec0022798dd418956cdd4b54e Mon Sep 17 00:00:00 2001
24 +From 78621d2d5e12c9e7c54ab0a15bb90495d7927251 Mon Sep 17 00:00:00 2001
25 From: Pierre-Olivier Mercier <nemunaire@×××××××.re>
26 -Date: Mon, 4 Sep 2017 22:29:55 +0200
27 -Subject: [PATCH] Test IPv6 compatibility instead of relying on library probes.
28 +Date: Wed, 8 Mar 2017 12:44:11 +0100
29 +Subject: [PATCH] musl compatibility
30
31 -Legacy configure behaviour was to detect IPv6 support through known IPv6
32 -capable version of common standard libraries. Now: it runs a POSIX test
33 -to determine if IPv6 is usable (in case it has not been disabled).
34 ---
35 - configure.ac | 138 ++++++++++++-----------------------------------------------
36 - 1 file changed, 28 insertions(+), 110 deletions(-)
37 + configure.ac | 138 +++++-------------------
38 + configure.sh | 348 +++++++++++++----------------------------------------------
39 + 2 files changed, 102 insertions(+), 384 deletions(-)
40
41 diff --git a/configure.ac b/configure.ac
42 -index e01e124b..b5db8515 100644
43 +index 1b32dfb..891f7b9 100644
44 --- a/configure.ac
45 +++ b/configure.ac
46 @@ -204,119 +204,37 @@ if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then
47 AC_SYS_LARGEFILE
48 fi
49 -
50 +
51 -ipv6type=unknown
52 -ipv6lib=none
53 -ipv6trylibc=yes
54 -
55 +
56 +# Checks if IPv6 is requested
57 +AC_MSG_CHECKING([whether to enable ipv6])
58 AC_ARG_ENABLE(ipv6,
59 @@ -139,17 +137,17 @@ index e01e124b..b5db8515 100644
60 + AC_DEFINE(INET6, 1, [true if you have IPv6])
61 + ;;
62 + esac ],
63 -
64 +
65 - AC_SEARCH_LIBS(getaddrinfo, inet6)
66 -fi
67 + AC_TRY_RUN([ /* AF_INET6 avalable check */
68 -+#include <stdlib.h>
69 +#include <sys/types.h>
70 +#include <sys/socket.h>
71 +main()
72 +{
73 ++ exit(0);
74 + if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
75 -+ exit(1);
76 ++ exit(1);
77 + else
78 + exit(0);
79 +}
80 @@ -159,9 +157,449 @@ index e01e124b..b5db8515 100644
81 + AC_MSG_RESULT(no),
82 + AC_MSG_RESULT(no)
83 +))
84 -
85 +
86 dnl Do you want to disable use of locale functions
87 AC_ARG_ENABLE([locale],
88 ---
89 -2.13.0
90 +diff --git a/configure.sh b/configure.sh
91 +index d6e9c8d..cfaaa99 100755
92 +--- a/configure.sh
93 ++++ b/configure.sh
94 +@@ -1349,7 +1349,7 @@ Optional Features:
95 + --enable-maintainer-mode
96 + turn on extra debug features
97 + --disable-largefile omit support for large files
98 +- --disable-ipv6 do not even try to use IPv6
99 ++ --disable-ipv6 disable ipv6 support
100 + --disable-locale disable locale features
101 + --disable-iconv-open disable all use of iconv_open() function
102 + --disable-iconv disable rsync's --iconv option
103 +@@ -1577,6 +1577,37 @@ fi
104 +
105 + } # ac_fn_c_try_run
106 +
107 ++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
108 ++# -------------------------------------------------------
109 ++# Tests whether HEADER exists and can be compiled using the include files in
110 ++# INCLUDES, setting the cache variable VAR accordingly.
111 ++ac_fn_c_check_header_compile ()
112 ++{
113 ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
114 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
115 ++$as_echo_n "checking for $2... " >&6; }
116 ++if eval \${$3+:} false; then :
117 ++ $as_echo_n "(cached) " >&6
118 ++else
119 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
120 ++/* end confdefs.h. */
121 ++$4
122 ++#include <$2>
123 ++_ACEOF
124 ++if ac_fn_c_try_compile "$LINENO"; then :
125 ++ eval "$3=yes"
126 ++else
127 ++ eval "$3=no"
128 ++fi
129 ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
130 ++fi
131 ++eval ac_res=\$$3
132 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
133 ++$as_echo "$ac_res" >&6; }
134 ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
135 ++
136 ++} # ac_fn_c_check_header_compile
137 ++
138 + # ac_fn_c_try_link LINENO
139 + # -----------------------
140 + # Try to link conftest.$ac_ext, and return whether this succeeded.
141 +@@ -1623,37 +1654,6 @@ fi
142 +
143 + } # ac_fn_c_try_link
144 +
145 +-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
146 +-# -------------------------------------------------------
147 +-# Tests whether HEADER exists and can be compiled using the include files in
148 +-# INCLUDES, setting the cache variable VAR accordingly.
149 +-ac_fn_c_check_header_compile ()
150 +-{
151 +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
152 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
153 +-$as_echo_n "checking for $2... " >&6; }
154 +-if eval \${$3+:} false; then :
155 +- $as_echo_n "(cached) " >&6
156 +-else
157 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
158 +-/* end confdefs.h. */
159 +-$4
160 +-#include <$2>
161 +-_ACEOF
162 +-if ac_fn_c_try_compile "$LINENO"; then :
163 +- eval "$3=yes"
164 +-else
165 +- eval "$3=no"
166 +-fi
167 +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
168 +-fi
169 +-eval ac_res=\$$3
170 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
171 +-$as_echo "$ac_res" >&6; }
172 +- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
173 +-
174 +-} # ac_fn_c_check_header_compile
175 +-
176 + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
177 + # -------------------------------------------------------
178 + # Tests whether HEADER exists, giving a warning if it cannot be compiled using
179 +@@ -4548,7 +4548,7 @@ else
180 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
181 + since some C++ compilers masquerading as C compilers
182 + incorrectly reject 9223372036854775807. */
183 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
184 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
185 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
186 + && LARGE_OFF_T % 2147483647 == 1)
187 + ? 1 : -1];
188 +@@ -4594,7 +4594,7 @@ else
189 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
190 + since some C++ compilers masquerading as C compilers
191 + incorrectly reject 9223372036854775807. */
192 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
193 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
194 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
195 + && LARGE_OFF_T % 2147483647 == 1)
196 + ? 1 : -1];
197 +@@ -4618,7 +4618,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
198 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
199 + since some C++ compilers masquerading as C compilers
200 + incorrectly reject 9223372036854775807. */
201 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
202 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
203 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
204 + && LARGE_OFF_T % 2147483647 == 1)
205 + ? 1 : -1];
206 +@@ -4663,7 +4663,7 @@ else
207 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
208 + since some C++ compilers masquerading as C compilers
209 + incorrectly reject 9223372036854775807. */
210 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
211 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
212 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
213 + && LARGE_OFF_T % 2147483647 == 1)
214 + ? 1 : -1];
215 +@@ -4687,7 +4687,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
216 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
217 + since some C++ compilers masquerading as C compilers
218 + incorrectly reject 9223372036854775807. */
219 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
220 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
221 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
222 + && LARGE_OFF_T % 2147483647 == 1)
223 + ? 1 : -1];
224 +@@ -4725,262 +4725,61 @@ fi
225 +
226 + fi
227 +
228 +-ipv6type=unknown
229 +-ipv6lib=none
230 +-ipv6trylibc=yes
231 +
232 ++# Checks if IPv6 is requested
233 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
234 ++$as_echo_n "checking whether to enable ipv6... " >&6; }
235 + # Check whether --enable-ipv6 was given.
236 + if test "${enable_ipv6+set}" = set; then :
237 +- enableval=$enable_ipv6;
238 +-fi
239 +-
240 +-if test x"$enable_ipv6" != x"no"; then
241 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
242 +-$as_echo_n "checking ipv6 stack type... " >&6; }
243 +- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta cygwin; do
244 +- case $i in
245 +- inria)
246 +- # http://www.kame.net/
247 +-
248 +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
249 +-/* end confdefs.h. */
250 +-
251 +-#include <netinet/in.h>
252 +-#ifdef IPV6_INRIA_VERSION
253 +-yes
254 +-#endif
255 +-_ACEOF
256 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
257 +- $EGREP "yes" >/dev/null 2>&1; then :
258 +- ipv6type=$i;
259 +-
260 +-$as_echo "#define INET6 1" >>confdefs.h
261 +-
262 +-
263 +-fi
264 +-rm -f conftest*
265 +-
266 +- ;;
267 +- kame)
268 +- # http://www.kame.net/
269 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
270 +-/* end confdefs.h. */
271 +-
272 +-#include <netinet/in.h>
273 +-#ifdef __KAME__
274 +-yes
275 +-#endif
276 +-_ACEOF
277 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
278 +- $EGREP "yes" >/dev/null 2>&1; then :
279 +- ipv6type=$i;
280 +-
281 +-$as_echo "#define INET6 1" >>confdefs.h
282 +-
283 +-fi
284 +-rm -f conftest*
285 +-
286 +- ;;
287 +- linux-glibc)
288 +- # http://www.v6.linux.or.jp/
289 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
290 +-/* end confdefs.h. */
291 +-
292 +-#include <features.h>
293 +-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
294 +-yes
295 +-#endif
296 +-_ACEOF
297 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
298 +- $EGREP "yes" >/dev/null 2>&1; then :
299 +- ipv6type=$i;
300 +-
301 +-$as_echo "#define INET6 1" >>confdefs.h
302 +-
303 +-fi
304 +-rm -f conftest*
305 +-
306 +- ;;
307 +- linux-inet6)
308 +- # http://www.v6.linux.or.jp/
309 +- if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then
310 +- ipv6type=$i
311 +- ipv6lib=inet6
312 +- ipv6libdir=/usr/inet6/lib
313 +- ipv6trylibc=yes;
314 +-
315 +-$as_echo "#define INET6 1" >>confdefs.h
316 +-
317 +- CFLAGS="-I/usr/inet6/include $CFLAGS"
318 +- fi
319 +- ;;
320 +- solaris)
321 +- # http://www.sun.com
322 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
323 +-/* end confdefs.h. */
324 +-
325 +-#include <netinet/ip6.h>
326 +-#ifdef __sun
327 +-yes
328 +-#endif
329 +-_ACEOF
330 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
331 +- $EGREP "yes" >/dev/null 2>&1; then :
332 +- ipv6type=$i;
333 +-
334 +-$as_echo "#define INET6 1" >>confdefs.h
335 +-
336 +-fi
337 +-rm -f conftest*
338 +-
339 +- ;;
340 +- toshiba)
341 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
342 +-/* end confdefs.h. */
343 +-
344 +-#include <sys/param.h>
345 +-#ifdef _TOSHIBA_INET6
346 +-yes
347 +-#endif
348 +-_ACEOF
349 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
350 +- $EGREP "yes" >/dev/null 2>&1; then :
351 +- ipv6type=$i;
352 +- ipv6lib=inet6;
353 +- ipv6libdir=/usr/local/v6/lib;
354 +-
355 +-$as_echo "#define INET6 1" >>confdefs.h
356 +-
357 +-fi
358 +-rm -f conftest*
359 +-
360 +- ;;
361 +- v6d)
362 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
363 +-/* end confdefs.h. */
364 +-
365 +-#include </usr/local/v6/include/sys/v6config.h>
366 +-#ifdef __V6D__
367 +-yes
368 +-#endif
369 +-_ACEOF
370 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
371 +- $EGREP "yes" >/dev/null 2>&1; then :
372 +- ipv6type=$i;
373 +- ipv6lib=v6;
374 +- ipv6libdir=/usr/local/v6/lib;
375 +-
376 +-$as_echo "#define INET6 1" >>confdefs.h
377 +-
378 +-fi
379 +-rm -f conftest*
380 +-
381 +- ;;
382 +- zeta)
383 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
384 +-/* end confdefs.h. */
385 +-
386 +-#include <sys/param.h>
387 +-#ifdef _ZETA_MINAMI_INET6
388 +-yes
389 +-#endif
390 +-_ACEOF
391 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
392 +- $EGREP "yes" >/dev/null 2>&1; then :
393 +- ipv6type=$i;
394 +- ipv6lib=inet6;
395 +- ipv6libdir=/usr/local/v6/lib;
396 +-
397 +-$as_echo "#define INET6 1" >>confdefs.h
398 +-
399 +-fi
400 +-rm -f conftest*
401 +-
402 +- ;;
403 +- cygwin)
404 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
405 +-/* end confdefs.h. */
406 +-
407 +-#include <netinet/in.h>
408 +-#ifdef _CYGWIN_IN6_H
409 +-yes
410 +-#endif
411 +-_ACEOF
412 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
413 +- $EGREP "yes" >/dev/null 2>&1; then :
414 +- ipv6type=$i;
415 ++ enableval=$enable_ipv6; case "$enableval" in
416 ++ no)
417 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
418 ++$as_echo "no" >&6; }
419 ++ ;;
420 ++ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
421 ++$as_echo "yes" >&6; }
422 +
423 + $as_echo "#define INET6 1" >>confdefs.h
424 +
425 +-fi
426 +-rm -f conftest*
427 ++ ;;
428 ++ esac
429 ++else
430 ++ if test "$cross_compiling" = yes; then :
431 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
432 ++$as_echo "no" >&6; }
433 +
434 +- ;;
435 +- esac
436 +- if test "$ipv6type" != "unknown"; then
437 +- break
438 +- fi
439 +- done
440 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
441 +-$as_echo "$ipv6type" >&6; }
442 +-
443 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
444 +-$as_echo_n "checking for library containing getaddrinfo... " >&6; }
445 +-if ${ac_cv_search_getaddrinfo+:} false; then :
446 +- $as_echo_n "(cached) " >&6
447 + else
448 +- ac_func_search_save_LIBS=$LIBS
449 +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
450 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
451 + /* end confdefs.h. */
452 +-
453 +-/* Override any GCC internal prototype to avoid an error.
454 +- Use char because int might match the return type of a GCC
455 +- builtin and then its argument prototype would still apply. */
456 +-#ifdef __cplusplus
457 +-extern "C"
458 +-#endif
459 +-char getaddrinfo ();
460 +-int
461 +-main ()
462 ++ /* AF_INET6 avalable check */
463 ++#include <sys/types.h>
464 ++#include <sys/socket.h>
465 ++main()
466 + {
467 +-return getaddrinfo ();
468 +- ;
469 +- return 0;
470 ++ exit(0);
471 ++ if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
472 ++ exit(1);
473 ++ else
474 ++ exit(0);
475 + }
476 ++
477 + _ACEOF
478 +-for ac_lib in '' inet6; do
479 +- if test -z "$ac_lib"; then
480 +- ac_res="none required"
481 +- else
482 +- ac_res=-l$ac_lib
483 +- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
484 +- fi
485 +- if ac_fn_c_try_link "$LINENO"; then :
486 +- ac_cv_search_getaddrinfo=$ac_res
487 +-fi
488 +-rm -f core conftest.err conftest.$ac_objext \
489 +- conftest$ac_exeext
490 +- if ${ac_cv_search_getaddrinfo+:} false; then :
491 +- break
492 +-fi
493 +-done
494 +-if ${ac_cv_search_getaddrinfo+:} false; then :
495 ++if ac_fn_c_try_run "$LINENO"; then :
496 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
497 ++$as_echo "yes" >&6; }
498 ++
499 ++$as_echo "#define INET6 1" >>confdefs.h
500 +
501 + else
502 +- ac_cv_search_getaddrinfo=no
503 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
504 ++$as_echo "no" >&6; }
505 + fi
506 +-rm conftest.$ac_ext
507 +-LIBS=$ac_func_search_save_LIBS
508 ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
509 ++ conftest.$ac_objext conftest.beam conftest.$ac_ext
510 + fi
511 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
512 +-$as_echo "$ac_cv_search_getaddrinfo" >&6; }
513 +-ac_res=$ac_cv_search_getaddrinfo
514 +-if test "$ac_res" != no; then :
515 +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
516 +
517 + fi
518 +
519 +-fi
520 +
521 + # Check whether --enable-locale was given.
522 + if test "${enable_locale+set}" = set; then :
523 +@@ -5006,6 +4805,7 @@ $as_echo "#define SHUTDOWN_ALL_SOCKETS 1" >>confdefs.h
524 + $as_echo "no" >&6; };;
525 + esac
526
527 ++
528 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
529 + $as_echo_n "checking for ANSI C header files... " >&6; }
530 + if ${ac_cv_header_stdc+:} false; then :
531 +--
532 +2.10.2