The branch, master has been updated via 475ca7d4 Add helper script for updating samba files. via 7c3c54b1 Don't force zsh use. via bcf0738f Indentation tweak. via 8749ec64 Update to newer artifact version. via 42e2b56c Another cast when multiplying integers. from 0902b52f Some checksum buffer fixes.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 475ca7d43c659d8c68ef09959fb00dfac7cd3e32 Author: Wayne Davison <wa...@opencoder.net> Date: Tue Nov 5 12:42:42 2024 -0800 Add helper script for updating samba files. commit 7c3c54b13216ba2beeffc2b95ad3c476574c1f14 Author: Wayne Davison <wa...@opencoder.net> Date: Tue Nov 5 11:20:28 2024 -0800 Don't force zsh use. commit bcf0738f9827d1bd9d49b84192f402928706c518 Author: Wayne Davison <wa...@opencoder.net> Date: Tue Nov 5 11:20:17 2024 -0800 Indentation tweak. commit 8749ec64365dd724b7cb19d892794bdb62fd02c2 Author: Wayne Davison <wa...@opencoder.net> Date: Tue Nov 5 11:14:46 2024 -0800 Update to newer artifact version. commit 42e2b56c4ede3ab164f9a5c6dae02aa84606a6c1 Author: Wayne Davison <wa...@opencoder.net> Date: Tue Nov 5 11:01:03 2024 -0800 Another cast when multiplying integers. ----------------------------------------------------------------------- Summary of changes: .github/workflows/cygwin-build.yml | 2 +- .github/workflows/freebsd-build.yml | 2 +- .github/workflows/solaris-build.yml | 2 +- .github/workflows/ubuntu-build.yml | 2 +- Makefile.in | 2 +- options.c | 2 +- packaging/branch-from-patch | 2 +- packaging/samba-rsync | 85 +++++++++++++++++++++++++++++++++++++ rsync.h | 2 +- sender.c | 2 +- 10 files changed, 94 insertions(+), 9 deletions(-) create mode 100755 packaging/samba-rsync Changeset truncated at 500 lines: diff --git a/.github/workflows/cygwin-build.yml b/.github/workflows/cygwin-build.yml index c6afb118..dc14cb9f 100644 --- a/.github/workflows/cygwin-build.yml +++ b/.github/workflows/cygwin-build.yml @@ -43,7 +43,7 @@ jobs: - name: ssl file list run: bash -c 'PATH="/usr/local/bin:$PATH" rsync-ssl --no-motd download.samba.org::rsyncftp/ || true' - name: save artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cygwin-bin path: | diff --git a/.github/workflows/freebsd-build.yml b/.github/workflows/freebsd-build.yml index 1ac22388..749a6d76 100644 --- a/.github/workflows/freebsd-build.yml +++ b/.github/workflows/freebsd-build.yml @@ -36,7 +36,7 @@ jobs: ./rsync --version ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: freebsd-bin path: | diff --git a/.github/workflows/solaris-build.yml b/.github/workflows/solaris-build.yml index 231fbd4a..50ba7501 100644 --- a/.github/workflows/solaris-build.yml +++ b/.github/workflows/solaris-build.yml @@ -36,7 +36,7 @@ jobs: ./rsync --version ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: solaris-bin path: | diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 1db9a482..9deb935a 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -43,7 +43,7 @@ jobs: - name: ssl file list run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ubuntu-bin path: | diff --git a/Makefile.in b/Makefile.in index d5fefe04..7c75c261 100644 --- a/Makefile.in +++ b/Makefile.in @@ -358,4 +358,4 @@ doxygen: .PHONY: doxygen-upload doxygen-upload: rsync -avzv $(srcdir)/dox/html/ --delete \ - $${SAMBA_HOST-samba.org}:/home/httpd/html/rsync/doxygen/head/ + $${RSYNC_SAMBA_HOST-samba.org}:/home/httpd/html/rsync/doxygen/head/ diff --git a/options.c b/options.c index fd674754..578507c6 100644 --- a/options.c +++ b/options.c @@ -2563,7 +2563,7 @@ char *safe_arg(const char *opt, const char *arg) if (escape_leading_tilde) *t++ = '\\'; while (*f) { - if (*f == '\\') { + if (*f == '\\') { if (!is_filename_arg || !strchr(WILD_CHARS, f[1])) *t++ = '\\'; } else if (strchr(escapes, *f)) diff --git a/packaging/branch-from-patch b/packaging/branch-from-patch index 440b5835..40e5653c 100755 --- a/packaging/branch-from-patch +++ b/packaging/branch-from-patch @@ -154,7 +154,7 @@ def create_branch(patch): s = cmd_run(['git', 'commit', '-a', '-m', f"Creating branch from {patch.name}.diff."]) if not s.returncode: break - s = cmd_run(['/bin/zsh']) + s = cmd_run([os.environ.get('SHELL', '/bin/sh')]) if s.returncode: die('Aborting due to shell error code') diff --git a/packaging/samba-rsync b/packaging/samba-rsync new file mode 100755 index 00000000..c36bf419 --- /dev/null +++ b/packaging/samba-rsync @@ -0,0 +1,85 @@ +#!/bin/sh +# This script makes it easy to update the ftp & html directories on the samba.org server. +# It expects the 2 *_DEST directories to contain updated files that need to be sent to +# the remote server. If these directories don't exist yet, they will be copied from the +# remote server (while also making the html dir a git checkout). + +FTP_SRC="$HOME/samba-rsync-ftp" +HTML_SRC="$HOME/samba-rsync-html" + +FTP_DEST="/home/ftp/pub/rsync" +HTML_DEST="/home/httpd/html/rsync" + +HTML_GIT='git.samba.org:/data/git/rsync-web.git' + +export RSYNC_PARTIAL_DIR='' + +case "$RSYNC_SAMBA_HOST" in + *.samba.org) ;; + *) + echo "You must set RSYNC_SAMBA_HOST in your environment to the samba hostname to use." >&2 + exit 1 + ;; +esac + +case "$1" in + f|-f|ftp|--ftp) MODE=ftp ;; + h|-h|html|--html) MODE=html ;; + '') + echo -n "Update ftp or html? " + read ans + case "$ans" in + f*) MODE=ftp ;; + h*) MODE=html ;; + *) + echo "Invalid answer." >&2 + exit 1 + ;; + esac + ;; + *) + echo "Invalid option: $1" >&2 + exit 1 + ;; +esac + +if [ "$MODE" = ftp ]; then + SRC_DIR="$FTP_SRC" + DEST_DIR="$FTP_DEST" + FILT=".filt" +else + SRC_DIR="$HTML_SRC" + DEST_DIR="$HTML_DEST" + FILT="filt" +fi + +if [ ! -d "$SRC_DIR" ]; then + echo "The directory $SRC_DIR does not exist yet." + echo -n "Do you want to create it? [n] " + read ans + case "$ans" in + y*) ;; + *) exit 1 ;; + esac + OPTS='-aiv' + TMP_FILT="$SRC_DIR/tmp-filt" + if [ "$MODE" = html ]; then + git clone "$HTML_GIT" "$SRC_DIR" + sed -n -e 's/[-P]/H/p' "$SRC_DIR/$FILT" >"$TMP_FILT" + OPTS="${OPTS}f._$TMP_FILT" + fi + rsync "$OPTS" "$RSYNC_SAMBA_HOST:$DEST_DIR/" "$SRC_DIR/" + rm -f "$TMP_FILT" + exit +fi + +cd "$SRC_DIR" || exit 1 +set -- -aivOHP --del -f._$FILT . "$RSYNC_SAMBA_HOST:$DEST_DIR/" + +rsync --dry-run "${@}" | grep -v 'is uptodate$' +echo '' +echo -n "Run without --dry-run? [n] " +read ans +case "$ans" in + y*) rsync "${@}" | grep -v 'is uptodate$' ;; +esac diff --git a/rsync.h b/rsync.h index 8ddbe702..0f9e277f 100644 --- a/rsync.h +++ b/rsync.h @@ -982,7 +982,7 @@ struct map_struct { int status; /* first errno from read errors */ }; -#define sum2_at(s, i) ((s)->sum2_array + ((OFF_T)(i) * xfer_sum_len)) +#define sum2_at(s, i) ((s)->sum2_array + ((size_t)(i) * xfer_sum_len)) #define NAME_IS_FILE (0) /* filter name as a file */ #define NAME_IS_DIR (1<<0) /* filter name as a dir */ diff --git a/sender.c b/sender.c index ab205341..2bbff2fa 100644 --- a/sender.c +++ b/sender.c @@ -95,7 +95,7 @@ static struct sum_struct *receive_sums(int f) return(s); s->sums = new_array(struct sum_buf, s->count); - s->sum2_array = new_array(char, s->count * xfer_sum_len); + s->sum2_array = new_array(char, (size_t)s->count * xfer_sum_len); for (i = 0; i < s->count; i++) { s->sums[i].sum1 = read_int(f); -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs