Browse Source

Merge pull request #647 from ThomasWaldmann/0.xx-maint

0.xx maint
TW 9 years ago
parent
commit
f1b4b52173
5 changed files with 73 additions and 19 deletions
  1. 22 18
      borg/cache.py
  2. 39 0
      docs/changes.rst
  3. 1 1
      docs/installation.rst
  4. 4 0
      requirements.d/fuse.txt
  5. 7 0
      setup.py

+ 22 - 18
borg/cache.py

@@ -59,24 +59,28 @@ class Cache:
                     raise self.CacheInitAbortedError()
             self.create()
         self.open(lock_wait=lock_wait)
-        # Warn user before sending data to a relocated repository
-        if self.previous_location and self.previous_location != repository._location.canonical_path():
-            msg = ("Warning: The repository at location {} was previously located at {}".format(repository._location.canonical_path(), self.previous_location) +
-                   "\n" +
-                   "Do you want to continue? [yN] ")
-            if not yes(msg, false_msg="Aborting.", default_notty=False,
-                       env_var_override='BORG_RELOCATED_REPO_ACCESS_IS_OK'):
-                raise self.RepositoryAccessAborted()
-
-        if sync and self.manifest.id != self.manifest_id:
-            # If repository is older than the cache something fishy is going on
-            if self.timestamp and self.timestamp > manifest.timestamp:
-                raise self.RepositoryReplay()
-            # Make sure an encrypted repository has not been swapped for an unencrypted repository
-            if self.key_type is not None and self.key_type != str(key.TYPE):
-                raise self.EncryptionMethodMismatch()
-            self.sync()
-            self.commit()
+        try:
+            # Warn user before sending data to a relocated repository
+            if self.previous_location and self.previous_location != repository._location.canonical_path():
+                msg = ("Warning: The repository at location {} was previously located at {}".format(repository._location.canonical_path(), self.previous_location) +
+                       "\n" +
+                       "Do you want to continue? [yN] ")
+                if not yes(msg, false_msg="Aborting.", default_notty=False,
+                           env_var_override='BORG_RELOCATED_REPO_ACCESS_IS_OK'):
+                    raise self.RepositoryAccessAborted()
+
+            if sync and self.manifest.id != self.manifest_id:
+                # If repository is older than the cache something fishy is going on
+                if self.timestamp and self.timestamp > manifest.timestamp:
+                    raise self.RepositoryReplay()
+                # Make sure an encrypted repository has not been swapped for an unencrypted repository
+                if self.key_type is not None and self.key_type != str(key.TYPE):
+                    raise self.EncryptionMethodMismatch()
+                self.sync()
+                self.commit()
+        except:
+            self.close()
+            raise
 
     def __enter__(self):
         return self

+ 39 - 0
docs/changes.rst

@@ -1,6 +1,45 @@
 Changelog
 =========
 
+Version 0.30.1
+--------------
+
+Compatibility / maintenance notes:
+
+- Python 3.2 is dead and everybody is dropping support for it.
+  Python 3.3 is rather old and not feeling too well either.
+- Thus, 0.30.x is the last borgbackup version that is compatible with python
+  3.2 and 3.3, all 1.x.x releases require python 3.4 or 3.5.
+- 1.0.0rc1 is already released, use that (and later 1.x.x), if possible.
+- 0.30.x releases will get a few critical fixes, so you can use them for
+  a while, but do not expect 0.30.x to be maintained for a long time.
+  Neither will any new features be added in 0.30.x.
+  Nor will any minor/cosmetic bugs be fixed in 0.30.x.
+- There will be no binary releases for 0.30.x - just use the 1.x.x releases
+  if you want a binary.
+- The 1.x.x binaries include python 3.5, so using them might be an option for
+  older systems that do not have python >= 3.4.
+- Alternatively, you can always install python 3.4 or 3.5 to /usr/local/bin
+  (make altinstall) without causing issues/conflicts with your system python.
+
+Bug fixes:
+
+- seeking to an invalid position is an IOError in python 3.2, #621
+- Cache: fix exception handling in __init__, release lock, #610
+
+Other changes:
+
+- allow llfuse version 0.41.x, #642
+- document and automate llfuse requirement (setup.py / requirements.d/fuse.txt)
+- require msgpack==0.4.6 - no python 3.2 support in 0.4.7+
+
+Missing in 0.30.0 change log:
+- Vagrantfile: avoid pkg-config missing error msg on netbsd
+- add chunks.archive.d trick to FAQ
+- Vagrantfile: remove python 3.2, use older pip/venv for trusty
+  pyenv installs latest virtualenv/pip that is not compatible with py 3.2 any more
+
+
 Version 0.30.0
 --------------
 

+ 1 - 1
docs/installation.rst

@@ -105,7 +105,7 @@ following dependencies first:
 * liblz4_
 * some Python dependencies, pip will automatically install them for you
 * optionally, the llfuse_ Python package is required if you wish to mount an
-  archive as a FUSE filesystem. FUSE >= 2.8.0 is required for llfuse.
+  archive as a FUSE filesystem. See setup.py about the version requirements.
 
 In the following, the steps needed to install the dependencies are listed for a
 selection of platforms. If your distribution is not covered by these

+ 4 - 0
requirements.d/fuse.txt

@@ -0,0 +1,4 @@
+# low-level FUSE support library for "borg mount"
+# see comments setup.py about this version requirement.
+llfuse<0.42
+

+ 7 - 0
setup.py

@@ -22,6 +22,12 @@ on_rtd = os.environ.get('READTHEDOCS')
 # Note: 0.4.7 is also OK, but has no Python 3.2 support any more.
 install_requires=['msgpack-python==0.4.6', ]
 
+extras_require = {
+    # llfuse 0.40 (tested, proven, ok), needs FUSE version >= 2.8.0
+    # llfuse 0.41 (tested shortly, looks ok), needs FUSE version >= 2.8.0
+    # llfuse 0.42 (tested, does not work, incompatible api changes)
+    'fuse': ['llfuse<0.42', ],
+}
 
 from setuptools import setup, Extension
 from setuptools.command.sdist import sdist
@@ -260,4 +266,5 @@ setup(
     ext_modules=ext_modules,
     setup_requires=['setuptools_scm>=1.7'],
     install_requires=install_requires,
+    extras_require=extras_require,
 )