[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#796379: marked as done (jessie-pu: package bareos/14.2.1+20141017gitc6c5b56-3+deb8u1)



Your message dated Sat, 05 Sep 2015 14:31:07 +0100
with message-id <1441459867.2151.32.camel@adam-barratt.org.uk>
and subject line Closing p-u bugs for 8.2
has caused the Debian Bug report #796379,
regarding jessie-pu: package bareos/14.2.1+20141017gitc6c5b56-3+deb8u1
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 owner@bugs.debian.org
immediately.)


-- 
796379: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796379
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

Hi SRM!

I'd love to update bareos in jessie to fix #788543 (backup corruption).
While at it, I thought it would be a good idea to also enable autopkgtests.
Sadly the upstream testsuite wants to create it's own database,
so I had to patch that part out (and can totally see if you would not like
that).

The full debdiff is attached. The diffstat is as follows:
 changelog                                     |   12 ++++++++
 patches/dont-create-db-in-tests.patch         |   30 ++++++++++++++++++++
 patches/fix_multi_volume_data_corruption.diff |   39 ++++++++++++++++++++++++++
 patches/series                                |    2 +
 tests/control                                 |   11 +++++++
 5 files changed, 94 insertions(+)

dont-create-db-in-tests.patch and tests/control can be dropped if you
would like to avoid enabling autopkgtests at this moment.

Greets and thanks for your work
Evgeni

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/changelog b/debian/changelog
index 0119751..01e5a08 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+bareos (14.2.1+20141017gitc6c5b56-3+deb8u1) stable; urgency=mediu
+
+  [ Felix Geyer ]
+  * backport the fix for the backup corruption on multi-volume jobs
+    (Closes: #788543)
+  * add autopkgtests
+
+  [ Evgeni Golov ]
+  * do not try to create the databases when running tests
+
+ -- Evgeni Golov <evgeni@debian.org>  Fri, 21 Aug 2015 17:13:56 +0200
+
 bareos (14.2.1+20141017gitc6c5b56-3) unstable; urgency=medium
 
   * do not install files as conffiles in /etc/bareos (Closes: #767819)
diff --git a/debian/patches/dont-create-db-in-tests.patch b/debian/patches/dont-create-db-in-tests.patch
new file mode 100644
index 0000000..69fe787
--- /dev/null
+++ b/debian/patches/dont-create-db-in-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/test/all b/test/all
+index 1adf4ec..6e03139 100755
+--- a/test/all
++++ b/test/all
+@@ -8,25 +8,6 @@ echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
+ echo "USER: $USER"
+ echo "DB: $DB"
+ 
+-chown ${daemon_user}:${daemon_group} /etc/bareos/*.conf
+-chmod ug=rw,o+r /etc/bareos/*.conf
+-chmod a+rx /etc/bareos/
+-
+-ls -la /etc/bareos/
+-
+-case "$DB" in
+-    postgres*)
+-        su postgres -c /usr/lib/bareos/scripts/create_bareos_database
+-        su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
+-        su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges
+-        ;;
+-    *)
+-        /usr/lib/bareos/scripts/create_bareos_database
+-        /usr/lib/bareos/scripts/make_bareos_tables
+-        /usr/lib/bareos/scripts/grant_bareos_privileges
+-        ;;
+-esac
+-
+ echo "--------- starting services ----------- "
+ service bareos-dir start
+ service bareos-sd start
diff --git a/debian/patches/fix_multi_volume_data_corruption.diff b/debian/patches/fix_multi_volume_data_corruption.diff
new file mode 100644
index 0000000..b4de30d
--- /dev/null
+++ b/debian/patches/fix_multi_volume_data_corruption.diff
@@ -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 --git a/debian/patches/series b/debian/patches/series
index 43b51ae..472de32 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 size_t_cn_length.patch
+fix_multi_volume_data_corruption.diff
+dont-create-db-in-tests.patch
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cfdd717
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,11 @@
+Test-Command: test/all
+Restrictions: needs-root allow-stderr
+Depends: postgresql, bareos-database-postgresql, bareos
+
+Test-Command: test/all
+Restrictions: needs-root allow-stderr
+Depends: mysql-server, bareos-database-mysql, bareos
+
+Test-Command: test/all
+Restrictions: needs-root allow-stderr
+Depends: bareos-database-sqlite3, bareos

--- End Message ---
--- Begin Message ---
Version: 8.2

Hi,

These bugs correspond to updates which were included in the 8.2 point
release.

Regards,

Adam

--- End Message ---

Reply to: