The branch, master has been updated via 26f4dbe1 Change usage (--version) output to note when ASM isn't really being used. via b3f1970f Fix wording in RSYNC_PORT section (#293) via c51da917 Build Cygwin on windows-2022 with newer python. [buildall] via 81f71f6f Add a CAUTION message to --debug=FILTER for trailing whitespace. from 48e70055 Add a couple more `--rsync-path` opts to the test. [buildall]
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 26f4dbe12c63d77ce8dcb7623b53bcf76be5c277 Author: Wayne Davison <wa...@opencoder.net> Date: Mon Feb 21 16:39:16 2022 -0800 Change usage (--version) output to note when ASM isn't really being used. commit b3f1970f18578fc4bbbc965f31d32a3ba677ef32 Author: Sam Mikes <smi...@cubane.com> Date: Mon Feb 21 15:00:45 2022 -0700 Fix wording in RSYNC_PORT section (#293) Fix wording from 'does is not read' -> 'is not read' commit c51da9174f626f6da2b3bf46a045099aeef72175 Author: Wayne Davison <wa...@opencoder.net> Date: Wed Feb 9 13:59:08 2022 -0800 Build Cygwin on windows-2022 with newer python. [buildall] commit 81f71f6f29656325863d5da78f4fece991d1574d Author: Wayne Davison <wa...@opencoder.net> Date: Thu Jan 27 08:31:24 2022 -0800 Add a CAUTION message to --debug=FILTER for trailing whitespace. ----------------------------------------------------------------------- Summary of changes: .github/workflows/build.yml | 9 +++--- NEWS.md | 3 ++ configure.ac | 76 +++++++++++++++++++++++++-------------------- exclude.c | 14 ++++++--- rsync.1.md | 10 +++++- usage.c | 2 +- 6 files changed, 68 insertions(+), 46 deletions(-) Changeset truncated at 500 lines: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a44cd2ab..75987fa3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,16 +86,15 @@ jobs: rrsync cygwin-build: - runs-on: windows-latest + runs-on: windows-2022 if: (github.event_name == 'schedule' || contains(github.event.head_commit.message, '[buildall]')) steps: - uses: actions/checkout@v2 - - uses: crazy-max/ghaction-chocolatey@v1.2.2 - with: - args: install -y --no-progress cygwin cyg-get + - name: cygwin + run: choco install -y --no-progress cygwin cyg-get - name: prep run: | - cyg-get make autoconf automake gcc-core attr libattr-devel python38 python38-pip libzstd-devel liblz4-devel libssl-devel libxxhash0 libxxhash-devel + cyg-get make autoconf automake gcc-core attr libattr-devel python39 python39-pip libzstd-devel liblz4-devel libssl-devel libxxhash0 libxxhash-devel curl.exe -o git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h echo "C:/tools/cygwin/bin" >>$Env:GITHUB_PATH - name: commonmark diff --git a/NEWS.md b/NEWS.md index 3083ca3a..87abba21 100644 --- a/NEWS.md +++ b/NEWS.md @@ -138,6 +138,9 @@ - More ASM optimizations from Shark64. + - Using `--debug=FILTER` now outputs a caution message if a filter rule + has trailing whitespace. + - Transformed rrsync into a python script with improvements: - Security has been beefed up. - The known rsync options were updated to include recent additions. diff --git a/configure.ac b/configure.ac index 7031283a..9960fafc 100644 --- a/configure.ac +++ b/configure.ac @@ -322,39 +322,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[return 0;]])], CFLAGS="$OLD_CFLAGS" AC_SUBST(NOEXECSTACK) -ASM= - -AC_MSG_CHECKING([whether to enable ASM optimizations]) -AC_ARG_ENABLE(asm, - AS_HELP_STRING([--enable-asm],[enable/disable to control ASM optimizations])) - -if test x"$enable_asm" = x""; then - case "$host_os" in - *linux*) ;; - *) enable_asm=no ;; - esac -fi - -if test x"$enable_asm" != x"no"; then - if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; 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|amd64 only. -Omit --enable-asm to continue without it.) - fi -fi - -if test x"$ASM" != x""; then - AC_MSG_RESULT([yes ($ASM)]) - AC_DEFINE(HAVE_ASM, 1, [Define to 1 to enable ASM optimizations]) - ASM='$(ASM_'"$ASM)" -else - AC_MSG_RESULT(no) -fi - -AC_SUBST(ASM) - # arrgh. libc in some old debian version screwed up the largefile # stuff, getting byte range locking wrong AC_CACHE_CHECK([for broken largefile support],rsync_cv_HAVE_BROKEN_LARGEFILE,[ @@ -457,7 +424,8 @@ if test x"$enable_openssl" != x"no"; then if test x"$ac_cv_header_openssl_md4_h" = x"yes" && test x"$ac_cv_header_openssl_md5_h" = x"yes"; then AC_MSG_RESULT(yes) AC_SEARCH_LIBS(MD5_Init, crypto, - [AC_DEFINE(USE_OPENSSL)], + [AC_DEFINE(USE_OPENSSL) + enable_openssl=yes], [err_msg="$err_msg$nl- Failed to find MD5_Init function in openssl crypto lib."; no_lib="$no_lib openssl"]) else @@ -465,10 +433,46 @@ if test x"$enable_openssl" != x"no"; then err_msg="$err_msg$nl- Failed to find openssl/md4.h and openssl/md5.h for openssl crypto lib support." no_lib="$no_lib openssl" fi + if test x"$enable_asm" != x"yes"; then + enable_asm=no + fi else AC_MSG_RESULT(no) fi +ASM= + +AC_MSG_CHECKING([whether to enable ASM optimizations]) +AC_ARG_ENABLE(asm, + AS_HELP_STRING([--enable-asm],[enable/disable to control ASM optimizations])) + +if test x"$enable_asm" = x""; then + case "$host_os" in + *linux*) ;; + *) enable_asm=no ;; + esac +fi + +if test x"$enable_asm" != x"no"; then + if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; 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|amd64 only. +Omit --enable-asm to continue without it.) + fi +fi + +if test x"$ASM" != x""; then + AC_MSG_RESULT([yes ($ASM)]) + AC_DEFINE(HAVE_ASM, 1, [Define to 1 to enable ASM optimizations]) + ASM='$(ASM_'"$ASM)" +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(ASM) + AC_MSG_CHECKING([whether to enable xxhash checksum support]) AC_ARG_ENABLE([xxhash], AS_HELP_STRING([--disable-xxhash],[disable to omit xxhash checksums])) @@ -1417,6 +1421,10 @@ esac AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT +if test "$enable_openssl" = yes && test "$enable_asm" = yes; then + echo "*** Ignoring --enable-asm option -- using openssl for MD5 checksums ***" +fi + AC_MSG_RESULT() AC_MSG_RESULT([ rsync $PACKAGE_VERSION configuration successful]) AC_MSG_RESULT() diff --git a/exclude.c b/exclude.c index e0957443..4ee06a84 100644 --- a/exclude.c +++ b/exclude.c @@ -152,13 +152,17 @@ static void add_rule(filter_rule_list *listp, const char *pat, unsigned int pat_ { const char *cp; unsigned int pre_len, suf_len, slash_cnt = 0; + char *mention_rule_suffix; - if (DEBUG_GTE(FILTER, 2)) { - rprintf(FINFO, "[%s] add_rule(%s%.*s%s)%s\n", + if (DEBUG_GTE(FILTER, 1) && pat_len && (pat[pat_len-1] == ' ' || pat[pat_len-1] == '\t')) + mention_rule_suffix = " -- CAUTION: trailing whitespace!"; + else + mention_rule_suffix = DEBUG_GTE(FILTER, 2) ? "" : NULL; + if (mention_rule_suffix) { + rprintf(FINFO, "[%s] add_rule(%s%.*s%s)%s%s\n", who_am_i(), get_rule_prefix(rule, pat, 0, NULL), - (int)pat_len, pat, - (rule->rflags & FILTRULE_DIRECTORY) ? "/" : "", - listp->debug_type); + (int)pat_len, pat, (rule->rflags & FILTRULE_DIRECTORY) ? "/" : "", + listp->debug_type, mention_rule_suffix); } /* These flags also indicate that we're reading a list that diff --git a/rsync.1.md b/rsync.1.md index b5685d3f..e20706dd 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -3723,6 +3723,14 @@ first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped. +Aside: because the interactions of filter rules can be complex, it is useful to +use the `--debug=FILTER` option if things aren't working they way you expect. +The level-1 output (the default if no level number is specified) mentions the +filter rule that is first matched by each file in the transfer. It also warns +if a filter rule has trailing whitespace. The level-2 output mentions a lot +more filter events, including the definition of each rule and the handling of +per-directory filter files. + Rsync builds an ordered list of filter rules as specified on the command-line. Filter rules have the following syntax: @@ -4429,7 +4437,7 @@ file is included or excluded. 0. `RSYNC_PORT` - This environment variable does is not read by rsync, but is instead set in + This environment variable is not read by rsync, but is instead set in its sub-environment when rsync is running the remote shell in combination with a daemon connection. This allows a script such as [`rsync-ssl`](rsync-ssl.1) to be able to know the port number that the user diff --git a/usage.c b/usage.c index db13535f..c8c4f025 100644 --- a/usage.c +++ b/usage.c @@ -144,7 +144,7 @@ static void print_info_flags(enum logcode f) #endif "SIMD", -#ifndef HAVE_ASM +#if !defined HAVE_ASM || defined USE_OPENSSL "no " #endif "asm", -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs