mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-31 01:58:31 -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.
75 lines
2.9 KiB
YAML
75 lines
2.9 KiB
YAML
name: Test fleettest harness
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
# Bitrot check for testsuite/fleettest.py (the developer fleet CI harness).
|
|
# fleettest is meant to be run by developers on a modern Ubuntu box, so this
|
|
# job runs only on ubuntu-latest: it stands up a one-host "fleet" of two
|
|
# targets that both ssh to localhost and runs a real fleettest pass against it.
|
|
# It does not run on the BSD/Solaris/macOS/Cygwin matrix.
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'testsuite/fleettest.py'
|
|
- '.github/workflows/fleettest.yml'
|
|
- 'runtests.py'
|
|
- 'testsuite/skiplist/**'
|
|
- 'testsuite/skiplist-spec_test.py'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths:
|
|
- 'testsuite/fleettest.py'
|
|
- '.github/workflows/fleettest.yml'
|
|
- 'runtests.py'
|
|
- 'testsuite/skiplist/**'
|
|
- 'testsuite/skiplist-spec_test.py'
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '17 7 * * 1'
|
|
|
|
jobs:
|
|
fleettest:
|
|
runs-on: ubuntu-latest
|
|
name: fleettest against localhost
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: prep
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc g++ gawk autoconf automake \
|
|
acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev libidn2-dev \
|
|
python3-cmarkgfm openssl rsync openssh-server
|
|
- name: set up ssh to localhost
|
|
run: |
|
|
mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519
|
|
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
|
|
chmod 600 ~/.ssh/authorized_keys
|
|
sudo systemctl start ssh || sudo service ssh start
|
|
# fleettest connects with `ssh -o BatchMode=yes localhost`, which won't
|
|
# answer a host-key prompt -- so pre-trust localhost in known_hosts.
|
|
ssh-keyscan -H localhost 127.0.0.1 >> ~/.ssh/known_hosts 2>/dev/null
|
|
ssh -o BatchMode=yes -o ConnectTimeout=15 localhost 'echo ssh-to-localhost-ok'
|
|
- name: write localhost fleet config
|
|
run: |
|
|
cat > fleettest-ci.json <<'EOF'
|
|
{ "targets": [
|
|
{ "name": "local-a", "ssh_host": "localhost", "workflow": "none.yml",
|
|
"configure_flags": [], "builddir": "rsync-citest-a", "privilege": "sudo" },
|
|
{ "name": "local-b", "ssh_host": "localhost", "workflow": "none.yml",
|
|
"configure_flags": [], "builddir": "rsync-citest-b", "privilege": "sudo" }
|
|
] }
|
|
EOF
|
|
- name: fleettest --list (config sanity)
|
|
run: python3 testsuite/fleettest.py --fleet fleettest-ci.json --list
|
|
- name: run fleettest against localhost
|
|
# Two targets both on localhost exercise the parallel multi-target path
|
|
# and the per-run dir / port isolation; exit 0 iff every cell is OK.
|
|
run: python3 testsuite/fleettest.py --fleet fleettest-ci.json --timing
|