Package: tor
Severity: wishlist
Tags: patch

Hi,

The dpatch patch management system has been deprecated for some time. The
Lintian currently flags use of dpatch packages as an error. The new 3.0
packaging format is an improved version which, among other things, contains
patch management built-in. For more information, see:

    http://wiki.debian.org/Projects/DebSrc3.0

I had some free time; see attached patch to migrate to new package
format. Note that all files in debian/patches/* are canocalized to
*.patch.

Let me know if there is anything that needs adjusting or if it is ok
to upload this version in a NMU in case you are working on other
issues needing attention.

Thanks,
Jari

>From 0ea90649552cdfd990ed7b05f09bb5a819a7460d Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Wed, 11 Apr 2012 13:31:00 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <[email protected]>
---
 debian/changelog                                   |   11 +++
 debian/compat                                      |    2 +-
 debian/control                                     |    4 +-
 debian/micro-revision.i                            |    2 +-
 debian/patches/00list                              |    5 --
 .../patches/02_add_debian_files_in_manpage.dpatch  |   45 ------------
 .../patches/02_add_debian_files_in_manpage.patch   |   23 ++++++
 debian/patches/03_tor_manpage_in_section_8.dpatch  |   75 --------------------
 debian/patches/03_tor_manpage_in_section_8.patch   |   52 ++++++++++++++
 ...s.dpatch => 06_add_compile_time_defaults.patch} |   39 +++-------
 debian/patches/07_log_to_file_by_default.dpatch    |   44 ------------
 debian/patches/07_log_to_file_by_default.patch     |   25 +++++++
 debian/patches/14_fix_geoip_warning.dpatch         |   38 ----------
 debian/patches/14_fix_geoip_warning.patch          |   19 +++++
 debian/patches/series                              |    5 ++
 debian/rules                                       |   15 ++--
 debian/source/format                               |    1 +
 17 files changed, 159 insertions(+), 246 deletions(-)
 delete mode 100644 debian/patches/00list
 delete mode 100644 debian/patches/02_add_debian_files_in_manpage.dpatch
 create mode 100644 debian/patches/02_add_debian_files_in_manpage.patch
 delete mode 100644 debian/patches/03_tor_manpage_in_section_8.dpatch
 create mode 100644 debian/patches/03_tor_manpage_in_section_8.patch
 rename debian/patches/{06_add_compile_time_defaults.dpatch => 06_add_compile_time_defaults.patch} (72%)
 delete mode 100644 debian/patches/07_log_to_file_by_default.dpatch
 create mode 100644 debian/patches/07_log_to_file_by_default.patch
 delete mode 100644 debian/patches/14_fix_geoip_warning.dpatch
 create mode 100644 debian/patches/14_fix_geoip_warning.patch
 create mode 100644 debian/patches/series
 create mode 100644 debian/source/format

diff --git a/debian/changelog b/debian/changelog
index 2093885..4ea0a71 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+tor (0.2.2.35-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.1 and debhelper to 9.
+  * Add build-arch and build-indep targets; use dh_prep in rules file.
+  * Note: all patches were updated with "quilt refresh" to make
+    them apply cleanly.
+
+ -- Jari Aalto <[email protected]>  Wed, 11 Apr 2012 13:17:24 +0300
+
 tor (0.2.2.35-1) unstable; urgency=high
 
   * New upstream version, fixing a heap overflow bug related to Tor's
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 34eb1fd..753388d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,8 @@ Source: tor
 Section: net
 Priority: optional
 Maintainer: Peter Palfrader <[email protected]>
-Build-Depends: debhelper (>= 5), libssl-dev, dpatch, zlib1g-dev, libevent-dev (>= 1.1), binutils (>= 2.14.90.0.7), hardening-includes, asciidoc (>= 8.2), docbook-xml, docbook-xsl, xmlto
-Standards-Version: 3.8.1
+Build-Depends: debhelper (>= 9), libssl-dev, zlib1g-dev, libevent-dev (>= 1.1), binutils (>= 2.14.90.0.7), hardening-includes, asciidoc (>= 8.2), docbook-xml, docbook-xsl, xmlto
+Standards-Version: 3.9.3.1
 Homepage: https://www.torproject.org/
 Vcs-Git: git://git.torproject.org/debian/tor.git
 Vcs-Browser: https://gitweb.torproject.org/debian/tor.git
diff --git a/debian/micro-revision.i b/debian/micro-revision.i
index 312dca9..d0df4e0 100644
--- a/debian/micro-revision.i
+++ b/debian/micro-revision.i
@@ -1 +1 @@
-"73ff13ab3cc9570d"
+"61083116af2b01ab"
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 9260bb7..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,5 +0,0 @@
-# 02_add_debian_files_in_manpage.dpatch
-03_tor_manpage_in_section_8.dpatch
-06_add_compile_time_defaults.dpatch
-07_log_to_file_by_default.dpatch
-14_fix_geoip_warning
diff --git a/debian/patches/02_add_debian_files_in_manpage.dpatch b/debian/patches/02_add_debian_files_in_manpage.dpatch
deleted file mode 100644
index ac87f43..0000000
--- a/debian/patches/02_add_debian_files_in_manpage.dpatch
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh -e
-## 02_add_debian_files_in_manpage.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change the FILES section of the manpage to properly describe the situation on Debian systems.
-
-if [ $# -lt 1 ]; then
-    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
-    -patch) patch -p1 ${patch_opts} < $0;;
-    -unpatch) patch -R -p1 ${patch_opts} < $0;;
-    *)
-        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-        exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad tor-0.1.1.5/doc/tor.1.in /tmp/dpep.E9VjWB/tor-0.1.1.5/doc/tor.1.in
---- tor-0.1.1.12/doc/tor.1.in
-+++ /tmp/dpep.E9VjWB/tor-0.1.1.12/doc/tor.1.in
-@@ -700,9 +700,15 @@
- .TP
- .B @LOCALSTATEDIR@/lib/tor/
- The tor process stores keys and other data here.
-+.TP
-+.B /var/log/tor/
-+The tor server logs to this directory.
-+.TP
-+.B /var/run/tor/tor.pid
-+The PID of the tor (master) process is stored in this file.
- .LP
- .TP
--.B \fIDataDirectory\fP/approved-routers
-+.B /var/lib/tor/approved-routers
- Only for naming authoritative directory servers
- (see \fBNamingAuthoritativeDirectory\fP).
- This file lists nickname to identity bindings.  Each line lists a
diff --git a/debian/patches/02_add_debian_files_in_manpage.patch b/debian/patches/02_add_debian_files_in_manpage.patch
new file mode 100644
index 0000000..63a5881
--- /dev/null
+++ b/debian/patches/02_add_debian_files_in_manpage.patch
@@ -0,0 +1,23 @@
+From: Peter Palfrader <[email protected]>
+Subject: Change the FILES section of the manpage to properly describe the situation on Debian systems.
+
+diff -urNad tor-0.1.1.5/doc/tor.1.in /tmp/dpep.E9VjWB/tor-0.1.1.5/doc/tor.1.in
+--- tor-0.1.1.12/doc/tor.1.in
++++ /tmp/dpep.E9VjWB/tor-0.1.1.12/doc/tor.1.in
+@@ -700,9 +700,15 @@
+ .TP
+ .B @LOCALSTATEDIR@/lib/tor/
+ The tor process stores keys and other data here.
++.TP
++.B /var/log/tor/
++The tor server logs to this directory.
++.TP
++.B /var/run/tor/tor.pid
++The PID of the tor (master) process is stored in this file.
+ .LP
+ .TP
+-.B \fIDataDirectory\fP/approved-routers
++.B /var/lib/tor/approved-routers
+ Only for naming authoritative directory servers
+ (see \fBNamingAuthoritativeDirectory\fP).
+ This file lists nickname to identity bindings.  Each line lists a
diff --git a/debian/patches/03_tor_manpage_in_section_8.dpatch b/debian/patches/03_tor_manpage_in_section_8.dpatch
deleted file mode 100644
index 10bece6..0000000
--- a/debian/patches/03_tor_manpage_in_section_8.dpatch
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /bin/sh -e
-## 03_tor_manpage_in_section_8.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Move the Tor manpage from section 1 to section 8.
-
-if [ $# -lt 1 ]; then
-    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
-    -patch) patch -p1 ${patch_opts} < $0;;
-    -unpatch) patch -R -p1 ${patch_opts} < $0;;
-    *)
-        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-        exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -ur tor-0.2.2.9-alpha/doc/tor-gencert.1.txt tor-0.2.2.9-alpha.new/doc/tor-gencert.1.txt
---- tor-0.2.2.9-alpha/doc/tor-gencert.1.txt	2010-02-02 22:40:22.000000000 +0100
-+++ tor-0.2.2.9-alpha.new/doc/tor-gencert.1.txt	2010-02-27 13:47:29.655735605 +0100
-@@ -81,7 +81,7 @@
- 
- SEE ALSO
- --------
--**tor**(1) +
-+**tor**(8) +
- 
- See also the "dir-spec.txt" file, distributed with Tor.
- 
-diff -ur tor-0.2.2.9-alpha/doc/tor-resolve.1.txt tor-0.2.2.9-alpha.new/doc/tor-resolve.1.txt
---- tor-0.2.2.9-alpha/doc/tor-resolve.1.txt	2010-02-02 22:40:22.000000000 +0100
-+++ tor-0.2.2.9-alpha.new/doc/tor-resolve.1.txt	2010-02-27 13:47:37.643234209 +0100
-@@ -36,10 +36,10 @@
- 
- SEE ALSO
- --------
--**tor**(1), **torify**(1). +
-+**tor**(8), **torify**(1). +
- 
- See doc/socks-extensions.txt in the Tor package for protocol details.
- 
- AUTHORS
- -------
--Roger Dingledine <[email protected]>, Nick Mathewson <[email protected]>.
-+Roger Dingledine <[email protected]>, Nick Mathewson <[email protected]>.
-diff -ur tor-0.2.2.9-alpha/doc/tor.1.txt tor-0.2.2.9-alpha.new/doc/tor.1.txt
---- tor-0.2.2.9-alpha/doc/tor.1.txt	2010-02-22 22:22:33.000000000 +0100
-+++ tor-0.2.2.9-alpha.new/doc/tor.1.txt	2010-02-27 13:47:18.531233093 +0100
-@@ -2,7 +2,7 @@
- // See LICENSE for licensing information
- // This is an asciidoc file used to generate the manpage/html reference.
- // Learn asciidoc on http://www.methods.co.nz/asciidoc/userguide.html
--TOR(1)
-+TOR(8)
- ======
- 
- NAME
-diff -ur tor-0.2.2.9-alpha/doc/torify.1.txt tor-0.2.2.9-alpha.new/doc/torify.1.txt
---- tor-0.2.2.9-alpha/doc/torify.1.txt	2010-02-02 22:40:22.000000000 +0100
-+++ tor-0.2.2.9-alpha.new/doc/torify.1.txt	2010-02-27 13:47:52.619234342 +0100
-@@ -46,5 +46,5 @@
- 
- SEE ALSO
- --------
--**tor**(1), **tor-resolve**(1), **torsocks**(1), **tsocks**(1),
-+**tor**(8), **tor-resolve**(1), **torsocks**(1), **tsocks**(1),
- **tsocks.conf**(5).
diff --git a/debian/patches/03_tor_manpage_in_section_8.patch b/debian/patches/03_tor_manpage_in_section_8.patch
new file mode 100644
index 0000000..cae2e73
--- /dev/null
+++ b/debian/patches/03_tor_manpage_in_section_8.patch
@@ -0,0 +1,52 @@
+From: Peter Palfrader <[email protected]>
+Subject: Move the Tor manpage from section 1 to section 8.
+
+---
+ doc/tor-gencert.1.txt |    2 +-
+ doc/tor-resolve.1.txt |    2 +-
+ doc/tor.1.txt         |    2 +-
+ doc/torify.1.txt      |    2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/doc/tor-gencert.1.txt
++++ b/doc/tor-gencert.1.txt
+@@ -81,7 +81,7 @@
+ 
+ SEE ALSO
+ --------
+-**tor**(1) +
++**tor**(8) +
+ 
+ See also the "dir-spec.txt" file, distributed with Tor.
+ 
+--- a/doc/tor-resolve.1.txt
++++ b/doc/tor-resolve.1.txt
+@@ -40,7 +40,7 @@
+ 
+ SEE ALSO
+ --------
+-**tor**(1), **torify**(1). +
++**tor**(8), **torify**(1). +
+ 
+ See doc/socks-extensions.txt in the Tor package for protocol details.
+ 
+--- a/doc/tor.1.txt
++++ b/doc/tor.1.txt
+@@ -2,7 +2,7 @@
+ // See LICENSE for licensing information
+ // This is an asciidoc file used to generate the manpage/html reference.
+ // Learn asciidoc on http://www.methods.co.nz/asciidoc/userguide.html
+-TOR(1)
++TOR(8)
+ ======
+ 
+ NAME
+--- a/doc/torify.1.txt
++++ b/doc/torify.1.txt
+@@ -46,5 +46,5 @@
+ 
+ SEE ALSO
+ --------
+-**tor**(1), **tor-resolve**(1), **torsocks**(1), **tsocks**(1),
++**tor**(8), **tor-resolve**(1), **torsocks**(1), **tsocks**(1),
+ **tsocks.conf**(5).
diff --git a/debian/patches/06_add_compile_time_defaults.dpatch b/debian/patches/06_add_compile_time_defaults.patch
similarity index 72%
rename from debian/patches/06_add_compile_time_defaults.dpatch
rename to debian/patches/06_add_compile_time_defaults.patch
index aab5da6..91c3325 100644
--- a/debian/patches/06_add_compile_time_defaults.dpatch
+++ b/debian/patches/06_add_compile_time_defaults.patch
@@ -1,31 +1,12 @@
-#! /bin/sh -e
-## 06_add_compile_time_defaults.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change a few compile time defaults so that Tor is better integrated on a Debian system
+From: Peter Palfrader <[email protected]>
+Subject: Change a few compile time defaults so that Tor is better integrated on a Debian system
 
-if [ $# -lt 1 ]; then
-    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-    exit 1
-fi
+---
+ src/or/config.c |   87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 87 insertions(+)
 
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
-    -patch) patch -p1 ${patch_opts} < $0;;
-    -unpatch) patch -R -p1 ${patch_opts} < $0;;
-    *)
-        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-        exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' tor~/src/or/config.c tor/src/or/config.c
---- tor~/src/or/config.c	2011-06-17 22:11:35.000000000 +0200
-+++ tor/src/or/config.c	2011-06-17 22:31:19.510811846 +0200
+--- a/src/or/config.c
++++ b/src/or/config.c
 @@ -12,6 +12,7 @@
  #define CONFIG_PRIVATE
  
@@ -34,7 +15,7 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  #include "circuitbuild.h"
  #include "circuitlist.h"
  #include "config.h"
-@@ -577,6 +578,9 @@
+@@ -582,6 +583,9 @@
  static void init_libevent(void);
  static int opt_streq(const char *s1, const char *s2);
  
@@ -44,7 +25,7 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
  /** Magic value for or_options_t. */
  #define OR_OPTIONS_MAGIC 9090909
  
-@@ -4086,6 +4090,9 @@
+@@ -4103,6 +4107,9 @@
    char *command_arg = NULL;
    char *errmsg=NULL;
  
@@ -54,7 +35,7 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch'
    if (argv) { /* first time we're called. save command line args */
      backup_argv = argv;
      backup_argc = argc;
-@@ -5332,3 +5339,83 @@
+@@ -5349,3 +5356,83 @@
    return 0;
  }
  
diff --git a/debian/patches/07_log_to_file_by_default.dpatch b/debian/patches/07_log_to_file_by_default.dpatch
deleted file mode 100644
index 225171d..0000000
--- a/debian/patches/07_log_to_file_by_default.dpatch
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh -e
-## 07_log_to_file_by_default.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change default logging target from stdout to a logfile
-
-if [ $# -lt 1 ]; then
-    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
-    -patch) patch -p1 ${patch_opts} < $0;;
-    -unpatch) patch -R -p1 ${patch_opts} < $0;;
-    *)
-        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-        exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad tor~/src/or/config.c tor/src/or/config.c
---- tor~/src/or/config.c	2006-07-24 05:15:02.576170550 +0200
-+++ tor/src/or/config.c	2006-07-24 05:18:45.286651501 +0200
-@@ -2118,8 +2118,13 @@
-     REJECT("Failed to normalize old Log options. See logs for details.");
- 
-   /* Special case on first boot if no Log options are given. */
--  if (!options->Logs && !options->RunAsDaemon && !from_setconf)
--    config_line_append(&options->Logs, "Log", "notice stdout");
-+  if (debian_running_as_debiantor()) {
-+    if (!options->Logs && !from_setconf)
-+      config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
-+  } else {
-+    if (!options->Logs && !options->RunAsDaemon && !from_setconf)
-+      config_line_append(&options->Logs, "Log", "notice stdout");
-+  }
- 
-   if (options_init_logs(options, 1)<0) /* Validate the log(s) */
-     REJECT("Failed to validate Log options. See logs for details.");
diff --git a/debian/patches/07_log_to_file_by_default.patch b/debian/patches/07_log_to_file_by_default.patch
new file mode 100644
index 0000000..a78f10c
--- /dev/null
+++ b/debian/patches/07_log_to_file_by_default.patch
@@ -0,0 +1,25 @@
+From: Peter Palfrader <[email protected]>
+Subject: Change default logging target from stdout to a logfile
+
+---
+ src/or/config.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/src/or/config.c
++++ b/src/or/config.c
+@@ -3034,8 +3034,13 @@
+         "misconfigured or something else goes wrong.");
+ 
+   /* Special case on first boot if no Log options are given. */
+-  if (!options->Logs && !options->RunAsDaemon && !from_setconf)
+-    config_line_append(&options->Logs, "Log", "notice stdout");
++  if (debian_running_as_debiantor()) {
++    if (!options->Logs && !from_setconf)
++      config_line_append(&options->Logs, "Log", "notice file /var/log/tor/log");
++  } else {
++    if (!options->Logs && !options->RunAsDaemon && !from_setconf)
++      config_line_append(&options->Logs, "Log", "notice stdout");
++  }
+ 
+   if (options_init_logs(options, 1)<0) /* Validate the log(s) */
+     REJECT("Failed to validate Log options. See logs for details.");
diff --git a/debian/patches/14_fix_geoip_warning.dpatch b/debian/patches/14_fix_geoip_warning.dpatch
deleted file mode 100644
index 09737d7..0000000
--- a/debian/patches/14_fix_geoip_warning.dpatch
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh -e
-## 14_fix_geoip_warning.dpatch by  <[email protected]>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change geoipdb open failed message
-
-if [ $# -lt 1 ]; then
-    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
-    -patch) patch -p1 ${patch_opts} < $0;;
-    -unpatch) patch -R -p1 ${patch_opts} < $0;;
-    *)
-        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
-        exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad git-stable~/src/or/geoip.c git-stable/src/or/geoip.c
---- git-stable~/src/or/geoip.c	2008-06-06 01:00:41.000000000 +0200
-+++ git-stable/src/or/geoip.c	2008-06-11 12:54:17.605150644 +0200
-@@ -182,7 +182,8 @@
-   int severity = options_need_geoip_info(options, &msg) ? LOG_WARN : LOG_INFO;
-   clear_geoip_db();
-   if (!(f = fopen(filename, "r"))) {
--    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.  %s",
-+    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s"
-+           " Do you have the tor-geoipdb package installed?",
-            filename, msg);
-     return -1;
-   }
diff --git a/debian/patches/14_fix_geoip_warning.patch b/debian/patches/14_fix_geoip_warning.patch
new file mode 100644
index 0000000..d404c53
--- /dev/null
+++ b/debian/patches/14_fix_geoip_warning.patch
@@ -0,0 +1,19 @@
+From: Peter Palfrader <[email protected]>
+Subject: Change geoipdb open failed message
+
+---
+ src/or/geoip.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/or/geoip.c
++++ b/src/or/geoip.c
+@@ -203,7 +203,8 @@
+   int severity = options_need_geoip_info(options, &msg) ? LOG_WARN : LOG_INFO;
+   clear_geoip_db();
+   if (!(f = fopen(filename, "r"))) {
+-    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.  %s",
++    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s"
++           " Do you have the tor-geoipdb package installed?",
+            filename, msg);
+     return -1;
+   }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8217e73
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+# 02_add_debian_files_in_manpage.patch
+03_tor_manpage_in_section_8.patch
+06_add_compile_time_defaults.patch
+07_log_to_file_by_default.patch
+14_fix_geoip_warning.patch
diff --git a/debian/rules b/debian/rules
index e9acb1e..94e88a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,6 @@
 #export DH_VERBOSE=1
 
 export PACKAGE=tor
-include /usr/share/dpatch/dpatch.make
 
 # enable hardning options
 include /usr/share/hardening-includes/hardening.make
@@ -71,7 +70,7 @@ export CFLAGS
 
 MANPAGE_INS=doc/tor.1.in doc/torify.1.in doc/tor-gencert.1.in doc/tor-resolve.1.in
 
-configure: patch-stamp
+configure:
 config.status: configure
 	dh_testdir
 	./configure \
@@ -83,12 +82,16 @@ config.status: configure
 		--sysconfdir=/etc
 
 
+
+build-arch: build
+build-indep: build
+
 build: build-stamp
 
 
 # create the manpages here because the build-system shipped in the tarball is
 # incomplete.  moving foo.8 to foo.1.in is intended.
-doc/%.1.in: doc/%.1.txt patch-stamp
+doc/%.1.in: doc/%.1.txt
 	target="$@"; base="$${target%%.1.in}"; \
 		a2x -f manpage "$$base".1.txt && \
 		if [ -e "$$base".1 ]; then mv "$$base".1 "$$base".1.in; \
@@ -114,7 +117,7 @@ build-stamp:  config.status $(MANPAGE_INS)
 	@echo
 	touch build-stamp
 
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
@@ -129,7 +132,7 @@ clean: unpatch
 		echo "\"`git rev-parse --short=16 HEAD`\"" > "debian/micro-revision.i" ; \
 	fi
 
-	# these get autobuilt from the .txt files, some of which we also patch
+	# these get autobuilt from the .txt files, some of which we also
 	rm -f $(MANPAGE_INS)
 
 	dh_clean
@@ -137,7 +140,7 @@ clean: unpatch
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/tor
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.9.5

Reply via email to