Commit graph

7311 commits

Author SHA1 Message Date
Thomas Waldmann
f8e8608488
FreeBSD: acl_get: raise OSError if lpathconf fails
Previously:
- acl_get just returned for lpathconf returning EINVAL
- acl_get silently ignored all other lpathconf errors and
  implied it is not a NFS4 acl

Now:
- not sure why the EINVAL silent return was done, but it seems
  wrong. guess it could be the system not implementing a check
  for nfs4. but in that case guess we still would like to get
  the default and access ACL!? Thus, I removed the silent return.
- raise OSError for all lpathconf errors

Cosmetic: add a nfs4_acl boolean, so the code reads better.
2024-03-17 18:50:58 +01:00
Thomas Waldmann
9d638e8d62
FreeBSD: acl_get: add an acl_extended_* call
... to implement same semantics as on linux (only store ACL
if it defines permissions other than those defined by the
traditional file permissions).

Looks like there is no call working with an fd on FreeBSD.
2024-03-17 18:50:55 +01:00
Thomas Waldmann
6ad1ad67d5
Linux: acl_set bug fix: always fsencode path
We use path when raising OSErrors, even if we have an fd.
2024-03-17 18:50:54 +01:00
Thomas Waldmann
17e3cee604
Linux: acl_get: use "nofollow" variant of acl_extended_file call
This is NOT a bug fix, because the previous code contained a
check for symlinks before that line - because symlinks can not
have ACLs under Linux.

Now, this "is it a symlink" check is removed to simplify the
code and the "nofollow" variant of acl_extended_file* is used
to look at the symlink fs object (in the symlink case).

It then should tell us that this does NOT have an extended ACL
(because symlinks can't have ACLs) and so we return there.

Overall the code gets simpler and looks less suspect.
2024-03-17 18:50:53 +01:00
Thomas Waldmann
519e3ebce8
Linux: acl_get: raise OSError for errors in acl_extended_* call
Previously, these conditions were handled the same (just return):
- no extended acl here
- some error happened (e.g. ACLs unsupported, bad file descriptor, file not found, permission error, ...)

Now there will be OSErrors for the error cases.
2024-03-17 18:50:49 +01:00
Thomas Waldmann
33f1ba699e
create/extract: ignore OSError if ACLs are not supported (ENOTSUP)
but do not silence other OSErrors.
2024-03-17 18:49:37 +01:00
Thomas Waldmann
d870c58e61
platform tests: misc. minor cleanups
- remove unused global / import
- use is_linux and is_darwin
- rename darwin acl test method
2024-03-16 15:58:50 +01:00
Thomas Waldmann
926b5a6b08
improve are_acls_working function
- ACLs are not working, if ENOTSUP ("Operation not supported") happens
- fix check for macOS
  On macOS borg uses "acl_extended", not "acl_access" and
  also the ACL text format is a bit different.
2024-03-16 15:56:58 +01:00
Thomas Waldmann
2c53a63a1c
raise OSError if acl_to_text / acl_from_text returns NULL
Also did a small structural refactors there.
2024-03-16 15:56:57 +01:00
Thomas Waldmann
d4a83edfdd
improve acl_get / acl_set error handling, see #4049 2024-03-16 15:56:55 +01:00
TW
702560d9f2
Merge pull request #8148 from ThomasWaldmann/gh-actions-update-1.4
github CI: misc. updates (1.4-maint)
2024-03-15 18:10:02 +01:00
Thomas Waldmann
28bd4d1bc6
github CI: misc updates
- move most Linux tests to ubuntu 22.04
- macOS: run on macos-14 (on Apple Silicon!)
- macOS: use OpenSSL 3.0 from brew
- macOS: run with Python 3.11
- pip install -e .: add -v
- trigger CI run for changed .toml files
- use up-to-date github actions
- remove libb2 references - since borg 1.2, we use blake2 indirectly via python stdlib
2024-03-15 16:38:30 +01:00
TW
d84118a9db
Merge pull request #8141 from ThomasWaldmann/vagrant-updates
Vagrant updates (1.4-maint)
2024-03-10 18:39:03 +01:00
Thomas Waldmann
ac1b28241d
vagrant: use python 3.11.8 2024-03-10 18:37:47 +01:00
Thomas Waldmann
86aeb1c253
vagrant: use pyinstaller 6.5.0 2024-03-10 18:37:46 +01:00
Thomas Waldmann
41520c2937
vagrant: add xxhash for macOS 2024-03-10 18:37:44 +01:00
Thomas Waldmann
0912e1b3e1
vagrant: add libxxhash-dev for debianoid systems 2024-03-10 16:26:06 +01:00
TW
3647426940
Merge pull request #8135 from ThomasWaldmann/msgpack-cython-updates-1.4
msgpack and cython updates (1.4-maint)
2024-03-02 16:35:21 +01:00
Thomas Waldmann
30ad61ae5a
require Cython 3.0.3 at least, fixes #8133
The fix for the Python 3.12 memory leak issue was
in Cython 3.0.3+.
2024-03-02 14:21:48 +01:00
Thomas Waldmann
0151c9a38f
allow msgpack 1.0.8, fixes #8133 2024-03-02 14:19:11 +01:00
TW
5017d92505
Merge pull request #8127 from ThomasWaldmann/ebusy-1.4
create: deal with EBUSY, fixes #8123
2024-02-25 13:26:00 +01:00
TW
a7329314ab
Merge pull request #8130 from ThomasWaldmann/fix-docs-1.4
docs: remove tabs
2024-02-25 12:20:01 +01:00
Thomas Waldmann
7e166598d5
docs: remove tabs 2024-02-25 12:19:06 +01:00
Thomas Waldmann
a88c3d9e25
create: deal with EBUSY, fixes #8123
I put it into same class as EPERM and EACCES:
BackupPermissionError: borg is not permitted to access the file.
2024-02-25 11:21:44 +01:00
TW
21deeaf208
Merge pull request #8126 from bket/use_libressl
[1.4-maint] No need to use OpenSSL 3.0 on OpenBSD
2024-02-25 11:10:09 +01:00
Björn Ketelaars
2d13e8efa0 No need to use OpenSSL 3.0 on OpenBSD
borg-2.0 requires EVP_aes_256_ocb, which is not provided by LibreSSL. As
such, OpenSSL-3.0 is needed on OpenBSD. borg-1.4 however does not use
EVP_aes_256_ocb thus there is no need to use OpenSSL. Instead rely on
LibreSSL.

Undo part of ccb1e92. Tested on OpenBSD -current.
2024-02-25 07:10:02 +01:00
TW
92da66dcfc
Merge pull request #8122 from ThomasWaldmann/update-changes-1.4
update CHANGES
2024-02-24 21:19:50 +01:00
Thomas Waldmann
01965c4993
update CHANGES 2024-02-24 20:43:59 +01:00
TW
17e64224e0
Merge pull request #8114 from stephan13360/1.4-maint
add non-root deployment strategy
2024-02-24 19:39:08 +01:00
TW
4522c040f3
Merge pull request #8117 from ThomasWaldmann/remove-bundled-3rd-party-1.4
Remove bundled 3rd party sw (1.4-maint)
2024-02-24 19:38:29 +01:00
TW
9fca0b2f42
Merge pull request #8118 from ThomasWaldmann/benchmark-crud-options-1.4
benchmark: inherit options --rsh --remote-path, fixes #8099
2024-02-22 22:01:12 +01:00
Thomas Waldmann
5a8a505046
benchmark: inherit options --rsh --remote-path, fixes #8099 2024-02-22 21:35:11 +01:00
Thomas Waldmann
30dc27b11a
remove bundled lz4/zstd/xxhash code
Also adapt our Cython code to directly use the lib headers,
remove our wrappers.
2024-02-22 13:48:51 +01:00
Thomas Waldmann
ccb1e92362
setup.py: remove support for bundled 3rd party src, fixes #8094
Took the setup.py from master branch and only slightly modified the
"checksums" module path for now.

This removes support for all BORG_USE_BUNDLED_*=YES env vars.
"NO" has been the default since quite a while anyway.

This adds support for:
- using OpenSSL 3.0 on OpenBSD
- locating libacl via pkgconfig

Formatting changes came due to master branch using "black".
2024-02-22 13:38:31 +01:00
Stephan Herbers
3172bda300 add restore considerations paragraph 2024-02-22 11:56:28 +01:00
Stephan Herbers
9abacabf51
Apply suggestions from code review
Co-authored-by: NetSysFire <59517351+NetSysFire@users.noreply.github.com>
2024-02-21 13:00:27 +01:00
Stephan Herbers
599514a247 add non-root deployment strategy 2024-02-21 12:25:48 +01:00
TW
4abc7f18cd
Merge pull request #8108 from ThomasWaldmann/new-rc-fix-1.4
fix: Error/CommandError have a output format for 1 argument
2024-02-20 12:54:53 +01:00
Thomas Waldmann
420ef45f63
fix: Error/CommandError have a output format for 1 argument
(backport from master, only thing todo here was that one place)
2024-02-20 04:23:02 +01:00
TW
52c90786fc
Merge pull request #8095 from ThomasWaldmann/update-changes-1.4
update CHANGES
2024-02-13 19:29:39 +01:00
Thomas Waldmann
9eec58bc18
update CHANGES 2024-02-13 18:03:14 +01:00
TW
8c8b5714d4
Merge pull request #8090 from ThomasWaldmann/fix-long-desc-1.4
sdist: dynamically compute readme (long_description)
2024-02-10 18:20:46 +01:00
Thomas Waldmann
2bb4b3d650
sdist: dynamically compute readme (long_description)
The long_desc_from_readme() was not called, it just read the
whole README.rst until "readme" was declared dynamic.
2024-02-10 18:04:28 +01:00
TW
767504b954
Merge pull request #8089 from ThomasWaldmann/fix-docs-1.4
development.rst: fix markup
2024-02-10 17:30:34 +01:00
Thomas Waldmann
9057c7ba4d
development.rst: fix markup 2024-02-10 17:25:43 +01:00
TW
92669abf13
Merge pull request #8077 from ThomasWaldmann/index-check-value-errors-1.4
check: fix return code for index entry value discrepancies
2024-02-08 21:56:20 +01:00
Thomas Waldmann
97fe48c44c
check: fix return code for index entry value discrepancies
Also: use ERROR loglevel for these (not WARNING).

A different amount of index entries was already logged as error
and led to "error_found = True" in repository.check.

Different values in the rebuilt index vs. the on-disk index were
only logged on warning level, but did not lead to error_found = True.

Guess there is no reason why these should not be errors and lead to
error_found = True, so this was fixed in this commit.

Minor related change: change report_error function args, so it can be
called like logger.error - including giving a format AND args.
2024-02-08 19:31:24 +01:00
TW
6292db2866
Merge pull request #8076 from ThomasWaldmann/docs-tests-pypi-pkg-1.4
docs: how to run the testsuite using the dist package
2024-02-08 18:27:00 +01:00
Thomas Waldmann
79268ec951
docs: how to run the testsuite using the dist package 2024-02-08 17:23:52 +01:00
TW
3a81da1154
Merge pull request #8072 from ThomasWaldmann/update-changes-1.4
Update changes (1.4-maint)
2024-02-03 01:43:17 +01:00