From owner-svn-ports-all@freebsd.org Sun Nov 5 12:04:46 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E23CEE69B2D; Sun, 5 Nov 2017 12:04:46 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC5517D013; Sun, 5 Nov 2017 12:04:46 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA5C4jxf044102; Sun, 5 Nov 2017 12:04:45 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA5C4jSn044097; Sun, 5 Nov 2017 12:04:45 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201711051204.vA5C4jSn044097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Sun, 5 Nov 2017 12:04:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r453541 - in head: . www/mod_rpaf2 www/mod_rpaf2/files X-SVN-Group: ports-head X-SVN-Commit-Author: brnrd X-SVN-Commit-Paths: in head: . www/mod_rpaf2 www/mod_rpaf2/files X-SVN-Commit-Revision: 453541 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 12:04:47 -0000 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 [1] Reported by: mayhem30@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@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@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 +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 + +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 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 + + # 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 + 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 +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);