diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-08-04 12:21:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-08-04 12:21:48 -0400 |
commit | e7d2a9b6c4407217780be3a0d0cbb29fd3812cf5 (patch) | |
tree | 437fdab02dd55d51d1bb397f48c69ec1918dc974 /debian/patches | |
parent | f206209abfc1f98bbbd0be5b6e36fdec6709953d (diff) | |
download | tor-e7d2a9b6c4407217780be3a0d0cbb29fd3812cf5.tar.gz tor-e7d2a9b6c4407217780be3a0d0cbb29fd3812cf5.zip |
Remove the debian directory from the main git repository
Once upon a time it made sense to keep all the Debian files in the
main Tor distribution, since repeatedly merging them back in was hard.
Now that we're on git, that's no longer so.
Peter's debian repository at debian/tor.git on our git server has the
most recent version of the tor-on-debian packaging stuff, and the versions
in our own repository have gotten out of date.
Resolves bug #1735.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/00list | 5 | ||||
-rwxr-xr-x | debian/patches/02_add_debian_files_in_manpage.dpatch | 45 | ||||
-rwxr-xr-x | debian/patches/03_tor_manpage_in_section_8.dpatch | 45 | ||||
-rwxr-xr-x | debian/patches/06_add_compile_time_defaults.dpatch | 118 | ||||
-rwxr-xr-x | debian/patches/07_log_to_file_by_default.dpatch | 44 | ||||
-rwxr-xr-x | debian/patches/14_fix_geoip_warning.dpatch | 38 |
6 files changed, 0 insertions, 295 deletions
diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 9260bb7ed5..0000000000 --- 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 100755 index ac87f43821..0000000000 --- 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 <weasel@debian.org> -## -## 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/03_tor_manpage_in_section_8.dpatch b/debian/patches/03_tor_manpage_in_section_8.dpatch deleted file mode 100755 index 28bbf957c0..0000000000 --- a/debian/patches/03_tor_manpage_in_section_8.dpatch +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh -e -## 03_tor_manpage_in_section_8.dpatch by <weasel@debian.org> -## -## 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 -urNad tor-0.1.1.5/contrib/torify.1 /tmp/dpep.fOA3Mm/tor-0.1.1.5/contrib/torify.1 ---- tor-0.1.1.5/contrib/torify.1 -+++ /tmp/dpep.fOA3Mm/tor-0.1.1.5/contrib/torify.1 -@@ -18,6 +18,6 @@ - to suid binaries. - - .SH SEE ALSO --.BR tor (1), -+.BR tor (8), - .BR tor-resolve (1), - .BR tsocks (1), -diff -urNad tor-0.1.1.5/doc/tor.1.in /tmp/dpep.fOA3Mm/tor-0.1.1.5/doc/tor.1.in ---- tor-0.1.1.5/doc/tor.1.in -+++ /tmp/dpep.fOA3Mm/tor-0.1.1.5/doc/tor.1.in -@@ -1,4 +1,4 @@ --.TH TOR 1 "January 2009" "TOR" -+.TH TOR 8 "January 2009" "TOR" - .SH NAME - tor \- The second-generation onion router - .SH SYNOPSIS diff --git a/debian/patches/06_add_compile_time_defaults.dpatch b/debian/patches/06_add_compile_time_defaults.dpatch deleted file mode 100755 index a2472d1db8..0000000000 --- a/debian/patches/06_add_compile_time_defaults.dpatch +++ /dev/null @@ -1,118 +0,0 @@ -#! /bin/sh -e -## 06_add_compile_time_defaults.dpatch by <weasel@debian.org> -## -## 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 - -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-trunk~/src/or/config.c tor-trunk/src/or/config.c ---- tor-trunk~/src/or/config.c 2009-01-18 01:47:33.000000000 +0100 -+++ tor-trunk/src/or/config.c 2009-02-05 00:25:17.614844812 +0100 -@@ -12,6 +12,7 @@ - #define CONFIG_PRIVATE - - #include "or.h" -+#include <pwd.h> - #ifdef MS_WINDOWS - #include <shlobj.h> - #endif -@@ -711,6 +712,8 @@ - #if defined(HAVE_EVENT_GET_VERSION) && defined(HAVE_EVENT_GET_METHOD) - static void check_libevent_version(const char *m, int server); - #endif -+static int debian_running_as_debiantor(); -+static int debian_config_fix_defaults(); - - /** Magic value for or_options_t. */ - #define OR_OPTIONS_MAGIC 9090909 -@@ -3917,6 +3920,9 @@ - char *command_arg = NULL; - char *errmsg=NULL; - -+ if (debian_config_fix_defaults() < 0) -+ goto err; -+ - if (argv) { /* first time we're called. save command line args */ - backup_argv = argv; - backup_argc = argc; -@@ -5307,3 +5313,62 @@ - return 0; - } - -+/* Checks whether we are running as the debian-tor user. -+ * Returns -1 on error, 2 if we are root, 1 if we are debian-tor, 0 if we are any normal user */ -+static int -+debian_running_as_debiantor() -+{ -+ struct passwd *pw = NULL; -+ int uid; -+ -+ uid = getuid(); -+ /* If we run as root we also apply our debian defaults. */ -+ if (uid == 0) -+ return 2; -+ -+ pw = getpwuid(uid); -+ if (!pw) { -+ log(LOG_WARN, LD_GENERAL, "Could not get passwd information for uid %d.", uid); -+ return -1; -+ } -+ assert(pw->pw_name); -+ if (strcmp(pw->pw_name, "debian-tor") == 0) -+ return 1; -+ else -+ return 0; -+} -+ -+static int -+debian_config_fix_defaults() -+{ -+ config_var_t *var; -+ static int fixed = 0; -+ int running_as_debian; -+ -+ if (fixed) return 0; -+ fixed = 1; -+ -+ running_as_debian = debian_running_as_debiantor(); -+ if (running_as_debian < 0) return -1; -+ if (!running_as_debian) return 0; -+ -+ var = config_find_option(&options_format, "DataDirectory"); -+ tor_assert(var); -+ var->initvalue = tor_strdup("/var/lib/tor"); -+ -+ var = config_find_option(&options_format, "PidFile"); -+ tor_assert(var); -+ var->initvalue = tor_strdup("/var/run/tor/tor.pid"); -+ -+ var = config_find_option(&options_format, "RunAsDaemon"); -+ tor_assert(var); -+ var->initvalue = tor_strdup("1"); -+ -+ if (running_as_debian == 2) { -+ var = config_find_option(&options_format, "User"); -+ tor_assert(var); -+ var->initvalue = tor_strdup("debian-tor"); -+ }; -+ -+ 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 100755 index 225171d0b5..0000000000 --- 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 <weasel@debian.org> -## -## 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/14_fix_geoip_warning.dpatch b/debian/patches/14_fix_geoip_warning.dpatch deleted file mode 100755 index 09737d7a61..0000000000 --- a/debian/patches/14_fix_geoip_warning.dpatch +++ /dev/null @@ -1,38 +0,0 @@ -#! /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 -@@ -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; - } |