svn commit: r453541 - in head: . www/mod_rpaf2 www/mod_rpaf2/files
Bernard Spil
brnrd at FreeBSD.org
Sun Nov 5 12:04:47 UTC 2017
Author: brnrd
Date: Sun Nov 5 12:04:45 2017
New Revision: 453541
URL: https://svnweb.freebsd.org/changeset/ports/453541
Log:
www/mod_rpaf2: Update to 0.8.4
- Update to 0.8.4 fixing Apache 2.4 compat [1]
- Add modules.d config file [1] fixing [2]
- Add upstream fix for clang warning [1]
PR: 209869 [1], 222374 [2]
Submitted by: Geoffroy Desvernay <dgeo at centrale-marseille.fr> [1]
Reported by: mayhem30 at gmail.com [2]
With hat: apache
Added:
head/www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in (contents, props changed)
head/www/mod_rpaf2/files/patch-mod__rpaf.c (contents, props changed)
Deleted:
head/www/mod_rpaf2/files/patch-mod_rpaf-2.0.c
Modified:
head/UPDATING
head/www/mod_rpaf2/Makefile
head/www/mod_rpaf2/distinfo
Modified: head/UPDATING
==============================================================================
--- head/UPDATING Sun Nov 5 11:51:02 2017 (r453540)
+++ head/UPDATING Sun Nov 5 12:04:45 2017 (r453541)
@@ -5,6 +5,13 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20171105:
+ AFFECTS: users of www/mod_rpaf2
+
+ The configuration of mod_rpaf2 has been heavily modified since version
+ 0.6. Have a look at https://github.com/gnif/mod_rpaf/tree/v0.8.4 to
+ determine what you need to change in your configuration.
+
20171031:
AFFECTS: users of editors/vim
AUTHOR: adamw at FreeBSD.org
Modified: head/www/mod_rpaf2/Makefile
==============================================================================
--- head/www/mod_rpaf2/Makefile Sun Nov 5 11:51:02 2017 (r453540)
+++ head/www/mod_rpaf2/Makefile Sun Nov 5 12:04:45 2017 (r453541)
@@ -2,23 +2,40 @@
# $FreeBSD$
PORTNAME= mod_rpaf
-PORTVERSION= 0.6.0
+PORTVERSION= 0.8.4
DISTVERSIONPREFIX= v
-PORTREVISION= 3
CATEGORIES= www
PKGNAMESUFFIX= 2
MAINTAINER= apache at FreeBSD.org
COMMENT= Make proxied requests appear with client IP
+LICENSE= APACHE20
+
USE_GITHUB= yes
GH_ACCOUNT= gnif
+DOCS= README.md
+
USE_APACHE= 22+
AP_FAST_BUILD= yes
-AP_GENPLIST= yes
SHORTMODNAME= rpaf
-SRC_FILE= mod_rpaf-2.0.c
+SRC_FILE= mod_rpaf.c
-.include <bsd.port.mk>
+APMOD_FILE= 200_mod_rpaf.conf.sample
+PLIST_SUB+= APMOD_FILE=${APMOD_FILE}
+PLIST_FILES= @sample\ %%APACHEETCDIR%%/modules.d/200_${PORTNAME}.conf.sample \
+ %%APACHEMODDIR%%/${PORTNAME}.so
+SUB_FILES= ${APMOD_FILE}
+
+PORTDOCS= README.md
+
+.include <bsd.port.pre.mk>
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKDIR}/${APMOD_FILE} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.post.mk>
Modified: head/www/mod_rpaf2/distinfo
==============================================================================
--- head/www/mod_rpaf2/distinfo Sun Nov 5 11:51:02 2017 (r453540)
+++ head/www/mod_rpaf2/distinfo Sun Nov 5 12:04:45 2017 (r453541)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1464785880
-SHA256 (gnif-mod_rpaf-v0.6.0_GH0.tar.gz) = f89e51d7331d336a00833d6dc1cc786430d9f9c53bbbac97f22a96dbe803c7e7
-SIZE (gnif-mod_rpaf-v0.6.0_GH0.tar.gz) = 7643
+TIMESTAMP = 1509882113
+SHA256 (gnif-mod_rpaf-v0.8.4_GH0.tar.gz) = b78f292d7336f839527d6fb2213116c995a525ad9aa38c344c485abbd76848f5
+SIZE (gnif-mod_rpaf-v0.8.4_GH0.tar.gz) = 6458
Added: head/www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in Sun Nov 5 12:04:45 2017 (r453541)
@@ -0,0 +1,33 @@
+LoadModule rpaf_module %%APACHEMODDIR%%/mod_rpaf.so
+<IfModule mod_rpaf>
+ # Enable reverse proxy add forward
+ #RPAF_Enable On
+
+ # What IPs & bitmasked subnets to adjust requests for
+ #RPAF_ProxyIPs 127.0.0.1 10.0.0.0/24
+
+ # The header to use for the real IP address
+ #RPAF_Header X-Forwarded-For
+
+ # Update vhost name so ServerName & ServerAlias work
+ #RPAF_SetHostName Off
+
+ # Set the HTTPS environment variable
+ # to the header value contained in
+ # X-HTTPS, or X-Forwarded-HTTPS. For
+ # best results make sure that mod_ssl
+ # is NOT enabled.
+ #RPAF_SetHTTPS Off
+
+ # Set the server port to the header
+ # value contained in X-Port, or
+ # X-Forwarded-Port.
+ # (see https://github.com/gnif/mod_rpaf/issues/12)
+ #RPAF_SetPort Off
+
+ # Option to forbid request if not from
+ # trusted RPAF_ProxyIPs; otherwise
+ # cannot be done with Allow/Deny after
+ # remote addr substitution
+ #RPAF_ForbidIfNotProxy Off
+</IfModule>
Added: head/www/mod_rpaf2/files/patch-mod__rpaf.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/mod_rpaf2/files/patch-mod__rpaf.c Sun Nov 5 12:04:45 2017 (r453541)
@@ -0,0 +1,31 @@
+From e93902533dd89ba6c77cea90e4e2c7d762650126 Mon Sep 17 00:00:00 2001
+From: Geoffroy Desvernay <dgeo at centrale-marseille.fr>
+Date: Mon, 12 Dec 2016 10:01:14 +0100
+Subject: [PATCH] Fix warning with clang
+
+Fix this warning on FreeBSD 11 (clang cc by default)
+./apxs.sh -c -n mod_rpaf.so mod_rpaf.c
+/usr/local/share/apr/build-1/libtool --silent --mode=compile cc -prefer-pic -O2 -pipe -I/usr/local/include -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include/apache24 -I/usr/local/include/apr-1 -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/local/include/db5 -I/usr/include -c -o mod_rpaf.lo mod_rpaf.c && touch mod_rpaf.slo
+mod_rpaf.c:117:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
+ if (mask = ap_strchr(ip, '/')) {
+ ~~~~~^~~~~~~~~~~~~~~~~~~~
+mod_rpaf.c:117:18: note: place parentheses around the assignment to silence this warning
+ if (mask = ap_strchr(ip, '/')) {
+ ^
+ ( )
+mod_rpaf.c:117:18: note: use '==' to turn this assignment into an equality comparison
+ if (mask = ap_strchr(ip, '/')) {
+ ^
+ ==
+1 warning generated.
+--- mod_rpaf.c.orig 2014-09-03 06:41:36 UTC
++++ mod_rpaf.c
+@@ -114,7 +114,7 @@ static const char *rpaf_set_proxy_ip(cmd
+
+ if (rpaf_looks_like_ip(proxy_ip)) {
+ ip = apr_pstrdup(cmd->temp_pool, proxy_ip);
+- if (mask = ap_strchr(ip, '/')) {
++ if ((mask = ap_strchr(ip, '/'))) {
+ *mask++ = '\0';
+ }
+ sub = (apr_ipsubnet_t **)apr_array_push(cfg->proxy_ips);
More information about the svn-ports-all
mailing list