mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-31 10:08:29 -04:00
* Add IDN support rsync can now connect to IDN (internationalized domain name) hosts, and IDN names are recognized in a daemon's hosts allow/deny. * idn: convert host names label by label The IDNA mapping folds some non-ASCII characters onto ASCII ones, so running a whole hosts allow/deny token through idn2_to_ascii_8z() could hand back a pattern the admin never wrote: a "*" (U+FF0A FULLWIDTH ASTERISK) entry came back as "*" and let every host in. Convert label by label instead, keeping an ASCII label byte for byte and using a converted label only when it comes back as a bare A-label. An ASCII-only config now behaves as it did before there was IDN support, and a token that cannot be converted is left alone and so matches nothing. The client side shares the same helper, and neither side truncates a name at its 1024-byte buffer any more. strlower() folds only ASCII now, since its one caller is the hosts allow/deny list, which can hold UTF-8. Adds testsuite/daemon-access-idn and extends testsuite/idn to cover Unicode, punycode, mixed-case and invalid input on both sides. * idn: hand libidn2 the same flags on both sides The client path called idn2_lookup_ul() without IDN2_NFC_INPUT while the daemon path passed it to idn2_to_ascii_8z(). Both normalize either way -- idn2_lookup_ul() ors the flag in itself, and TR46 normalizes as it maps -- but there is no reason for the two calls to read differently, so pass one set of flags from one place. The flag asks libidn2 to normalize the label rather than promising that it already is: it gates the u32_normalize() call, and without it a decomposed label comes back IDN2_NOT_NFC. Adds composed/decomposed cases to testsuite/idn, which sees the exact host name rsync hands out, and a decomposed hosts allow token to testsuite/daemon-access-idn.
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
name: Test rsync on macOS
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths-ignore:
|
|
- '.github/workflows/*.yml'
|
|
- '!.github/workflows/macos-build.yml'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths-ignore:
|
|
- '.github/workflows/*.yml'
|
|
- '!.github/workflows/macos-build.yml'
|
|
schedule:
|
|
- cron: '42 8 * * *'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: macos-latest
|
|
name: Test rsync on macOS
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: prep
|
|
run: |
|
|
brew install automake openssl xxhash zstd lz4 libidn2
|
|
pip3 install --user --break-system-packages commonmark
|
|
echo "$(brew --prefix)/bin" >>"$GITHUB_PATH"
|
|
- name: configure
|
|
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
|
|
run: sudo make install
|
|
- name: info
|
|
run: rsync --version
|
|
- name: check
|
|
# chown-fake / devices-fake / xattrs / xattrs-hlink now RUN on macOS
|
|
# (rsyncfns.py drives xattrs via the `xattr` command), verified on a
|
|
# real macOS host, so they're no longer in the skip set.
|
|
run: sudo RSYNC_EXPECT_SKIPPED=@testsuite/skiplist/common.txt,@testsuite/skiplist/macos.txt make check
|
|
- name: check (TCP daemon transport)
|
|
# Second run with daemon tests over a real loopback rsyncd; the default
|
|
# 'make check' above uses the secure stdio-pipe transport.
|
|
run: sudo ./runtests.py --rsync-bin="$PWD/rsync" --use-tcp -j 8
|
|
- name: ssl file list
|
|
run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
|
|
- name: save artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
retention-days: 45
|
|
name: macos-bin
|
|
path: |
|
|
rsync
|
|
rsync-ssl
|
|
rsync.1
|
|
rsync-ssl.1
|
|
rsyncd.conf.5
|
|
rrsync.1
|
|
rrsync
|