backupninja performs incorrect version tests on duplicity

Bug #1004210 reported by Jeffery von Ronne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
backupninja (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The program /usr/share/backupninja/dup in backupninja 0.9.7-5~lucid1 does not correctly test for versions of duplicity.

First, the code for parsing (lines 99-102) and comparing versions (lines 120, 126, 161, 187, 244, 264) only work
together correctly if the version number has the form x.y.z where x, y, and z are numbers. The version of duplicity
in lucid, however, is 0.6.08b. The "b" in the subversion causes all of the tests to fail.

Second, the version comparisons do not correctly compare the major/minor/sub parts of versions correctly. For, example, the comparison on line 244 is supposed to test whether the version is at least 0.4.4. It does this
with:

  "if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then"

That comparison would be false for version 0.5.02, because 2 is not greater than or equal to 4. The same problem occurs on line 264. The comparisons 120, 161, 187 have the same incorrect logic, but since they're are less-than comparisons, they actually can't fail for any actual versions of duplicity.

Revision history for this message
Jeffery von Ronne (vonronne) wrote :

The same problem appears in the 0.9.6-4 package in Lucid and still exists in the version found in the trunk branch at https://code.launchpad.net/~vcs-imports/backupninja/trunk.

Revision history for this message
Jacob Anawalt (jlanawalt) wrote :

The problem exists in backupninja 1.0.1-2 on 16.04 xenial. Because of this duplicity 0.7.06 fails to be recognized as >= 0.6.17, causing it to assume that only the scp/sftp backend is supported and paramiko isn't (06 ! -ge 17) and that it can't handle removing increments older than full backups (06 ! -ge 10).

The fix has been sitting in their git repo since 2014-Feb-22 [0]. The old upstream source location points to this new location. [1]

This isn't the only bug in 1.0.1 that has a fix available but is waiting a 1.0.2 release. There is also a host.rsync bug. [2]

0) https://0xacab.org/riseuplabs/backupninja/commit/1017ec315fe2b5550908abd9f1f4f9e5edb0bd9d
1) https://labs.riseup.net/code/projects/backupninja
2) https://scriptthe.net/2015/02/09/backupninja-or-how-i-learned-to-stop-worrying-and-build-from-source/

Changed in backupninja (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.