Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: net-misc/rsync/files/, net-misc/rsync/
Date: Mon, 29 Jan 2018 19:12:16
Message-Id: 1517145870.5ec4cbb0630d630807af09d25689fb1a0bda8785.lluixhi@gentoo
1 commit: 5ec4cbb0630d630807af09d25689fb1a0bda8785
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Fri May 5 16:43:17 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Sun Jan 28 13:24:30 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=5ec4cbb0
7
8 net-misc/rsync: IPv6 compatibility fix
9
10 Bug: https://bugs.gentoo.org/609694
11 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10715
12
13 net-misc/rsync/Manifest | 1 +
14 net-misc/rsync/files/rsync-fix-musl-ipv6.patch | 605 +++++++++++++++++++++++++
15 net-misc/rsync/files/rsyncd.conf-3.0.9-r1 | 15 +
16 net-misc/rsync/files/rsyncd.conf.d | 5 +
17 net-misc/rsync/files/rsyncd.init.d-r1 | 11 +
18 net-misc/rsync/files/rsyncd.logrotate | 9 +
19 net-misc/rsync/files/rsyncd.service | 12 +
20 net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 | 10 +
21 net-misc/rsync/rsync-3.1.2-r2.ebuild | 89 ++++
22 9 files changed, 757 insertions(+)
23
24 diff --git a/net-misc/rsync/Manifest b/net-misc/rsync/Manifest
25 new file mode 100644
26 index 0000000..87500d8
27 --- /dev/null
28 +++ b/net-misc/rsync/Manifest
29 @@ -0,0 +1 @@
30 +DIST rsync-3.1.2.tar.gz 892724 BLAKE2B e366514ae9835ba7c201a9e09fb9342c5e52fa36d45d46300d080403de25a64ba3ed7a703e56b4f47a743a597694a2d0a50bb4bab6cfa0aa7b59a4f7b93b9f21 SHA512 4c55fd69f436ead0cb5a0b7c6fdfef9bb28ddb9c63534eb619e756b118d5b08cfc5e696498650932c86e865b37e06633da947e6720ca0c27ed5c034313ae208b
31
32 diff --git a/net-misc/rsync/files/rsync-fix-musl-ipv6.patch b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
33 new file mode 100644
34 index 0000000..53d7381
35 --- /dev/null
36 +++ b/net-misc/rsync/files/rsync-fix-musl-ipv6.patch
37 @@ -0,0 +1,605 @@
38 +From 78621d2d5e12c9e7c54ab0a15bb90495d7927251 Mon Sep 17 00:00:00 2001
39 +From: Pierre-Olivier Mercier <nemunaire@×××××××.re>
40 +Date: Wed, 8 Mar 2017 12:44:11 +0100
41 +Subject: [PATCH] musl compatibility
42 +
43 +---
44 + configure.ac | 138 +++++-------------------
45 + configure.sh | 348 +++++++++++++----------------------------------------------
46 + 2 files changed, 102 insertions(+), 384 deletions(-)
47 +
48 +diff --git a/configure.ac b/configure.ac
49 +index 1b32dfb..891f7b9 100644
50 +--- a/configure.ac
51 ++++ b/configure.ac
52 +@@ -204,119 +204,37 @@ if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then
53 + AC_SYS_LARGEFILE
54 + fi
55 +
56 +-ipv6type=unknown
57 +-ipv6lib=none
58 +-ipv6trylibc=yes
59 +
60 ++# Checks if IPv6 is requested
61 ++AC_MSG_CHECKING([whether to enable ipv6])
62 + AC_ARG_ENABLE(ipv6,
63 +- AS_HELP_STRING([--disable-ipv6],[do not even try to use IPv6]))
64 +-if test x"$enable_ipv6" != x"no"; then
65 +- AC_MSG_CHECKING([ipv6 stack type])
66 +- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta cygwin; do
67 +- case $i in
68 +- inria)
69 +- # http://www.kame.net/
70 +- AC_EGREP_CPP(yes, [
71 +-#include <netinet/in.h>
72 +-#ifdef IPV6_INRIA_VERSION
73 +-yes
74 +-#endif],
75 +- [ipv6type=$i;
76 +- AC_DEFINE(INET6, 1, [true if you have IPv6])
77 +- ])
78 +- ;;
79 +- kame)
80 +- # http://www.kame.net/
81 +- AC_EGREP_CPP(yes, [
82 +-#include <netinet/in.h>
83 +-#ifdef __KAME__
84 +-yes
85 +-#endif],
86 +- [ipv6type=$i;
87 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
88 +- ;;
89 +- linux-glibc)
90 +- # http://www.v6.linux.or.jp/
91 +- AC_EGREP_CPP(yes, [
92 +-#include <features.h>
93 +-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
94 +-yes
95 +-#endif],
96 +- [ipv6type=$i;
97 +-AC_DEFINE(INET6, 1, [true if you have IPv6])])
98 +- ;;
99 +- linux-inet6)
100 +- # http://www.v6.linux.or.jp/
101 +- if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then
102 +- ipv6type=$i
103 +- ipv6lib=inet6
104 +- ipv6libdir=/usr/inet6/lib
105 +- ipv6trylibc=yes;
106 +- AC_DEFINE(INET6, 1, [true if you have IPv6])
107 +- CFLAGS="-I/usr/inet6/include $CFLAGS"
108 +- fi
109 +- ;;
110 +- solaris)
111 +- # http://www.sun.com
112 +- AC_EGREP_CPP(yes, [
113 +-#include <netinet/ip6.h>
114 +-#ifdef __sun
115 +-yes
116 +-#endif],
117 +- [ipv6type=$i;
118 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
119 +- ;;
120 +- toshiba)
121 +- AC_EGREP_CPP(yes, [
122 +-#include <sys/param.h>
123 +-#ifdef _TOSHIBA_INET6
124 +-yes
125 +-#endif],
126 +- [ipv6type=$i;
127 +- ipv6lib=inet6;
128 +- ipv6libdir=/usr/local/v6/lib;
129 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
130 +- ;;
131 +- v6d)
132 +- AC_EGREP_CPP(yes, [
133 +-#include </usr/local/v6/include/sys/v6config.h>
134 +-#ifdef __V6D__
135 +-yes
136 +-#endif],
137 +- [ipv6type=$i;
138 +- ipv6lib=v6;
139 +- ipv6libdir=/usr/local/v6/lib;
140 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
141 +- ;;
142 +- zeta)
143 +- AC_EGREP_CPP(yes, [
144 +-#include <sys/param.h>
145 +-#ifdef _ZETA_MINAMI_INET6
146 +-yes
147 +-#endif],
148 +- [ipv6type=$i;
149 +- ipv6lib=inet6;
150 +- ipv6libdir=/usr/local/v6/lib;
151 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
152 +- ;;
153 +- cygwin)
154 +- AC_EGREP_CPP(yes, [
155 +-#include <netinet/in.h>
156 +-#ifdef _CYGWIN_IN6_H
157 +-yes
158 +-#endif],
159 +- [ipv6type=$i;
160 +- AC_DEFINE(INET6, 1, [true if you have IPv6])])
161 +- ;;
162 +- esac
163 +- if test "$ipv6type" != "unknown"; then
164 +- break
165 +- fi
166 +- done
167 +- AC_MSG_RESULT($ipv6type)
168 ++[ --disable-ipv6 disable ipv6 support],
169 ++[ case "$enableval" in
170 ++ no)
171 ++ AC_MSG_RESULT(no)
172 ++ ;;
173 ++ *) AC_MSG_RESULT(yes)
174 ++ AC_DEFINE(INET6, 1, [true if you have IPv6])
175 ++ ;;
176 ++ esac ],
177 +
178 +- AC_SEARCH_LIBS(getaddrinfo, inet6)
179 +-fi
180 ++ AC_TRY_RUN([ /* AF_INET6 avalable check */
181 ++#include <sys/types.h>
182 ++#include <sys/socket.h>
183 ++main()
184 ++{
185 ++ exit(0);
186 ++ if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
187 ++ exit(1);
188 ++ else
189 ++ exit(0);
190 ++}
191 ++],
192 ++ AC_MSG_RESULT(yes)
193 ++ AC_DEFINE(INET6, 1, [true if you have IPv6]),
194 ++ AC_MSG_RESULT(no),
195 ++ AC_MSG_RESULT(no)
196 ++))
197 +
198 + dnl Do you want to disable use of locale functions
199 + AC_ARG_ENABLE([locale],
200 +diff --git a/configure.sh b/configure.sh
201 +index d6e9c8d..cfaaa99 100755
202 +--- a/configure.sh
203 ++++ b/configure.sh
204 +@@ -1349,7 +1349,7 @@ Optional Features:
205 + --enable-maintainer-mode
206 + turn on extra debug features
207 + --disable-largefile omit support for large files
208 +- --disable-ipv6 do not even try to use IPv6
209 ++ --disable-ipv6 disable ipv6 support
210 + --disable-locale disable locale features
211 + --disable-iconv-open disable all use of iconv_open() function
212 + --disable-iconv disable rsync's --iconv option
213 +@@ -1577,6 +1577,37 @@ fi
214 +
215 + } # ac_fn_c_try_run
216 +
217 ++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
218 ++# -------------------------------------------------------
219 ++# Tests whether HEADER exists and can be compiled using the include files in
220 ++# INCLUDES, setting the cache variable VAR accordingly.
221 ++ac_fn_c_check_header_compile ()
222 ++{
223 ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
224 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
225 ++$as_echo_n "checking for $2... " >&6; }
226 ++if eval \${$3+:} false; then :
227 ++ $as_echo_n "(cached) " >&6
228 ++else
229 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
230 ++/* end confdefs.h. */
231 ++$4
232 ++#include <$2>
233 ++_ACEOF
234 ++if ac_fn_c_try_compile "$LINENO"; then :
235 ++ eval "$3=yes"
236 ++else
237 ++ eval "$3=no"
238 ++fi
239 ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
240 ++fi
241 ++eval ac_res=\$$3
242 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
243 ++$as_echo "$ac_res" >&6; }
244 ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
245 ++
246 ++} # ac_fn_c_check_header_compile
247 ++
248 + # ac_fn_c_try_link LINENO
249 + # -----------------------
250 + # Try to link conftest.$ac_ext, and return whether this succeeded.
251 +@@ -1623,37 +1654,6 @@ fi
252 +
253 + } # ac_fn_c_try_link
254 +
255 +-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
256 +-# -------------------------------------------------------
257 +-# Tests whether HEADER exists and can be compiled using the include files in
258 +-# INCLUDES, setting the cache variable VAR accordingly.
259 +-ac_fn_c_check_header_compile ()
260 +-{
261 +- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
262 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
263 +-$as_echo_n "checking for $2... " >&6; }
264 +-if eval \${$3+:} false; then :
265 +- $as_echo_n "(cached) " >&6
266 +-else
267 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
268 +-/* end confdefs.h. */
269 +-$4
270 +-#include <$2>
271 +-_ACEOF
272 +-if ac_fn_c_try_compile "$LINENO"; then :
273 +- eval "$3=yes"
274 +-else
275 +- eval "$3=no"
276 +-fi
277 +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
278 +-fi
279 +-eval ac_res=\$$3
280 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
281 +-$as_echo "$ac_res" >&6; }
282 +- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
283 +-
284 +-} # ac_fn_c_check_header_compile
285 +-
286 + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
287 + # -------------------------------------------------------
288 + # Tests whether HEADER exists, giving a warning if it cannot be compiled using
289 +@@ -4548,7 +4548,7 @@ else
290 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
291 + since some C++ compilers masquerading as C compilers
292 + incorrectly reject 9223372036854775807. */
293 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
294 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
295 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
296 + && LARGE_OFF_T % 2147483647 == 1)
297 + ? 1 : -1];
298 +@@ -4594,7 +4594,7 @@ else
299 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
300 + since some C++ compilers masquerading as C compilers
301 + incorrectly reject 9223372036854775807. */
302 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
303 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
304 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
305 + && LARGE_OFF_T % 2147483647 == 1)
306 + ? 1 : -1];
307 +@@ -4618,7 +4618,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
308 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
309 + since some C++ compilers masquerading as C compilers
310 + incorrectly reject 9223372036854775807. */
311 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
312 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
313 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
314 + && LARGE_OFF_T % 2147483647 == 1)
315 + ? 1 : -1];
316 +@@ -4663,7 +4663,7 @@ else
317 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
318 + since some C++ compilers masquerading as C compilers
319 + incorrectly reject 9223372036854775807. */
320 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
321 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
322 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
323 + && LARGE_OFF_T % 2147483647 == 1)
324 + ? 1 : -1];
325 +@@ -4687,7 +4687,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
326 + We can't simply define LARGE_OFF_T to be 9223372036854775807,
327 + since some C++ compilers masquerading as C compilers
328 + incorrectly reject 9223372036854775807. */
329 +-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
330 ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
331 + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
332 + && LARGE_OFF_T % 2147483647 == 1)
333 + ? 1 : -1];
334 +@@ -4725,262 +4725,61 @@ fi
335 +
336 + fi
337 +
338 +-ipv6type=unknown
339 +-ipv6lib=none
340 +-ipv6trylibc=yes
341 +
342 ++# Checks if IPv6 is requested
343 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
344 ++$as_echo_n "checking whether to enable ipv6... " >&6; }
345 + # Check whether --enable-ipv6 was given.
346 + if test "${enable_ipv6+set}" = set; then :
347 +- enableval=$enable_ipv6;
348 +-fi
349 +-
350 +-if test x"$enable_ipv6" != x"no"; then
351 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
352 +-$as_echo_n "checking ipv6 stack type... " >&6; }
353 +- for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta cygwin; do
354 +- case $i in
355 +- inria)
356 +- # http://www.kame.net/
357 +-
358 +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
359 +-/* end confdefs.h. */
360 +-
361 +-#include <netinet/in.h>
362 +-#ifdef IPV6_INRIA_VERSION
363 +-yes
364 +-#endif
365 +-_ACEOF
366 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
367 +- $EGREP "yes" >/dev/null 2>&1; then :
368 +- ipv6type=$i;
369 +-
370 +-$as_echo "#define INET6 1" >>confdefs.h
371 +-
372 +-
373 +-fi
374 +-rm -f conftest*
375 +-
376 +- ;;
377 +- kame)
378 +- # http://www.kame.net/
379 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
380 +-/* end confdefs.h. */
381 +-
382 +-#include <netinet/in.h>
383 +-#ifdef __KAME__
384 +-yes
385 +-#endif
386 +-_ACEOF
387 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
388 +- $EGREP "yes" >/dev/null 2>&1; then :
389 +- ipv6type=$i;
390 +-
391 +-$as_echo "#define INET6 1" >>confdefs.h
392 +-
393 +-fi
394 +-rm -f conftest*
395 +-
396 +- ;;
397 +- linux-glibc)
398 +- # http://www.v6.linux.or.jp/
399 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
400 +-/* end confdefs.h. */
401 +-
402 +-#include <features.h>
403 +-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
404 +-yes
405 +-#endif
406 +-_ACEOF
407 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
408 +- $EGREP "yes" >/dev/null 2>&1; then :
409 +- ipv6type=$i;
410 +-
411 +-$as_echo "#define INET6 1" >>confdefs.h
412 +-
413 +-fi
414 +-rm -f conftest*
415 +-
416 +- ;;
417 +- linux-inet6)
418 +- # http://www.v6.linux.or.jp/
419 +- if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then
420 +- ipv6type=$i
421 +- ipv6lib=inet6
422 +- ipv6libdir=/usr/inet6/lib
423 +- ipv6trylibc=yes;
424 +-
425 +-$as_echo "#define INET6 1" >>confdefs.h
426 +-
427 +- CFLAGS="-I/usr/inet6/include $CFLAGS"
428 +- fi
429 +- ;;
430 +- solaris)
431 +- # http://www.sun.com
432 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
433 +-/* end confdefs.h. */
434 +-
435 +-#include <netinet/ip6.h>
436 +-#ifdef __sun
437 +-yes
438 +-#endif
439 +-_ACEOF
440 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
441 +- $EGREP "yes" >/dev/null 2>&1; then :
442 +- ipv6type=$i;
443 +-
444 +-$as_echo "#define INET6 1" >>confdefs.h
445 +-
446 +-fi
447 +-rm -f conftest*
448 +-
449 +- ;;
450 +- toshiba)
451 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
452 +-/* end confdefs.h. */
453 +-
454 +-#include <sys/param.h>
455 +-#ifdef _TOSHIBA_INET6
456 +-yes
457 +-#endif
458 +-_ACEOF
459 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
460 +- $EGREP "yes" >/dev/null 2>&1; then :
461 +- ipv6type=$i;
462 +- ipv6lib=inet6;
463 +- ipv6libdir=/usr/local/v6/lib;
464 +-
465 +-$as_echo "#define INET6 1" >>confdefs.h
466 +-
467 +-fi
468 +-rm -f conftest*
469 +-
470 +- ;;
471 +- v6d)
472 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
473 +-/* end confdefs.h. */
474 +-
475 +-#include </usr/local/v6/include/sys/v6config.h>
476 +-#ifdef __V6D__
477 +-yes
478 +-#endif
479 +-_ACEOF
480 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
481 +- $EGREP "yes" >/dev/null 2>&1; then :
482 +- ipv6type=$i;
483 +- ipv6lib=v6;
484 +- ipv6libdir=/usr/local/v6/lib;
485 +-
486 +-$as_echo "#define INET6 1" >>confdefs.h
487 +-
488 +-fi
489 +-rm -f conftest*
490 +-
491 +- ;;
492 +- zeta)
493 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
494 +-/* end confdefs.h. */
495 +-
496 +-#include <sys/param.h>
497 +-#ifdef _ZETA_MINAMI_INET6
498 +-yes
499 +-#endif
500 +-_ACEOF
501 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
502 +- $EGREP "yes" >/dev/null 2>&1; then :
503 +- ipv6type=$i;
504 +- ipv6lib=inet6;
505 +- ipv6libdir=/usr/local/v6/lib;
506 +-
507 +-$as_echo "#define INET6 1" >>confdefs.h
508 +-
509 +-fi
510 +-rm -f conftest*
511 +-
512 +- ;;
513 +- cygwin)
514 +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
515 +-/* end confdefs.h. */
516 +-
517 +-#include <netinet/in.h>
518 +-#ifdef _CYGWIN_IN6_H
519 +-yes
520 +-#endif
521 +-_ACEOF
522 +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
523 +- $EGREP "yes" >/dev/null 2>&1; then :
524 +- ipv6type=$i;
525 ++ enableval=$enable_ipv6; case "$enableval" in
526 ++ no)
527 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
528 ++$as_echo "no" >&6; }
529 ++ ;;
530 ++ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
531 ++$as_echo "yes" >&6; }
532 +
533 + $as_echo "#define INET6 1" >>confdefs.h
534 +
535 +-fi
536 +-rm -f conftest*
537 ++ ;;
538 ++ esac
539 ++else
540 ++ if test "$cross_compiling" = yes; then :
541 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
542 ++$as_echo "no" >&6; }
543 +
544 +- ;;
545 +- esac
546 +- if test "$ipv6type" != "unknown"; then
547 +- break
548 +- fi
549 +- done
550 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
551 +-$as_echo "$ipv6type" >&6; }
552 +-
553 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
554 +-$as_echo_n "checking for library containing getaddrinfo... " >&6; }
555 +-if ${ac_cv_search_getaddrinfo+:} false; then :
556 +- $as_echo_n "(cached) " >&6
557 + else
558 +- ac_func_search_save_LIBS=$LIBS
559 +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
560 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
561 + /* end confdefs.h. */
562 +-
563 +-/* Override any GCC internal prototype to avoid an error.
564 +- Use char because int might match the return type of a GCC
565 +- builtin and then its argument prototype would still apply. */
566 +-#ifdef __cplusplus
567 +-extern "C"
568 +-#endif
569 +-char getaddrinfo ();
570 +-int
571 +-main ()
572 ++ /* AF_INET6 avalable check */
573 ++#include <sys/types.h>
574 ++#include <sys/socket.h>
575 ++main()
576 + {
577 +-return getaddrinfo ();
578 +- ;
579 +- return 0;
580 ++ exit(0);
581 ++ if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
582 ++ exit(1);
583 ++ else
584 ++ exit(0);
585 + }
586 ++
587 + _ACEOF
588 +-for ac_lib in '' inet6; do
589 +- if test -z "$ac_lib"; then
590 +- ac_res="none required"
591 +- else
592 +- ac_res=-l$ac_lib
593 +- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
594 +- fi
595 +- if ac_fn_c_try_link "$LINENO"; then :
596 +- ac_cv_search_getaddrinfo=$ac_res
597 +-fi
598 +-rm -f core conftest.err conftest.$ac_objext \
599 +- conftest$ac_exeext
600 +- if ${ac_cv_search_getaddrinfo+:} false; then :
601 +- break
602 +-fi
603 +-done
604 +-if ${ac_cv_search_getaddrinfo+:} false; then :
605 ++if ac_fn_c_try_run "$LINENO"; then :
606 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
607 ++$as_echo "yes" >&6; }
608 ++
609 ++$as_echo "#define INET6 1" >>confdefs.h
610 +
611 + else
612 +- ac_cv_search_getaddrinfo=no
613 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
614 ++$as_echo "no" >&6; }
615 + fi
616 +-rm conftest.$ac_ext
617 +-LIBS=$ac_func_search_save_LIBS
618 ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
619 ++ conftest.$ac_objext conftest.beam conftest.$ac_ext
620 + fi
621 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
622 +-$as_echo "$ac_cv_search_getaddrinfo" >&6; }
623 +-ac_res=$ac_cv_search_getaddrinfo
624 +-if test "$ac_res" != no; then :
625 +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
626 +
627 + fi
628 +
629 +-fi
630 +
631 + # Check whether --enable-locale was given.
632 + if test "${enable_locale+set}" = set; then :
633 +@@ -5006,6 +4805,7 @@ $as_echo "#define SHUTDOWN_ALL_SOCKETS 1" >>confdefs.h
634 + $as_echo "no" >&6; };;
635 + esac
636 +
637 ++
638 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
639 + $as_echo_n "checking for ANSI C header files... " >&6; }
640 + if ${ac_cv_header_stdc+:} false; then :
641 +--
642 +2.10.2
643
644 diff --git a/net-misc/rsync/files/rsyncd.conf-3.0.9-r1 b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
645 new file mode 100644
646 index 0000000..20dcf3a
647 --- /dev/null
648 +++ b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
649 @@ -0,0 +1,15 @@
650 +# /etc/rsyncd.conf
651 +
652 +# Minimal configuration file for rsync daemon
653 +# See rsync(1) and rsyncd.conf(5) man pages for help
654 +
655 +# This line is required by the /etc/init.d/rsyncd script
656 +pid file = @GENTOO_PORTAGE_EPREFIX@/run/rsyncd.pid
657 +use chroot = yes
658 +read only = yes
659 +
660 +# Simple example for enabling your own local rsync server
661 +#[gentoo-portage]
662 +# path = @GENTOO_PORTAGE_EPREFIX@/usr/portage
663 +# comment = Gentoo Portage tree
664 +# exclude = /distfiles /packages
665
666 diff --git a/net-misc/rsync/files/rsyncd.conf.d b/net-misc/rsync/files/rsyncd.conf.d
667 new file mode 100644
668 index 0000000..c3d897e
669 --- /dev/null
670 +++ b/net-misc/rsync/files/rsyncd.conf.d
671 @@ -0,0 +1,5 @@
672 +# /etc/conf.d/rsyncd: config file for /etc/init.d/rsyncd
673 +
674 +# see man pages for rsync or run `rsync --help`
675 +# for valid cmdline options
676 +#RSYNC_OPTS=""
677
678 diff --git a/net-misc/rsync/files/rsyncd.init.d-r1 b/net-misc/rsync/files/rsyncd.init.d-r1
679 new file mode 100644
680 index 0000000..243e107
681 --- /dev/null
682 +++ b/net-misc/rsync/files/rsyncd.init.d-r1
683 @@ -0,0 +1,11 @@
684 +#!/sbin/openrc-run
685 +# Copyright 1999-2012 Gentoo Foundation
686 +# Distributed under the terms of the GNU General Public License v2
687 +
688 +command="/usr/bin/rsync"
689 +command_args="--daemon ${RSYNC_OPTS}"
690 +pidfile="/var/run/${SVCNAME}.pid"
691 +
692 +depend() {
693 + use net
694 +}
695
696 diff --git a/net-misc/rsync/files/rsyncd.logrotate b/net-misc/rsync/files/rsyncd.logrotate
697 new file mode 100644
698 index 0000000..34bcf72
699 --- /dev/null
700 +++ b/net-misc/rsync/files/rsyncd.logrotate
701 @@ -0,0 +1,9 @@
702 +/var/log/rsync.log {
703 + compress
704 + maxage 365
705 + rotate 7
706 + size=+1024k
707 + notifempty
708 + missingok
709 + copytruncate
710 +}
711
712 diff --git a/net-misc/rsync/files/rsyncd.service b/net-misc/rsync/files/rsyncd.service
713 new file mode 100644
714 index 0000000..a2c1de0
715 --- /dev/null
716 +++ b/net-misc/rsync/files/rsyncd.service
717 @@ -0,0 +1,12 @@
718 +[Unit]
719 +Description=rsync daemon
720 +After=networking.target
721 +
722 +[Service]
723 +Type=simple
724 +ExecStart=/usr/bin/rsync --daemon --no-detach
725 +StandardOutput=syslog
726 +StandardError=syslog
727 +
728 +[Install]
729 +WantedBy=multi-user.target
730
731 diff --git a/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
732 new file mode 100644
733 index 0000000..90d07f0
734 --- /dev/null
735 +++ b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
736 @@ -0,0 +1,10 @@
737 +service rsync
738 +{
739 + socket_type = stream
740 + protocol = tcp
741 + wait = no
742 + user = root
743 + server = @GENTOO_PORTAGE_EPREFIX@/usr/bin/rsync
744 + server_args = --daemon
745 + disable = yes
746 +}
747
748 diff --git a/net-misc/rsync/rsync-3.1.2-r2.ebuild b/net-misc/rsync/rsync-3.1.2-r2.ebuild
749 new file mode 100644
750 index 0000000..08473b5
751 --- /dev/null
752 +++ b/net-misc/rsync/rsync-3.1.2-r2.ebuild
753 @@ -0,0 +1,89 @@
754 +# Copyright 1999-2017 Gentoo Foundation
755 +# Distributed under the terms of the GNU General Public License v2
756 +
757 +EAPI=6
758 +
759 +inherit eutils flag-o-matic prefix systemd
760 +
761 +DESCRIPTION="File transfer program to keep remote files into sync"
762 +HOMEPAGE="http://rsync.samba.org/"
763 +SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P}.tar.gz"
764 +[[ "${PV}" = *_pre* ]] && SRC_URI="http://rsync.samba.org/ftp/rsync/src-previews/${P/_/}.tar.gz"
765 +
766 +LICENSE="GPL-3"
767 +SLOT="0"
768 +if [[ ${PV} != *_pre ]] ; then
769 +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
770 +fi
771 +IUSE="acl iconv ipv6 static stunnel xattr"
772 +
773 +LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )
774 + xattr? ( kernel_linux? ( sys-apps/attr[static-libs(+)] ) )
775 + >=dev-libs/popt-1.5[static-libs(+)]"
776 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
777 + iconv? ( virtual/libiconv )"
778 +DEPEND="${RDEPEND}
779 + static? ( ${LIB_DEPEND} )"
780 +
781 +S=${WORKDIR}/${P/_/}
782 +
783 +PATCHES=(
784 + "${FILESDIR}"/${PN}-fix-musl-ipv6.patch
785 +)
786 +
787 +src_configure() {
788 + use static && append-ldflags -static
789 + econf \
790 + --without-included-popt \
791 + $(use_enable acl acl-support) \
792 + $(use_enable xattr xattr-support) \
793 + $(use_enable ipv6) \
794 + $(use_enable iconv) \
795 + --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
796 + touch proto.h-tstamp #421625
797 +}
798 +
799 +src_install() {
800 + emake DESTDIR="${D}" install
801 + newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
802 + newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd
803 + dodoc NEWS OLDNEWS README TODO tech_report.tex
804 + insinto /etc
805 + newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf
806 +
807 + insinto /etc/logrotate.d
808 + newins "${FILESDIR}"/rsyncd.logrotate rsyncd
809 +
810 + insinto /etc/xinetd.d
811 + newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
812 +
813 + # Install stunnel helpers
814 + if use stunnel ; then
815 + emake DESTDIR="${D}" install-ssl-client
816 + emake DESTDIR="${D}" install-ssl-daemon
817 + fi
818 +
819 + # Install the useful contrib scripts
820 + exeinto /usr/share/rsync
821 + doexe support/*
822 + rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
823 +
824 + eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
825 +
826 + systemd_dounit "${FILESDIR}/rsyncd.service"
827 +}
828 +
829 +pkg_postinst() {
830 + if egrep -qis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
831 + "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then
832 + ewarn "You have disabled chroot support in your rsyncd.conf. This"
833 + ewarn "is a security risk which you should fix. Please check your"
834 + ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
835 + fi
836 + if use stunnel ; then
837 + einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature."
838 + einfo
839 + einfo "You maybe have to update the certificates configured in"
840 + einfo "${EROOT}/etc/stunnel/rsync.conf"
841 + fi
842 +}