14_fix_geoip_warning.dpatch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. @@ -147,7 +147,7 @@
  25. int severity = should_record_bridge_info(options) ? 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.", filename);
  29. + log_fn(severity, LD_GENERAL, "Failed to open GEOIP file %s. Do you have the tor-geoipdb package installed?", filename);
  30. return -1;
  31. }
  32. geoip_countries = smartlist_create();