Your message dated Sat, 01 Apr 2017 19:18:47 +0000
with message-id <e1cuoxv-000bj3...@fasolo.debian.org>
and subject line Bug#859295: fixed in bup 0.29-3
has caused the Debian Bug report #859295,
regarding bup: Fix possible 'bup gc --threshold=0' data loss
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
859295: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859295
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: bup
Version: 0.29-2
Severity: critical
Justification: possibility of serious data loss

Hi,

The bup 0.29.1 release contains a fix for a bug that can cause serious
data loss (dbda0e98074b8b6ec20f4bdf5479b2847cc8eb0e, attached). From the
upstream release notes:

    Notable changes in 0.29.1 as compared to 0.29
    =============================================

    May require attention
    ---------------------

    * Running gc with a --threshold of 0 no longer runs the risk of
      corrupting the repository.  (The default threshold is 10).
      Previously, gc could delete a packfile after rewriting it when the
      packfile didn't change.

This commit should be cherry-picked for stretch.

-- 
Robert Edmonds
edmo...@debian.org
>From dbda0e98074b8b6ec20f4bdf5479b2847cc8eb0e Mon Sep 17 00:00:00 2001
From: Tim Riemenschneider <g...@tim-riemenschneider.de>
Date: Mon, 6 Mar 2017 23:08:46 +0100
Subject: [PATCH] Saveguard against deleting new pack-file (f.e. with
 threshold=0)

Signed-off-by: Tim Riemenschneider <g...@tim-riemenschneider.de>
[r...@defaultvalue.org: wrap comment line in test-gc.sh; adjust comment
 whitespace in gc.py]
Reviewed-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
 lib/bup/gc.py |  2 ++
 t/test-gc.sh  | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/lib/bup/gc.py b/lib/bup/gc.py
index c0a1c0e..395094a 100644
--- a/lib/bup/gc.py
+++ b/lib/bup/gc.py
@@ -135,6 +135,8 @@ def sweep(live_objects, existing_count, cat_pipe, threshold, compression,
         if verbosity and new_pack_prefix:
             log('created ' + basename(new_pack_prefix) + '\n')
         for p in ns.stale_files:
+            if new_pack_prefix and p.startswith(new_pack_prefix):
+                continue  # Don't remove the new pack file
             if verbosity:
                 log('removing ' + basename(p) + '\n')
             os.unlink(p)
diff --git a/t/test-gc.sh b/t/test-gc.sh
index 82be29c..2739ae7 100755
--- a/t/test-gc.sh
+++ b/t/test-gc.sh
@@ -219,4 +219,23 @@ WVPASSEQ 1 $(echo "$only_in_before" | wc -l)
 WVPASSEQ 1 $(echo "$only_in_after" | wc -l)
 WVPASSEQ 1 $(echo "$in_both" | wc -l)
 
+WVSTART "gc (threshold 0)"
+
+WVPASS rm -rf "$BUP_DIR"
+WVPASS bup init
+WVPASS rm -rf src && mkdir src
+WVPASS echo 0 > src/0
+WVPASS echo 1 > src/1
+
+WVPASS bup index src
+WVPASS bup save -n src-1 src
+
+packs_before="$(ls "$BUP_DIR/objects/pack/"*.pack)" || exit $?
+WVPASS bup gc -v $GC_OPTS --threshold 0 2>&1 | tee gc.log
+packs_after="$(ls "$BUP_DIR/objects/pack/"*.pack)" || exit $?
+# Check that the pack was rewritten, but not removed (since the
+# result-pack is equal to the source pack)
+WVPASSEQ 1 "$(grep -cE '^rewriting ' gc.log)"
+WVPASSEQ "$packs_before" "$packs_after"
+
 WVPASS rm -rf "$tmpdir"
-- 
2.11.0


--- End Message ---
--- Begin Message ---
Source: bup
Source-Version: 0.29-3

We believe that the bug you reported is fixed in the latest version of
bup, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 859...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Robert Edmonds <edmo...@debian.org> (supplier of updated bup package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 01 Apr 2017 14:38:19 -0400
Source: bup
Binary: bup bup-doc
Architecture: source amd64 all
Version: 0.29-3
Distribution: unstable
Urgency: medium
Maintainer: Robert Edmonds <edmo...@debian.org>
Changed-By: Robert Edmonds <edmo...@debian.org>
Description:
 bup        - highly efficient file backup system based on git
 bup-doc    - highly efficient file backup system based on git (documentation)
Closes: 859295
Changes:
 bup (0.29-3) unstable; urgency=medium
 .
   [ Tim Riemenschneider ]
   * Safeguard against deleting new pack-file (f.e. with threshold=0)
     (Closes: #859295)
Checksums-Sha1:
 0fed4aff510e65c7a3dcdb1de15745e501c663d7 2024 bup_0.29-3.dsc
 2919e8817f48a87cba4dc9e74303f50ddedca912 6668 bup_0.29-3.debian.tar.xz
 6469d53e3092eeb79eb1372f4b6b0703052c4c4e 34684 bup-dbgsym_0.29-3_amd64.deb
 c4727bdbe276a5fcee981dbac92e9ede8dfed601 78928 bup-doc_0.29-3_all.deb
 27f0f659cdfdb40116b2700d39cd08021bc9499b 7674 bup_0.29-3_amd64.buildinfo
 b7d1459ca53faac5be907cb8153498701a43f426 121848 bup_0.29-3_amd64.deb
Checksums-Sha256:
 d52037ab8fe62e8a0a4dde6a0c49605c6dea049b13bb3247257ffb13bba74303 2024 
bup_0.29-3.dsc
 7ec232e4e1904fcd151661c30b58a81924c09231c26fdfe07da83359e99b2efe 6668 
bup_0.29-3.debian.tar.xz
 b48337ba398a6cb9cd6d0424d2e11f11273571364e1e69bd7b14441873cdb1bb 34684 
bup-dbgsym_0.29-3_amd64.deb
 804b51e9a96c3e510363ab79d9b1a188949b0d6941c08c40657edcbc5353ac2d 78928 
bup-doc_0.29-3_all.deb
 95dd87dbb1d40fef2c054508da5eb5f24c79afefb5ba2f8d78e9285218350070 7674 
bup_0.29-3_amd64.buildinfo
 252016d2a837d4da01e2e94e5e2a4d2c3453de8f577983b937b07d205990dc38 121848 
bup_0.29-3_amd64.deb
Files:
 943c25067b50fecbc0db7a829ae9cb2b 2024 admin extra bup_0.29-3.dsc
 dd8f7dfae28a7b429e3934c78d256c2f 6668 admin extra bup_0.29-3.debian.tar.xz
 3d701d4cb5155ac1e320005e5752baf6 34684 debug extra bup-dbgsym_0.29-3_amd64.deb
 f8f5bcb27b9bf79dfa9da5cc519a3183 78928 doc extra bup-doc_0.29-3_all.deb
 c469861e83df5f32d393f9710730c948 7674 admin extra bup_0.29-3_amd64.buildinfo
 925555795e1649c347369ebbba3a0315 121848 admin extra bup_0.29-3_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE3z2W7rOCeCDzAmZcAYF6sKr2za4FAljf+lYACgkQAYF6sKr2
za7uYQ/+LBYs7T+0rH4HbXfytd+NafkeHaE/XQ9894dAjVsfF6tVBMrlj15q22vt
kYz4sT1iFMZ755gwHBzI2Pg8dbTzTHhKLTrIG1+U2xYUiLK+pBQ6P8nFFI3xO2r2
LFxD4lfrXZcKV65VoW/4YoK67RaBBICuSDdhLOq9NLSMWNuDe4vSlW44+qZBQbA8
uujatJQKRoN55Q+XNy/+BT/r3mHZg/HvdVA7nxk8A/H/Z4yIhTRNKddV1hlB9e9M
YdsQGUgejuKwhTs7gUhj14mXJnpq2Ro/WP/fEKtoYrx+bCjyfHk4hlwRkPph3PoF
K66XS1CZvYtjcUp4DvI1x6v7orDPTPLrMMWWpXHHr0PpzWq9Z5oh6IZX9EpfZfZ9
4G7rp6zIUMg8IfzQCsPnFOW6Rd9+/xENG/5ZxLB49FnQwutvfcel10aInoVoadPZ
Gzo0XvS3d9d7qaIzQ51Rc6on75NfdLuKqlET+gXz8vD4CNXGXcra+qgFB2ameW48
t/aAHycT1idLxoIqVs5ABFmG8NIg3/BpBELdG15MV5nltTWATog8dNJoK0ZmA2BM
2RCmb4OnJnnztfdba41lyGYIkCUwWMdh3tz/W0/NlM/7AbFpGz7Y+6+pTxwnACYm
Sblh/M69r4PTl7bgjTDt0kc5KOjiKLQpLXx1PJdEBipbIdy/mNc=
=nD25
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to