diff -Nru libapache2-mod-rpaf-0.6/debian/README.Debian libapache2-mod-rpaf-0.6/debian/README.Debian --- libapache2-mod-rpaf-0.6/debian/README.Debian 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/README.Debian 2014-01-24 06:24:49.000000000 +0000 @@ -1,8 +1,31 @@ libapache2-mod-rpaf for Debian ------------------------------ -The mod_remoteip, available in the Apache 2.4 (not included in the -Debian Wheezy) can be used for the same purpose: +The mod_remoteip, available in the Apache 2.4 (Debian Jessie) +can be used for the same purpose: http://httpd.apache.org/docs/2.4/mod/mod_remoteip.html -This module should be considered as deprecated after Wheezy+. +This module should be considered as deprecated after Jessie. + + +Transition to the remoteip module +--------------------------------- + +The following configuraion snippet for mod_remoteip match the +default mod_rpaf's configuration: +-->8-- + + RemoteIPInternalProxy 127.0.0.1 ::1 + RemoteIPHeader X-Forwarded-For +# RemoteIPHeader X-Real-IP + +-->8-- + +You should add this (along with local customisations) to the +/etc/apache2/mods-available/mod_remoteip.conf file, then do: + + a2enmod remoteip + a2dismod rpaf + service apache2 restart + +At this point you could remove the libapache2-mod-rpaf package. diff -Nru libapache2-mod-rpaf-0.6/debian/changelog libapache2-mod-rpaf-0.6/debian/changelog --- libapache2-mod-rpaf-0.6/debian/changelog 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/changelog 2014-01-24 06:24:49.000000000 +0000 @@ -1,3 +1,14 @@ +libapache2-mod-rpaf (0.6-12) unstable; urgency=low + + * Add transition notes + * Fix lintian error: vcs-field-not-canonical + * Bump up Standards-Version (to 3.9.5) + * Add --no-silent to LTFLAGS + * Restore 030_ipv6.patch, removed by QA upload in 0.6-1 (Closes: #726529) + * Refresh patches + + -- Sergey B Kirpichev Fri, 24 Jan 2014 10:24:27 +0400 + libapache2-mod-rpaf (0.6-11) unstable; urgency=low * Repackage from experimental to sid (Closes: #709463) diff -Nru libapache2-mod-rpaf-0.6/debian/control libapache2-mod-rpaf-0.6/debian/control --- libapache2-mod-rpaf-0.6/debian/control 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/control 2014-01-24 06:24:49.000000000 +0000 @@ -2,10 +2,10 @@ Maintainer: Sergey B Kirpichev Section: httpd Priority: extra -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Build-Depends: debhelper (>= 9), dh-apache2, apache2-dev (>= 2.4.2-1~) -Vcs-Git: git://git.debian.org/git/collab-maint/libapache2-mod-rpaf.git -Vcs-Browser: http://git.debian.org/?p=collab-maint/libapache2-mod-rpaf.git;a=summary +Vcs-Git: git://anonscm.debian.org/collab-maint/libapache2-mod-rpaf.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/libapache2-mod-rpaf.git;a=summary Homepage: http://stderr.net/apache/rpaf/ Package: libapache2-mod-rpaf diff -Nru libapache2-mod-rpaf-0.6/debian/patches/010_multiple_proxies.patch libapache2-mod-rpaf-0.6/debian/patches/010_multiple_proxies.patch --- libapache2-mod-rpaf-0.6/debian/patches/010_multiple_proxies.patch 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/patches/010_multiple_proxies.patch 2014-01-24 06:24:49.000000000 +0000 @@ -9,7 +9,7 @@ --- a/mod_rpaf-2.0.c +++ b/mod_rpaf-2.0.c -@@ -152,6 +152,16 @@ +@@ -154,6 +154,16 @@ return APR_SUCCESS; } @@ -26,12 +26,12 @@ static int change_remote_ip(request_rec *r) { const char *fwdvalue; char *val; -@@ -183,7 +193,7 @@ +@@ -185,7 +195,7 @@ rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip); rcr->r = r; apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null); - r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]); + r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips)); r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip); - if (cfg->sethostname) { - const char *hostvalue; + apr_sockaddr_t *tmpsa; + int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool); diff -Nru libapache2-mod-rpaf-0.6/debian/patches/011_apache2.4.patch libapache2-mod-rpaf-0.6/debian/patches/011_apache2.4.patch --- libapache2-mod-rpaf-0.6/debian/patches/011_apache2.4.patch 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/patches/011_apache2.4.patch 2014-01-24 06:24:49.000000000 +0000 @@ -3,12 +3,12 @@ Bug-Debian: http://bugs.debian.org/666792 --- - mod_rpaf-2.0.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + mod_rpaf-2.0.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) --- a/mod_rpaf-2.0.c +++ b/mod_rpaf-2.0.c -@@ -147,8 +147,8 @@ +@@ -149,8 +149,8 @@ static apr_status_t rpaf_cleanup(void *data) { rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data; @@ -19,7 +19,7 @@ return APR_SUCCESS; } -@@ -171,7 +171,7 @@ +@@ -173,7 +173,7 @@ if (!cfg->enable) return DECLINED; @@ -28,7 +28,7 @@ /* check if cfg->headername is set and if it is use that instead of X-Forwarded-For by default */ if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) { -@@ -190,11 +190,11 @@ +@@ -192,15 +192,15 @@ if (*fwdvalue != '\0') ++fwdvalue; } @@ -40,6 +40,12 @@ - r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip); + r->connection->client_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips)); + r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->client_ip); + apr_sockaddr_t *tmpsa; +- int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool); ++ int ret = apr_sockaddr_info_get(&tmpsa, r->connection->client_ip, APR_UNSPEC, r->connection->client_addr->port, 0, r->connection->client_addr->pool); + if (ret == APR_SUCCESS) +- memcpy(r->connection->remote_addr, tmpsa, sizeof(apr_sockaddr_t)); ++ memcpy(r->connection->client_addr, tmpsa, sizeof(apr_sockaddr_t)); if (cfg->sethostname) { const char *hostvalue; if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) { diff -Nru libapache2-mod-rpaf-0.6/debian/patches/030_ipv6.patch libapache2-mod-rpaf-0.6/debian/patches/030_ipv6.patch --- libapache2-mod-rpaf-0.6/debian/patches/030_ipv6.patch 1970-01-01 00:00:00.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/patches/030_ipv6.patch 2014-01-24 06:24:49.000000000 +0000 @@ -0,0 +1,31 @@ +Description: ipv6 fixes +Author: Piotr Roszatycki +Reviewed-by: Sergey B Kirpichev  +Bug-Debian: http://bugs.debian.org/726529 + +--- + mod_rpaf-2.0.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/mod_rpaf-2.0.c ++++ b/mod_rpaf-2.0.c +@@ -72,6 +72,8 @@ + #include "http_vhost.h" + #include "apr_strings.h" + ++#include ++ + module AP_MODULE_DECLARE_DATA rpaf_module; + + typedef struct { +@@ -185,6 +187,10 @@ + apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null); + r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]); + r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip); ++ apr_sockaddr_t *tmpsa; ++ int ret = apr_sockaddr_info_get(&tmpsa, r->connection->remote_ip, APR_UNSPEC, r->connection->remote_addr->port, 0, r->connection->remote_addr->pool); ++ if (ret == APR_SUCCESS) ++ memcpy(r->connection->remote_addr, tmpsa, sizeof(apr_sockaddr_t)); + if (cfg->sethostname) { + const char *hostvalue; + if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) { diff -Nru libapache2-mod-rpaf-0.6/debian/patches/series libapache2-mod-rpaf-0.6/debian/patches/series --- libapache2-mod-rpaf-0.6/debian/patches/series 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/patches/series 2014-01-24 06:24:49.000000000 +0000 @@ -1,3 +1,4 @@ +030_ipv6.patch 010_multiple_proxies.patch 011_apache2.4.patch 012_Add-missing-header-for-inet_addr.patch diff -Nru libapache2-mod-rpaf-0.6/debian/rules libapache2-mod-rpaf-0.6/debian/rules --- libapache2-mod-rpaf-0.6/debian/rules 2013-06-16 11:24:38.000000000 +0000 +++ libapache2-mod-rpaf-0.6/debian/rules 2014-01-24 06:24:49.000000000 +0000 @@ -7,7 +7,10 @@ rm -rf .libs *.la *.lo override_dh_auto_build: - apxs2 -S CFLAGS="$(CFLAGS) -D_LARGEFILE64_SOURCE $(CPPFLAGS)" -c -o mod_rpaf.so mod_rpaf-2.0.c + LTFLAGS="--no-silent" apxs2 \ + -S CFLAGS="$(CFLAGS) \ + -D_LARGEFILE64_SOURCE \ + $(CPPFLAGS)" -c -o mod_rpaf.so mod_rpaf-2.0.c override_dh_auto_test: