[svn-inject] Applying Debian modifications to trunk 2.4.3-2
authorEmmanuel Lacour <elacour@home-dn.net>
Sat, 13 Oct 2007 14:27:23 +0000 (14:27 +0000)
committerEmmanuel Lacour <elacour@home-dn.net>
Sat, 13 Oct 2007 14:27:23 +0000 (14:27 +0000)
14 files changed:
config.html
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/conf/proxy_html.load [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/install [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/prerm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
guide.html
mod_proxy_html.c

index 1317a3e..fbbfedd 100644 (file)
@@ -143,12 +143,4 @@ size and avoid the need to resize the buffer dynamically during a request.
 </dd>
 </dl>
 </div>
-<div id="navbar"><a class="internal" href="./" title="Up">Up</a>
-*
-<a class="internal" href="/" title="WebThing Apache Centre">Home</a>
-*
-<a class="internal" href="/contact.html" title="Contact WebThing">Contact</a>
-*
-<a class="external" href="http://www.webthing.com/" title="WebThing Ltd">Web&#222;ing</a>
-*
-<a class="external" href="http://www.apache.org/" title="Apache Software Foundation">Apache</a></div></body></html>
+</body></html>
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..58f63a0
--- /dev/null
@@ -0,0 +1,19 @@
+mod-proxy-html (2.4.3-2) unstable; urgency=low
+
+  * mod_proxy_html.c: use new apache regex definitions, closes: #297912
+
+ -- Emmanuel Lacour <elacour@home-dn.net>  Wed, 23 Mar 2005 13:00:22 +0000
+
+mod-proxy-html (2.4.3-1) unstable; urgency=medium
+
+  * debian/conf/proxy_html.load: fix libxml2 filename, closes: #283272
+  * New upstream release
+
+ -- Emmanuel Lacour <elacour@home-dn.net>  Mon, 29 Nov 2004 09:11:20 +0100
+
+mod-proxy-html (2.4.1-1) unstable; urgency=low
+
+  * Initial Release, closes: #278006
+
+ -- Emmanuel Lacour <elacour@home-dn.net>  Sun, 24 Oct 2004 06:17:25 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/debian/conf/proxy_html.load b/debian/conf/proxy_html.load
new file mode 100644 (file)
index 0000000..b4699c8
--- /dev/null
@@ -0,0 +1,2 @@
+LoadFile /usr/lib/libxml2.so.2
+LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..bfc9f40
--- /dev/null
@@ -0,0 +1,15 @@
+Source: mod-proxy-html
+Section: web
+Priority: optional
+Maintainer: Emmanuel Lacour <elacour@home-dn.net>
+Build-Depends: debhelper (>= 4.0.0), apache2-prefork-dev (>> 2.0.53), libxml2-dev (>> 2.5.10)
+Standards-Version: 3.6.1
+
+Package: libapache2-mod-proxy-html
+Architecture: any
+Depends: ${shlibs:Depends}, apache2, libxml2 (>> 2.5.10)
+Description: Apache2 filter module for HTML links rewriting
+ mod_proxy_html is an output filter to rewrite HTML links in a proxy
+ situation, to ensure that links work for users outside the proxy. It
+ serves the same purpose as Apache's ProxyPassReverse directive does for
+ HTTP headers, and is an essential component of a reverse proxy.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..a9b5dab
--- /dev/null
@@ -0,0 +1,26 @@
+This package was debianized by Emmanuel Lacour <elacour@home-dn.net> on
+Sun, 24 Oct 2004 06:17:25 +0200.
+
+It was downloaded from http://apache.webthing.com/mod_proxy_html/
+
+Upstream Author: Nick Kew <nick@webthing.com>
+
+Copyright (c) 2003-4, WebThing Ltd
+
+License:
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+see /usr/share/common-licenses/GPL for all details.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..59d28be
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/lib/apache2/modules
+/etc/apache2/mods-available
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..3a0c4da
--- /dev/null
@@ -0,0 +1,2 @@
+config.html
+guide.html
diff --git a/debian/install b/debian/install
new file mode 100644 (file)
index 0000000..1ef61ee
--- /dev/null
@@ -0,0 +1,2 @@
+debian/conf/proxy_html.load /etc/apache2/mods-available/
+.libs/mod_proxy_html.so /usr/lib/apache2/modules/
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..ccc14b4
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh
+# postinst script for libapache2-mod-proxy-html
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+reload_apache()
+{
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+       echo "Your apache2 configuration is broken, so we're not restarting it for you."
+    fi
+}
+
+
+case "$1" in
+    configure)
+        # Reload the module on upgrade if enabled
+        if [ -n "$2" ]; then
+           if [ -e /etc/apache2/mods-enabled/proxy_html.load ]; then
+               reload_apache
+           fi
+        else 
+           # Enable the module
+           if [ -e /etc/apache2/apache2.conf ]; then
+               a2enmod proxy_html >/dev/null || true
+               reload_apache
+           fi
+       fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/prerm b/debian/prerm
new file mode 100644 (file)
index 0000000..f6fbbc6
--- /dev/null
@@ -0,0 +1,51 @@
+#! /bin/sh
+# prerm script for libapache2-mod-proxy-html
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+reload_apache()
+{
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+        echo "Your apache2 configuration is broken, so we're not restarting it for you."
+    fi
+}
+
+
+case "$1" in
+    remove)
+               if [ -e /etc/apache2/mods-enabled/proxy_html.load ]; then
+                   a2dismod proxy_html >/dev/null || true
+                   reload_apache
+               fi
+        ;;
+    upgrade|failed-upgrade|deconfigure)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..6d0655a
--- /dev/null
@@ -0,0 +1,50 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+
+build-stamp:
+       dh_testdir
+       apxs2 -c -I/usr/include/libxml2 mod_proxy_html.c
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp mod_proxy_html.la  mod_proxy_html.lo  mod_proxy_html.o  mod_proxy_html.slo
+       rm -rf .libs
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+       dh_install
+
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-arch
+.PHONY: build clean binary-arch binary install
index 50ffee8..7e7fd69 100644 (file)
@@ -191,12 +191,4 @@ and after, and possibly in the middle of, a page.  To work around this, set the
 <code>force-response-1.0</code> environment variable in httpd.conf.
 For example,<br /><code>BrowserMatch MSIE force-response-1.0</code></p>
 </div>
-<div id="navbar"><a class="internal" href="./" title="Up">Up</a>
-*
-<a class="internal" href="/" title="WebThing Apache Centre">Home</a>
-*
-<a class="internal" href="/contact.html" title="Contact WebThing">Contact</a>
-*
-<a class="external" href="http://www.webthing.com/" title="WebThing Ltd">Web&#222;ing</a>
-*
-<a class="external" href="http://www.apache.org/" title="Apache Software Foundation">Apache</a></div></body></html>
+</body></html>
index dfdbf60..0215cb2 100644 (file)
@@ -88,7 +88,7 @@ typedef struct urlmap {
   unsigned int flags ;
   union {
     const char* c ;
-    regex_t* r ;
+    ap_regex_t* r ;
   } from ;
   const char* to ;
 } urlmap ;
@@ -208,7 +208,7 @@ static void dump_content(saxctxt* ctx) {
   size_t match ;
   char c = 0 ;
   int nmatch ;
-  regmatch_t pmatch[10] ;
+  ap_regmatch_t pmatch[10] ;
   char* subs ;
   size_t len, offs ;
 #ifndef GO_FASTER
@@ -323,7 +323,7 @@ static void pstartElement(void* ctxt, const xmlChar* name,
   char* found ;
   saxctxt* ctx = (saxctxt*) ctxt ;
   size_t nmatch ;
-  regmatch_t pmatch[10] ;
+  ap_regmatch_t pmatch[10] ;
 #ifndef GO_FASTER
   int verbose = ctx->cfg->verbose ;
 #endif
@@ -580,18 +580,18 @@ static htmlSAXHandlerPtr setupSAX(apr_pool_t* pool) {
   return sax ;
 }
 
-static regex_t* seek_meta_ctype ;
-static regex_t* seek_charset ;
-static regex_t* seek_meta ;
+static ap_regex_t* seek_meta_ctype ;
+static ap_regex_t* seek_charset ;
+static ap_regex_t* seek_meta ;
 
 static void proxy_html_child_init(apr_pool_t* pool, server_rec* s) {
   seek_meta_ctype = ap_pregcomp(pool,
        "(<meta[^>]*http-equiv[ \t\r\n='\"]*content-type[^>]*>)",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
   seek_charset = ap_pregcomp(pool, "charset=([A-Za-z0-9_-]+)",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
   seek_meta = ap_pregcomp(pool, "<meta[^>]*(http-equiv)[^>]*>",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
 }
 
 static xmlCharEncoding sniff_encoding(request_rec* r, const char* cbuf, size_t bytes
@@ -603,7 +603,7 @@ static xmlCharEncoding sniff_encoding(request_rec* r, const char* cbuf, size_t b
   char* encoding = NULL ;
   char* p ;
   char* q ;
-  regmatch_t match[2] ;
+  ap_regmatch_t match[2] ;
   unsigned char* buf = (unsigned char*)cbuf ;
 
   VERBOSE( ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
@@ -673,7 +673,7 @@ static meta* metafix(request_rec* r, const char* buf /*, size_t bytes*/
   const char* q ;
   char* header ;
   char* content ;
-  regmatch_t pmatch[2] ;
+  ap_regmatch_t pmatch[2] ;
   char delim ;
 
   while ( ! ap_regexec(seek_meta, buf+offs, 2, pmatch, 0) ) {
@@ -942,10 +942,10 @@ static const char* set_urlmap(cmd_parms* cmd, void* CFG,
     newmap->to = apr_pstrdup(cmd->pool, to) ;
   } else {
     regflags
-       = REGFLAG(REG_EXTENDED,flags,'x')
-       | REGFLAG(REG_ICASE,flags,'i')
-       | REGFLAG(REG_NOSUB,flags,'n')
-       | REGFLAG(REG_NEWLINE,flags,'s')
+       = REGFLAG(AP_REG_EXTENDED,flags,'x')
+       | REGFLAG(AP_REG_ICASE,flags,'i')
+       | REGFLAG(AP_REG_NOSUB,flags,'n')
+       | REGFLAG(AP_REG_NEWLINE,flags,'s')
     ;
     newmap->from.r = ap_pregcomp(cmd->pool, from, regflags) ;
     newmap->to = apr_pstrdup(cmd->pool, to) ;