14_fix_geoip_warning.dpatch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh -e
  2. ## 14_fix_geoip_warning.dpatch by <weasel@debian.org>
  3. ##
  4. ## All lines beginning with `## DP:' are a description of the patch.
  5. ## DP: Change geoipdb open failed message
  6. if [ $# -lt 1 ]; then
  7. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  8. exit 1
  9. fi
  10. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  11. patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
  12. case "$1" in
  13. -patch) patch -p1 ${patch_opts} < $0;;
  14. -unpatch) patch -R -p1 ${patch_opts} < $0;;
  15. *)
  16. echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
  17. exit 1;;
  18. esac
  19. exit 0
  20. @DPATCH@
  21. diff -urNad git-stable~/src/or/geoip.c git-stable/src/or/geoip.c
  22. --- git-stable~/src/or/geoip.c 2008-06-06 01:00:41.000000000 +0200
  23. +++ git-stable/src/or/geoip.c 2008-06-11 12:54:17.605150644 +0200
  24. @@ -182,7 +182,8 @@
  25. int severity = options_need_geoip_info(options, &msg) ? LOG_WARN : LOG_INFO;
  26. clear_geoip_db();
  27. if (!(f = fopen(filename, "r"))) {
  28. - log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s",
  29. + log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. %s"
  30. + " Do you have the tor-geoipdb package installed?",
  31. filename, msg);
  32. return -1;
  33. }