Skip to content

Commit

Permalink
feat: update rsync to 3.3.0-1
Browse files Browse the repository at this point in the history
  • Loading branch information
deepin-community-bot[bot] authored and UTsweetyfish committed Jun 28, 2024
1 parent a5814a2 commit 6976856
Show file tree
Hide file tree
Showing 55 changed files with 1,902 additions and 1,405 deletions.
61 changes: 60 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
.pc/
*.[oa]
*~
dummy
ID
Makefile
Makefile.old
configure.sh
configure.sh.old
config.cache
config.h
config.h.in
config.h.in.old
config.log
config.status
aclocal.m4
/proto.h
/proto.h-tstamp
/rsync*.[15]
/rrsync
/rrsync*.1
/rsync*.html
/rrsync*.html
/help-rsync*.h
/default-cvsignore.h
/default-dont-compress.h
/daemon-parm.h
/.md2man-works
/autom4te*.cache
/confdefs.h
/conftest*
/dox
/getgroups
/gists
/gmon.out
/rsync
/stunnel-rsyncd.conf
/shconfig
/git-version.h
/testdir
/tests-dont-exist
/testtmp
/tls
/testrun
/trimslash
/t_unsafe
/wildtest
/getfsdev
/rounding.h
/doc/rsync.pdf
/doc/rsync.ps
/support/savetransfer
/testsuite/chown-fake.test
/testsuite/devices-fake.test
/testsuite/xattrs-hlink.test
/patches
/patches.gen
/build
/auto-build-save
.deps
/*.exe
87 changes: 79 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
# NEWS for rsync 3.3.0 (6 Apr 2024)

## Changes in this version:

### BUG FIXES:

- Fixed a bug with `--sparse --inplace` where a trailing gap in the source
file would not clear out the trailing data in the destination file.

- Fixed an buffer overflow in the checksum2 code if SHA1 is being used for
the checksum2 algorithm.

- Fixed an issue when rsync is compiled using `_FORTIFY_SOURCE` so that the
extra tests don't complain about a strlcpy() limit value (which was too
large, even though it wasn't possible for the larger value to cause an
overflow).

- Add a backtick to the list of characters that the filename quoting needs to
escape using backslashes.

- Fixed a string-comparison issue in the internal handling of `--progress` (a
locale such as tr_TR.utf-8 needed the internal triggering of `--info` options
to use upper-case flag names to ensure that they match).

- Make sure that a local transfer marks the sender side as trusted.

- Change the argv handling to work with a newer popt library -- one that likes
to free more data than it used to.

- Rsync now calls `OpenSSL_add_all_algorithms()` when compiled against an older
openssl library.

- Fixed a problem in the daemon auth for older protocols (29 and before) if the
openssl library is being used to compute MD4 checksums.

- Fixed `rsync -VV` on Cygwin -- it needed a flush of stdout.

- Fixed an old stats bug that counted devices as symlinks.

### ENHANCEMENTS:

- Enhanced rrsync with the `-no-overwrite` option that allows you to ensure
that existing files on your restricted but writable directory can't be
modified.

- Enhanced the manpages to mark links with .UR & .UE. If your nroff doesn't
support these idioms, touch the file `.md2man-force` in the source directory
so that `md-convert` gets called with the `--force-link-text` option, and
that should ensure that your manpages are still readable even with the
ignored markup.

- Some manpage improvements on the handling of [global] modules.

- Changed the mapfrom & mapto perl scripts (in the support dir) into a single
python script named idmap. Converted a couple more perl scripts into python.

- Changed the mnt-excl perl script (in the support dir) into a python script.

### DEVELOPER RELATED:

- Updated config.guess (timestamp 2023-01-01) and config.sub (timestamp
2023-01-21).

------------------------------------------------------------------------------

# NEWS for rsync 3.2.7 (20 Oct 2022)

## Changes in this version:
Expand Down Expand Up @@ -50,7 +115,7 @@

- The `--fuzzy` option was optimized a bit to try to cut down on the amount of
computations when considering a big pool of files. The simple heuristic from
Kenneth Finnegan resuled in about a 2x speedup.
Kenneth Finnegan resulted in about a 2x speedup.

- If rsync is forced to use protocol 29 or before (perhaps due to talking to an
rsync before 3.0.0), the modify time of a file is limited to 4-bytes. Rsync
Expand Down Expand Up @@ -217,20 +282,25 @@
- A new form of arg protection was added that works similarly to the older
`--protect-args` ([`-s`](rsync.1#opt)) option but in a way that avoids
breaking things like rrsync (the restricted rsync script): rsync now uses
backslash escaping for sending "shell-active" characters to the remote
shell. This includes spaces, so fetching a remote file via a simple quoted
filename value now works by default without any extra quoting:
backslash escaping for sending "shell-active" characters to the remote shell
(such as `$(){}<>#&` and others). This includes spaces, so fetching a remote
file via a quoted filename value now works by default without any extra
quoting:

```shell
rsync -aiv host:'a simple file.pdf' .
```

Wildcards are not escaped in filename args, but they are escaped in options
like the [`--suffix`](rsync.1#opt) and [`--usermap`](rsync.1#opt) values.
If your rsync script depends on the old arg-splitting behavior, either run
it with the [`--old-args`](rsync.1#opt) option or `export RSYNC_OLD_ARGS=1`
in the script's environment. See also the [ADVANCED USAGE](rsync.1#)
section of rsync's manpage for how to use a more modern arg style.

If a script depends on the old arg behavior (perhaps because it quotes or
protects the args already, or perhaps because it expects arg splitting),
there are two easy ways to get things going with a modern rsync: either
`export RSYNC_OLD_ARGS=1` in the script's environment (perhaps in the script
itself) or add the option [`--old-args`](rsync.1#opt) to the rsync commands
that are run. See also the [ADVANCED USAGE](rsync.1#) section of rsync's
manpage for how to use a more modern arg style.

- A long-standing bug was preventing rsync from figuring out the current
locale's decimal point character, which made rsync always output numbers
Expand Down Expand Up @@ -4692,6 +4762,7 @@

| RELEASE DATE | VER. | DATE OF COMMIT\* | PROTOCOL |
|--------------|--------|------------------|-------------|
| 06 Apr 2024 | 3.3.0 | | 31 |
| 20 Oct 2022 | 3.2.7 | | 31 |
| 09 Sep 2022 | 3.2.6 | | 31 |
| 14 Aug 2022 | 3.2.5 | | 31 |
Expand Down
6 changes: 3 additions & 3 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# PARTICULAR PURPOSE.

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([../m4/have_type.m4])
m4_include([../m4/header_major_fixed.m4])
m4_include([../m4/socklen_t.m4])
m4_include([m4/have_type.m4])
m4_include([m4/header_major_fixed.m4])
m4_include([m4/socklen_t.m4])
9 changes: 7 additions & 2 deletions checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 1996 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
* Copyright (C) 2004-2022 Wayne Davison
* Copyright (C) 2004-2023 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -154,7 +154,7 @@ static const EVP_MD *csum_evp_md(struct name_num_item *nni)
emd = NULL;
else
#endif
emd = EVP_get_digestbyname(nni->name);
emd = EVP_get_digestbyname(nni->name);
if (emd && !(nni->flags & NNI_EVP_OK)) { /* Make sure it works before we advertise it */
if (!ctx_evp && !(ctx_evp = EVP_MD_CTX_create()))
out_of_memory("csum_evp_md");
Expand Down Expand Up @@ -300,6 +300,7 @@ uint32 get_checksum1(char *buf1, int32 len)
}
#endif

/* The "sum" buffer must be at least MAX_DIGEST_LEN bytes! */
void get_checksum2(char *buf, int32 len, char *sum)
{
#ifdef USE_OPENSSL
Expand Down Expand Up @@ -787,6 +788,10 @@ void init_checksum_choices()
if (initialized_choices)
return;

#if defined USE_OPENSSL && OPENSSL_VERSION_NUMBER < 0x10100000L
OpenSSL_add_all_algorithms();
#endif

#if defined SUPPORT_XXH3 || defined USE_OPENSSL
for (nni = valid_checksums.list; nni->name; nni++)
verify_digest(nni, True);
Expand Down
6 changes: 5 additions & 1 deletion compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,8 @@ void output_daemon_greeting(int f_out, int am_client)
char tmpbuf[MAX_NSTR_STRLEN];
int our_sub = get_subprotocol_version();

init_checksum_choices();

get_default_nno_list(&valid_auth_checksums, tmpbuf, MAX_NSTR_STRLEN, '\0');

io_printf(f_out, "@RSYNCD: %d.%d %s\n", protocol_version, our_sub, tmpbuf);
Expand Down Expand Up @@ -873,8 +875,10 @@ void negotiate_daemon_auth(int f_out, int am_client)
}
}
am_server = save_am_server;
if (md4_is_old && valid_auth_checksums.negotiated_nni->num == CSUM_MD4)
if (md4_is_old && valid_auth_checksums.negotiated_nni->num == CSUM_MD4) {
valid_auth_checksums.negotiated_nni->num = CSUM_MD4_OLD;
valid_auth_checksums.negotiated_nni->flags = 0;
}
}

int get_subprotocol_version()
Expand Down
Loading

0 comments on commit 6976856

Please sign in to comment.