Hi, On 13.06.2015 01:32, Felix Geyer wrote: > Hi, > > On Fri, 12 Jun 2015 17:30:51 +0200 Michael Renner <r...@amd.co.at> wrote: >> Package: bareos >> Version: 14.2.1+20141017gitc6c5b56-4 >> Severity: critical >> Justification: causes serious data loss >> >> In March 2015 bareos fixed a bug which caused silent corruption of >> backups when the following conditions are met: >> >> * backups are written to disk (tape backups are not affected) >> * autolabelling is enabled >> * a backup spans over multiple volumes >> * the additional volumes are newly created and labeled during the backup. >> >> Bug: https://bugs.bareos.org/view.php?id=437 >> Announcement: >> http://www.bareos.com/en/company_news/items/Bareos-14.2.4-published.html >> Fix for 14.2: >> https://github.com/bareos/bareos/commit/263240eaa911563a8468ecdaf7d4957201b41426 >> >> Given that the above conditions are met in most bareos installations >> I've tagged this as critical. >> >> >> While I'm at it I'd like to point out that Joerg Steffens, an upstream >> maintainer, >> employee and/or partner of bareos.com and co-maintainer of this >> package in Debian, hasn't found the time to inform the Debian community of >> this issue, lest >> providing a patched package. > > Attached is a debdiff that contains a backport of the upstream fix.
How about reverting the fix for #769536 ("circular dependency hell") until there is a proper solution for it? That way we can get this bug fixed and bareos back into testing. I've prepared those changes in the attached debdiff. What do you think? Cheers, Felix
diff -Nru bareos-14.2.1+20141017gitc6c5b56/debian/changelog bareos-14.2.1+20141017gitc6c5b56/debian/changelog --- bareos-14.2.1+20141017gitc6c5b56/debian/changelog 2014-12-02 10:25:20.000000000 +0100 +++ bareos-14.2.1+20141017gitc6c5b56/debian/changelog 2015-07-20 18:24:24.000000000 +0200 @@ -1,3 +1,12 @@ +bareos (14.2.1+20141017gitc6c5b56-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Revert fix for #769536 until there is a proper solution. (Closes: #771870) + * Fix data corruption bug affecting file based backups. (Closes: #788543) + - Backport upstream fix as fix_multi_volume_data_corruption.diff + + -- Felix Geyer <fge...@debian.org> Mon, 20 Jul 2015 18:18:13 +0200 + bareos (14.2.1+20141017gitc6c5b56-4) unstable; urgency=medium [ Joerg Steffens ] diff -Nru bareos-14.2.1+20141017gitc6c5b56/debian/control bareos-14.2.1+20141017gitc6c5b56/debian/control --- bareos-14.2.1+20141017gitc6c5b56/debian/control 2014-12-01 19:28:21.000000000 +0100 +++ bareos-14.2.1+20141017gitc6c5b56/debian/control 2015-07-20 18:17:26.000000000 +0200 @@ -96,7 +96,7 @@ Package: bareos-database-common Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0 -Depends: bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} Description: Backup Archiving Recovery Open Sourced - common catalog files Bareos is a set of programs to manage backup, recovery and verification of data across a network of computers of different kinds. @@ -146,7 +146,7 @@ Package: bareos-database-tools Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0 -Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3 Description: Backup Archiving Recovery Open Sourced - database tools Bareos is a set of programs to manage backup, recovery and verification of @@ -184,7 +184,7 @@ Package: bareos-director Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, adduser -Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends} Recommends: logrotate Conflicts: bacula-director Replaces: bacula-director diff -Nru bareos-14.2.1+20141017gitc6c5b56/debian/control.in bareos-14.2.1+20141017gitc6c5b56/debian/control.in --- bareos-14.2.1+20141017gitc6c5b56/debian/control.in 2014-12-01 19:28:21.000000000 +0100 +++ bareos-14.2.1+20141017gitc6c5b56/debian/control.in 2015-07-20 18:23:49.000000000 +0200 @@ -96,7 +96,7 @@ Package: bareos-database-common Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0 -Depends: bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} Description: Backup Archiving Recovery Open Sourced - common catalog files Bareos is a set of programs to manage backup, recovery and verification of data across a network of computers of different kinds. @@ -146,7 +146,7 @@ Package: bareos-database-tools Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0 -Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends} Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3 Description: Backup Archiving Recovery Open Sourced - database tools Bareos is a set of programs to manage backup, recovery and verification of @@ -184,7 +184,7 @@ Package: bareos-director Architecture: any Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, adduser -Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends} +Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends} Recommends: logrotate Conflicts: bacula-director Replaces: bacula-director diff -Nru bareos-14.2.1+20141017gitc6c5b56/debian/patches/fix_multi_volume_data_corruption.diff bareos-14.2.1+20141017gitc6c5b56/debian/patches/fix_multi_volume_data_corruption.diff --- bareos-14.2.1+20141017gitc6c5b56/debian/patches/fix_multi_volume_data_corruption.diff 1970-01-01 01:00:00.000000000 +0100 +++ bareos-14.2.1+20141017gitc6c5b56/debian/patches/fix_multi_volume_data_corruption.diff 2015-07-20 18:21:47.000000000 +0200 @@ -0,0 +1,39 @@ +Description: Backport of upstream fix "Don't trash dcr->rec while doing autolabeling." +Origin: backport, https://github.com/bareos/bareos/commit/263240eaa911563a8468ecdaf7d4957201b41426 +Bug: https://bugs.bareos.org/view.php?id=437 +Bug-Debian: https://bugs.debian.org/788543 + +--- bareos-14.2.1+20141017gitc6c5b56.orig/src/stored/label.c ++++ bareos-14.2.1+20141017gitc6c5b56/src/stored/label.c +@@ -341,6 +341,7 @@ static bool write_volume_label_to_block( + bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName, + const char *PoolName, bool relabel) + { ++ DEV_RECORD *rec; + JCR *jcr = dcr->jcr; + DEVICE *dev = dcr->dev; + DEV_BLOCK *block = dcr->block; +@@ -420,15 +421,18 @@ bool write_new_volume_label_to_dev(DCR * + goto bail_out; + } + +- create_volume_label_record(dcr, dev, dcr->rec); +- dcr->rec->Stream = 0; +- dcr->rec->maskedStream = 0; ++ rec = new_record(); ++ create_volume_label_record(dcr, dev, rec); ++ rec->Stream = 0; ++ rec->maskedStream = 0; + +- if (!write_record_to_block(dcr, dcr->rec)) { ++ if (!write_record_to_block(dcr, rec)) { + Dmsg2(130, "Bad Label write on %s: ERR=%s\n", dev->print_name(), dev->print_errmsg()); ++ free_record(rec); + goto bail_out; + } else { +- Dmsg2(130, "Wrote label of %d bytes to %s\n", dcr->rec->data_len, dev->print_name()); ++ Dmsg2(130, "Wrote label of %d bytes to %s\n", rec->data_len, dev->print_name()); ++ free_record(rec); + } + + Dmsg0(130, "Call write_block_to_dev()\n"); diff -Nru bareos-14.2.1+20141017gitc6c5b56/debian/patches/series bareos-14.2.1+20141017gitc6c5b56/debian/patches/series --- bareos-14.2.1+20141017gitc6c5b56/debian/patches/series 2014-12-01 19:25:28.000000000 +0100 +++ bareos-14.2.1+20141017gitc6c5b56/debian/patches/series 2015-07-20 18:21:47.000000000 +0200 @@ -1 +1,2 @@ size_t_cn_length.patch +fix_multi_volume_data_corruption.diff