From f76b7afd088b821b9169ff02e0b03cae7aada51f Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Sat, 5 May 2012 16:55:08 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 debian/README.source                               |   38 --------------------
 debian/changelog                                   |   12 +++++++
 debian/compat                                      |    2 +-
 debian/control                                     |    6 ++--
 debian/copyright                                   |    2 +-
 debian/duplicity.docs                              |    1 -
 debian/patches/00list                              |    5 ---
 .../{01sshbackend.dpatch => 01-sshbackend.patch}   |    8 ++---
 debian/patches/02-cachedesync.patch                |   25 +++++++++++++
 debian/patches/02cachedesync.dpatch                |   26 --------------
 ...03forcecleanup.dpatch => 03-forcecleanup.patch} |   33 +++++++++--------
 .../{04reverify.dpatch => 04-reverify.patch}       |   10 ++----
 ...reamgpgintf.dpatch => 05-upstreamgpgintf.patch} |    8 ++---
 debian/patches/series                              |    5 +++
 debian/rules                                       |   11 +++---
 debian/source/format                               |    1 +
 16 files changed, 78 insertions(+), 115 deletions(-)
 delete mode 100644 debian/README.source
 delete mode 100644 debian/patches/00list
 rename debian/patches/{01sshbackend.dpatch => 01-sshbackend.patch} (91%)
 create mode 100644 debian/patches/02-cachedesync.patch
 delete mode 100644 debian/patches/02cachedesync.dpatch
 rename debian/patches/{03forcecleanup.dpatch => 03-forcecleanup.patch} (64%)
 rename debian/patches/{04reverify.dpatch => 04-reverify.patch} (75%)
 rename debian/patches/{05upstreamgpgintf.dpatch => 05-upstreamgpgintf.patch} (69%)
 create mode 100644 debian/patches/series
 create mode 100644 debian/source/format

diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index fc98b3d..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,38 +0,0 @@
-This package uses dpatch to manage all modifications to the upstream
-source. Changes are stored in the source package as diffs in
-debian/patches and applied during the build.
-
-To get the fully patched source after unpacking the source package, cd
-to the root level of the source package and run:
-
-    debian/rules patch
-
-Removing a patch is as simple as removing its entry from the
-debian/patches/00list file, and please also remove the patch file
-itself.
-
-Creating a new patch is done with "dpatch-edit-patch patch XX_patchname"
-where you should replace XX with a new number and patchname with a
-descriptive shortname of the patch. You can then simply edit all the
-files your patch wants to edit, and then simply "exit 0" from the shell
-to actually create the patch file.
-
-To tweak an already existing patch, call "dpatch-edit-patch XX_patchname"
-and replace XX_patchname with the actual filename from debian/patches
-you want to use.
-
-To clean up afterwards again, "debian/rules unpatch" will do the
-work for you - or you can of course choose to call
-"fakeroot debian/rules clean" all together.
-
-
---- 
-
-this documentation is part of dpatch package, and may be used by
-packages using dpatch to comply with policy on README.source. This
-documentation is meant to be useful to users who are not proficient in
-dpatch in doing work with dpatch-based packages. Please send any
-improvements to the BTS of dpatch package.
-
-original text by Gerfried Fuchs, edited by Junichi Uekawa <dancer@debian.org>
-10 Aug 2008.
diff --git a/debian/changelog b/debian/changelog
index 4681a21..fbcbf41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+duplicity (0.6.18-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt".
+  * Update to Standards-Version to 3.9.3, debhelper to 9 and
+    drop X-* prefix from Python-Version field in control file.
+  * Add build-arch and build-indep targets; use dh_prep in rules file.
+  * Update patches 02, 03 with "quilt refresh" to make them apply cleanly.
+  * Fix copyright-refers-to-symlink-license (Lintian).
+
+ -- Jari Aalto <jari.aalto@cante.net>  Sat, 05 May 2012 16:51:56 +0300
+
 duplicity (0.6.18-1) unstable; urgency=low
 
   * New upstream release (closes: #659532)
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 39e1468..a922c2f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,9 @@ Source: duplicity
 Section: utils
 Priority: optional
 Maintainer: Alexander Zangerl <az@debian.org>
-Build-Depends: debhelper (>= 5.0.37.2), librsync-dev (>=0.9.6), python-dev (>= 2.6.6-3), dpatch
-Standards-Version: 3.9.1
-X-Python-Version: >= 2.5
+Build-Depends: debhelper (>= 9), librsync-dev (>=0.9.6), python-dev (>= 2.6.6-3)
+Standards-Version: 3.9.3
+Python-Version: >= 2.5
 
 Package: duplicity
 Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 78e04b0..f947d6d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -27,7 +27,7 @@ the terms of the GNU General Public License as published by the Free Software
 Foundation; either version 2, or (at your option) any later version.
 
 On Debian GNU/Linux systems, the complete text of the GNU General Public
-License can be found in `/usr/share/common-licenses/GPL'.
+License can be found in `/usr/share/common-licenses/GPL-2'.
 
 
 tarfile:
diff --git a/debian/duplicity.docs b/debian/duplicity.docs
index 4c7a959..3d23a5d 100644
--- a/debian/duplicity.docs
+++ b/debian/duplicity.docs
@@ -1,4 +1,3 @@
 debian/NEWS.Debian
-debian/README.source
 README-LOG
 
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index e95d662..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,5 +0,0 @@
-01sshbackend
-02cachedesync
-03forcecleanup
-04reverify
-05upstreamgpgintf
diff --git a/debian/patches/01sshbackend.dpatch b/debian/patches/01-sshbackend.patch
similarity index 91%
rename from debian/patches/01sshbackend.dpatch
rename to debian/patches/01-sshbackend.patch
index db00e8c..c351e8b 100644
--- a/debian/patches/01sshbackend.dpatch
+++ b/debian/patches/01-sshbackend.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01sshbackend.dpatch by  <az@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: replace sshbackend with rewritten one
+From: <az@debian.org>
+Subject: replace sshbackend with rewritten one
 
-@DPATCH@
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.18~/duplicity/backends/sshbackend.py duplicity-0.6.18/duplicity/backends/sshbackend.py
 --- duplicity-0.6.18~/duplicity/backends/sshbackend.py	2012-03-01 05:24:04.000000000 +1000
 +++ duplicity-0.6.18/duplicity/backends/sshbackend.py	2012-03-11 11:56:10.284325675 +1000
diff --git a/debian/patches/02-cachedesync.patch b/debian/patches/02-cachedesync.patch
new file mode 100644
index 0000000..ddba3cc
--- /dev/null
+++ b/debian/patches/02-cachedesync.patch
@@ -0,0 +1,25 @@
+From: <az@debian.org>
+Subject: fix for (upstream)#497243: remove causes cache desynchronization
+ backed out the attempted fix, as it only dealt with the symptomps
+ and not the root-cause (which is the ill-advised change-set 616)
+
+---
+ duplicity/collections.py |    7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/duplicity/collections.py
++++ b/duplicity/collections.py
+@@ -151,12 +151,7 @@
+             if (pr
+                 and pr.time == self.time
+                 and pr.start_time == self.start_time
+-                and pr.end_time == self.end_time
+-                and pr.type != "new-sig" ):
+-                # do not remove new sigs from the cache:
+-                # they aren't removed from the remote archive,
+-                # and subsequent backups will have to resync
+-                # which is bad if running non-interactive with encrypt-key
++                and pr.end_time == self.end_time):
+                 try:
+                     globals.archive_dir.append(lfn).delete()
+                 except Exception:
diff --git a/debian/patches/02cachedesync.dpatch b/debian/patches/02cachedesync.dpatch
deleted file mode 100644
index 9e91490..0000000
--- a/debian/patches/02cachedesync.dpatch
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02cachedesync.dpatch by  <az@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: fix for (upstream)#497243: remove causes cache desynchronization
-## DP: backed out the attempted fix, as it only dealt with the symptomps 
-## DP: and not the root-cause (which is the ill-advised change-set 616)
-
-@DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.14~/duplicity/collections.py duplicity-0.6.14/duplicity/collections.py
---- duplicity-0.6.14~/duplicity/collections.py	2011-06-18 23:53:21.000000000 +1000
-+++ duplicity-0.6.14/duplicity/collections.py	2011-07-25 18:58:44.854456333 +1000
-@@ -145,12 +145,7 @@
-             if (pr
-                 and pr.time == self.time
-                 and pr.start_time == self.start_time
--                and pr.end_time == self.end_time
--                and pr.type != "new-sig" ):
--                # do not remove new sigs from the cache:
--                # they aren't removed from the remote archive,
--                # and subsequent backups will have to resync
--                # which is bad if running non-interactive with encrypt-key
-+                and pr.end_time == self.end_time):
-                 try:
-                     globals.archive_dir.append(lfn).delete()
-                 except Exception:
diff --git a/debian/patches/03forcecleanup.dpatch b/debian/patches/03-forcecleanup.patch
similarity index 64%
rename from debian/patches/03forcecleanup.dpatch
rename to debian/patches/03-forcecleanup.patch
index f276f27..9e17a05 100644
--- a/debian/patches/03forcecleanup.dpatch
+++ b/debian/patches/03-forcecleanup.patch
@@ -1,14 +1,15 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03forcecleanup.dpatch by  <az@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: fix for #572792: we force a extra-clean cleanup for all remove* ops
+From: <az@debian.org>
+Subject: fix for #572792: we force a extra-clean cleanup for all remove* ops
 
-@DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.15~/duplicity duplicity-0.6.15/duplicity
---- duplicity-0.6.15~/bin/duplicity	2011-08-20 04:27:00.000000000 +1000
-+++ duplicity-0.6.15/bin/duplicity	2011-10-01 15:24:07.069725446 +1000
-@@ -822,13 +822,24 @@
+---
+ bin/duplicity            |   13 ++++++++++++-
+ bin/duplicity.1          |   11 +++++++++++
+ duplicity/collections.py |    2 --
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+
+--- a/bin/duplicity
++++ b/bin/duplicity
+@@ -868,13 +868,24 @@
                      log.Notice("Deleting set " + set.type + " " + dup_time.timetopretty(set.get_time()))
                      set.delete()
          col_stats.set_values(sig_chain_warning=None)
@@ -34,9 +35,8 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  
  def sync_archive(decrypt):
      """
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.15~/bin/duplicity.1 duplicity-0.6.15/bin/duplicity.1
---- duplicity-0.6.15~/bin/duplicity.1	2011-08-20 04:27:00.000000000 +1000
-+++ duplicity-0.6.15/bin/duplicity.1	2011-10-01 15:22:11.397979265 +1000
+--- a/bin/duplicity.1
++++ b/bin/duplicity.1
 @@ -186,6 +186,14 @@
  .I --force
  will be needed to delete the files rather than just list them.
@@ -62,10 +62,9 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  .TP
  .BI --allow-source-mismatch
  Do not abort on attempts to use the same archive dir or remote backend
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.15~/duplicity/collections.py duplicity-0.6.15/duplicity/collections.py
---- duplicity-0.6.15~/duplicity/collections.py	2011-10-01 15:22:11.348981913 +1000
-+++ duplicity-0.6.15/duplicity/collections.py	2011-10-01 15:22:11.398979211 +1000
-@@ -997,8 +997,6 @@
+--- a/duplicity/collections.py
++++ b/duplicity/collections.py
+@@ -1004,8 +1004,6 @@
              if self.matched_chain_pair:
                  matched_sig_chain = self.matched_chain_pair[0]
                  for sig_chain in self.all_sig_chains:
diff --git a/debian/patches/04reverify.dpatch b/debian/patches/04-reverify.patch
similarity index 75%
rename from debian/patches/04reverify.dpatch
rename to debian/patches/04-reverify.patch
index 5a08d48..3d32a20 100644
--- a/debian/patches/04reverify.dpatch
+++ b/debian/patches/04-reverify.patch
@@ -1,11 +1,7 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04reverify.dpatch by  <az@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: fix #659009 by disabling validate_encryption_settings, which
-## DP: cannot work with public key encryption
+From: <az@debian.org>
+Subject: fix #659009 by disabling validate_encryption_settings, which
+ cannot work with public key encryption
 
-@DPATCH@
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.18~/bin/duplicity duplicity-0.6.18/bin/duplicity
 --- duplicity-0.6.18~/bin/duplicity	2012-03-11 12:10:22.625703996 +1000
 +++ duplicity-0.6.18/bin/duplicity	2012-03-11 12:11:34.810006192 +1000
diff --git a/debian/patches/05upstreamgpgintf.dpatch b/debian/patches/05-upstreamgpgintf.patch
similarity index 69%
rename from debian/patches/05upstreamgpgintf.dpatch
rename to debian/patches/05-upstreamgpgintf.patch
index 8cd7470..39f8a71 100644
--- a/debian/patches/05upstreamgpgintf.dpatch
+++ b/debian/patches/05-upstreamgpgintf.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 05upstreamgpgintf.dpatch by  <az@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: ensure that the public gnupginterface module is imported
+From: <az@debian.org>
+Subject: ensure that the public gnupginterface module is imported
 
-@DPATCH@
 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' duplicity-0.6.12~/duplicity/gpg.py duplicity-0.6.12/duplicity/gpg.py
 --- duplicity-0.6.12~/duplicity/gpg.py	2011-03-09 05:54:31.000000000 +1000
 +++ duplicity-0.6.12/duplicity/gpg.py	2011-03-13 00:31:52.648673991 +1000
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..26c619e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+01-sshbackend.patch
+02-cachedesync.patch
+03-forcecleanup.patch
+04-reverify.patch
+05-upstreamgpgintf.patch
diff --git a/debian/rules b/debian/rules
index be491d6..6a72ea8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,6 @@ endif
 
 
 # we use dpatch
-include /usr/share/dpatch/dpatch.make
 
 
 configure: configure-stamp
@@ -27,16 +26,20 @@ configure-stamp:
 	touch configure-stamp
 
 
+
+build-arch: build
+build-indep: build
+
 build: build-stamp
 
-build-stamp: patch configure-stamp 
+build-stamp: configure-stamp 
 	dh_testdir
 
 # Add here commands to compile the package.
 	python setup.py build
 	touch build-stamp
 
-clean: clean1 unpatch
+clean: clean1
 clean1:
 	dh_testdir
 	dh_testroot
@@ -50,7 +53,7 @@ clean1:
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 
 # Add here commands to install the package into debian/duplicity.
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
-- 
1.7.10

