Package:     backup2l
Subject:     fix parameter in DRIVER_TAR_GPG
Author:      Holger Segnitz <holger@segnitz.net>
Bug-Debian:  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665429
Forwarded:   no
Last-Update: 2016-05-24

Restore with DRIVER_TAR_GPG gives some troubles:
 * a full restore (backup2l -r) creates all files as empty directories 
   inside the restore directory
 * trying to restore files with a search pattern (backup2l -r <pattern> ) 
   tells the user, the files cannot be found in any archive.
I could identify the parameter "-f $3" in the tar command to be causing
the problem. Removing it fixes the problem.
---

diff -urN s06/first-time.conf s07/first-time.conf
--- s06/first-time.conf	2016-05-24 01:46:17.633335825 +0200
+++ s07/first-time.conf	2016-05-24 01:58:57.962000231 +0200
@@ -361,7 +361,7 @@
 
 
 
-# This driver uses tar and pipes the output trough gnupg. You can specifiy
+# This driver uses tar and pipes the output through gnupg. You can specifiy
 # the passphrase in a file (/etc/backup2l.pass in the example). You have to
 # invoke gpg at least one time before backup because gnupg has to initiate
 # first thing in the home directory.
@@ -382,7 +382,7 @@
             /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar t | sed 's#^#/#'
             ;;
         -extract)       # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-             /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar -x --same-permission --same-owner -f $3 -T $4 2>&1
+             /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar -x --same-permission --same-owner -T $4 2>&1
             ;;
     esac
 }
