Commit Graph

1116 Commits

Author SHA1 Message Date
Antoine Beaupré 1819adaf59 log level tweaking: stats should not be a warning
we should find other ways of forcing that to be shown, it seems
2015-10-02 11:16:21 -04:00
Antoine Beaupré ca6c52610f restore some print statements
the heuristics i used are the following:

 1. if we are prompting the use, use print on stderr (input() may
    produce some stuff on stdout, but it's outside the scope of this
    patch). we do not want those prompts to end up on the standard
    output in case we are piping stuff around

 2. if the command is primarily producing output for the user on the
    console (`list`, `info`, `help`), we simply print on the default
    file descriptor.

 3. everywhere else, we use the logging module with varying levels of
    verbosity, as appropriate.
2015-10-02 11:13:01 -04:00
Antoine Beaupré c9b11316ab use a module-specific logger instead of global one
that way we have one logger per module, and we can pick and choose
which module we want verbose, for example
2015-10-02 11:05:44 -04:00
Antoine Beaupré 1b540d91a0 convert more print() statements to logging
we use logging.warning in info and list, but print() more usage bits.

we also now support logging.debug() and by default are more silent
2015-10-01 14:20:29 -04:00
Antoine Beaupré 09ffbb1d9d convert most print() calls to logging
the logging level varies: most is logging.info(), in some place
logging.warning() or logging.error() are used when the condition is
clearly an error or warning. in other cases, we keep using print, but
force writing to sys.stderr, unless we interact with the user.

there were 77 calls to print before this commit, now there are 7, most
of which in the archiver module, which interacts directly with the
user. in one case there, we still use print() only because logging is
not setup properly yet during argument parsing.

it could be argued that commands like info or list should use print
directly, but we have converted them anyways, without ill effects on
the unit tests

unit tests still use print() in some places

this switches all informational output to stderr, which should help
with, if not fix jborg/attic#312 directly
2015-10-01 13:41:45 -04:00
Antoine Beaupré c996fd8366 just call print() once in the odd print_() function
this will help when we want to refactor output functions

this function should definitely be replaced by a __repr__() or
__str__() however
2015-10-01 12:39:13 -04:00
TW 50fe290770 Merge pull request #229 from anarcat/rmapi
remove api file introduced by mistake in #228
2015-10-01 10:52:09 +02:00
Antoine Beaupré b72d955c3e remove api file introduced by mistake in #228 2015-09-30 18:33:45 -04:00
TW 3b1fae6b34 Merge pull request #228 from anarcat/faster-usage
generate usage include files only as needed
2015-10-01 00:03:12 +02:00
Antoine Beaupré 50e7d0f345 more human-readable output in usage generation 2015-09-30 17:42:18 -04:00
Antoine Beaupré e3433f433c generate usage include files only as needed
right now, the update_usage script regenerates the usage files at
every call

by moving this into the makefile, we make those files be generated
only when the source file change, which makes testing docs much faster
2015-09-30 17:30:56 -04:00
Thomas Waldmann bc9679f0e5 development docs: update / fix / add Vagrant section
thanks to level323 for the vagrant docs
2015-09-30 17:38:51 +02:00
Thomas Waldmann ba5fa0ba99 update / improve / reformat FAQ
- reduce redundancy (platforms are documented in README.rst)
- reformat to 80 chars width
- clarify checkpoints
- remove workarounds for stuff that was fixed
2015-09-30 17:13:22 +02:00
Thomas Waldmann 6aca4694fe fix segment entry header size check, attic issue #352
it only checked for too big sizes, but not for too small ones.
that made it die with a ValueError and not raise the appropriate IntegrityError
that gets handled in check() and triggers the repair attempt for the segment.
2015-09-30 16:10:50 +02:00
Thomas Waldmann a3d967bdff hint to single-file pyinstaller binaries from README 2015-09-28 00:41:40 +02:00
Thomas Waldmann 507752f39a update CHANGES 2015-09-28 00:34:18 +02:00
Thomas Waldmann 524ca297ea document binary and non-binary requirements 2015-09-28 00:22:20 +02:00
Thomas Waldmann 4a71613f14 modularize Vagrantfile, use centos6 boxes for building the binaries
for building binaries that run everywhere, we need to love old stuff like centos6,
because it has the oldest glibc version which we want to support.

use 768MB for 64bit machines (not 512)
2015-09-28 00:05:52 +02:00
Thomas Waldmann 86502d2729 docs: explain --read-special in more detail, fixes #220 2015-09-26 14:24:37 +02:00
Thomas Waldmann 22f335e0a0 docs: add how to build wheels and standalone binaries 2015-09-21 21:48:46 +02:00
Thomas Waldmann 7dbe2b80b3 docs: add a note about the single-file binaries 2015-09-21 21:28:18 +02:00
Thomas Waldmann c557613e3a vagrant: darwin: give configure options so libpython gets build
it is needed by pyinstaller to build the borg binary
2015-09-21 21:20:33 +02:00
Thomas Waldmann 9dc98eeb45 vagrant: add py3.4 for precise/trusty, install pyinstaller
also: source .profile so the PATH is ok
2015-09-20 22:22:40 +02:00
Thomas Waldmann 4410f1c3c3 docs: must run make html after tagging, so the html titel says correct version 2015-09-19 22:38:00 +02:00
Thomas Waldmann 688488d62d docs: must run make html before release 2015-09-19 22:20:41 +02:00
Thomas Waldmann 507d90f476 MANIFEST.in: add some more excludes 2015-09-19 22:17:46 +02:00
Thomas Waldmann d4de0fd019 remove remainders of versioneer, typo fix. 2015-09-19 21:44:40 +02:00
Thomas Waldmann 0f68f1ccd1 add docs about release process 2015-09-19 21:35:02 +02:00
Thomas Waldmann 6ef7a9b11b update CHANGES for 0.26 release 2015-09-19 20:57:02 +02:00
Thomas Waldmann fb8d1cc602 also mention libattr
ACLs are implemented as xattrs, so libattr is pulled in as a dependency of libacl.
2015-09-19 20:31:26 +02:00
Thomas Waldmann 5de30e9a05 update CHANGES 2015-09-19 19:02:03 +02:00
TW 07ff905276 Merge pull request #212 from ThomasWaldmann/match-counting
Match counting
2015-09-19 18:56:06 +02:00
Thomas Waldmann ab76176553 fix: patterns might be None 2015-09-19 18:38:44 +02:00
Thomas Waldmann e0a08c5cae borg extract: warn if a include pattern never matched, fixes #209 2015-09-19 18:16:47 +02:00
Thomas Waldmann 15b003e344 add a string representation for Include/ExcludePattern
it just gives the original string that was used.
2015-09-19 18:03:53 +02:00
Thomas Waldmann 08417b52ec implement counters for Include/ExcludePatterns 2015-09-19 17:48:41 +02:00
Thomas Waldmann aed6cc9446 be more clear about pruning, attic issue #132 2015-09-19 16:58:02 +02:00
TW 44d1a32e60 Merge pull request #211 from ThomasWaldmann/archivename_validation
archive names with slashes are invalid, attic issue #180
2015-09-19 16:32:03 +02:00
Thomas Waldmann cad0515178 archive names with slashes are invalid, attic issue #180
for borg mount's FUSE filesystem, we use the archive name as a directory name,
thus slashes are not allowed.
2015-09-19 16:09:20 +02:00
Thomas Waldmann 375717c095 tests: work around strange mtime granularity issue on netbsd, fixes #204
not sure where the problem is:
it seems to announce it supports st_mtime_ns, but if one uses it and
has a file with ...123ns, i t gets restored as ...000ns.

Then I tried setting st_mtime_ns_round to -3, but it still failed with +1000ns difference.

Maybe rounding is incorrect and it should be truncating?
Issue with granularity could be in python, in netbsd (netbsd platform code), in ffs filesystem, ...
2015-09-18 00:02:44 +02:00
Thomas Waldmann 48634d4e96 tests: ignore st_rdev if file is not a block/char device, fixes #203 2015-09-17 22:41:49 +02:00
Thomas Waldmann ff64b4c424 be more precise about OpenBSD/NetBSD support
xattrs/ACLs need platform specific code and new have none (yet) for them.
2015-09-16 11:53:53 +02:00
Thomas Waldmann f138d06dd5 more platform support, works on py 3.5
xattrs and ACLs on OpenBSD and NetBSD need development or adaptation of
the platform-specific code.
2015-09-16 11:44:53 +02:00
Thomas Waldmann 41860ef5f0 test setup: stay away from the setgid mode bit
for vagrant testing on misc. platforms, we can't know the group /
we can't have the same group everywhere.

but the OS won't let us set setgid bit if the file does not have our group.
on netbsd, the created file somehow happens to have group "wheel",
but vagrant is not in group wheel.
2015-09-15 23:52:17 +02:00
Thomas Waldmann e8571c1c85 vagrant: more docs, some fixes 2015-09-15 23:45:12 +02:00
Thomas Waldmann 56bf8b79cb add .vagrant to .gitignore 2015-09-15 18:27:16 +02:00
Thomas Waldmann dc0938f639 vagrant: add netbsd (needs more work)
there's a problem with the shell:
- either it is no login shell, then e.g. PKG_PATH is not set (sh)
- or it is not found (no bash here)
- or it is not compatible enough (csh)

depending on what shell is configured, one or the other vagrant mode / feature
does not work.
2015-09-15 14:46:26 +02:00
Thomas Waldmann cf9ba87734 test setup: do not set the sticky bit on a regular file
sticky bit only has a function on directories.
openbsd does not let one set sticky on files.
other systems seem to just ignore it.
2015-09-15 00:41:32 +02:00
Thomas Waldmann bc5949a7f4 chunker: add a check whether the POSIX_FADV_DONTNEED constant is defined
on openbsd, it isn't.
2015-09-14 17:36:04 +02:00
Thomas Waldmann 568963eca7 vagrant: added openbsd 2015-09-14 17:35:04 +02:00