- name: Install dependencies (container is root)
run: |
apt-get update
- apt-get install -y curl gnupg make git python3-docutils
+ apt-get install -y curl gnupg make git python3-docutils rsync
- name: Tool versions (check)
run: |
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
}
-# Determine if we expect the bug (Threshold: >= 2.2.20 assumed for now)
-# Ubuntu 20.04 (2.2.19) does NOT have the bug.
-# Ubuntu 22.04 (2.2.27) likely has it.
+# Determine if we expect the bug (Threshold: >= 2.4.5 assumed for now)
+# Ubuntu 22.04 (2.2.27) confirmed NOT to have it.
# Arch (2.4.9) definitely has it.
expect_bug=1
-if version_lt "$gpg_ver" "2.2.20"; then
+if version_lt "$gpg_ver" "2.4.5"; then
print_warn "GPG version $gpg_ver is old. We do not expect the checksum bug here."
expect_bug=0
else
tempdir=$(mktemp -d)
readonly tempdir
trap 'rm -Rf -- "${tempdir}"' EXIT
+export HOME="${tempdir}"
# Setup PATH to use local git-remote-gcrypt
PATH=${PWD}:${PATH}
tempdir=$(mktemp -d)
readonly tempdir
trap 'rm -Rf -- "$tempdir"' EXIT
+export HOME="${tempdir}"
# Ensure git-remote-gcrypt is in PATH
repo_root="${PWD}"
readonly tempdir
# shellcheck disable=SC2064
trap "rm -Rf -- '${tempdir}'" EXIT
+export HOME="${tempdir}"
# Set up the PATH
repo_root="${PWD}"
#!/bin/bash
set -e
+
+# Skip if rsync not found (don't fail CI)
+if ! command -v rsync &>/dev/null; then
+ echo "rsync not found, skipping test."
+ exit 0
+fi
+
mkdir -p .tmp/simple_src .tmp/simple_dst/subdir
touch .tmp/simple_dst/subdir/badfile
touch .tmp/simple_dst/subdir/goodfile
# Create temp directory
tempdir=$(mktemp -d)
trap 'rm -rf "$tempdir"' EXIT
+export HOME="${tempdir}"
# Isolate git config to prevent leaks from other tests
export GIT_CONFIG_GLOBAL="${tempdir}/gitconfig"
readonly tempdir
# shellcheck disable=SC2064
trap "rm -Rf -- '${tempdir}'" EXIT
+export HOME="${tempdir}"
# Set up the PATH to favor the version of git-remote-gcrypt from the repository
# rather than a version that might already be installed on the user's system.