From 50d1b6e77501f49e13dc336c7479f4eb1b5168f0 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Sat, 17 Jan 2026 07:58:10 -0500 Subject: [PATCH] fixup! more fixes to support container/root mount action --- .github/workflows/compatibility.yaml | 2 +- tests/system-test-multikey.sh | 8 ++++---- tests/system-test-privacy-leaks.sh | 1 + tests/system-test-repack.sh | 1 + tests/system-test-rsync-simple.sh | 7 +++++++ tests/system-test-safety-check.sh | 1 + tests/system-test.sh | 1 + 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compatibility.yaml b/.github/workflows/compatibility.yaml index 9106371..904f681 100644 --- a/.github/workflows/compatibility.yaml +++ b/.github/workflows/compatibility.yaml @@ -24,7 +24,7 @@ jobs: - 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: | diff --git a/tests/system-test-multikey.sh b/tests/system-test-multikey.sh index 6d65c2f..5bada03 100755 --- a/tests/system-test-multikey.sh +++ b/tests/system-test-multikey.sh @@ -26,12 +26,11 @@ version_lt() { [ "$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 @@ -80,6 +79,7 @@ umask 077 tempdir=$(mktemp -d) readonly tempdir trap 'rm -Rf -- "${tempdir}"' EXIT +export HOME="${tempdir}" # Setup PATH to use local git-remote-gcrypt PATH=${PWD}:${PATH} diff --git a/tests/system-test-privacy-leaks.sh b/tests/system-test-privacy-leaks.sh index 17f323c..8b277bc 100755 --- a/tests/system-test-privacy-leaks.sh +++ b/tests/system-test-privacy-leaks.sh @@ -12,6 +12,7 @@ umask 077 tempdir=$(mktemp -d) readonly tempdir trap 'rm -Rf -- "$tempdir"' EXIT +export HOME="${tempdir}" # Ensure git-remote-gcrypt is in PATH repo_root="${PWD}" diff --git a/tests/system-test-repack.sh b/tests/system-test-repack.sh index 0221683..c43c252 100755 --- a/tests/system-test-repack.sh +++ b/tests/system-test-repack.sh @@ -44,6 +44,7 @@ tempdir=$(mktemp -d) readonly tempdir # shellcheck disable=SC2064 trap "rm -Rf -- '${tempdir}'" EXIT +export HOME="${tempdir}" # Set up the PATH repo_root="${PWD}" diff --git a/tests/system-test-rsync-simple.sh b/tests/system-test-rsync-simple.sh index eeafc32..57e99a2 100755 --- a/tests/system-test-rsync-simple.sh +++ b/tests/system-test-rsync-simple.sh @@ -1,5 +1,12 @@ #!/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 diff --git a/tests/system-test-safety-check.sh b/tests/system-test-safety-check.sh index 3f5587a..254c4a3 100755 --- a/tests/system-test-safety-check.sh +++ b/tests/system-test-safety-check.sh @@ -25,6 +25,7 @@ GIT="git -c advice.defaultBranchName=false" # 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" diff --git a/tests/system-test.sh b/tests/system-test.sh index 71ef23b..43f37d3 100755 --- a/tests/system-test.sh +++ b/tests/system-test.sh @@ -69,6 +69,7 @@ tempdir=$(mktemp -d) 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. -- 2.52.0