Commit graph

881 commits

Author SHA1 Message Date
Thomas Waldmann
df7191e55c skip remote tests on cygwin
remote is broken and hangs infinitely on cygwin.

https://github.com/borgbackup/borg/issues/1268
2016-11-02 04:09:16 +01:00
Thomas Waldmann
f2ed60b80b vagrant: fix fuse test for darwin, fixes #1546
otherwise the "input" dir is root.wheel -rwx------ and gives a PermissionError when trying to access it.
2016-10-31 05:02:19 +01:00
TW
de9aa1923f Merge pull request #1762 from julian-klode/for-1.0/fix-bug-940
RemoteRepository: Fix busy wait in call_many, fixes #940
2016-10-26 21:19:31 +02:00
enkore
25ef14e853 Merge pull request #1756 from ThomasWaldmann/fix-freebsd-fuse-tests
Fix freebsd fuse tests
2016-10-25 20:56:17 +02:00
Andrew Skalski
2df8b740dd RemoteRepository: Fix busy wait in call_many, fixes #940
(cherry picked from commit 731f6241fa)
2016-10-25 11:24:12 +02:00
Thomas Waldmann
baa77c0e04 avoid previous_location mismatch, fixes #1741
due to the changed canonicalization for relative pathes in PR #1711 (implement /./ relpath hack),
there would be a changed repo location warning and the user would be asked if this is ok.
this would break automation and require manual intervention, which is unwanted.

thus, we automatically fix the previous_location config entry, if it only changed in the
expected way, but still means the same location.
2016-10-24 19:29:35 +02:00
Thomas Waldmann
02ecf04780 fuse tests: catch ENOTSUP on freebsd
seems like fuse does not support xattrs there at all.
2016-10-24 05:19:50 +02:00
Thomas Waldmann
ede3b4a354 fuse: test troublesome xattrs last 2016-10-24 05:19:50 +02:00
Thomas Waldmann
48fa449e39 assert_dirs_equal: add ignore_bsdflags and ignore_xattrs argument
bsdflags are not supported in the FUSE mount.
xattrs are supported, but are tested separately.
2016-10-24 05:19:50 +02:00
TW
f086dad41b Merge pull request #1737 from ThomasWaldmann/vagrant-fix-fuse
Vagrant fix fuse
2016-10-22 03:37:46 +02:00
Thomas Waldmann
22f77b908f implement borgmajor/minor/patch placeholders, fixes #1694 2016-10-22 00:20:50 +02:00
Thomas Waldmann
d49a782796 implement borgmajor/minor/patch placeholders, fixes #1694 2016-10-21 03:43:38 +02:00
Thomas Waldmann
f9aa74e7e1 skip fuse test for borg binary + fakeroot
strange: works on wheezy, blows up on xenial
2016-10-20 17:19:37 +02:00
Thomas Waldmann
ade405eae0 ignore security.selinux xattrs, fixes #1735
they fail the FUSE tests on centos7.
2016-10-19 13:37:49 +02:00
Thomas Waldmann
498e71846c add borg debug refcount-obj ID subcommand 2016-10-17 03:19:43 +02:00
enkore
1166ade6ed Merge pull request #1685 from enkore/f/remote-excs
fix debug get-obj / delete-obj crash if object not found and remote repo
2016-10-15 21:30:47 +02:00
Thomas Waldmann
e829e8372d implement /./relpath hack, fixes #1655 2016-10-15 00:57:27 +02:00
Thomas Waldmann
2b27a06595 use monkeypatch to set env vars
but only on pytest based tests.
2016-10-14 04:44:06 +02:00
Thomas Waldmann
f3efcdbd2e point XDG_*_HOME to temp dirs for tests, fixes #1714
otherwise it spoils the user's nonces and cache dirs with lots of files.

also: remove all BORG_* env vars from the outer environment

fix get_*_dir tests to use monkeypatch.
2016-10-14 00:46:43 +02:00
Thomas Waldmann
8d9475f704 fuse_mount contextmanager: accept any options
not just the -o mount_options, but any options borg mount would take.
simpler, more flexible.
2016-10-13 03:53:26 +02:00
Thomas Waldmann
546c77f73d ssh:// Location URL - remove not needed #
nobody could make sense of it, so guess it is a mistake.
2016-10-12 23:10:38 +02:00
Thomas Waldmann
e9ba14c686 Location parsing regexes: use verbose REs
just added whitespace and comments, no semantic changes
2016-10-12 23:10:38 +02:00
Thomas Waldmann
cf0359eba7 allow pathes with colons, fixes #1705
also:
- refactor / deduplicate the location parsing regexes
- add comments
- add more tests for Location parsing
2016-10-12 22:57:23 +02:00
enkore
7a83bea0e8 Merge pull request #1690 from ThomasWaldmann/more-informative-integrityerror
borg.key: include chunk id in exception msgs
2016-10-10 11:17:03 +02:00
enkore
2e5b2b150b Merge pull request #1709 from ThomasWaldmann/fix-1700
better messages for cache newer than repo, fixes #1700
2016-10-10 11:15:40 +02:00
Thomas Waldmann
4fc5a35572 better messages for cache newer than repo, fixes #1700 2016-10-10 06:10:39 +02:00
Thomas Waldmann
f50068944d update changed repo location immediately after acceptance
fixes #1524

before, if a longer backup got interrupted before commit(),
it asked same question again.
2016-10-10 05:18:43 +02:00
Thomas Waldmann
7434010cdd IntegrityError: add placeholder for message, fixes #1572
So that the message we give appears not only in the traceback, but also in the (short) error message.
2016-10-06 23:36:22 +02:00
Thomas Waldmann
5f337e2c9c borg.key: include chunk id in exception msgs
this is a backport of bcdce91dfb2883c139011322a9e8086059fbe5c2 improvements on the exception msgs.
2016-10-06 22:46:37 +02:00
Thomas Waldmann
67aafec195 backport bin_to_hex and use it
simplifies code and also porting and merging between 1.0 and 1.1/master.
2016-10-06 05:15:01 +02:00
Marian Beermann
573cb616d3 deployment: synthesize alternative --restrict-to-path example 2016-10-06 01:00:07 +02:00
Marian Beermann
4c1a920ed4 debug delete/get obj: fix wrong reference to exception
iow RemoteRepository doesn't define this type, only Repository does.
2016-10-05 12:27:26 +02:00
Simon Heath
cf1c73b4f9 Added docs explaining multiple --restrict-to-path flags, with example (take 2) 2016-10-03 09:25:48 +02:00
Thomas Waldmann
4174291f6f hashindex: bump api version
API_VERSION is used to check whether the compiled binaries are up-to-date.
the tests for the recent iterator fixes of course need updated (fixed) binaries,
so we bump api_version, so not-up-to-date binaries will get identified.
2016-09-30 20:38:46 +02:00
Thomas Waldmann
8fd0e07a1c hashindex: fix iterator implementation
NSKeyIterator and ChunkKeyIterator raised StopIteration once only when they reached their end.

But they did not raise StopIteration if one called next() again after they were exhausted,
so they did not comply to the standard iterator protocol.

AFAIK, this did not cause actual problems due to the way these iterators are used,
but when I tried to use itertools.islice() to get n-long sequences from these iterators,
it failed / went into an endless loop.
2016-09-29 04:41:59 +02:00
textshell
b84014e7d9 archiver: Add documentation for "key export" and "key import" commands. (#1641)
archiver: Add documentation for "key export" and "key import" commands
2016-09-27 15:24:31 +02:00
Martin Hostettler
15444b19d1 testsuite/archiver.py: Fix key import failure with ArchiverTestCaseBinary 2016-09-26 19:47:39 +02:00
Martin Hostettler
7c2025a2c0 testsuite/archiver.py: Add a comment how to easily test ArchiverTestCaseBinary locally. 2016-09-26 19:28:00 +02:00
Thomas Waldmann
60c5482e6b fix closed FD issue, fixes #1551 2016-09-26 04:34:25 +02:00
TW
38819552df Merge pull request #1636 from textshell/feature/subcommands
Use subcommands for debug-* and key-*
2016-09-25 23:33:38 +02:00
TW
995c3a2488 Merge pull request #1623 from ThomasWaldmann/yes-retries
yes(): abort on wrong answers, saying so
2016-09-25 22:34:32 +02:00
Thomas Waldmann
d9b880fdf3 fix signal handling, fixes #1620
use context manager for signal handler installation / restoration -
this includes the special case of installing handler SIG_IGN to ignore
a signal and restoring the original (non-ignoring) handler.

use SIG_IGN to avoid a 2nd signal interrupts the handling of the 1st signal.
2016-09-25 17:59:26 +02:00
Martin Hostettler
5c2424831e archiver: Create a subcommmand debug for all debug-* commands
The debug commands all should subcommands of a common debug command.

This commit adds this command but keeps the old command names for 1.0.x.
The plan is to remove them in 1.1.0.
2016-09-25 16:24:57 +02:00
Martin Hostettler
29b5136da7 archiver: Move key management commands to new key subcommand. 2016-09-25 16:24:57 +02:00
TW
b055bb025f Merge pull request #1616 from textshell/issue/1555
Implement key import / export
2016-09-24 15:54:46 +02:00
Martin Hostettler
55a3331942 Implement key import / export
We recommed that users backup their keys, this adds simple to use commands
to do so.

Supported formats are the keyfile format used by borg internally and
a special format with by line checksums for printed backups.

For this format the import is an interactive process which checks
each line as soon as it is input.

Fixes #1555
2016-09-24 12:55:34 +02:00
TW
79617d4e74 Merge pull request #1629 from ThomasWaldmann/fix-narrow-terminal-crash
adapt formatting to narrow screens, do not crash, fixes #1628
2016-09-23 03:30:02 +02:00
Thomas Waldmann
7e7dd9688d adapt formatting to narrow screens, do not crash, fixes #1628
when screen width was too narrow, the {space} placeholder could get negative,
which crashes as it is a width specification.

now we simplify progress output if screen is narrow.
we stop output completely if screen is ridiculously narrow.
2016-09-23 00:26:04 +02:00
Thomas Waldmann
7b9d0c9739 yes(): abort on wrong answers, saying so
except for the passphrase display as we can only display it as long as we have it in memory,
here: retry, telling the user if he entered something invalid and needs to enter again.
2016-09-22 02:43:57 +02:00
Thomas Waldmann
34ec344e9d trivial code optimization 2016-09-17 17:19:26 +02:00