based on willyvmm's work in PR #3116, but some changes:
- removed any mulithreading changes
- add zstandard in setup.py install_requires
- tests
- fix: minimum compression level is 1 (not 0)
- use 3 for the default compression level
- use ID 03 00 for zstd
- only convert to bytes if we don't have bytes yet
- move zstd code so that code blocks are ordered by ID
- other cosmetic fixes
this is needed for correctness because the preprocessor is just
doing text replacement.
This is the correct way:
#define MUL(x, y) ((x) * (y))
MUL(1+2, 3-4) -> ((1+2) * (3-4)) # not: (1+2 * 3-4)
I didn't put parens around all arg usages for readability.
Some stuff (like index) is not expected to be an expression.
Also, when a arg is only used in another macro or function call,
no parens are needed either.
I reviewed the code: no harm was done (yet) due to this fault.
Thanks to @rciorba who found this.
crc32_slice_by_8.c:344:3: error: ISO C90 forbids mixed declarations
and code [-Werror=declaration-after-statement]
(cherry picked from commit 23a1d62b25)
setup.py excludes all .c .h .pyx files from installation, but such
docs / license files would still be copied to the target directory
if they are inside the python "borg" package dir.
(cherry picked from commit 831a06a07d)
Fixes CVE-2017-15914 (affects releases 1.1.0, 1.1.1, 1.1.2,
but not 1.0.x).
Thanks to Florian Apolloner for discovering/reporting this!
Also: added tests for this.
(cherry picked from commit ea0203bb0d)
1.1.2 was released with a sdist that included quite some files that
did not belong into the package (I tried nuitka at some time).
This was because the old MANIFEST.in / setup.py included all the stuff
in the package dir.
Now, setuptools_scm is to automatically deal with the INCLUDES and
MANIFEST.in only handles the EXCLUDES, so only committed files get
into the sdist (minus some we do not want).
Also, no .c .h .pyx files will be installed - they are not needed as
they have been compiled into binary files.
This command works similarly to "git config" - it parses repo and
cache configs to get, set, and delete values. It only works on local
repos so a malicious client can't e.g. override their storage quota
or reset the append_only flag.
Add tests for borg config
Add documentation for borg config
Change manual config edits -> borg config
There were a couple places in the documentation where it was advised
to edit the repository or cache config file, a process that is stream-
lined by borg config.