From 861062369f7b3c8f137ad34c45f4e2cf46f6c3a7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 May 2026 07:03:54 +1000 Subject: [PATCH] CI: fix workflows for backport testing --- .github/workflows/almalinux-8-build.yml | 1 - .github/workflows/cygwin-build.yml | 3 +- .github/workflows/freebsd-build.yml | 2 +- .github/workflows/macos-build.yml | 16 +++++--- .github/workflows/netbsd-build.yml | 51 +++++++++++++++++++++++ .github/workflows/openbsd-build.yml | 52 ++++++++++++++++++++++++ .github/workflows/solaris-build.yml | 2 +- .github/workflows/ubuntu-22.04-build.yml | 1 - .github/workflows/ubuntu-build.yml | 3 +- testsuite/clean-fname-underflow.test | 4 +- 10 files changed, 120 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/netbsd-build.yml create mode 100644 .github/workflows/openbsd-build.yml diff --git a/.github/workflows/almalinux-8-build.yml b/.github/workflows/almalinux-8-build.yml index 9d7ea782..a4a91ddb 100644 --- a/.github/workflows/almalinux-8-build.yml +++ b/.github/workflows/almalinux-8-build.yml @@ -13,7 +13,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/almalinux-8-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/almalinux-8-build.yml' diff --git a/.github/workflows/cygwin-build.yml b/.github/workflows/cygwin-build.yml index dc14cb9f..8062c83f 100644 --- a/.github/workflows/cygwin-build.yml +++ b/.github/workflows/cygwin-build.yml @@ -7,7 +7,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/cygwin-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/cygwin-build.yml' @@ -39,7 +38,7 @@ jobs: - name: info run: bash -c '/usr/local/bin/rsync --version' - name: check - run: bash -c 'RSYNC_EXPECT_SKIPPED=acls-default,acls,chown,devices,dir-sgid,protected-regular make check' + run: bash -c 'RSYNC_EXPECT_SKIPPED=acls-default,acls,bare-do-open-symlink-race,chdir-symlink-race,chmod-symlink-race,chown,daemon-chroot-acl,devices,dir-sgid,protected-regular,sender-flist-symlink-leak,simd-checksum,symlink-dirlink-basis make check' - name: ssl file list run: bash -c 'PATH="/usr/local/bin:$PATH" rsync-ssl --no-motd download.samba.org::rsyncftp/ || true' - name: save artifact diff --git a/.github/workflows/freebsd-build.yml b/.github/workflows/freebsd-build.yml index 749a6d76..3c044db1 100644 --- a/.github/workflows/freebsd-build.yml +++ b/.github/workflows/freebsd-build.yml @@ -7,7 +7,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/freebsd-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/freebsd-build.yml' @@ -34,6 +33,7 @@ jobs: ./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4 make ./rsync --version + make check ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 5471bf53..0bc46e4a 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -7,7 +7,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/macos-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/macos-build.yml' @@ -25,10 +24,15 @@ jobs: - name: prep run: | brew install automake openssl xxhash zstd lz4 - sudo pip3 install commonmark - echo "/usr/local/bin" >>$GITHUB_PATH + pip3 install --user --break-system-packages commonmark + echo "$(brew --prefix)/bin" >>$GITHUB_PATH - name: configure - run: CPPFLAGS=-I/usr/local/opt/openssl/include/ LDFLAGS=-L/usr/local/opt/openssl/lib/ ./configure --with-rrsync + run: | + BREW_PREFIX=$(brew --prefix) + OPENSSL_PREFIX=$(brew --prefix openssl) + CPPFLAGS="-I${BREW_PREFIX}/include -I${OPENSSL_PREFIX}/include" \ + LDFLAGS="-L${BREW_PREFIX}/lib -L${OPENSSL_PREFIX}/lib" \ + ./configure --with-rrsync - name: make run: make - name: install @@ -36,11 +40,11 @@ jobs: - name: info run: rsync --version - name: check - run: sudo RSYNC_EXPECT_SKIPPED=acls-default,chmod-temp-dir,chown-fake,devices-fake,dir-sgid,protected-regular,xattrs-hlink,xattrs make check + run: sudo RSYNC_EXPECT_SKIPPED=acls-default,chmod-temp-dir,chown-fake,daemon-chroot-acl,devices-fake,dir-sgid,protected-regular,simd-checksum,xattrs-hlink,xattrs make check - 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: macos-bin path: | diff --git a/.github/workflows/netbsd-build.yml b/.github/workflows/netbsd-build.yml new file mode 100644 index 00000000..770d7124 --- /dev/null +++ b/.github/workflows/netbsd-build.yml @@ -0,0 +1,51 @@ +name: Test rsync on NetBSD + +on: + push: + branches: [ master ] + paths-ignore: + - '.github/workflows/*.yml' + - '!.github/workflows/netbsd-build.yml' + pull_request: + branches: [ master ] + paths-ignore: + - '.github/workflows/*.yml' + - '!.github/workflows/netbsd-build.yml' + schedule: + - cron: '42 8 * * *' + +jobs: + test: + runs-on: ubuntu-latest + name: Test rsync on NetBSD + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Test in NetBSD VM + id: test + uses: vmactions/netbsd-vm@v1 + with: + usesh: true + prepare: | + PATH=/usr/sbin:$PATH pkg_add autoconf automake python312 + ln -sf /usr/pkg/bin/python3.12 /usr/pkg/bin/python3 + run: | + uname -a + ./configure --with-rrsync --disable-zstd --disable-md2man --disable-xxhash --disable-lz4 + make + ./rsync --version + make check + ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true + - name: save artifact + uses: actions/upload-artifact@v4 + with: + name: netbsd-bin + path: | + rsync + rsync-ssl + rsync.1 + rsync-ssl.1 + rsyncd.conf.5 + rrsync.1 + rrsync diff --git a/.github/workflows/openbsd-build.yml b/.github/workflows/openbsd-build.yml new file mode 100644 index 00000000..749724cd --- /dev/null +++ b/.github/workflows/openbsd-build.yml @@ -0,0 +1,52 @@ +name: Test rsync on OpenBSD + +on: + push: + branches: [ master ] + paths-ignore: + - '.github/workflows/*.yml' + - '!.github/workflows/openbsd-build.yml' + pull_request: + branches: [ master ] + paths-ignore: + - '.github/workflows/*.yml' + - '!.github/workflows/openbsd-build.yml' + schedule: + - cron: '42 8 * * *' + +jobs: + test: + runs-on: ubuntu-latest + name: Test rsync on OpenBSD + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Test in OpenBSD VM + id: test + uses: vmactions/openbsd-vm@v1 + with: + usesh: true + prepare: | + pkg_add -I bash autoconf%2.71 automake%1.16 + run: | + uname -a + export AUTOCONF_VERSION=2.71 + export AUTOMAKE_VERSION=1.16 + ./configure --with-rrsync --disable-zstd --disable-md2man --disable-xxhash --disable-lz4 + make + ./rsync --version + make check + ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true + - name: save artifact + uses: actions/upload-artifact@v4 + with: + name: openbsd-bin + path: | + rsync + rsync-ssl + rsync.1 + rsync-ssl.1 + rsyncd.conf.5 + rrsync.1 + rrsync diff --git a/.github/workflows/solaris-build.yml b/.github/workflows/solaris-build.yml index 50ba7501..3877ca00 100644 --- a/.github/workflows/solaris-build.yml +++ b/.github/workflows/solaris-build.yml @@ -7,7 +7,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/solaris-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/solaris-build.yml' @@ -34,6 +33,7 @@ jobs: ./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4 make ./rsync --version + make check ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ubuntu-22.04-build.yml b/.github/workflows/ubuntu-22.04-build.yml index 0e608279..87e9e360 100644 --- a/.github/workflows/ubuntu-22.04-build.yml +++ b/.github/workflows/ubuntu-22.04-build.yml @@ -11,7 +11,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/ubuntu-22.04-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/ubuntu-22.04-build.yml' diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 9deb935a..0501e8e8 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -7,7 +7,6 @@ on: - '.github/workflows/*.yml' - '!.github/workflows/ubuntu-build.yml' pull_request: - branches: [ master ] paths-ignore: - '.github/workflows/*.yml' - '!.github/workflows/ubuntu-build.yml' @@ -16,7 +15,7 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: Test rsync on Ubuntu steps: - uses: actions/checkout@v4 diff --git a/testsuite/clean-fname-underflow.test b/testsuite/clean-fname-underflow.test index 56d4fece..10257bc2 100644 --- a/testsuite/clean-fname-underflow.test +++ b/testsuite/clean-fname-underflow.test @@ -22,7 +22,9 @@ fi workdir="${TMPDIR:-/tmp}/rsync-clean-fname.$$" mkdir -p "$workdir" -trap 'rm -rf "$workdir"' EXIT INT TERM +# Solaris's rm refuses to delete a directory in the path of the cwd, +# so cd out before the trap runs. +trap 'cd /; rm -rf "$workdir"' EXIT INT TERM cd "$workdir" # Minimal rsyncd.conf using chroot so the crafted path reaches the server parser.