aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/14_fix_geoip_warning.dpatch
blob: 49adeac6b5d9b366a4a7ef89efb34c2db10a6254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/sh -e
## 14_fix_geoip_warning.dpatch by  <weasel@debian.org>
##
## 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
@@ -147,7 +147,7 @@
   int severity = should_record_bridge_info(options) ? LOG_WARN : LOG_INFO;
   clear_geoip_db();
   if (!(f = fopen(filename, "r"))) {
-    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.", filename);
+    log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s.  Do you have the tor-geoipdb package installed?", filename);
     return -1;
   }
   geoip_countries = smartlist_create();