diff options
Diffstat (limited to 'net-misc/rsync')
-rw-r--r-- | net-misc/rsync/Manifest | 8 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.3-cross.patch | 129 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.3-glibc-lchmod.patch | 58 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.3-verify-certificate.patch | 26 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch | 21 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.7-fortify-source-3.patch | 54 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.7-ipv6-configure-c99.patch | 32 | ||||
-rw-r--r-- | net-misc/rsync/metadata.xml | 5 | ||||
-rw-r--r-- | net-misc/rsync/rsync-3.2.3-r5.ebuild | 131 | ||||
-rw-r--r-- | net-misc/rsync/rsync-3.2.7-r3.ebuild | 204 | ||||
-rw-r--r-- | net-misc/rsync/rsync-3.2.7-r4.ebuild | 207 | ||||
-rw-r--r-- | net-misc/rsync/rsync-3.3.0.ebuild (renamed from net-misc/rsync/rsync-3.2.4-r1.ebuild) | 79 | ||||
-rw-r--r-- | net-misc/rsync/rsync-9999.ebuild | 79 |
13 files changed, 642 insertions, 391 deletions
diff --git a/net-misc/rsync/Manifest b/net-misc/rsync/Manifest index f217d9271b7d..a5939be1ad9c 100644 --- a/net-misc/rsync/Manifest +++ b/net-misc/rsync/Manifest @@ -1,4 +1,4 @@ -DIST rsync-3.2.3.tar.gz 1069784 BLAKE2B 085adb55d0d7e3d063fa198912fd09df67b63800a65baff5315ccb7dfc0e9d703eef30a7f2e72e3b271162c280abd9809b3f736704752c1663eed65ad8e0ac25 SHA512 48b68491f3ef644dbbbfcaec5ab90a1028593e02d50367ce161fd9d3d0bd0a3628bc57c5e5dec4be3a1d213f784f879b8a8fcdfd789ba0f99837cba16e1ae70e -DIST rsync-3.2.3.tar.gz.asc 195 BLAKE2B cc18dd2589c09f869e35ecaf94a610e5b605dcb10ceaf01e6c0eb2667666a9a73feb7dcb2325638686c772f91a74d6d1f15ea33fdb6a38e89640f32a8cd0e04a SHA512 b7e512d8bb0aaff7c48571b918a7b0362942c65ef2a0aa076574ec86c05822dc5df41f8796fdf62b762b12d166a671c9e979f9962357b89e3649459c4567525b -DIST rsync-3.2.4.tar.gz 1114853 BLAKE2B a67fcb9619874f1c5346a876138e59f4bf508a90736f830fb2b4eaf180ab11f15a0a7db9b3b28c3b990b77c2b0973d8e668bf509e4134f464159ed3172f53d80 SHA512 96318e2754fbddf84d16df671c721e577766969dfa415925c4dc1be2e4e60a51246623747a8aec0c6e9c0824e6aa7335235ccd07f3d6fd901f8cf28e2d6e91b6 -DIST rsync-3.2.4.tar.gz.asc 195 BLAKE2B 9bc2fbd59e5396a91de82f27a461367ad2a129820e2d1926c3b1e26dacf93c676a7231f186c341b6dec9c764a9619b504bc9b5f95925982e78de4607eddf6c65 SHA512 7e1bbebc777d5710345fdec1efd4c2ef1079d6c0ec90272a1a4a51a59ae3cb619b9d1c0ae2f337ecdd06827bb3536b969b6f21f9108f8d21114713aa1750012b +DIST rsync-3.2.7.tar.gz 1149787 BLAKE2B 1b910b321e8d6b49af9f26bef813509f0da12dedd6857897de136d3617c68d38368ce05de13b9b0ef35a5452dca141ebdcdfb6af8456151d0ca0ad546452b504 SHA512 c2afba11a352fd88133f9e96e19d6df80eb864450c83eced13a7faa23df947bccf2ef093f2101df6ee30abff4cbbd39ac802e9aa5f726e42c9caff274fad8377 +DIST rsync-3.2.7.tar.gz.asc 195 BLAKE2B d2bca9276d9a0c96a9156a8da60e391f58eceb2e1ffaa51b7e7ffd592feaba3ce54772bd563a251e3b30efb0ad07fc96da01158a77dd77c6534eac5d80b46e53 SHA512 bad9f48e033966566c6abf8cd485d35c0d9cf130eafb0c5fff9bcb928882283bbcdd2375e7c2880cf71cf81496ba6b743b61adca3d4678421c32915a2464acc3 +DIST rsync-3.3.0.tar.gz 1153969 BLAKE2B 75a3cc50452086aebd16f42d7a309c173cbc1ea156227afb10d2106d0b9043e973676995b8199d22840775ae3df8db97d1c0de5f3aa58afa130c5b1348c3f825 SHA512 df5c53bc2f2b0e7e30f475903e5e4296dc2fbcf08e9ea6c3c61462d0e52b067c27e82deeb4be79102c86e9aa55a825182e126f22df44dabf5b7328acb2a01d10 +DIST rsync-3.3.0.tar.gz.asc 195 BLAKE2B bd077217bd44d406ac49a55b0c0d38c2accd4867b9fbf78a13fe906f52e1773d5a69aa3116a0c245abdeb1af54705d6ffc75aaba8b276ba9229bbb3340d7c3e8 SHA512 611d26374e0ff98ffb11b6ad6555f08773b9f09e1fbf232abc73c5d472b0defd28fd559bd42707774204d055b93be289f19f4db94bbdfe0b0935918fd922cced diff --git a/net-misc/rsync/files/rsync-3.2.3-cross.patch b/net-misc/rsync/files/rsync-3.2.3-cross.patch deleted file mode 100644 index c61090b7c40b..000000000000 --- a/net-misc/rsync/files/rsync-3.2.3-cross.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 9f9240b661c5f381831b62d72b6ea928a91ff43a Mon Sep 17 00:00:00 2001 -From: Wayne Davison <wayne@opencoder.net> -Date: Thu, 3 Sep 2020 10:07:36 -0700 -Subject: [PATCH] Set CXX_OK=no when cross compiling. - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 64d2e6d6..109546a6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -233,7 +233,7 @@ __attribute__ ((target("ssse3"))) void more_testing(char* buf, int len) - in8_2 = _mm_lddqu_si128((__m128i_u*)&buf[i + 16]); - } - } --]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no]) -+]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no],[CXX_OK=no]) - AC_LANG(C) - if test x"$CXX_OK" = x"yes"; then - # AC_MSG_RESULT() is called below. -From 7eb59a9152a2ace7bc7858e9915c671b3ab54344 Mon Sep 17 00:00:00 2001 -From: Wayne Davison <wayne@opencoder.net> -Date: Tue, 22 Sep 2020 17:19:45 -0700 -Subject: [PATCH] Change from $build_cpu to $host_cpu as edo1 suggested. - ---- - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 109546a6..e8c06f42 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -211,7 +211,7 @@ CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'` - - if test x"$enable_simd" != x"no"; then - # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required -- if test x"$build_cpu" = x"x86_64"; then -+ if test x"$host_cpu" = x"x86_64"; then - AC_LANG(C++) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> - #include <immintrin.h> -@@ -283,8 +283,8 @@ AC_ARG_ENABLE(asm, - AS_HELP_STRING([--disable-asm],[disable ASM optimizations])) - - if test x"$enable_asm" != x"no"; then -- if test x"$build_cpu" = x"x86_64"; then -- ASM="$build_cpu" -+ if test x"$host_cpu" = x"x86_64"; then -+ ASM="$host_cpu" - elif test x"$enable_asm" = x"yes"; then - AC_MSG_RESULT(unavailable) - AC_MSG_ERROR(The ASM optimizations are currently x86_64 only. -From b7fab6f285ff0ff3816b109a8c3131b6ded0b484 Mon Sep 17 00:00:00 2001 -From: edo <edo.rus@gmail.com> -Date: Wed, 7 Oct 2020 08:33:57 +0300 -Subject: [PATCH] Allow cross-compilation with SIMD (x86_84) (#104) - -Replace runtime SIMD check with a compile-only test in case of -cross-compilation. - -You can still use '--enable-simd=no' to build x86_64 code without -SIMD instructions. ---- - configure.ac | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3fd7e5d5..e469981b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -208,12 +208,7 @@ AC_ARG_ENABLE(simd, - - # Clag is crashing with -g -O2, so we'll get rid of -g for now. - CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'` -- --if test x"$enable_simd" != x"no"; then -- # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required -- if test x"$host_cpu" = x"x86_64"; then -- AC_LANG(C++) -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> -+m4_define(SIMD_X86_64_TEST, [[#include <stdio.h> - #include <immintrin.h> - __attribute__ ((target("default"))) int test_ssse3(int x) { return x; } - __attribute__ ((target("default"))) int test_sse2(int x) { return x; } -@@ -233,7 +228,18 @@ __attribute__ ((target("ssse3"))) void more_testing(char* buf, int len) - in8_2 = _mm_lddqu_si128((__m128i_u*)&buf[i + 16]); - } - } --]], [[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],[CXX_OK=yes],[CXX_OK=no],[CXX_OK=no]) -+]]) -+ -+if test x"$enable_simd" != x"no"; then -+ # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required -+ if test x"$host_cpu" = x"x86_64"; then -+ AC_LANG(C++) -+ if test x"$host_cpu" = x"$build_cpu"; then -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST],[[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])], -+ [CXX_OK=yes],[CXX_OK=no]) -+ else -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST])],[CXX_OK=yes],[CXX_OK=no]) -+ fi - AC_LANG(C) - if test x"$CXX_OK" = x"yes"; then - # AC_MSG_RESULT() is called below. -From 7d830ff52ff7b01f528f39aa27b1ab36ea8c1356 Mon Sep 17 00:00:00 2001 -From: Andrew Aladjev <aladjev.andrew@gmail.com> -Date: Sun, 7 Nov 2021 22:45:49 +0300 -Subject: [PATCH] improved cross compilation detection (#252) - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index fbdd17d8..9e7338cf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -264,7 +264,7 @@ if test x"$enable_simd" != x"no"; then - # For x86-64 SIMD, g++ >=5 or clang++ >=7 is required - if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then - AC_LANG(C++) -- if test x"$host_cpu" = x"$build_cpu"; then -+ if test x"$host" = x"$build"; then - AC_RUN_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST],[[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])], - [CXX_OK=yes],[CXX_OK=no]) - else diff --git a/net-misc/rsync/files/rsync-3.2.3-glibc-lchmod.patch b/net-misc/rsync/files/rsync-3.2.3-glibc-lchmod.patch deleted file mode 100644 index 970d7af42bad..000000000000 --- a/net-misc/rsync/files/rsync-3.2.3-glibc-lchmod.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 9dd62525f3b98d692e031f22c02be8f775966503 Mon Sep 17 00:00:00 2001 -From: Wayne Davison <wayne@opencoder.net> -Date: Sun, 29 Nov 2020 09:33:54 -0800 -Subject: [PATCH] Work around glibc's lchmod() issue a better way. - -diff --git a/syscall.c b/syscall.c -index b9c3b4ef..11d10e4a 100644 ---- a/syscall.c -+++ b/syscall.c -@@ -227,27 +227,35 @@ int do_open(const char *pathname, int flags, mode_t mode) - #ifdef HAVE_CHMOD - int do_chmod(const char *path, mode_t mode) - { -+ static int switch_step = 0; - int code; - if (dry_run) return 0; - RETURN_ERROR_IF_RO_OR_LO; -+ switch (switch_step) { - #ifdef HAVE_LCHMOD -- code = lchmod(path, mode & CHMOD_BITS); --#else -- if (S_ISLNK(mode)) { -+#include "case_N.h" -+ if ((code = lchmod(path, mode & CHMOD_BITS)) == 0 || errno != ENOTSUP) -+ break; -+ switch_step++; -+#endif -+ -+#include "case_N.h" -+ if (S_ISLNK(mode)) { - # if defined HAVE_SETATTRLIST -- struct attrlist attrList; -- uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */ -+ struct attrlist attrList; -+ uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */ - -- memset(&attrList, 0, sizeof attrList); -- attrList.bitmapcount = ATTR_BIT_MAP_COUNT; -- attrList.commonattr = ATTR_CMN_ACCESSMASK; -- code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW); -+ memset(&attrList, 0, sizeof attrList); -+ attrList.bitmapcount = ATTR_BIT_MAP_COUNT; -+ attrList.commonattr = ATTR_CMN_ACCESSMASK; -+ code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW); - # else -- code = 1; -+ code = 1; - # endif -- } else -- code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */ --#endif /* !HAVE_LCHMOD */ -+ } else -+ code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */ -+ break; -+ } - if (code != 0 && (preserve_perms || preserve_executability)) - return code; - return 0; diff --git a/net-misc/rsync/files/rsync-3.2.3-verify-certificate.patch b/net-misc/rsync/files/rsync-3.2.3-verify-certificate.patch deleted file mode 100644 index 9b462a1df721..000000000000 --- a/net-misc/rsync/files/rsync-3.2.3-verify-certificate.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c3f7414c450faaf6a8281cc4a4403529aeb7d859 Mon Sep 17 00:00:00 2001 -From: Matt McCutchen <matt@mattmccutchen.net> -Date: Wed, 26 Aug 2020 12:16:08 -0400 -Subject: [PATCH] rsync-ssl: Verify the hostname in the certificate when using - openssl. - ---- - rsync-ssl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rsync-ssl b/rsync-ssl -index 8101975a..46701af1 100755 ---- a/rsync-ssl -+++ b/rsync-ssl -@@ -129,7 +129,7 @@ function rsync_ssl_helper { - fi - - if [[ $RSYNC_SSL_TYPE == openssl ]]; then -- exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -connect $hostname:$port -+ exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port - elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then - exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_opts $hostname:$port - else --- -2.25.1 - diff --git a/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch b/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch new file mode 100644 index 000000000000..9aa1b93e2c9c --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.7-flist-memcmp-ub.patch @@ -0,0 +1,21 @@ +https://github.com/WayneD/rsync/issues/427 +https://github.com/WayneD/rsync/issues/429 +https://github.com/WayneD/rsync/commit/90df93e446f9ebbfd4ce97d6755c5fe1f45f9fd0 + +From 90df93e446f9ebbfd4ce97d6755c5fe1f45f9fd0 Mon Sep 17 00:00:00 2001 +From: Wayne Davison <wayne@opencoder.net> +Date: Sun, 8 Jan 2023 21:35:39 -0800 +Subject: [PATCH] Don't call memcmp() on an empty lastdir. + +--- a/flist.c ++++ b/flist.c +@@ -2367,7 +2367,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) + } + + dirlen = dir ? strlen(dir) : 0; +- if (dirlen != lastdir_len || memcmp(lastdir, dir, dirlen) != 0) { ++ if (dirlen != lastdir_len || (dirlen && memcmp(lastdir, dir, dirlen) != 0)) { + if (!change_pathname(NULL, dir, -dirlen)) + goto bad_path; + lastdir = pathname; + diff --git a/net-misc/rsync/files/rsync-3.2.7-fortify-source-3.patch b/net-misc/rsync/files/rsync-3.2.7-fortify-source-3.patch new file mode 100644 index 000000000000..952af573dfc7 --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.7-fortify-source-3.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/917517 +https://github.com/WayneD/rsync/issues/511 +https://bugzilla.suse.com/show_bug.cgi?id=1214249 +https://bugzilla.redhat.com/show_bug.cgi?id=2229654 +https://src.fedoraproject.org/rpms/rsync/raw/06d55616ec86c3a68a8af917783788b928fefcc4/f/rsync-3.2.7-buffer-overflow.patch + +From 1f83963f59960150e8c46112daa8411324c1f209 Mon Sep 17 00:00:00 2001 +From: Jiri Slaby <jslaby@suse.cz> +Date: Fri, 18 Aug 2023 08:26:20 +0200 +Subject: [PATCH] exclude: fix crashes with fortified strlcpy() + +Fortified (-D_FORTIFY_SOURCE=2 for gcc) builds make strlcpy() crash when +its third parameter (size) is larger than the buffer: + $ rsync -FFXHav '--filter=merge global-rsync-filter' Align-37-43/ xxx + sending incremental file list + *** buffer overflow detected ***: terminated + +It's in the exclude code in setup_merge_file(): + strlcpy(y, save, MAXPATHLEN); + +Note the 'y' pointer was incremented, so it no longer points to memory +with MAXPATHLEN "owned" bytes. + +Fix it by remembering the number of copied bytes into the 'save' buffer +and use that instead of MAXPATHLEN which is clearly incorrect. + +Fixes #511. +--- + exclude.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/exclude.c b/exclude.c +index ffe55b167..1a5de3b9e 100644 +--- a/exclude.c ++++ b/exclude.c +@@ -720,7 +720,8 @@ static BOOL setup_merge_file(int mergelist_num, filter_rule *ex, + parent_dirscan = True; + while (*y) { + char save[MAXPATHLEN]; +- strlcpy(save, y, MAXPATHLEN); ++ /* copylen is strlen(y) which is < MAXPATHLEN. +1 for \0 */ ++ size_t copylen = strlcpy(save, y, MAXPATHLEN) + 1; + *y = '\0'; + dirbuf_len = y - dirbuf; + strlcpy(x, ex->pattern, MAXPATHLEN - (x - buf)); +@@ -734,7 +735,7 @@ static BOOL setup_merge_file(int mergelist_num, filter_rule *ex, + lp->head = NULL; + } + lp->tail = NULL; +- strlcpy(y, save, MAXPATHLEN); ++ strlcpy(y, save, copylen); + while ((*x++ = *y++) != '/') {} + } + parent_dirscan = False; diff --git a/net-misc/rsync/files/rsync-3.2.7-ipv6-configure-c99.patch b/net-misc/rsync/files/rsync-3.2.7-ipv6-configure-c99.patch new file mode 100644 index 000000000000..1b99dc61088b --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.7-ipv6-configure-c99.patch @@ -0,0 +1,32 @@ +https://github.com/WayneD/rsync/pull/558 + +From d869bcd3850b9a80f27f5aee4d41725f39d84ea7 Mon Sep 17 00:00:00 2001 +From: Ivan Babrou <github@ivan.computer> +Date: Mon, 1 Jan 2024 19:31:01 -0800 +Subject: [PATCH] configure.ac: fix failing IPv6 check due to missing return + type + +Fixing this warning escalated to an error, resuting in no IPv6 support: + +``` +configure.sh:7679: checking whether to enable ipv6 +configure.sh:7718: clang -o conftest -g -O2 -DHAVE_CONFIG_H -Wall -W conftest.c >&5 +conftest.c:73:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] +main() +^ +int +1 error generated. +configure.sh:7718: $? = 1 +configure.sh: program exited with status 1 +``` +--- a/configure.ac ++++ b/configure.ac +@@ -392,7 +392,7 @@ AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]), + #include <stdlib.h> + #include <sys/types.h> + #include <sys/socket.h> +-main() ++int main() + { + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); diff --git a/net-misc/rsync/metadata.xml b/net-misc/rsync/metadata.xml index 6a684b27c6ce..cceaeff88940 100644 --- a/net-misc/rsync/metadata.xml +++ b/net-misc/rsync/metadata.xml @@ -6,10 +6,13 @@ <name>Gentoo Base System</name> </maintainer> <upstream> + <changelog>https://rsync.samba.org/ftp/rsync/NEWS</changelog> <remote-id type="cpe">cpe:/a:samba:rsync</remote-id> + <remote-id type="github">RsyncProject/rsync</remote-id> </upstream> <use> - <flag name="stunnel">Provide helper scripts for using rsync via >=net-misc/stunnel-4</flag> + <flag name="rrsync">Install rrsync script to setup restricted rsync users via ssh logins</flag> + <flag name="stunnel">Provide helper scripts for using rsync via >=<pkg>net-misc/stunnel</pkg>-4</flag> <flag name="system-zlib">Use system zlib instead of bundled one. This is incompatible with older rsync releases!</flag> <flag name="xxhash">Enable <pkg>dev-libs/xxhash</pkg> support for hashing</flag> </use> diff --git a/net-misc/rsync/rsync-3.2.3-r5.ebuild b/net-misc/rsync/rsync-3.2.3-r5.ebuild deleted file mode 100644 index 4e060aaa03bc..000000000000 --- a/net-misc/rsync/rsync-3.2.3-r5.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -if [[ ${PV} != 3.2.3 ]]; then - # Make sure we revert the autotools hackery applied in 3.2.3. - die "Please use rsync-9999.ebuild as a basis for version bumps" -fi - -WANT_LIBTOOL=none -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc - -inherit autotools flag-o-matic prefix systemd verify-sig - -DESCRIPTION="File transfer program to keep remote files into sync" -HOMEPAGE="https://rsync.samba.org/" -SRC_DIR="src" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" -S="${WORKDIR}/${P/_/}" - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd" - -RDEPEND="acl? ( virtual/acl ) - lz4? ( app-arch/lz4 ) - ssl? ( dev-libs/openssl:0= ) - system-zlib? ( sys-libs/zlib ) - xattr? ( kernel_linux? ( sys-apps/attr ) ) - xxhash? ( dev-libs/xxhash ) - zstd? ( >=app-arch/zstd-1.4 ) - >=dev-libs/popt-1.5 - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-waynedavison )" - -src_prepare() { - local PATCHES=( - "${FILESDIR}/${P}-glibc-lchmod.patch" - "${FILESDIR}/${P}-cross.patch" - # Fix for (CVE-2020-14387) - net-misc/rsync: improper TLS validation in rsync-ssl script - "${FILESDIR}/${P}-verify-certificate.patch" - ) - default - eautoconf -o configure.sh - touch config.h.in || die -} - -src_configure() { - # Force enable IPv6 on musl - upstream bug: - # https://bugzilla.samba.org/show_bug.cgi?id=10715 - use elibc_musl && use ipv6 && append-cppflags -DINET6 - - local myeconfargs=( - --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf - --without-included-popt - $(use_enable acl acl-support) - $(use_enable iconv) - $(use_enable ipv6) - $(use_enable lz4) - $(use_enable ssl openssl) - $(use_with !system-zlib included-zlib) - $(use_enable xattr xattr-support) - $(use_enable xxhash) - $(use_enable zstd) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd - - dodoc NEWS.md README.md TODO tech_report.tex - - insinto /etc - newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf - - insinto /etc/logrotate.d - newins "${FILESDIR}"/rsyncd.logrotate rsyncd - - insinto /etc/xinetd.d - newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd - - # Install stunnel helpers - if use stunnel ; then - emake DESTDIR="${D}" install-ssl-daemon - fi - - # Install the useful contrib scripts - if use examples ; then - exeinto /usr/share/rsync - doexe support/* - rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c} - fi - - eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd* - - systemd_newunit "packaging/systemd/rsync.service" "rsyncd.service" -} - -pkg_postinst() { - if grep -Eqis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \ - "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then - ewarn "You have disabled chroot support in your rsyncd.conf. This" - ewarn "is a security risk which you should fix. Please check your" - ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'." - fi - if use stunnel ; then - einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature." - einfo - einfo "You maybe have to update the certificates configured in" - einfo "${EROOT}/etc/stunnel/rsync.conf" - fi - if use system-zlib ; then - ewarn "Using system-zlib is incompatible with <rsync-3.1.1 when" - ewarn "using the --compress option." - ewarn - ewarn "When syncing with >=rsync-3.1.1 built with bundled zlib," - ewarn "and the --compress option, add --new-compress (-zz)." - ewarn - ewarn "For syncing the portage tree, add:" - ewarn "PORTAGE_RSYNC_EXTRA_OPTS=\"--new-compress\" to make.conf" - fi -} diff --git a/net-misc/rsync/rsync-3.2.7-r3.ebuild b/net-misc/rsync/rsync-3.2.7-r3.ebuild new file mode 100644 index 000000000000..ef0a743c83ee --- /dev/null +++ b/net-misc/rsync/rsync-3.2.7-r3.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Uncomment when introducing a patch which touches configure +#RSYNC_NEEDS_AUTOCONF=1 +PYTHON_COMPAT=( python3_{9..11} ) +inherit flag-o-matic prefix python-single-r1 systemd + +DESCRIPTION="File transfer program to keep remote files into sync" +HOMEPAGE="https://rsync.samba.org/" +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/WayneD/rsync.git" + inherit autotools git-r3 + + REQUIRED_USE="${PYTHON_REQUIRED_USE}" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc + inherit verify-sig + + if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + inherit autotools + fi + + if [[ ${PV} == *_pre* ]] ; then + SRC_DIR="src-previews" + else + SRC_DIR="src" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz + verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" + S="${WORKDIR}"/${P/_/} +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" +REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=dev-libs/popt-1.5 + acl? ( virtual/acl ) + examples? ( + ${PYTHON_DEPS} + dev-lang/perl + ) + lz4? ( app-arch/lz4:= ) + rrsync? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/bracex[${PYTHON_USEDEP}] + ') + ) + ssl? ( dev-libs/openssl:= ) + system-zlib? ( sys-libs/zlib ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + xxhash? ( >=dev-libs/xxhash-0.8 ) + zstd? ( >=app-arch/zstd-1.4:= ) + iconv? ( virtual/libiconv )" +DEPEND="${RDEPEND}" +BDEPEND=" + examples? ( ${PYTHON_DEPS} ) + rrsync? ( ${PYTHON_DEPS} ) +" + +if [[ ${PV} == *9999 ]] ; then + BDEPEND+=" ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/commonmark[${PYTHON_USEDEP}] + ')" +else + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )" +fi + +PATCHES=( + "${FILESDIR}"/${P}-flist-memcmp-ub.patch + "${FILESDIR}"/${P}-fortify-source-3.patch +) + +pkg_setup() { + # - USE=examples needs Python itself at runtime, but nothing else + # - 9999 needs commonmark at build time + if [[ ${PV} == *9999 ]] || use examples || use rrsync; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + default + + if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + eaclocal -I m4 + eautoconf -o configure.sh + eautoheader && touch config.h.in + fi + + if use examples || use rrsync; then + python_fix_shebang support/ + fi + + if [[ -f rrsync.1 ]]; then + # If the pre-build rrsync.1 man page exists, then link to it + # from support/rrsync.1 to avoid rsync's build system attempting + # re-creating the man page (bug #883049). + ln -s ../rrsync.1 support/rrsync.1 || die + fi +} + +src_configure() { + local myeconfargs=( + --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf + --without-included-popt + --enable-ipv6 + $(use_enable acl acl-support) + $(use_enable iconv) + $(use_enable lz4) + $(use_with rrsync) + $(use_enable ssl openssl) + $(use_with !system-zlib included-zlib) + $(use_enable xattr xattr-support) + $(use_enable xxhash) + $(use_enable zstd) + ) + + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + + newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd + newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd + + dodoc NEWS.md README.md TODO tech_report.tex + + insinto /etc + newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}"/rsyncd.logrotate rsyncd + + insinto /etc/xinetd.d + newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd + + # Install stunnel helpers + if use stunnel ; then + emake DESTDIR="${D}" install-ssl-daemon + fi + + # Install the useful contrib scripts + if use examples ; then + # The 'rrsync' script is installed conditionally via the 'rrysnc' + # USE flag, and not via the 'examples' USE flag. + rm support/rrsync* || die + + exeinto /usr/share/rsync + doexe support/* + + rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c} + fi + + eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd* + + systemd_newunit packaging/systemd/rsync.service rsyncd.service +} + +pkg_postinst() { + if grep -Eqis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \ + "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then + ewarn "You have disabled chroot support in your rsyncd.conf. This" + ewarn "is a security risk which you should fix. Please check your" + ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'." + fi + + if use stunnel ; then + einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature." + einfo + einfo "You maybe have to update the certificates configured in" + einfo "${EROOT}/etc/stunnel/rsync.conf" + fi + + if use system-zlib ; then + ewarn "Using system-zlib is incompatible with <rsync-3.1.1 when" + ewarn "using the --compress option." + ewarn + ewarn "When syncing with >=rsync-3.1.1 built with bundled zlib," + ewarn "and the --compress option, add --new-compress (-zz)." + ewarn + ewarn "For syncing the portage tree, add:" + ewarn "PORTAGE_RSYNC_EXTRA_OPTS=\"--new-compress\" to make.conf" + fi +} diff --git a/net-misc/rsync/rsync-3.2.7-r4.ebuild b/net-misc/rsync/rsync-3.2.7-r4.ebuild new file mode 100644 index 000000000000..831a218e466c --- /dev/null +++ b/net-misc/rsync/rsync-3.2.7-r4.ebuild @@ -0,0 +1,207 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Uncomment when introducing a patch which touches configure +RSYNC_NEEDS_AUTOCONF=1 +PYTHON_COMPAT=( python3_{9..11} ) +inherit flag-o-matic prefix python-single-r1 systemd + +DESCRIPTION="File transfer program to keep remote files into sync" +HOMEPAGE="https://rsync.samba.org/" +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/WayneD/rsync.git" + inherit autotools git-r3 + + REQUIRED_USE="${PYTHON_REQUIRED_USE}" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc + inherit verify-sig + + if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + inherit autotools + fi + + if [[ ${PV} == *_pre* ]] ; then + SRC_DIR="src-previews" + else + SRC_DIR="src" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz + verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" + S="${WORKDIR}"/${P/_/} +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" +REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=dev-libs/popt-1.5 + acl? ( virtual/acl ) + examples? ( + ${PYTHON_DEPS} + dev-lang/perl + ) + lz4? ( app-arch/lz4:= ) + rrsync? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/bracex[${PYTHON_USEDEP}] + ') + ) + ssl? ( dev-libs/openssl:= ) + system-zlib? ( sys-libs/zlib ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + xxhash? ( >=dev-libs/xxhash-0.8 ) + zstd? ( >=app-arch/zstd-1.4:= ) + iconv? ( virtual/libiconv )" +DEPEND="${RDEPEND}" +BDEPEND=" + examples? ( ${PYTHON_DEPS} ) + rrsync? ( ${PYTHON_DEPS} ) +" + +if [[ ${PV} == *9999 ]] ; then + BDEPEND+=" ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/commonmark[${PYTHON_USEDEP}] + ')" +else + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )" +fi + +PATCHES=( + "${FILESDIR}"/${P}-flist-memcmp-ub.patch + "${FILESDIR}"/${P}-fortify-source-3.patch + "${FILESDIR}"/${PN}-3.2.7-ipv6-configure-c99.patch +) + +pkg_setup() { + # - USE=examples needs Python itself at runtime, but nothing else + # - 9999 needs commonmark at build time + if [[ ${PV} == *9999 ]] || use examples || use rrsync; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + default + + sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac + + if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + eaclocal -I m4 + eautoconf -o configure.sh + eautoheader && touch config.h.in + fi + + if use examples || use rrsync; then + python_fix_shebang support/ + fi + + if [[ -f rrsync.1 ]]; then + # If the pre-build rrsync.1 man page exists, then link to it + # from support/rrsync.1 to avoid rsync's build system attempting + # re-creating the man page (bug #883049). + ln -s ../rrsync.1 support/rrsync.1 || die + fi +} + +src_configure() { + local myeconfargs=( + --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf + --without-included-popt + --enable-ipv6 + $(use_enable acl acl-support) + $(use_enable iconv) + $(use_enable lz4) + $(use_with rrsync) + $(use_enable ssl openssl) + $(use_with !system-zlib included-zlib) + $(use_enable xattr xattr-support) + $(use_enable xxhash) + $(use_enable zstd) + ) + + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + + newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd + newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd + + dodoc NEWS.md README.md TODO tech_report.tex + + insinto /etc + newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}"/rsyncd.logrotate rsyncd + + insinto /etc/xinetd.d + newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd + + # Install stunnel helpers + if use stunnel ; then + emake DESTDIR="${D}" install-ssl-daemon + fi + + # Install the useful contrib scripts + if use examples ; then + # The 'rrsync' script is installed conditionally via the 'rrysnc' + # USE flag, and not via the 'examples' USE flag. + rm support/rrsync* || die + + exeinto /usr/share/rsync + doexe support/* + + rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c} + fi + + eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd* + + systemd_newunit packaging/systemd/rsync.service rsyncd.service +} + +pkg_postinst() { + if grep -Eqis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \ + "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then + ewarn "You have disabled chroot support in your rsyncd.conf. This" + ewarn "is a security risk which you should fix. Please check your" + ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'." + fi + + if use stunnel ; then + einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature." + einfo + einfo "You maybe have to update the certificates configured in" + einfo "${EROOT}/etc/stunnel/rsync.conf" + fi + + if use system-zlib ; then + ewarn "Using system-zlib is incompatible with <rsync-3.1.1 when" + ewarn "using the --compress option." + ewarn + ewarn "When syncing with >=rsync-3.1.1 built with bundled zlib," + ewarn "and the --compress option, add --new-compress (-zz)." + ewarn + ewarn "For syncing the portage tree, add:" + ewarn "PORTAGE_RSYNC_EXTRA_OPTS=\"--new-compress\" to make.conf" + fi +} diff --git a/net-misc/rsync/rsync-3.2.4-r1.ebuild b/net-misc/rsync/rsync-3.3.0.ebuild index a5cde37a6997..6ea497c2e733 100644 --- a/net-misc/rsync/rsync-3.2.4-r1.ebuild +++ b/net-misc/rsync/rsync-3.3.0.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Uncomment when introducing a patch which touches configure +RSYNC_NEEDS_AUTOCONF=1 +PYTHON_COMPAT=( python3_{10..12} ) inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" @@ -14,14 +16,18 @@ if [[ ${PV} == *9999 ]] ; then REQUIRED_USE="${PYTHON_REQUIRED_USE}" else - VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc inherit verify-sig + if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + inherit autotools + fi + if [[ ${PV} == *_pre* ]] ; then SRC_DIR="src-previews" else SRC_DIR="src" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz @@ -31,24 +37,35 @@ fi LICENSE="GPL-3" SLOT="0" -IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd" +IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" -RDEPEND="acl? ( virtual/acl ) +RDEPEND=" + >=dev-libs/popt-1.5 + acl? ( virtual/acl ) examples? ( ${PYTHON_DEPS} dev-lang/perl ) - lz4? ( app-arch/lz4 ) - ssl? ( dev-libs/openssl:0= ) + lz4? ( app-arch/lz4:= ) + rrsync? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/bracex[${PYTHON_USEDEP}] + ') + ) + ssl? ( dev-libs/openssl:= ) system-zlib? ( sys-libs/zlib ) xattr? ( kernel_linux? ( sys-apps/attr ) ) - xxhash? ( dev-libs/xxhash ) - zstd? ( >=app-arch/zstd-1.4 ) - >=dev-libs/popt-1.5 + xxhash? ( >=dev-libs/xxhash-0.8 ) + zstd? ( >=app-arch/zstd-1.4:= ) iconv? ( virtual/libiconv )" DEPEND="${RDEPEND}" -BDEPEND="examples? ( ${PYTHON_DEPS} )" +BDEPEND=" + examples? ( ${PYTHON_DEPS} ) + rrsync? ( ${PYTHON_DEPS} ) +" if [[ ${PV} == *9999 ]] ; then BDEPEND+=" ${PYTHON_DEPS} @@ -62,7 +79,7 @@ fi pkg_setup() { # - USE=examples needs Python itself at runtime, but nothing else # - 9999 needs commonmark at build time - if [[ ${PV} == *9999 ]] || use examples ; then + if [[ ${PV} == *9999 ]] || use examples || use rrsync; then python-single-r1_pkg_setup fi } @@ -70,25 +87,35 @@ pkg_setup() { src_prepare() { default - if [[ ${PV} == *9999 ]] ; then + sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac + + if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then eaclocal -I m4 eautoconf -o configure.sh eautoheader && touch config.h.in fi + + if use examples || use rrsync; then + python_fix_shebang support/ + fi + + if [[ -f rrsync.1 ]]; then + # If the pre-build rrsync.1 man page exists, then link to it + # from support/rrsync.1 to avoid rsync's build system attempting + # re-creating the man page (bug #883049). + ln -s ../rrsync.1 support/rrsync.1 || die + fi } src_configure() { - # Force enable IPv6 on musl - upstream bug: - # https://bugzilla.samba.org/show_bug.cgi?id=10715 - use elibc_musl && use ipv6 && append-cppflags -DINET6 - local myeconfargs=( --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf --without-included-popt + --enable-ipv6 $(use_enable acl acl-support) $(use_enable iconv) - $(use_enable ipv6) $(use_enable lz4) + $(use_with rrsync) $(use_enable ssl openssl) $(use_with !system-zlib included-zlib) $(use_enable xattr xattr-support) @@ -96,6 +123,14 @@ src_configure() { $(use_enable zstd) ) + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + econf "${myeconfargs[@]}" } @@ -123,7 +158,9 @@ src_install() { # Install the useful contrib scripts if use examples ; then - python_fix_shebang support/ + # The 'rrsync' script is installed conditionally via the 'rrysnc' + # USE flag, and not via the 'examples' USE flag. + rm support/rrsync* || die exeinto /usr/share/rsync doexe support/* diff --git a/net-misc/rsync/rsync-9999.ebuild b/net-misc/rsync/rsync-9999.ebuild index d172d6ec7259..6ea497c2e733 100644 --- a/net-misc/rsync/rsync-9999.ebuild +++ b/net-misc/rsync/rsync-9999.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Uncomment when introducing a patch which touches configure +RSYNC_NEEDS_AUTOCONF=1 +PYTHON_COMPAT=( python3_{10..12} ) inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" @@ -14,14 +16,18 @@ if [[ ${PV} == *9999 ]] ; then REQUIRED_USE="${PYTHON_REQUIRED_USE}" else - VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc inherit verify-sig + if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + inherit autotools + fi + if [[ ${PV} == *_pre* ]] ; then SRC_DIR="src-previews" else SRC_DIR="src" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz @@ -31,24 +37,35 @@ fi LICENSE="GPL-3" SLOT="0" -IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd" +IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" -RDEPEND="acl? ( virtual/acl ) +RDEPEND=" + >=dev-libs/popt-1.5 + acl? ( virtual/acl ) examples? ( ${PYTHON_DEPS} dev-lang/perl ) - lz4? ( app-arch/lz4 ) - ssl? ( dev-libs/openssl:0= ) + lz4? ( app-arch/lz4:= ) + rrsync? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/bracex[${PYTHON_USEDEP}] + ') + ) + ssl? ( dev-libs/openssl:= ) system-zlib? ( sys-libs/zlib ) xattr? ( kernel_linux? ( sys-apps/attr ) ) - xxhash? ( dev-libs/xxhash ) - zstd? ( >=app-arch/zstd-1.4 ) - >=dev-libs/popt-1.5 + xxhash? ( >=dev-libs/xxhash-0.8 ) + zstd? ( >=app-arch/zstd-1.4:= ) iconv? ( virtual/libiconv )" DEPEND="${RDEPEND}" -BDEPEND="examples? ( ${PYTHON_DEPS} )" +BDEPEND=" + examples? ( ${PYTHON_DEPS} ) + rrsync? ( ${PYTHON_DEPS} ) +" if [[ ${PV} == *9999 ]] ; then BDEPEND+=" ${PYTHON_DEPS} @@ -62,7 +79,7 @@ fi pkg_setup() { # - USE=examples needs Python itself at runtime, but nothing else # - 9999 needs commonmark at build time - if [[ ${PV} == *9999 ]] || use examples ; then + if [[ ${PV} == *9999 ]] || use examples || use rrsync; then python-single-r1_pkg_setup fi } @@ -70,25 +87,35 @@ pkg_setup() { src_prepare() { default - if [[ ${PV} == *9999 ]] ; then + sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac + + if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then eaclocal -I m4 eautoconf -o configure.sh eautoheader && touch config.h.in fi + + if use examples || use rrsync; then + python_fix_shebang support/ + fi + + if [[ -f rrsync.1 ]]; then + # If the pre-build rrsync.1 man page exists, then link to it + # from support/rrsync.1 to avoid rsync's build system attempting + # re-creating the man page (bug #883049). + ln -s ../rrsync.1 support/rrsync.1 || die + fi } src_configure() { - # Force enable IPv6 on musl - upstream bug: - # https://bugzilla.samba.org/show_bug.cgi?id=10715 - use elibc_musl && use ipv6 && append-cppflags -DINET6 - local myeconfargs=( --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf --without-included-popt + --enable-ipv6 $(use_enable acl acl-support) $(use_enable iconv) - $(use_enable ipv6) $(use_enable lz4) + $(use_with rrsync) $(use_enable ssl openssl) $(use_with !system-zlib included-zlib) $(use_enable xattr xattr-support) @@ -96,6 +123,14 @@ src_configure() { $(use_enable zstd) ) + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + econf "${myeconfargs[@]}" } @@ -123,7 +158,9 @@ src_install() { # Install the useful contrib scripts if use examples ; then - python_fix_shebang support/ + # The 'rrsync' script is installed conditionally via the 'rrysnc' + # USE flag, and not via the 'examples' USE flag. + rm support/rrsync* || die exeinto /usr/share/rsync doexe support/* |