diff --git a/README_WINDOWS.rst b/README_WINDOWS.rst index 3a19213efb..520bf47c97 100644 --- a/README_WINDOWS.rst +++ b/README_WINDOWS.rst @@ -27,7 +27,7 @@ What's working - ``borg list`` works as expected. - ``borg extract --strip-components 1 ::backup-XXXX`` works. If absolute paths are extracted, it's important to pass ``--strip-components 1`` as - otherwise the data is resotred to the original location! + otherwise the data is restored to the original location! What's NOT working ------------------ diff --git a/docs/changes.rst b/docs/changes.rst index 9228160cb2..ac06eb309e 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -124,7 +124,7 @@ Steps you should take: Prior versions can access and modify repositories with this measure enabled, however, to 1.0.9 or later their modifications are indiscernible from an attack and will raise an error until the below procedure is followed. We are aware that this can -be be annoying in some circumstances, but don't see a way to fix the vulnerability +be annoying in some circumstances, but don't see a way to fix the vulnerability otherwise. In case a version prior to 1.0.9 is used to modify a repository where above procedure @@ -426,7 +426,7 @@ Version 1.2.0a8 (2020-04-22) Fixes: - fixed potential index corruption / data loss issue due to bug in hashindex_set, #4829. - Please read and follow the more detailled notes close to the top of this document. + Please read and follow the more detailed notes close to the top of this document. - fix crash when upgrading erroneous hints file, #4922 - commit-time free space calc: ignore bad compact map entries, #4796 - info: if the archive doesn't exist, print a pretty message, #4793 @@ -454,7 +454,7 @@ New features: we just extract another copy instead of making a hardlink. - move sync_file_range to its own extension for better platform compatibility. - new --bypass-lock option to bypass locking, e.g. for read-only repos -- accept absolute pathes by removing leading slashes in patterns of all +- accept absolute paths by removing leading slashes in patterns of all sorts but re: style, #4029 - delete: new --keep-security-info option @@ -880,7 +880,7 @@ Compatibility notes: Fixes: - fixed potential index corruption / data loss issue due to bug in hashindex_set, #4829. - Please read and follow the more detailled notes close to the top of this document. + Please read and follow the more detailed notes close to the top of this document. - upgrade bundled xxhash to 0.7.3, #4891. 0.7.2 is the minimum requirement for correct operations on ARMv6 in non-fixup mode, where unaligned memory accesses cause bus errors. @@ -1168,7 +1168,7 @@ New features: - init: add warning to store both key and passphrase at safe place(s) - BORG_HOST_ID env var to work around all-zero MAC address issue, #3985 - borg debug dump-repo-objs --ghost (dump everything from segment files, - including deleted or superceded objects or commit tags) + including deleted or superseded objects or commit tags) - borg debug search-repo-objs (search in repo objects for hex bytes or strings) Other changes: @@ -1361,7 +1361,7 @@ Compatibility notes: Fixes: - check: data corruption fix: fix for borg check --repair malfunction, #3444. - See the more detailled notes close to the top of this document. + See the more detailed notes close to the top of this document. - delete: also delete security dir when deleting a repo, #3427 - prune: fix building the "borg prune" man page, #3398 - init: use given --storage-quota for local repo, #3470 @@ -2702,8 +2702,8 @@ Bug fixes: Fixes a chmod/chown/chgrp/unlink/rename/... crash race between getting dirents and dispatching to process_symlink. - yes(): abort on wrong answers, saying so, #1622 -- fixed exception borg serve raised when connection was closed before reposiory - was openend. add an error message for this. +- fixed exception borg serve raised when connection was closed before repository + was opened. Add an error message for this. - fix read-from-closed-FD issue, #1551 (this seems not to get triggered in 1.0.x, but was discovered in master) - hashindex: fix iterators (always raise StopIteration when exhausted) @@ -3206,7 +3206,7 @@ Bug fixes: - do not sleep for >60s while waiting for lock, #773 - unpack file stats before passing to FUSE - fix build on illumos -- don't try to backup doors or event ports (Solaris and derivates) +- don't try to backup doors or event ports (Solaris and derivatives) - remove useless/misleading libc version display, #738 - test suite: reset exit code of persistent archiver, #844 - RemoteRepository: clean up pipe if remote open() fails diff --git a/docs/faq.rst b/docs/faq.rst index 30cb33738c..f12bc97a7c 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -496,7 +496,7 @@ your repositories and it is not encrypted. However, the assumption is that the cache is being stored on the very same system which also contains the original files which are being backed up. So someone with access to the cache files would also have -access the the original files anyway. +access the original files anyway. The Internals section contains more details about :ref:`cache`. If you ever need to move the cache to a different location, this can be achieved by using the appropriate :ref:`env_vars`. @@ -507,7 +507,7 @@ How can I specify the encryption passphrase programmatically? There are several ways to specify a passphrase without human intervention: Setting ``BORG_PASSPHRASE`` - The passphrase can be specified using the ``BORG_PASSPHRASE`` enviroment variable. + The passphrase can be specified using the ``BORG_PASSPHRASE`` environment variable. This is often the simplest option, but can be insecure if the script that sets it is world-readable. @@ -630,7 +630,7 @@ C to delete all backups residing on S. These are your options to protect against that: - Do not allow to permanently delete data from the repo, see :ref:`append_only_mode`. -- Use a pull-mode setup using ``ssh -R``, see :ref:`pull_backup` for more informations. +- Use a pull-mode setup using ``ssh -R``, see :ref:`pull_backup` for more information. - Mount C's filesystem on another machine and then create a backup of it. - Do not give C filesystem-level access to S. diff --git a/docs/installation.rst b/docs/installation.rst index 0363a6f229..2ae12c1524 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -250,7 +250,7 @@ messages such as:: /Users/you/Pictures/Photos Library.photoslibrary: scandir: [Errno 1] Operation not permitted: -To fix this problem, you should grant full disk acccess to cron, and to your +To fix this problem, you should grant full disk access to cron, and to your Terminal application. More information `can be found here `__. diff --git a/docs/internals/data-structures.rst b/docs/internals/data-structures.rst index 7d00ac3221..1b2174e864 100644 --- a/docs/internals/data-structures.rst +++ b/docs/internals/data-structures.rst @@ -55,7 +55,7 @@ time for the purposes of the log. Config file ~~~~~~~~~~~ -Each repository has a ``config`` file which which is a ``INI``-style file +Each repository has a ``config`` file which is a ``INI``-style file and looks like this:: [repository] diff --git a/docs/internals/security.rst b/docs/internals/security.rst index 72688bc45d..d0c5bd1e35 100644 --- a/docs/internals/security.rst +++ b/docs/internals/security.rst @@ -108,7 +108,7 @@ the tampering. Note that when using BORG_PASSPHRASE the attacker cannot swap the *entire* repository against a new repository with e.g. repokey mode and no passphrase, -because Borg will abort access when BORG_PASSPRHASE is incorrect. +because Borg will abort access when BORG_PASSPHRASE is incorrect. However, interactively a user might not notice this kind of attack immediately, if she assumes that the reason for the absent passphrase diff --git a/docs/usage/notes.rst b/docs/usage/notes.rst index 59f56c34c7..546b6bf9cd 100644 --- a/docs/usage/notes.rst +++ b/docs/usage/notes.rst @@ -78,7 +78,7 @@ You can use this to not query and store (or not extract and set) flags - in case you don't need them or if they are broken somehow for your fs. On Linux, dealing with the flags needs some additional syscalls. Especially when -dealing with lots of small files, this causes a noticable overhead, so you can +dealing with lots of small files, this causes a noticeable overhead, so you can use this option also for speeding up operations. ``--umask`` diff --git a/scripts/shell_completions/fish/borg.fish b/scripts/shell_completions/fish/borg.fish index 79ce3848ad..89d76c7500 100644 --- a/scripts/shell_completions/fish/borg.fish +++ b/scripts/shell_completions/fish/borg.fish @@ -111,7 +111,7 @@ complete -c borg -l 'exclude-if-present' -d 'Exclude directories that complete -c borg -f -l 'keep-exclude-tags' -d 'Keep tag files of excluded directories' -n "__fish_seen_subcommand_from create" complete -c borg -f -l 'keep-tag-files' -d 'Keep tag files of excluded directories' -n "__fish_seen_subcommand_from create" complete -c borg -f -l 'exclude-nodump' -d 'Exclude files flagged NODUMP' -n "__fish_seen_subcommand_from create" -# Filesytem options +# Filesystem options complete -c borg -f -s x -l 'one-file-system' -d 'Stay in the same file system' -n "__fish_seen_subcommand_from create" complete -c borg -f -l 'numeric-owner' -d 'Only store numeric user:group identifiers' -n "__fish_seen_subcommand_from create" complete -c borg -f -l 'noatime' -d 'Do not store atime' -n "__fish_seen_subcommand_from create" diff --git a/scripts/shell_completions/zsh/_borg b/scripts/shell_completions/zsh/_borg index d97fc3b153..41bac8a836 100644 --- a/scripts/shell_completions/zsh/_borg +++ b/scripts/shell_completions/zsh/_borg @@ -1158,7 +1158,7 @@ __borg_complete_keys() { compset -S '[^A-Za-z]##*' [[ -n $ISUFFIX ]] && compstate[to_end]='' - # NOTE: `[[ -n $ISUFFIX ]]` is a workarond for a bug that causes cursor movement to the right further than it should + # NOTE: `[[ -n $ISUFFIX ]]` is a workaround for a bug that causes cursor movement to the right further than it should # NOTE: the _oldlist completer doesn't respect compstate[to_end]='' local ipref suf diff --git a/src/borg/__init__.py b/src/borg/__init__.py index c2b201860a..47adb1b677 100644 --- a/src/borg/__init__.py +++ b/src/borg/__init__.py @@ -1,7 +1,7 @@ from distutils.version import LooseVersion # IMPORTANT keep imports from borg here to a minimum because our testsuite depends on -# beeing able to import borg.constants and then monkey patching borg.constants.PBKDF2_ITERATIONS +# being able to import borg.constants and then monkey patching borg.constants.PBKDF2_ITERATIONS from ._version import version as __version__ diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 5ab053c0f3..2fe47056dd 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1955,7 +1955,7 @@ def decrypt_dump(i, id, cdata, tag=None, segment=None, offset=None): fd.write(data) if args.ghost: - # dump ghosty stuff from segment files: not yet committed objects, deleted / superceded objects, commit tags + # dump ghosty stuff from segment files: not yet committed objects, deleted / superseded objects, commit tags # set up the key without depending on a manifest obj for id, cdata, tag, segment, offset in repository.scan_low_level(): @@ -2046,7 +2046,7 @@ def print_finding(info, wanted, data, offset): # try to locate wanted sequence in data count = data.count(wanted) if count: - offset = data.find(wanted) # only determine first occurance's offset + offset = data.find(wanted) # only determine first occurrence's offset info = "%d %s #%d" % (i, id.hex(), count) print_finding(info, wanted, data, offset) @@ -2291,7 +2291,7 @@ def do_break_lock(self, args, repository): Via ``--pattern`` or ``--patterns-from`` you can define BOTH inclusion and exclusion of files using pattern prefixes ``+`` and ``-``. With ``--exclude`` and - ``--exlude-from`` ONLY excludes are defined. + ``--exclude-from`` ONLY excludes are defined. Inclusion patterns are useful to include paths that are contained in an excluded path. The first matching pattern is used so if an include pattern matches before @@ -3048,7 +3048,7 @@ def define_borg_mount(parser): so consider using the ``--progress`` option. A segment is compacted if the amount of saved space is above the percentage value - given by the ``--threshold`` option. If ommitted, a threshold of 10% is used. + given by the ``--threshold`` option. If omitted, a threshold of 10% is used. When using ``--verbose``, borg will output an estimate of the freed space. After upgrading borg (server) to 1.2+, you can use ``borg compact --cleanup-commits`` @@ -4574,7 +4574,7 @@ def get_args(self, argv, cmd): value = getattr(client_result, attr_name, not_present) if value is not not_present: # note: it is not possible to specify a allowlisted option via a forced command, - # it always gets overridden by the value specified (or defaulted to) by the client commmand. + # it always gets overridden by the value specified (or defaulted to) by the client command. setattr(result, attr_name, value) return result diff --git a/src/borg/compress.pyx b/src/borg/compress.pyx index 7db240ff56..480a745fd7 100644 --- a/src/borg/compress.pyx +++ b/src/borg/compress.pyx @@ -470,7 +470,7 @@ class ObfuscateSize(CompressorBase): # f = 0.1 .. 1.0 for r in 0.1 .. 0.01 == in 9% of cases # f = 1.0 .. 10.0 for r in 0.01 .. 0.001 = in 0.9% of cases # f = 10.0 .. 100.0 for r in 0.001 .. 0.0001 == in 0.09% of cases - r = max(self.min_r, random.random()) # 0..1, but dont get too close to 0 + r = max(self.min_r, random.random()) # 0..1, but don't get too close to 0 f = self.factor / r return int(compr_size * f) diff --git a/src/borg/helpers/errors.py b/src/borg/helpers/errors.py index e7a5fec1f3..699f6f0a6a 100644 --- a/src/borg/helpers/errors.py +++ b/src/borg/helpers/errors.py @@ -7,7 +7,7 @@ class Error(Exception): """Error: {}""" # Error base class - # if we raise such an Error and it is only catched by the uppermost + # if we raise such an Error and it is only caught by the uppermost # exception handler (that exits short after with the given exit_code), # it is always a (fatal and abrupt) EXIT_ERROR, never just a warning. exit_code = EXIT_ERROR diff --git a/src/borg/helpers/progress.py b/src/borg/helpers/progress.py index 1968c35534..312ff25857 100644 --- a/src/borg/helpers/progress.py +++ b/src/borg/helpers/progress.py @@ -147,7 +147,7 @@ def show(self, current=None, increase=1, info=None): # truncate the last argument, if no space is available if info is not None: if not self.json: - # no need to truncate if we're not outputing to a terminal + # no need to truncate if we're not outputting to a terminal terminal_space = get_terminal_size(fallback=(-1, -1))[0] if terminal_space != -1: space = terminal_space - len(self.msg % tuple([pct] + info[:-1] + [''])) diff --git a/src/borg/locking.py b/src/borg/locking.py index 4ec2a4bf8a..c274abd83c 100644 --- a/src/borg/locking.py +++ b/src/borg/locking.py @@ -343,7 +343,7 @@ class Lock: """ A Lock for a resource that can be accessed in a shared or exclusive way. Typically, write access to a resource needs an exclusive lock (1 writer, - noone is allowed reading) and read access to a resource needs a shared + no one is allowed reading) and read access to a resource needs a shared lock (multiple readers are allowed). If possible, try to use the contextmanager here like:: diff --git a/src/borg/logger.py b/src/borg/logger.py index 7edec891b8..0fb7a062c5 100644 --- a/src/borg/logger.py +++ b/src/borg/logger.py @@ -117,7 +117,7 @@ def setup_logging(stream=None, conf_fname=None, env_var='BORG_LOGGING_CONF', lev def find_parent_module(): - """find the name of a the first module calling this module + """find the name of the first module calling this module if we cannot find it, we return the current module's name (__name__) instead. diff --git a/src/borg/paperkey.html b/src/borg/paperkey.html index a06b09a2e0..8dd818cbd0 100644 --- a/src/borg/paperkey.html +++ b/src/borg/paperkey.html @@ -2012,7 +2012,7 @@ * @private */ Sha256.toHexStr = function(n) { - // note can't use toString(16) as it is implementation-dependant, + // note can't use toString(16) as it is implementation-dependent, // and in IE returns signed numbers when used on full words var s="", v; for (var i=7; i>=0; i--) { v = (n>>>(i*4)) & 0xf; s += v.toString(16); } diff --git a/src/borg/patterns.py b/src/borg/patterns.py index 38dd9a8de1..318538496b 100644 --- a/src/borg/patterns.py +++ b/src/borg/patterns.py @@ -374,7 +374,7 @@ def parse_inclexcl_command(cmd_line_str, fallback=ShellPattern): cmd = cmd_prefix_map.get(cmd_line_str[0]) if cmd is None: - raise argparse.ArgumentTypeError("A pattern/command must start with any one of: %s" % + raise argparse.ArgumentTypeError("A pattern/command must start with anyone of: %s" % ', '.join(cmd_prefix_map)) # remaining text on command-line following the command character diff --git a/src/borg/repository.py b/src/borg/repository.py index 7385207fad..41dbe36f7c 100644 --- a/src/borg/repository.py +++ b/src/borg/repository.py @@ -1071,7 +1071,7 @@ def scan_low_level(self): """Very low level scan over all segment file entries. It does NOT care about what's committed and what not. - It does NOT care whether an object might be deleted or superceded later. + It does NOT care whether an object might be deleted or superseded later. It just yields anything it finds in the segment files. This is intended as a last-resort way to get access to all repo contents of damaged repos, diff --git a/src/borg/testsuite/__init__.py b/src/borg/testsuite/__init__.py index be4b7c04d2..2a49675ca0 100644 --- a/src/borg/testsuite/__init__.py +++ b/src/borg/testsuite/__init__.py @@ -235,7 +235,7 @@ def fuse_mount(self, location, mountpoint=None, *options, fork=True, os_fork=Fal # the borg mount daemon to work properly or the tests # will just freeze. Therefore, if argument `fork` is not # specified, the default value is `True`, regardless of - # `FORK_DEFAULT`. However, leaving the possibilty to run + # `FORK_DEFAULT`. However, leaving the possibility to run # the command with `fork = False` is still necessary for # testing for mount failures, for example attempting to # mount a read-only repo. diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index fbe5931aba..3226bae426 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -2009,12 +2009,12 @@ def fifo_feeder(fifo_fn, data): assert extracted_data == data def test_create_read_special_broken_symlink(self): - os.symlink('somewhere doesnt exist', os.path.join(self.input_path, 'link')) + os.symlink('somewhere does not exist', os.path.join(self.input_path, 'link')) self.cmd('init', '--encryption=repokey', self.repository_location) archive = self.repository_location + '::test' self.cmd('create', '--read-special', archive, 'input') output = self.cmd('list', archive) - assert 'input/link -> somewhere doesnt exist' in output + assert 'input/link -> somewhere does not exist' in output # def test_cmdline_compatibility(self): # self.create_regular_file('file1', size=1024 * 80) diff --git a/src/borg/testsuite/hashindex.py b/src/borg/testsuite/hashindex.py index 8a706ab467..6fdf1c38aa 100644 --- a/src/borg/testsuite/hashindex.py +++ b/src/borg/testsuite/hashindex.py @@ -192,7 +192,7 @@ def test_chunkindex_limit(self): idx = ChunkIndex() idx[H(1)] = ChunkIndex.MAX_VALUE - 1, 1, 2 - # 5 is arbitray, any number of incref/decrefs shouldn't move it once it's limited + # 5 is arbitrary, any number of incref/decrefs shouldn't move it once it's limited for i in range(5): # first incref to move it to the limit refcount, *_ = idx.incref(H(1))