diff options
Diffstat (limited to 'net-misc/rsync/files')
-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.4-strlcpy.patch | 46 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.4-unsigned-char-checksum.patch | 12 |
5 files changed, 58 insertions, 213 deletions
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.4-strlcpy.patch b/net-misc/rsync/files/rsync-3.2.4-strlcpy.patch new file mode 100644 index 000000000000..d5a02f0e3159 --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.4-strlcpy.patch @@ -0,0 +1,46 @@ +https://github.com/WayneD/rsync/issues/324 +https://github.com/WayneD/rsync/commit/3592ac3c025da23b2dd291561ec6113940b9c11b + +From 3592ac3c025da23b2dd291561ec6113940b9c11b Mon Sep 17 00:00:00 2001 +From: Wayne Davison <wayne@opencoder.net> +Date: Sun, 19 Jun 2022 10:02:51 -0700 +Subject: [PATCH] Include bsd/strings.h if it exists + +Some systems apparently put strlcpy() into a separate bsd/strings.h file +without putting the function into a separate library. Thus, configure +finds that the function exists for linking but the build does not have +the declaration (which rsync only supplies if it is also supplying its +own version of the function). +--- + configure.ac | 3 ++- + rsync.h | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 37dbb18a..37241637 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,7 +13,8 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \ + netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.h \ + sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \ + popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netgroup.h \ +- zlib.h xxhash.h openssl/md4.h openssl/md5.h zstd.h lz4.h sys/file.h) ++ zlib.h xxhash.h openssl/md4.h openssl/md5.h zstd.h lz4.h sys/file.h \ ++ bsd/string.h) + AC_CHECK_HEADERS([netinet/ip.h], [], [], [[#include <netinet/in.h>]]) + AC_HEADER_MAJOR_FIXED + +diff --git a/rsync.h b/rsync.h +index e5aacd25..1cc037c5 100644 +--- a/rsync.h ++++ b/rsync.h +@@ -338,6 +338,9 @@ enum delret { + # endif + # include <string.h> + #endif ++#ifdef HAVE_BSD_STRING_H ++# include <bsd/string.h> ++#endif + #ifdef HAVE_STRINGS_H + # include <strings.h> + #endif diff --git a/net-misc/rsync/files/rsync-3.2.4-unsigned-char-checksum.patch b/net-misc/rsync/files/rsync-3.2.4-unsigned-char-checksum.patch new file mode 100644 index 000000000000..18e56c31ce2a --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.4-unsigned-char-checksum.patch @@ -0,0 +1,12 @@ +https://lists.samba.org/archive/rsync-announce/2022/000111.html +--- a/configure.ac ++++ b/configure.ac +@@ -1117,7 +1117,7 @@ else + fi + + AC_CACHE_CHECK([for unsigned char],rsync_cv_SIGNED_CHAR_OK,[ +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char *s = ""]])],[rsync_cv_SIGNED_CHAR_OK=yes],[rsync_cv_SIGNED_CHAR_OK=no])]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char *s = (signed char *)""]])],[rsync_cv_SIGNED_CHAR_OK=yes],[rsync_cv_SIGNED_CHAR_OK=no])]) + if test x"$rsync_cv_SIGNED_CHAR_OK" = x"yes"; then + AC_DEFINE(SIGNED_CHAR_OK, 1, [Define to 1 if "signed char" is a valid type]) + fi |