From c8f5d6219d0f31d78c641b9fbf08d89b47b91ec7 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 20 Nov 2025 17:50:50 +0100 Subject: [PATCH 1/5] CI: FUSE related fixes/improvements (master) fixes #9182 - install OS fuse support packages as indicated by the tox env. on the macOS runners, we do not have any fuse support. on the linux runners, we may have fuse2 or fuse3. on FreeBSD, we have fuse2. - install fuse python library for binary build - first build/upload binaries, then run tests (including binary tests). early uploading makes inspection of a malfunctioning binary possible. - for now, use llfuse, as there is an issue with pyinstaller and pyfuse3. Also: - remove || true - this just hides errors, not what we want. --- .github/workflows/ci.yml | 59 +++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 801e525b4..3ae870280 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,10 +187,13 @@ jobs: sudo apt-get update sudo apt-get install -y pkg-config build-essential sudo apt-get install -y libssl-dev libacl1-dev libxxhash-dev liblz4-dev libzstd-dev - sudo apt-get install -y libfuse-dev fuse || true # Required for Python llfuse module - sudo apt-get install -y libfuse3-dev fuse3 || true # Required for Python pyfuse3 module sudo apt-get install -y bash zsh fish # for shell completion tests sudo apt-get install -y rclone openssh-server curl + if [[ "$TOXENV" == *"fuse2"* ]]; then + sudo apt-get install -y libfuse-dev fuse # Required for Python llfuse module + elif [[ "$TOXENV" == *"fuse3"* ]]; then + sudo apt-get install -y libfuse3-dev fuse3 # Required for Python pyfuse3 module + fi - name: Install macOS packages if: ${{ runner.os == 'macOS' }} @@ -262,28 +265,21 @@ jobs: - name: Install borgbackup run: | - pip install -e . - - - name: run tox env - run: | - # do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482. - #sudo -E bash -c "tox -e py" - tox --skip-missing-interpreters - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - env: - OS: ${{ runner.os }} - python: ${{ matrix.python-version }} - with: - token: ${{ secrets.CODECOV_TOKEN }} - env_vars: OS, python + if [[ "$TOXENV" == *"fuse2"* ]]; then + pip install -ve ".[llfuse]" + elif [[ "$TOXENV" == *"fuse3"* ]]; then + pip install -ve ".[pyfuse3]" + else + pip install -ve . + fi - name: Build Borg fat binaries (${{ matrix.binary }}) if: ${{ matrix.binary && startsWith(github.ref, 'refs/tags/') }} run: | pip install 'pyinstaller==6.14.2' mkdir -p dist/binary + # Ensure locally built binaries in ./dist/binary are found during tox tests + echo "$GITHUB_WORKSPACE/dist/binary" >> "$GITHUB_PATH" pyinstaller --clean --distpath=dist/binary scripts/borg.exe.spec - name: Smoke-test the built binary (${{ matrix.binary }}) @@ -298,6 +294,8 @@ jobs: ./borg-dir/borg.exe -V tar czf borg.tgz borg-dir popd + echo "borg.exe binary in PATH" + borg.exe -V - name: Prepare binaries (${{ matrix.binary }}) if: ${{ matrix.binary && startsWith(github.ref, 'refs/tags/') }} @@ -326,6 +324,21 @@ jobs: path: artifacts/* if-no-files-found: error + - name: run tox env + run: | + # do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482. + #sudo -E bash -c "tox -e py" + tox --skip-missing-interpreters + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + OS: ${{ runner.os }} + python: ${{ matrix.python-version }} + with: + token: ${{ secrets.CODECOV_TOKEN }} + env_vars: OS, python + vm_tests: permissions: contents: read @@ -386,8 +399,10 @@ jobs: export IGNORE_OSVERSION=yes sudo -E pkg update -f sudo -E pkg install -y xxhash liblz4 zstd pkgconf - # Install one of the FUSE libraries; fail if neither is available - sudo -E pkg install -y fusefs-libs || sudo -E pkg install -y fusefs-libs3 + sudo -E pkg install -y fusefs-libs + sudo -E kldload fusefs + sudo -E sysctl vfs.usermount=1 + sudo -E chmod 666 /dev/fuse sudo -E pkg install -y rust sudo -E pkg install -y gmake sudo -E pkg install -y git @@ -407,8 +422,8 @@ jobs: pip -V python -m pip install --upgrade pip wheel pip install -r requirements.d/development.txt - pip install -e . - tox -e py311-none + pip install -e ".[llfuse]" + tox -e py311-fuse2 if [[ "${{ matrix.do_binaries }}" == "true" && "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then python -m pip install 'pyinstaller==6.14.2' From fefb4dfd8e8703b2c9bdcfaf81fbeb0e7a86f0e8 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 15 Dec 2025 17:33:19 +0100 Subject: [PATCH 2/5] freebsd: fix upload name for artifact zip --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ae870280..4fa02a553 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -529,7 +529,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') && matrix.do_binaries uses: actions/upload-artifact@v4 with: - name: ${{ matrix.os }}-${{ matrix.version }}-dist + name: ${{ matrix.artifact_prefix }} path: artifacts/* if-no-files-found: ignore From ddcf61b5db7e677476d3148f59fe514c02f31c42 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 15 Dec 2025 17:35:12 +0100 Subject: [PATCH 3/5] CI: increase timeout --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fa02a553..71027cd33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,7 +158,8 @@ jobs: TOXENV: ${{ matrix.toxenv }} runs-on: ${{ matrix.os }} - timeout-minutes: 120 + # macOS machines can be slow, if overloaded. + timeout-minutes: 360 steps: - uses: actions/checkout@v4 From 4db56e3f71e4e7a092b1ae70f5b1cd94e3802ec0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 15 Dec 2025 17:37:14 +0100 Subject: [PATCH 4/5] update binary readme --- docs/binaries/00_README.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/binaries/00_README.txt b/docs/binaries/00_README.txt index 7a75a3726..797f743e6 100644 --- a/docs/binaries/00_README.txt +++ b/docs/binaries/00_README.txt @@ -37,16 +37,13 @@ borg-linux-glibc235-arm64-gh Linux ARM (built on Ubuntu 22.04 LTS with glibc 2. borg-macos-14-arm64-gh macOS Apple Silicon (built on macOS 14 w/o FUSE support) borg-macos-13-x86_64-gh macOS Intel (built on macOS 13 w/o FUSE support) +borg-freebsd-14-x86_64-gh FreeBSD AMD/Intel (built on FreeBSD 14) Binaries built locally ~~~~~~~~~~~~~~~~~~~~~~ -borg-linux-glibc241-x86_64 Linux (built on Debian 13 "Trixie" with glibc 2.41) -borg-linux-glibc236-x86_64 Linux (built on Debian 12 "Bookworm" with glibc 2.36) borg-linux-glibc231-x86_64 Linux (built on Debian 11 "Bullseye" with glibc 2.31) -borg-freebsd-14-x86_64 FreeBSD (built on FreeBSD 14) - Note: if you don't find a specific binary here, check release 1.4.1 or 1.2.9. Verifying your download From ac73be4b090566ace9d6f486d32ffb33a56b75fe Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 15 Dec 2025 17:40:51 +0100 Subject: [PATCH 5/5] CI: use macOS 15 for binary builds Github EOLed all other macOS Intel action runners. As Apple Silicon users tend to have more recent OSes, we bump that to macOS 15 also. --- .github/workflows/ci.yml | 4 ++-- docs/binaries/00_README.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71027cd33..eaa7b7d50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,8 +149,8 @@ jobs: {"os": "ubuntu-24.04", "python-version": "3.12", "toxenv": "py312-fuse3"}, {"os": "ubuntu-24.04", "python-version": "3.13", "toxenv": "py313-fuse3"}, {"os": "ubuntu-24.04", "python-version": "3.14", "toxenv": "py314-fuse3"}, - {"os": "macos-13", "python-version": "3.11", "toxenv": "py311-none", "binary": "borg-macos-13-x86_64-gh"}, - {"os": "macos-14", "python-version": "3.11", "toxenv": "py311-none", "binary": "borg-macos-14-arm64-gh"} + {"os": "macos-15", "python-version": "3.11", "toxenv": "py311-none", "binary": "borg-macos-15-x86_64-gh"}, + {"os": "macos-15", "python-version": "3.11", "toxenv": "py311-none", "binary": "borg-macos-15-arm64-gh"} ] }' ) }} diff --git a/docs/binaries/00_README.txt b/docs/binaries/00_README.txt index 797f743e6..73ce7acb4 100644 --- a/docs/binaries/00_README.txt +++ b/docs/binaries/00_README.txt @@ -34,8 +34,8 @@ Binaries built on GitHub servers borg-linux-glibc235-x86_64-gh Linux AMD/Intel (built on Ubuntu 22.04 LTS with glibc 2.35) borg-linux-glibc235-arm64-gh Linux ARM (built on Ubuntu 22.04 LTS with glibc 2.35) -borg-macos-14-arm64-gh macOS Apple Silicon (built on macOS 14 w/o FUSE support) -borg-macos-13-x86_64-gh macOS Intel (built on macOS 13 w/o FUSE support) +borg-macos-15-arm64-gh macOS Apple Silicon (built on macOS 15 w/o FUSE support) +borg-macos-15-x86_64-gh macOS Intel (built on macOS 15 w/o FUSE support) borg-freebsd-14-x86_64-gh FreeBSD AMD/Intel (built on FreeBSD 14)