1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-09 13:53:09 +00:00
Commit graph

7302 commits

Author SHA1 Message Date
TW
499e07d842
Merge pull request #8028 from ThomasWaldmann/modernize-msgpack-1.4
modernize msgpack wrapper
2024-01-07 05:39:12 +01:00
Thomas Waldmann
46fc887647
msgpack: remove max_*_len, msgpack has builtin DoS-protection
msgpack >= 0.6.1 has DoS-protection and we require >= 1.0.3 anyway.

This is now a bit closer to what master branch uses.
2024-01-04 20:14:59 +01:00
Thomas Waldmann
8cb7bc3d32
msgpack: simplify, we are always using msgpack >= 1.0.3 now
see requirements, we also check this in is_supported_msgpack().

update comment about msgpack api change.
2024-01-04 20:14:34 +01:00
TW
0f23bda622
Merge pull request #8011 from ThomasWaldmann/rel140a1
release 1.4.0a1
2024-01-01 21:56:56 +01:00
Thomas Waldmann
f6963df380
build_man 2024-01-01 21:16:56 +01:00
Thomas Waldmann
5eaabea647
build_usage 2024-01-01 21:16:30 +01:00
Thomas Waldmann
3426f91241
update release checklist 2024-01-01 21:13:27 +01:00
Thomas Waldmann
520870329f
update CHANGES 2024-01-01 21:11:07 +01:00
TW
3a269d9552
Merge pull request #8010 from ThomasWaldmann/update-docs-1.4
update CHANGES
2024-01-01 20:53:39 +01:00
Thomas Waldmann
7e2a1c4ea7 update CHANGES 2024-01-01 20:21:15 +01:00
TW
de5bfdbd7a
Merge pull request #7976 from ThomasWaldmann/new-rc-1.4
optional more specific return codes
2024-01-01 19:53:25 +01:00
TW
0e5f6e6a4e
Merge pull request #8006 from ThomasWaldmann/update-changes-1.4
update CHANGES
2023-12-27 19:28:38 +01:00
Thomas Waldmann
649537f951
update CHANGES 2023-12-27 19:22:04 +01:00
Thomas Waldmann
2b6dd14464
use get_reset_ec to internally re-init ec/warnings
if we do multiple calls to Archiver.do_something(),
we need to reset the ec / warnings after each call,
otherwise they will keep growing (in severity, in length).
2023-12-27 13:49:11 +01:00
Thomas Waldmann
242b8f9f51
refactor (re-)init of exit_code and warnings_list globals
stop directly accessing the variables from other modules.

prefix with underscore to indicate that these shall
only be used within this module and every other user
shall call the respective functions.
2023-12-27 13:49:08 +01:00
Thomas Waldmann
4bb42d2a00
do not return the rc from Archiver methods
this is not needed and getting rid of it makes
the code / behaviour simpler to understand:

if a fatal error is detected, we throw an exception.

if we encounter something warning worthy, we emit and collect the warning.

in a few cases, we directly call set_ec to set the
exit code as needed, e.g. if passing it through
from a subprocess.

also:
- get rid of Archiver.exit_code
- assert that return value of archiver methods is None
- fix a print_warning call to use the correct formatting method
2023-12-27 13:49:06 +01:00
Thomas Waldmann
f81c6b5963
update frontends.rst error/warning list 2023-12-27 13:48:58 +01:00
Thomas Waldmann
69072f0c17
BackupErrors get caught and give warning RCs
also: use more union operators rather than .union()
2023-12-27 13:48:55 +01:00
Thomas Waldmann
83bf4d8c7d
raise BackupOSError subclasses 2023-12-27 13:48:52 +01:00
Thomas Waldmann
82f147f63f
add NotFoundWarning 2023-12-27 13:48:49 +01:00
Thomas Waldmann
ead9fe4763
print_warning*: support warning msgids, fixes #7080 2023-12-27 13:48:47 +01:00
Thomas Waldmann
775b9f5560
extend errorlist script to warnings, update docs 2023-12-27 13:48:41 +01:00
Thomas Waldmann
2fda86ce61
more detailled warnings for source file OSErrors 2023-12-27 13:48:14 +01:00
Thomas Waldmann
53291a4ac0
BackupError->BackupWarning, BackupOSError->BackupOSWarning 2023-12-27 13:48:12 +01:00
Thomas Waldmann
c2e8bb0468
move Backup*Error to errors module 2023-12-27 13:48:11 +01:00
Thomas Waldmann
482ac47ed8
new warnings infrastructure to support modern exit codes
- implement updating exit code based on severity, including modern codes
- extend print_warning with kwargs wc (warning code) and wt (warning type)
- update a global warnings_list with warning_info elements
- create a class hierarchy below BorgWarning class similar to Error class
- diff: change harmless warnings about speed to rc == 0
- delete --force --force: change harmless warnings to rc == 0

Also:

- have BackupRaceConditionError as a more precise subclass of BackupError
2023-12-27 13:47:52 +01:00
Thomas Waldmann
770f4117a5
get rid of some rare error classes, use RTError instead 2023-12-27 13:46:15 +01:00
Thomas Waldmann
f6279eac9d
shorten TAMRequiredError error msg
Users using recently created repos (after borg 1.0.9) or
who followed the upgrade procedure of 1.0.9 or >1.2.4 will
never see this error msg.

So, have it as short as and similar to the ArchiveTAMRequiredError.
2023-12-27 13:46:13 +01:00
Thomas Waldmann
41351af635
fix dealing with remote repo Locking Exceptions
previously, this was handled in RPCError handler and always resulted in rc 2.

now re-raise Lock Exceptions locally, so it gives rc 2 (legacy) or 7x (modern).
2023-12-27 13:46:12 +01:00
Thomas Waldmann
add7a22581
refactor set_ec usage
- _export_tar: remove unneeded call to set_ec
  print_warning() already sets the exit code to EXIT_WARNING.

- msgpack version check: raise Error instead of calling set_ec
2023-12-27 13:46:11 +01:00
Thomas Waldmann
74954faec8
use print_warning also in borg delete ::archive --force --force 2023-12-27 13:46:04 +01:00
Thomas Waldmann
62ad0369ef
update "modern" error RCs (docs and code) 2023-12-27 13:45:48 +01:00
Thomas Waldmann
422d1ba4ca
scripts/errorlist.py: improve error list docs generation
- also output modern rc and traceback yes/no
- recursive list of Error subclasses
2023-12-27 13:41:58 +01:00
Thomas Waldmann
2a13268e05
BORG_EXIT_CODES=modern can be set to get more specific process exit codes
If not set, it will default to "legacy" (always return 2 for errors).

This commit only changes the Error exception class and its subclasses.

The more specific exit codes need to be defined via .exit_mcode in the subclasses.
2023-12-27 13:41:46 +01:00
TW
94c461974d
Merge pull request #8005 from ThomasWaldmann/do-not-accept-empty-paths-1.4
PATH: do not accept empty strings, fixes #4221
2023-12-27 09:51:12 +01:00
Thomas Waldmann
8ad7a9ae77
PATH: do not accept empty strings, fixes #4221 2023-12-27 04:14:58 +01:00
TW
82cba46345
Merge pull request #8003 from ThomasWaldmann/vagrant-updates3-1.4
vagrant updates3 (1.4-maint)
2023-12-26 23:57:51 +01:00
Thomas Waldmann
bd9d12c0ba
vagrant: use openssl 3.0 on macOS 2023-12-26 22:15:59 +01:00
Thomas Waldmann
8ce3f23dca
vagrant: use openssl 3.0 on openbsd 2023-12-26 22:11:00 +01:00
Thomas Waldmann
f2b70cf0a6
vagrant: remove outdated comment 2023-12-26 22:10:59 +01:00
Thomas Waldmann
e80fa4a189
vagrant: use generic/openbsd7 box 2023-12-26 22:10:53 +01:00
TW
60dcd53130
Merge pull request #8001 from ThomasWaldmann/move-conftest.py-1.4
move conftest.py to src/borg/testsuite, see #6386
2023-12-26 20:59:41 +01:00
TW
6ce8bd6fff
Merge pull request #8002 from ThomasWaldmann/remove-dateutil-1.4
get rid of dateutil
2023-12-26 20:59:02 +01:00
Thomas Waldmann
2d97dcf250
get rid of dateutil 2023-12-26 19:12:00 +01:00
Thomas Waldmann
63848349c0
move conftest.py to src/borg/testsuite, see #6386
there, it will be packaged and installed, so
that when one runs the testsuite after installing
the pypi package, it will find the conftest.py.
2023-12-26 18:55:05 +01:00
TW
68109e7af9
Merge pull request #7999 from ThomasWaldmann/fix-msgpack-version-check
msgpack version check: use same versions as pyproject.toml
2023-12-26 18:49:47 +01:00
Thomas Waldmann
0ab26a04b7
msgpack version check: use same versions as pyproject.toml 2023-12-26 17:15:45 +01:00
TW
218160a914
Merge pull request #7993 from ThomasWaldmann/latest-pyinstaller-1.4
use pyinstaller 6.3.0
2023-12-26 01:01:12 +01:00
Thomas Waldmann
7efef07db1
use pyinstaller 6.3.0 2023-12-26 00:08:37 +01:00
TW
453c8eda07
Merge pull request #7998 from ThomasWaldmann/vagrant-updates2-1.4
Vagrant updates2 (1.4-maint)
2023-12-25 20:34:11 +01:00