Commit graph

39 commits

Author SHA1 Message Date
Thomas Waldmann
8ac86b8cae syncfilerange: add cython: language_level=3 2020-10-09 02:31:12 +02:00
Will
4327922bdd Move sync_file_range to its own extension 2020-03-01 14:05:50 -05:00
Thomas Waldmann
beb948fc71 new BORG_WORKAROUNDS mechanism, basesyncfile, fixes #4710
remove WSL autodetection. if WSL still has this problem, you need to
set BORG_WORKAROUNDS=basesyncfile in the borg process environment to
work around it.
2019-08-24 09:38:26 +02:00
Thomas Waldmann
53649cd6e6 work around some Microsoft WSL issues
see there:

https://github.com/borgbackup/borg/issues/1961

and especially there (not implemented sync_file_range):

https://github.com/Microsoft/WSL/issues/645
2019-02-05 01:30:54 +01:00
Thomas Waldmann
6614918e68 make "hostname" short, even on misconfigured systems, fixes #4262
(cherry picked from commit 111c34f92e)
2019-02-01 11:11:25 +01:00
Thomas Waldmann
c188a0b0bc add "# cython: language_level=3" directive to .pyx files, fixes #4214
in master branch, it was possible to do this via setup.py's
cythonize() calls, but we do not have them in 1.1.

thus, i modified the source files, setting the language level to 3,
which is supported since long in Cython (3str is only supported since
recently so might fail with older Cython versions).

Before this changeset, current Cython 0.29.x emitted a FutureWarning,
but still compiled. The next major release of Cython is said to emit
an error instead, so this changeset hopefully avoids the build breaking
after a Cython upgrade.
2019-01-05 20:12:32 +01:00
Thomas Waldmann
ca1928c925 on linux, symlinks can't have ACLs, see #4044 2018-12-08 23:11:08 +01:00
Thomas Waldmann
901e3a7888 add BORG_HOST_ID, fixes #3985
(cherry picked from commit 90348c1de9)
2018-08-09 08:11:05 +02:00
Thomas Waldmann
2bf1b29e8e process_alive: add some assertions 2018-07-17 00:18:57 +02:00
Thomas Waldmann
30509b74b0 acl platform code: fix acl set return type (1.1-maint) 2018-07-05 22:55:17 +02:00
Thomas Waldmann
d11c9e9b15 use patched version of socket.getfqdn(), fixes #3471
(cherry picked from commit 9b0d0f3127)
2017-12-25 06:05:53 +01:00
Thomas Waldmann
f00e9de492 refactor/move hostname/fqdn related funcs, see #3471
- move stuff to platform.base (should be platform independent according
  to the docs).
- bump platform API version
- parseformat: import fqdn from platform instead of recomputing it

This is not yet fixing #3471, just a preparation for it.

(cherry picked from commit 5e4df7782b)
2017-12-25 06:05:52 +01:00
Thomas Waldmann
e1723ec1d9 bsdflags support: do not open BLK/CHR/LNK files, fixes #3130
opening a device file for a non-existing device can be very slow.
symlinks will make the open() call fail as it is using O_NOFOLLOW.

also: lstat -> stat(..., follow_symlinks=False) like everywhere else.
(cherry picked from commit a6ee4e9aed)
2017-10-13 23:55:00 +02:00
Thomas Waldmann
09e3a02fbc migrate locks to child PID when daemonize is used
also:

increase platform api version due to change in get_process_id behaviour.

(cherry picked from commit 6f94949a36)
(cherry picked from commit 5bad764637)
2017-08-13 21:40:56 +02:00
Marian Beermann
2fe37dba7f umount: try fusermount, then try umount 2017-07-24 13:55:32 +02:00
Marian Beermann
ed0a5c798f platform.SaveFile: truncate_and_unlink temporary
SaveFile is typically used for small files where this is not
necessary. The sole exception is the files cache.
2017-06-06 18:13:20 +02:00
Marian Beermann
7b519e4769 platform.linux: get rid of "resource" module 2017-04-19 11:31:40 +02:00
Thomas Waldmann
7f2a108c94 fixup: do not access os.POSIX_FADV_* early
before we know posix_fadvise support exists on the platform.
2017-01-30 03:11:42 +01:00
Thomas Waldmann
c0dc644ef6 Merge branch '1.0-maint' into merge-1.0-maint
# Conflicts:
#	MANIFEST.in
#	Vagrantfile
#	docs/changes.rst
#	docs/usage/mount.rst.inc
#	src/borg/archiver.py
#	src/borg/fuse.py
#	src/borg/repository.py
2017-01-29 05:49:53 +01:00
Thomas Waldmann
e4c5db4efc posix platform module: only build / import on non-win32 platforms, fixes #2041
rather use a inverted check like "not windows".
also: add a base implementation for this stuff, just raising NotImplementedError
2017-01-14 14:48:49 +01:00
Thomas Waldmann
e431d60cc5 merge 1.0-maint into master
# Conflicts:
#	src/borg/crypto.pyx
#	src/borg/hashindex.pyx
#	src/borg/helpers.py
#	src/borg/platform/__init__.py
#	src/borg/platform/darwin.pyx
#	src/borg/platform/freebsd.pyx
#	src/borg/platform/linux.pyx
#	src/borg/remote.py
2017-01-14 03:07:11 +01:00
Marian Beermann
b9770c348f posix: use fully-qualified hostname + node ID
The node ID is usually the 48 bit MAC of the primary network
interface.
2017-01-12 00:54:17 +01:00
Thomas Waldmann
afab1cc9b0 Merge branch '1.0-maint'
# Conflicts:
#	borg/platform.py
#	src/borg/archiver.py
#	src/borg/helpers.py
#	src/borg/platform/darwin.pyx
#	src/borg/platform/freebsd.pyx
#	src/borg/platform/linux.pyx
#	src/borg/testsuite/__init__.py
2016-11-17 23:56:34 +01:00
Marian Beermann
c380d91805 fixes for flake 3.1.1 2016-11-14 21:50:20 +01:00
Marian Beermann
676e69cac4 Parse & pass BORG_HOSTNAME_IS_UNIQUE env var to enable stale lock killing 2016-11-07 21:56:40 +01:00
Marian Beermann
cc14975f2d Add tests for stale lock killing and platform.process_alive 2016-11-07 21:56:07 +01:00
Marian Beermann
2bd8ac7762 platform: bump API version (and check consistency) 2016-11-07 21:54:16 +01:00
Marian Beermann
c562f7750c Move platform-dependent code to platform package 2016-11-07 21:54:16 +01:00
TW
02e229b255 Merge pull request #1377 from enkore/issue/1060
Use atomic file writing and updating for configuration and key files
2016-07-30 16:06:01 +02:00
Lee Bousfield
b652f4039c
Remove trailing whitespace 2016-07-28 10:35:41 -04:00
Marian Beermann
2e3fc9ddfc SyncFile/SaveFile: default binary=False, just like open() 2016-07-26 22:49:25 +02:00
Marian Beermann
863ab66908 SaveFile: unlink(tmppath): only ignore FileNotFoundError 2016-07-26 22:40:23 +02:00
Marian Beermann
dec671d8ff SaveFile: os.replace instead of rename 2016-07-26 22:39:45 +02:00
Marian Beermann
36ebc82748 Add platform.SaveFile 2016-07-09 21:10:26 +02:00
Marian Beermann
567617ebbe
sync_dir: silence fsync() failing with EINVAL 2016-07-08 18:05:46 +02:00
Carlo Teubner
58d236c619 platform.linux: small SyncFile error handling fix 2016-06-18 13:39:22 +01:00
Marian Beermann
e41f3ecc5b
SyncFile: open with O_EXCL (or equivalent) 2016-06-04 22:47:27 +02:00
Thomas Waldmann
60da32123a refactor to use Item class, fixes #1071 2016-06-04 17:24:55 +02:00
Marian Beermann
0ca1a18b33
Make borg.platform a package 2016-05-31 15:38:56 +02:00