diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2020-07-28 08:54:11 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2020-07-28 08:54:47 +0200 |
commit | f0c6c276cbc2bc2b5eb25264586b2a5fef1af3c2 (patch) | |
tree | d6c47a0d64fc4fd8a4357c2ae5c580cc958d86bc /net-misc/rsync/files | |
parent | dev-util/gnome-builder: add subslot operator dep := for libgit2 (diff) | |
download | gentoo-f0c6c276cbc2bc2b5eb25264586b2a5fef1af3c2.tar.gz gentoo-f0c6c276cbc2bc2b5eb25264586b2a5fef1af3c2.tar.bz2 gentoo-f0c6c276cbc2bc2b5eb25264586b2a5fef1af3c2.zip |
net-misc/rsync: Revbump to backport two fixes
- Allow --bwlimit=0 again
- Fix usage of zstd compression
Closes: https://bugs.gentoo.org/731306
Closes: https://bugs.gentoo.org/733084
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-misc/rsync/files')
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.2-allow_bwlimit_0.patch | 77 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-3.2.2-zstd_see_token.patch | 31 |
2 files changed, 108 insertions, 0 deletions
diff --git a/net-misc/rsync/files/rsync-3.2.2-allow_bwlimit_0.patch b/net-misc/rsync/files/rsync-3.2.2-allow_bwlimit_0.patch new file mode 100644 index 000000000000..4a795bb17b96 --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.2-allow_bwlimit_0.patch @@ -0,0 +1,77 @@ +From 5dcb49c7ddec765d4a24b4f801ffc7212c085db1 Mon Sep 17 00:00:00 2001 +From: Wayne Davison <wayne@opencoder.net> +Date: Tue, 7 Jul 2020 11:40:27 -0700 +Subject: [PATCH] Allow --bwlimit=0 again. + +--- + options.c | 12 ++++++------ + testsuite/hands.test | 2 +- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/options.c b/options.c +index 5a372ae7..0b7b9f33 100644 +--- a/options.c ++++ b/options.c +@@ -1253,7 +1253,7 @@ static int count_args(const char **argv) + /* If the size_arg is an invalid string or the value is < min_value, an error + * is put into err_buf & the return is -1. Note that this parser does NOT + * support negative numbers, so a min_value < 0 doesn't make any sense. */ +-static ssize_t parse_size_arg(char *size_arg, char def_suf, const char *opt_name, ssize_t min_value) ++static ssize_t parse_size_arg(char *size_arg, char def_suf, const char *opt_name, ssize_t min_value, BOOL allow_0) + { + int reps, mult; + const char *arg, *err = "invalid"; +@@ -1299,7 +1299,7 @@ static ssize_t parse_size_arg(char *size_arg, char def_suf, const char *opt_name + size += atoi(arg), arg += 2; + if (*arg) + goto failure; +- if (size < min_value) { ++ if (size < min_value && (!allow_0 || size != 0)) { + err = size < 0 ? "too big" : "too small"; + goto failure; + } +@@ -1683,19 +1683,19 @@ int parse_arguments(int *argc_p, const char ***argv_p) + break; + + case OPT_MAX_SIZE: +- if ((max_size = parse_size_arg(max_size_arg, 'b', "max-size", 0)) < 0) ++ if ((max_size = parse_size_arg(max_size_arg, 'b', "max-size", 0, True)) < 0) + return 0; + max_size_arg = num_to_byte_string(max_size); + break; + + case OPT_MIN_SIZE: +- if ((min_size = parse_size_arg(min_size_arg, 'b', "min-size", 0)) < 0) ++ if ((min_size = parse_size_arg(min_size_arg, 'b', "min-size", 0, True)) < 0) + return 0; + min_size_arg = num_to_byte_string(min_size); + break; + + case OPT_BWLIMIT: { +- ssize_t size = parse_size_arg(bwlimit_arg, 'K', "bwlimit", 512); ++ ssize_t size = parse_size_arg(bwlimit_arg, 'K', "bwlimit", 512, True); + if (size < 0) + return 0; + bwlimit_arg = num_to_byte_string(size); +@@ -1889,7 +1889,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + max_alloc_arg = NULL; + } + if (max_alloc_arg) { +- ssize_t size = parse_size_arg(max_alloc_arg, 'B', "max-alloc", 1024*1024); ++ ssize_t size = parse_size_arg(max_alloc_arg, 'B', "max-alloc", 1024*1024, False); + if (size < 0) + return 0; + max_alloc = size; +diff --git a/testsuite/hands.test b/testsuite/hands.test +index 46928d4e..8e265b7c 100644 +--- a/testsuite/hands.test ++++ b/testsuite/hands.test +@@ -16,7 +16,7 @@ DEBUG_OPTS="--debug=all0,deltasum0" + runtest "basic operation" 'checkit "$RSYNC -av \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"' + + ln "$fromdir/filelist" "$fromdir/dir" +-runtest "hard links" 'checkit "$RSYNC -avH $DEBUG_OPTS \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"' ++runtest "hard links" 'checkit "$RSYNC -avH --bwlimit=0 $DEBUG_OPTS \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"' + + rm "$todir/text" + runtest "one file" 'checkit "$RSYNC -avH $DEBUG_OPTS \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"' diff --git a/net-misc/rsync/files/rsync-3.2.2-zstd_see_token.patch b/net-misc/rsync/files/rsync-3.2.2-zstd_see_token.patch new file mode 100644 index 000000000000..02f22409d4c2 --- /dev/null +++ b/net-misc/rsync/files/rsync-3.2.2-zstd_see_token.patch @@ -0,0 +1,31 @@ +From bb1365dd7736b264738f50b683a0f81a2ed11aba Mon Sep 17 00:00:00 2001 +From: Wayne Davison <wayne@opencoder.net> +Date: Fri, 10 Jul 2020 09:47:16 -0700 +Subject: [PATCH] Fix see_token zstd case. + +--- + token.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/token.c b/token.c +index cad6b641..61be8dd9 100644 +--- a/token.c ++++ b/token.c +@@ -1093,13 +1093,13 @@ void see_token(char *data, int32 toklen) + break; + case CPRES_ZLIBX: + break; +-#ifdef SUPPORT_LZ4 +- case CPRES_LZ4: +- /*see_uncompressed_token(data, toklen);*/ ++#ifdef SUPPORT_ZSTD ++ case CPRES_ZSTD: + break; + #endif + #ifdef SUPPORT_LZ4 +- case CPRES_ZSTD: ++ case CPRES_LZ4: ++ /*see_uncompressed_token(data, toklen);*/ + break; + #endif + default: |