Skip to content

Commit 20c8431

Browse files
Merge branch 'master' into prune-timely-by-interval
2 parents dfcee1d + 07183f1 commit 20c8431

File tree

305 files changed

+5172
-3272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+5172
-3272
lines changed

.coveragerc

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,54 @@
11
<!--
22
Thank you for reporting an issue.
33
4-
*IMPORTANT* - *before* creating a new issue please look around:
5-
- Borgbackup documentation: http://borgbackup.readthedocs.io/en/stable/index.html
4+
*IMPORTANT* – Before creating a new issue, please look around:
5+
- BorgBackup documentation: https://borgbackup.readthedocs.io/en/stable/index.html
66
- FAQ: https://borgbackup.readthedocs.io/en/stable/faq.html
7-
and
8-
- open issues in GitHub tracker: https://github.com/borgbackup/borg/issues
9-
7+
- Open issues in the GitHub tracker: https://github.com/borgbackup/borg/issues
8+
109
If you cannot find a similar problem, then create a new issue.
1110
1211
Please fill in as much of the template as possible.
1312
-->
1413

15-
## Have you checked borgbackup docs, FAQ, and open GitHub issues?
14+
## Have you checked the BorgBackup docs, FAQ, and open GitHub issues?
1615

1716
No
1817

19-
## Is this a BUG / ISSUE report or a QUESTION?
18+
## Is this a bug/issue report or a question?
2019

21-
Invalid
20+
Bug/Issue/Question
2221

23-
## System information. For client/server mode post info for both machines.
22+
## System information. For client/server mode, post info for both machines.
2423

25-
#### Your borg version (borg -V).
24+
#### Your Borg version (borg -V).
2625

2726
#### Operating system (distribution) and version.
2827

29-
#### Hardware / network configuration, and filesystems used.
28+
#### Hardware/network configuration and filesystems used.
3029

31-
#### How much data is handled by borg?
30+
#### How much data is handled by Borg?
3231

33-
#### Full borg commandline that lead to the problem (leave away excludes and passwords)
32+
#### Full Borg command line that led to the problem (leave out excludes and passwords).
3433

3534

3635
## Describe the problem you're observing.
3736

3837
#### Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
3938

40-
#### Include any warning/errors/backtraces from the system logs
39+
#### Include any warnings/errors/backtraces from the system logs
4140

4241
<!--
4342
44-
If this complaint relates to borg performance, please include CRUD benchmark
43+
If this complaint relates to Borg performance, please include CRUD benchmark
4544
results and any steps you took to troubleshoot.
46-
How to run benchmark: http://borgbackup.readthedocs.io/en/stable/usage/benchmark.html
45+
How to run the benchmark: https://borgbackup.readthedocs.io/en/stable/usage/benchmark.html
4746
48-
*IMPORTANT* - Please mark logs and text output from terminal commands
49-
or else GitHub will not display them correctly.
47+
*IMPORTANT* – Please mark logs and terminal command output, otherwise GitHub will not display them correctly.
5048
An example is provided below.
5149
5250
Example:
5351
```
54-
this is an example how log text should be marked (wrap it with ```)
52+
this is an example of how log text should be marked (wrap it with ```)
5553
```
5654
-->

.github/PULL_REQUEST_TEMPLATE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Thank you for contributing code to Borg, your help is appreciated!
1+
Thank you for contributing code to Borg; your help is appreciated!
22

3-
Please, before you submit a pull request, make sure it complies with the
4-
guidelines given in our documentation:
3+
Before you submit a pull request, please make sure it complies with the
4+
guidelines in our documentation:
55

66
https://borgbackup.readthedocs.io/en/latest/development.html#contributions
77

8-
**Please remove all above text before submitting your pull request.**
8+
**Please remove the text above before submitting your pull request.**

.github/workflows/black.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# https://black.readthedocs.io/en/stable/integrations/github_actions.html#usage
2-
# see also what we use locally, requirements.d/codestyle.txt - should be the same version here.
2+
# See also what we use locally in requirements.d/codestyle.txt — this should be the same version here.
33

44
name: Lint
55

.github/workflows/ci.yml

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ jobs:
8484
- os: ubuntu-24.04
8585
python-version: '3.13'
8686
toxenv: py313-fuse3
87+
- os: ubuntu-24.04
88+
python-version: '3.14-dev'
89+
toxenv: py314-fuse3
8790

8891
env:
8992
TOXENV: ${{ matrix.toxenv }}
@@ -94,7 +97,7 @@ jobs:
9497
steps:
9598
- uses: actions/checkout@v4
9699
with:
97-
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
100+
# Just fetching one commit is not enough for setuptools-scm, so we fetch all.
98101
fetch-depth: 0
99102
- name: Set up Python ${{ matrix.python-version }}
100103
uses: actions/setup-python@v5
@@ -117,7 +120,60 @@ jobs:
117120
sudo apt-get install -y libfuse-dev fuse || true # Required for Python llfuse module
118121
sudo apt-get install -y libfuse3-dev fuse3 || true # Required for Python pyfuse3 module
119122
sudo apt-get install -y bash zsh fish # for shell completion tests
120-
123+
sudo apt-get install -y rclone openssh-server curl
124+
- name: Configure OpenSSH SFTP server (test only)
125+
run: |
126+
sudo mkdir -p /run/sshd
127+
sudo useradd -m -s /bin/bash sftpuser || true
128+
# Create SSH key for the CI user and authorize it for sftpuser
129+
mkdir -p ~/.ssh
130+
chmod 700 ~/.ssh
131+
test -f ~/.ssh/id_ed25519 || ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519
132+
sudo mkdir -p /home/sftpuser/.ssh
133+
sudo chmod 700 /home/sftpuser/.ssh
134+
sudo cp ~/.ssh/id_ed25519.pub /home/sftpuser/.ssh/authorized_keys
135+
sudo chown -R sftpuser:sftpuser /home/sftpuser/.ssh
136+
sudo chmod 600 /home/sftpuser/.ssh/authorized_keys
137+
# Allow publickey auth and enable Subsystem sftp
138+
sudo sed -i 's/^#\?PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config
139+
sudo sed -i 's/^#\?PubkeyAuthentication .*/PubkeyAuthentication yes/' /etc/ssh/sshd_config
140+
if ! grep -q '^Subsystem sftp' /etc/ssh/sshd_config; then echo 'Subsystem sftp /usr/lib/openssh/sftp-server' | sudo tee -a /etc/ssh/sshd_config; fi
141+
# Ensure host keys exist to avoid slow generation on first sshd start
142+
sudo ssh-keygen -A
143+
# Start sshd (listen on default 22 inside runner)
144+
sudo /usr/sbin/sshd -D &
145+
# Add host key to known_hosts so paramiko trusts it
146+
ssh-keyscan -H localhost 127.0.0.1 | tee -a ~/.ssh/known_hosts
147+
# Start ssh-agent and add our key so paramiko can use the agent
148+
eval "$(ssh-agent -s)"
149+
ssh-add ~/.ssh/id_ed25519
150+
# Export SFTP test URL for tox via GITHUB_ENV
151+
echo "BORG_TEST_SFTP_REPO=sftp://sftpuser@localhost:22/borg/sftp-repo" >> $GITHUB_ENV
152+
- name: Install and configure MinIO S3 server (test only)
153+
run: |
154+
set -e
155+
arch=$(uname -m)
156+
case "$arch" in
157+
x86_64|amd64) srv_url=https://dl.min.io/server/minio/release/linux-amd64/minio; cli_url=https://dl.min.io/client/mc/release/linux-amd64/mc ;;
158+
aarch64|arm64) srv_url=https://dl.min.io/server/minio/release/linux-arm64/minio; cli_url=https://dl.min.io/client/mc/release/linux-arm64/mc ;;
159+
*) echo "Unsupported arch: $arch"; exit 1 ;;
160+
esac
161+
curl -fsSL -o /usr/local/bin/minio "$srv_url"
162+
curl -fsSL -o /usr/local/bin/mc "$cli_url"
163+
sudo chmod +x /usr/local/bin/minio /usr/local/bin/mc
164+
export PATH=/usr/local/bin:$PATH
165+
# Start MinIO on :9000 with default credentials (minioadmin/minioadmin)
166+
MINIO_DIR="$GITHUB_WORKSPACE/.minio-data"
167+
MINIO_LOG="$GITHUB_WORKSPACE/.minio.log"
168+
mkdir -p "$MINIO_DIR"
169+
nohup minio server "$MINIO_DIR" --address ":9000" >"$MINIO_LOG" 2>&1 &
170+
# Wait for MinIO port to be ready
171+
for i in $(seq 1 60); do (echo > /dev/tcp/127.0.0.1/9000) >/dev/null 2>&1 && break; sleep 1; done
172+
# Configure client and create bucket
173+
mc alias set local http://127.0.0.1:9000 minioadmin minioadmin
174+
mc mb --ignore-existing local/borg
175+
# Export S3 test URL for tox via GITHUB_ENV
176+
echo "BORG_TEST_S3_REPO=s3:minioadmin:minioadmin@http://127.0.0.1:9000/borg/s3-repo" >> $GITHUB_ENV
121177
- name: Install Python requirements
122178
run: |
123179
python -m pip install --upgrade pip setuptools wheel
@@ -150,7 +206,7 @@ jobs:
150206
include:
151207
- os: macos-14
152208
python-version: '3.11'
153-
toxenv: py311-none # note: no fuse testing, due to #6099, see also #6196.
209+
toxenv: py311-none # Note: no FUSE testing due to #6099; see also #6196.
154210

155211
env:
156212
# Configure pkg-config to use OpenSSL from Homebrew
@@ -163,7 +219,7 @@ jobs:
163219
steps:
164220
- uses: actions/checkout@v4
165221
with:
166-
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
222+
# Just fetching one commit is not enough for setuptools-scm, so we fetch all
167223
fetch-depth: 0
168224
- name: Set up Python ${{ matrix.python-version }}
169225
uses: actions/setup-python@v5
@@ -187,21 +243,21 @@ jobs:
187243
run: |
188244
python -m pip install --upgrade pip setuptools wheel
189245
pip install -r requirements.d/development.txt
190-
- name: Install borgbackup
246+
- name: Install BorgBackup
191247
env:
192-
# we already have that in the global env, but something is broken and overwrites that.
193-
# so, set it here, again.
248+
# We already have this in the global environment, but something overrides it.
249+
# So set it here again.
194250
PKG_CONFIG_PATH: "/opt/homebrew/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH"
195251
run: |
196252
pip install -ve .
197-
- name: run tox env
253+
- name: Run pytest via tox
198254
env:
199-
# we already have that in the global env, but something is broken and overwrites that.
200-
# so, set it here, again.
255+
# We already have this in the global environment, but something overrides it.
256+
# So set it here again.
201257
PKG_CONFIG_PATH: "/opt/homebrew/opt/openssl@3.0/lib/pkgconfig:$PKG_CONFIG_PATH"
202258
XDISTN: "6"
203259
run: |
204-
# do not use fakeroot, but run as root. avoids the dreaded EISDIR sporadic failures. see #2482.
260+
# Do not use fakeroot; run as root. Avoids the dreaded sporadic EISDIR failures; see #2482.
205261
#sudo -E bash -c "tox -e py"
206262
tox --skip-missing-interpreters
207263
- name: Upload coverage to Codecov
@@ -215,7 +271,7 @@ jobs:
215271

216272
windows:
217273

218-
if: false # can be used to temporary disable build
274+
if: false # can be used to temporarily disable the build
219275
runs-on: windows-latest
220276
timeout-minutes: 120
221277
needs: linux

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Checkout repository
3232
uses: actions/checkout@v4
3333
with:
34-
# just fetching 1 commit is not enough for setuptools-scm, so we fetch all
34+
# Just fetching one commit is not enough for setuptools-scm, so we fetch all.
3535
fetch-depth: 0
3636
- name: Set up Python
3737
uses: actions/setup-python@v5

.gitignore

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ MANIFEST
22
docs/_build
33
build
44
dist
5-
external
6-
borg-env
75
.tox
86
src/borg/compress.c
97
src/borg/crypto/low_level.c
10-
src/borg/hashindex.c
118
src/borg/item.c
12-
src/borg/chunker.c
9+
src/borg/chunkers/buzhash.c
10+
src/borg/chunkers/buzhash64.c
11+
src/borg/chunkers/reader.c
1312
src/borg/checksums.c
1413
src/borg/platform/darwin.c
1514
src/borg/platform/freebsd.c
@@ -23,12 +22,9 @@ src/borg/_version.py
2322
*.pyd
2423
*.so
2524
.idea/
26-
.cache/
25+
.junie/
2726
.vscode/
28-
borg.build/
29-
borg.dist/
3027
borg.exe
3128
.coverage
3229
.coverage.*
3330
.vagrant
34-
.eggs

AUTHORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
E-mail addresses listed here are not intended for support, please see
2-
the `support section`_ instead.
1+
Email addresses listed here are not intended for support.
2+
Please see the `support section`_ instead.
33

44
.. _support section: https://borgbackup.readthedocs.io/en/stable/support.html
55

Brewfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ brew 'xxhash'
55
brew 'openssl@3.0'
66

77
# osxfuse (aka macFUSE) is only required for "borg mount",
8-
# but won't work on github actions' workers.
9-
# it requires installing a kernel extension, so some users
8+
# but won't work on GitHub Actions' workers.
9+
# It requires installing a kernel extension, so some users
1010
# may want it and some won't.
1111

1212
#cask 'osxfuse'

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# stuff we need to include into the sdist is handled automatically by
1+
# The files we need to include in the sdist are handled automatically by
22
# setuptools_scm - it includes all git-committed files.
3-
# but we want to exclude some committed files/dirs not needed in the sdist:
3+
# But we want to exclude some committed files/directories not needed in the sdist:
44
exclude .editorconfig .gitattributes .gitignore .mailmap Vagrantfile
55
prune .github
66
include src/borg/platform/darwin.c src/borg/platform/freebsd.c src/borg/platform/linux.c src/borg/platform/posix.c

0 commit comments

Comments
 (0)