Commit Graph

4791 Commits

Author SHA1 Message Date
Thomas Waldmann 981a936f47 add parens for C preprocessor macro argument usages
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.

(cherry picked from commit a3cecf599f)
2017-12-15 00:50:06 +01:00
Thomas Waldmann 747ada77e6 fix building the "borg prune" man page, fixes #3398
will fix all ".. highlight:: none" issues (just killing it).

also a slight punctuation fix, so there is a dot at the end of
the prune man page.

(cherry picked from commit 1f5b8c9219)
2017-12-15 00:49:21 +01:00
TW b62d349740
Merge pull request #3420 from ThomasWaldmann/add-config-docs
add auto-generated docs for borg config (1.1)
2017-12-09 22:24:20 +01:00
Thomas Waldmann 278ed640e9 add auto-generated docs for borg config
also: move a bit upwards in the use docs
2017-12-09 13:41:03 +01:00
TW 11eeacf024
Merge pull request #3413 from milkey-mouse/no-borgfs-html-docs-bp1.1
Don't generate HTML docs page for borgfs (1.1 backport)
2017-12-03 12:46:00 +01:00
Milkey Mouse 25bfb5b00d
Don't generate HTML docs page for borgfs (fixes #3404) 2017-12-03 00:03:33 -08:00
TW dff29cc5a5
Merge pull request #3409 from ThomasWaldmann/exclude-broken-pytest330-1.1
exclude broken pytest 3.3.0 release
2017-12-02 19:55:47 +01:00
Thomas Waldmann 953f3a4a2f exclude broken pytest 3.3.0 release
https://github.com/pytest-dev/pytest/issues/2957
(cherry picked from commit 43184f2dd1)
2017-12-02 17:46:00 +01:00
TW bb6e86628f
Merge pull request #3391 from borgbackup/rel113
Release 1.1.3
2017-11-27 06:12:42 +01:00
Thomas Waldmann dc8de36109 borg mount: fix hardlink processing, fixes #3388
when the result list after stripping was empty,
os.path.join(*emptylist) fails as it want 1+ args.
2017-11-27 04:10:17 +01:00
Thomas Waldmann 23a1d62b25 crc32-slice-by-8.c: fix for C90 compilers
crc32_slice_by_8.c:344:3: error: ISO C90 forbids mixed declarations
and code [-Werror=declaration-after-statement]
2017-11-27 01:01:34 +01:00
Thomas Waldmann 831a06a07d move 3rd party docs/license file from package dir to docs/3rd_party
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.
2017-11-27 00:02:37 +01:00
Thomas Waldmann 6becbb259b manually fix build_man issue with highlight directive 2017-11-27 00:02:36 +01:00
Thomas Waldmann 51504bad18 build_man 2017-11-27 00:02:36 +01:00
Thomas Waldmann d373772517 build_usage 2017-11-27 00:02:36 +01:00
Thomas Waldmann 54883434b9 update CHANGES (1.1-maint) for 1.1.3 release 2017-11-27 00:02:36 +01:00
Thomas Waldmann ea0203bb0d security: fix enforcement of --restrict-to-path in args processing
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.
2017-11-27 00:02:36 +01:00
TW da040fcf5f
Merge pull request #3385 from ThomasWaldmann/docs-fix-broken-links-1.1
docs: fix broken links (1.1-maint)
2017-11-26 23:57:32 +01:00
Thomas Waldmann c7994b598b docs: fix broken links (1.1-maint) 2017-11-26 23:56:32 +01:00
TW fba42889d2
Merge pull request #3383 from ThomasWaldmann/link-to-hp-support-1.1
link to the homepage for support/service (1.1-maint)
2017-11-26 23:38:42 +01:00
Thomas Waldmann 7438cb2ef4 link to the homepage for support/service (1.1-maint)
otherwise people ONLY reading the docs (and not coming from the
homepage) will miss these options.
2017-11-26 23:34:10 +01:00
TW feaa246095
Merge pull request #3382 from ThomasWaldmann/issue-2812-1.1
do remaining part of #3360 backport to 1.1-maint
2017-11-26 23:26:41 +01:00
Michael Rupert 2e365f46de do remaining part of #3360 backport to 1.1-maint 2017-11-26 23:23:57 +01:00
TW d8ff84c2f4
WIP: update CHANGES (1.1-maint) (#3368)
update CHANGES (1.1-maint)
2017-11-26 18:47:20 +01:00
Michael Rupert a40dd4c3b6 fixed support links (#3379) (#3381)
fixed support links, #3379

(cherry picked from commit 6dd54f93ce)
2017-11-26 05:30:09 +01:00
TW 1f41b251f7
Merge pull request #3380 from milkey-mouse/fix-build-man-bp1.1
Fix build_man issues (1.1 backport)
2017-11-26 04:43:35 +01:00
Milkey Mouse 248c408b5b
Fix build_man issues (fixes #3364) 2017-11-25 19:38:23 -08:00
Milkey Mouse e488e69f41
Use name of command for "virtual man page" name
This makes it slightly easier to debug manpage issues without removing
the virtmanpage hack.
2017-11-25 19:37:17 -08:00
TW 6b10ac03b9
Merge pull request #3378 from ThomasWaldmann/docs-fixes-1.1
docs fixes / updates (1.1-maint)
2017-11-26 04:17:27 +01:00
Thomas Waldmann 25b40a261b docs: give examples for borg mount exclusion options
(cherry picked from commit 0eaec60384)
2017-11-26 04:04:42 +01:00
Thomas Waldmann ef39dc6554 docs: move bsdflags tuning comments to notes docs section
the atime comments are already there.

(cherry picked from commit 91ff2f81a6)
2017-11-26 04:04:20 +01:00
Thomas Waldmann b175f1fdf1 docs: document birthtime support on platforms supporting it
stat.st_birthtime, MacOS and (some?) BSDs.

(cherry picked from commit a107233f75)
2017-11-26 04:04:01 +01:00
Thomas Waldmann 21afd17f2f docs: document good and problematic option placements, see #3356
(cherry picked from commit e3cb7c3c32)
2017-11-26 04:03:42 +01:00
Thomas Waldmann 938d122191 docs: fix examples with problematic option placements, fixes #3356
have options to the left OR to the right of all positional arguments,
but not on BOTH sides and not in between them.

(cherry picked from commit f2a1539f25)
2017-11-26 04:03:16 +01:00
TW 26cfaf3681
Merge pull request #3359 from milkey-mouse/borg-config-cmd-bp1.1
Add borg config command (1.1 backport)
2017-11-26 03:56:01 +01:00
Milkey Mouse 5331b378f7
fixup! Add borg config command (fixes #3304)
Don't use list unpacking for function calls in order to support py3.4

Reword basic borg config help

It doesn't edit the repo config, but any borg-related config.
2017-11-25 15:58:08 -08:00
TW 960c78ffea
Merge pull request #3367 from ThomasWaldmann/create-tuning-options-1.1
docs: point out tuning options for borg create, fixes #3239
2017-11-25 15:27:37 +01:00
Thomas Waldmann 3bdf1193ad docs: point out tuning options for borg create, fixes #3239
(cherry picked from commit 520a6a2ef1)
2017-11-25 15:25:15 +01:00
TW 4021423330
Merge pull request #3365 from ThomasWaldmann/update-usage-man-1.1
update usage / man (1.1-maint)
2017-11-25 14:54:12 +01:00
Thomas Waldmann 0340fbe420 build_man (1.1-maint)
also: git add borgfs.1
2017-11-25 14:49:00 +01:00
Thomas Waldmann 7bf838003a build_usage (1.1-maint)
also: git add borgfs.rst.inc
2017-11-25 14:45:28 +01:00
TW f651e08d45
Merge pull request #3362 from ThomasWaldmann/package-data-1.1
clean up and simplify packaging (1.1-maint)
2017-11-25 14:40:43 +01:00
Thomas Waldmann 13d339bb85 clean up and simplify packaging
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.

(cherry picked from commit feb428b4e0)
2017-11-25 13:56:51 +01:00
Milkey Mouse 15d9c94981
Fix borg config flake8 failures
Suppressed E731 so lambdas can be assigned to vars
2017-11-24 16:39:27 -08:00
Milkey Mouse 2ac0bf4980
Add borg config command (fixes #3304)
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.
2017-11-24 16:38:56 -08:00
TW 0a5d17018e
Merge pull request #3354 from ThomasWaldmann/mount-options-1.1
borg mount options (1.1 backport)
2017-11-24 16:57:22 +01:00
Thomas Waldmann 47d16e0f62 borg mount: support --consider-part-files correctly, fixes #3347
(cherry picked from commit caece370b8)
2017-11-24 01:45:42 +01:00
Thomas Waldmann 0e07647576 borg mount: support hardlinks correctly, add tests
previous commit did not yet support hardlinks correctly, if the
hardlink master was excluded somehow.

added some tests for this, also refactored related tests slightly.

(cherry picked from commit e97deafb16)
2017-11-24 00:30:28 +01:00
TW 6fb5f989a9
Merge pull request #3353 from milkey-mouse/document-ntfsclone-bp1.1
Add instructions for using ntfsclone (1.1 backport)
2017-11-24 00:25:16 +01:00
Thomas Waldmann 52410b6976 borg mount: support exclusion group options and paths, fixes #2138
borg mount [options] repo_or_archive mountpoint path [paths...]

paths: you can just give some "root paths" (like for borg extract) to
only partially populate the FUSE filesystem.

Similar for these exclusion group options:
--exclude
--exclude-from
--pattern
--patterns-from
--strip-components

(cherry picked from commit 77df1cfe8c)
2017-11-24 00:09:08 +01:00