* 27_remove_nsl.dpatch: Remove unnecessary linking against libnsl.
authorRoland Rosenfeld <roland@spinnaker.de>
Sat, 14 Oct 2006 11:16:11 +0000 (11:16 +0000)
committerRoland Rosenfeld <roland@spinnaker.de>
Sat, 14 Oct 2006 11:16:11 +0000 (11:16 +0000)
* 28_usermanual_slash.dpatch: Redirect http://p.p/user-manual (without
  trailing slash) to http://p.p/user-manual/ (with trailing slash),
  otherwise the links will be broken (Closes: #244931).

debian/patches/00list
debian/patches/27_remove_nsl.dpatch [new file with mode: 0755]
debian/patches/28_usermanual_slash.dpatch [new file with mode: 0755]

index 279fcdb..78ccd89 100644 (file)
@@ -14,3 +14,5 @@
 24_global_action.dpatch
 25_standard_medium.dpatch
 26_edit_only_writable.dpatch
 24_global_action.dpatch
 25_standard_medium.dpatch
 26_edit_only_writable.dpatch
+27_remove_nsl.dpatch
+28_usermanual_slash.dpatch
diff --git a/debian/patches/27_remove_nsl.dpatch b/debian/patches/27_remove_nsl.dpatch
new file mode 100755 (executable)
index 0000000..4fc10dc
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 27_remove_nsl.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove unnecessary linking against libnsl.
+
+@DPATCH@
+diff -urNad privoxy~/configure.in privoxy/configure.in
+--- privoxy~/configure.in
++++ privoxy/configure.in
+@@ -869,7 +869,7 @@
+ dnl =================================================================
+ dnl Next line needed to find the gethost*_r functions on Solaris
+-AC_CHECK_LIB(nsl, gethostbyname)
++dnl AC_CHECK_LIB(nsl, gethostbyname)
+ AC_CHECK_FUNC(gethostbyaddr_r, [
+   AC_MSG_CHECKING([signature of gethostbyaddr_r])
diff --git a/debian/patches/28_usermanual_slash.dpatch b/debian/patches/28_usermanual_slash.dpatch
new file mode 100755 (executable)
index 0000000..20a64e9
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 28_usermanual_slash.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Redirect http://p.p/user-manual (without trailing slash) to 
+## DP: http://p.p/user-manual/ (with trailing slash), otherwise the links
+## DP: will be broken (#244931).
+
+@DPATCH@
+diff -urNad privoxy~/cgisimple.c privoxy/cgisimple.c
+--- privoxy~/cgisimple.c
++++ privoxy/cgisimple.c
+@@ -716,6 +716,11 @@
+    assert(rsp);
+    assert(parameters);
++   if (!parameters->first) {
++      /* requested http://p.p/user-manual (without trailing slash) */
++      return cgi_redirect(rsp, CGI_PREFIX "user-manual/");
++   }
++
+    get_string_param(parameters, "file", &filename);
+    /* Check paramter for hack attempts */
+    if (filename && strchr(filename, '/'))