From b0b035d37a9392a6362f03c4066d96fd6e10dc06 Mon Sep 17 00:00:00 2001 From: hannes Date: Sep 05 2019 10:05:28 +0000 Subject: Update to 1.2.1 --- diff --git a/.gitignore b/.gitignore index 89194b7..9e14395 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ backintime-0.9.26_src.tar.gz /backintime-1.1.22.tar.gz /backintime-1.1.24.tar.gz /backintime-1.2.0.tar.gz +/backintime-1.2.1.tar.gz diff --git a/backintime-fix-variable-type.patch b/backintime-fix-variable-type.patch deleted file mode 100644 index eba5be3..0000000 --- a/backintime-fix-variable-type.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 463c0195f7ade6b4e1692568d1d71a8b63787f80 Mon Sep 17 00:00:00 2001 -From: Germar Reitze -Date: Sun, 11 Aug 2019 21:50:31 +0200 -Subject: [PATCH] Fix bug: TypeError in backintime.py if mount failed while - running a snapshot (fixes #1005) - ---- - CHANGES | 3 +++ - common/snapshots.py | 2 +- - common/test/test_backup.py | 18 +++++++++--------- - 3 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/CHANGES b/CHANGES -index c970eba5..5a5fb93e 100644 ---- a/CHANGES -+++ b/CHANGES -@@ -1,5 +1,8 @@ - Back In Time - -+Version 1.2.1 -+* Fix bug: TypeError in backintime.py if mount failed while running a snapshot (https://github.com/bit-team/backintime/issues/1005) -+ - Version 1.2.0 - * Fix bug: Exit code is linked to the wrong status message (https://github.com/bit-team/backintime/issues/906) - * minor changes to allow running BiT inside Docker (https://github.com/bit-team/backintime/pull/959) -diff --git a/common/snapshots.py b/common/snapshots.py -index 14228281..39f4df77 100644 ---- a/common/snapshots.py -+++ b/common/snapshots.py -@@ -646,7 +646,7 @@ def backup(self, force = False): - instance.exitApplication() - logger.info('Unlock', self) - time.sleep(2) -- return False, True -+ return True - else: - self.config.setCurrentHashId(hash_id) - -diff --git a/common/test/test_backup.py b/common/test/test_backup.py -index 46f17b6c..8a2dd0a5 100644 ---- a/common/test/test_backup.py -+++ b/common/test/test_backup.py -@@ -36,7 +36,7 @@ class TestBackup(generic.SnapshotsTestCase): - @patch('snapshots.Snapshots.takeSnapshot') - def test_backup(self, takeSnapshot, sleep): - takeSnapshot.return_value = [True, False] -- self.assertFalse(self.sn.backup()) -+ self.assertIs(self.sn.backup(), False) - - self.assertEqual(takeSnapshot.call_count, 1) - self.assertIsInstance(takeSnapshot.call_args[0][0], snapshots.SID) -@@ -47,7 +47,7 @@ def test_backup(self, takeSnapshot, sleep): - @patch('snapshots.Snapshots.takeSnapshot') - def test_no_changes(self, takeSnapshot, sleep): - takeSnapshot.return_value = [False, False] -- self.assertFalse(self.sn.backup()) -+ self.assertIs(self.sn.backup(), False) - self.assertTrue(takeSnapshot.called) - - sid = takeSnapshot.call_args[0][0] -@@ -59,7 +59,7 @@ def test_no_changes(self, takeSnapshot, sleep): - @patch('snapshots.Snapshots.takeSnapshot') - def test_with_errors(self, takeSnapshot, sleep): - takeSnapshot.return_value = [False, True] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - - @patch('time.sleep') # speed up unittest - @patch('tools.onBattery') -@@ -113,7 +113,7 @@ def test_scheduled(self, takeSnapshot, sleep): - def test_already_running(self, takeSnapshot, check, sleep): - check.return_value = False - takeSnapshot.return_value = [True, False] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - self.assertFalse(takeSnapshot.called) - - @patch('time.sleep') # speed up unittest -@@ -122,7 +122,7 @@ def test_already_running(self, takeSnapshot, check, sleep): - def test_plugin_prevented_backup(self, takeSnapshot, processBegin, sleep): - processBegin.return_value = False - takeSnapshot.return_value = [True, False] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - self.assertFalse(takeSnapshot.called) - - @patch('time.sleep') # speed up unittest -@@ -131,7 +131,7 @@ def test_plugin_prevented_backup(self, takeSnapshot, processBegin, sleep): - def test_not_configured(self, takeSnapshot, isConfigured, sleep): - isConfigured.return_value = False - takeSnapshot.return_value = [True, False] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - self.assertFalse(takeSnapshot.called) - - @patch('time.sleep') # speed up unittest -@@ -140,7 +140,7 @@ def test_not_configured(self, takeSnapshot, isConfigured, sleep): - def test_mount_exception(self, takeSnapshot, mount, sleep): - mount.side_effect = MountException() - takeSnapshot.return_value = [True, False] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - self.assertFalse(takeSnapshot.called) - - @patch('time.sleep') # speed up unittest -@@ -149,7 +149,7 @@ def test_mount_exception(self, takeSnapshot, mount, sleep): - def test_umount_exception(self, takeSnapshot, umount, sleep): - umount.side_effect = MountException() - takeSnapshot.return_value = [True, False] -- self.assertFalse(self.sn.backup()) -+ self.assertIs(self.sn.backup(), False) - - @patch('time.sleep') # speed up unittest - @patch.object(config.Config, 'canBackup') -@@ -157,7 +157,7 @@ def test_umount_exception(self, takeSnapshot, umount, sleep): - def test_cant_backup(self, takeSnapshot, canBackup, sleep): - canBackup.return_value = False - takeSnapshot.return_value = [True, False] -- self.assertTrue(self.sn.backup()) -+ self.assertIs(self.sn.backup(), True) - self.assertFalse(takeSnapshot.called) - - @patch('time.sleep') # speed up unittest diff --git a/backintime.spec b/backintime.spec index 6902063..01baca3 100644 --- a/backintime.spec +++ b/backintime.spec @@ -1,6 +1,6 @@ Name: backintime -Version: 1.2.0 -Release: 6%{?dist} +Version: 1.2.1 +Release: 1%{?dist} Summary: Simple backup tool inspired from the Flyback project and TimeVault License: GPLv2+ URL: https://github.com/bit-team/backintime @@ -14,9 +14,6 @@ BuildRequires: python-rpm-macros BuildRequires: python%{python3_pkgversion}-devel BuildRequires: systemd Requires: %{name}-common = %{version}-%{release} -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd # we place additional icons Requires: hicolor-icon-theme @@ -155,17 +152,6 @@ EOF rm common/test/test_tools.py make -C common test-v - -%post common -%systemd_post %{name}.service - -%postun common -%systemd_preun %{name}.service - -%posttrans common -%systemd_postun_with_restart %{name}.service - - %files common -f %{name}.lang %doc %{_datadir}/doc/%{name}/ %{_sysconfdir}/xdg/autostart/%{name}.desktop @@ -198,6 +184,10 @@ make -C common test-v %changelog +* Thu Sep 05 2019 Johannes Lips - 1.2.1-1 +- update to 1.2.1 +- clean up of post, postun and posttrans sections + * Tue Aug 20 2019 Johannes Lips - 1.2.0-6 - added upstream patch to fix #1709064 diff --git a/sources b/sources index 155f4d0..512b32b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (backintime-1.2.0.tar.gz) = d36ec438433f9b608f967aee257209254e5523bb5b6ff8253c49a47cdf4f7c6a3c4998cdd274d052a84dbd31016b159c0eb62f22c44d8a7529c5ac3b421458c7 +SHA512 (backintime-1.2.1.tar.gz) = 91dbc76a7db81469c5a538be03196c8e307d13307486d8e1c6cad10ce0af399de495f0292fecffc2853ed78804b5899750f06f274b4701efe3af6a708ea1024e