From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 11 23:30:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 770A5106567B for ; Wed, 11 Jan 2012 23:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 46DB58FC0C for ; Wed, 11 Jan 2012 23:30:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0BNUDPH066589 for ; Wed, 11 Jan 2012 23:30:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0BNUDpP066588; Wed, 11 Jan 2012 23:30:13 GMT (envelope-from gnats) Resent-Date: Wed, 11 Jan 2012 23:30:13 GMT Resent-Message-Id: <201201112330.q0BNUDpP066588@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Olli Hauer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D6221065673; Wed, 11 Jan 2012 23:20:29 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65]) by mx1.freebsd.org (Postfix) with ESMTP id 373998FC24; Wed, 11 Jan 2012 23:20:29 +0000 (UTC) Received: by p578be941.dip0.t-ipconnect.de (Postfix, from userid 1100) id 2CC6B20828; Thu, 12 Jan 2012 00:20:25 +0100 (CET) Message-Id: <20120111232025.2CC6B20828@p578be941.dip0.t-ipconnect.de> Date: Thu, 12 Jan 2012 00:20:25 +0100 (CET) From: Olli Hauer To: X-Send-Pr-Version: 3.113 Cc: "Lev A. Serebryakov" Subject: ports/164033: [patch] port devel/subversion change pkg-install and pkg-deinstall script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 23:30:13 -0000 >Number: 164033 >Category: ports >Synopsis: [patch] port devel/subversion ports change pkg-install and pkg-deinstall script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jan 11 23:30:12 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Olli Hauer >Release: >Organization: >Environment: >Description: The pkg-install script should be more expilzit. The pkg-deinstall script should only check for LoadModule (apache20/22/24), AddModule was only used for apache13. Also during deinstall the changed script will cleanup lines prefixed with `#' and is tolerant against reformating httpd.conf by the user. >How-To-Repeat: - change spacing in httpd.conf and install subversion (add additional tab/spaces in the Line LoadModule dav_module) - prefix a subversion module line with `#' and deinstall subversion >Fix: --- patch_subversion.txt begins here --- Index: subversion/files/pkg-deinstall.in =================================================================== RCS file: /home/pcvs/ports/devel/subversion/files/pkg-deinstall.in,v retrieving revision 1.1 diff -u -r1.1 pkg-deinstall.in --- subversion/files/pkg-deinstall.in 19 Apr 2010 10:39:12 -0000 1.1 +++ subversion/files/pkg-deinstall.in 11 Jan 2012 22:47:46 -0000 @@ -51,15 +51,12 @@ for i in ${conffile}; do echo -n Removing dav_svn_module, authz_svn_module and dontdothat_module from $i in config dir: ${confdir}... - awk '{if (!/^LoadModule dav_svn_module/ && - !/^AddModule mod_dav_svn.c/ && \ - !/^LoadModule authz_svn_module/ && \ - !/^AddModule mod_authz_svn.c/ && \ - !/^LoadModule dontdothat_module/ && \ - !/^AddModule mod_dontdothat.c/ ) \ + awk '{if (!/LoadModule[[:blank:]]+dav_svn_module/ && + !/LoadModule[[:blank:]]+authz_svn_module/ && + !/LoadModule[[:blank:]]+dontdothat_module/ ) print $0}' < "${confdir}/$i" > "${tmpdir}/$i" AWKRC=$? - diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | grep -Evq "^< (Load|Add)Module " + diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | sed -e 's/#//g' | grep -Evq "^<[[:blank:]]+LoadModule" GREPRC=$? # last grep should not find anything if [ "x${AWKRC}" = "x0" -a "x${GREPRC}" = "x1" ] ; then Index: subversion/files/pkg-install.in =================================================================== RCS file: /home/pcvs/ports/devel/subversion/files/pkg-install.in,v retrieving revision 1.1 diff -u -r1.1 pkg-install.in --- subversion/files/pkg-install.in 19 Apr 2010 10:39:12 -0000 1.1 +++ subversion/files/pkg-install.in 11 Jan 2012 22:47:46 -0000 @@ -43,7 +43,7 @@ fi # use only 'egrep -e' else the check works not correct -if [ ! -n "`egrep -e '^(Load|Add)Module.*dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then +if [ ! -n "`egrep -e '^LoadModule[[:blank:]]+dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then if [ -f ${LIBEXECDIR}/mod_dav.so ]; then ${APXSCMD} -e -S LIBEXECDIR=${LIBEXECDIR} -a -n dav ${LIBEXECDIR}/mod_dav.so else Index: subversion16/files/pkg-deinstall.in =================================================================== RCS file: /home/pcvs/ports/devel/subversion16/files/pkg-deinstall.in,v retrieving revision 1.1 diff -u -r1.1 pkg-deinstall.in --- subversion16/files/pkg-deinstall.in 19 Apr 2010 10:39:12 -0000 1.1 +++ subversion16/files/pkg-deinstall.in 11 Jan 2012 22:47:46 -0000 @@ -51,15 +51,12 @@ for i in ${conffile}; do echo -n Removing dav_svn_module, authz_svn_module and dontdothat_module from $i in config dir: ${confdir}... - awk '{if (!/^LoadModule dav_svn_module/ && - !/^AddModule mod_dav_svn.c/ && \ - !/^LoadModule authz_svn_module/ && \ - !/^AddModule mod_authz_svn.c/ && \ - !/^LoadModule dontdothat_module/ && \ - !/^AddModule mod_dontdothat.c/ ) \ + awk '{if (!/LoadModule[[:blank:]]+dav_svn_module/ && + !/LoadModule[[:blank:]]+authz_svn_module/ && + !/LoadModule[[:blank:]]+dontdothat_module/ ) print $0}' < "${confdir}/$i" > "${tmpdir}/$i" AWKRC=$? - diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | grep -Evq "^< (Load|Add)Module " + diff "${confdir}/$i" "${tmpdir}/$i" | grep "^[<>]" | sed -e 's/#//g' | grep -Evq "^<[[:blank:]]+LoadModule" GREPRC=$? # last grep should not find anything if [ "x${AWKRC}" = "x0" -a "x${GREPRC}" = "x1" ] ; then Index: subversion16/files/pkg-install.in =================================================================== RCS file: /home/pcvs/ports/devel/subversion16/files/pkg-install.in,v retrieving revision 1.1 diff -u -r1.1 pkg-install.in --- subversion16/files/pkg-install.in 19 Apr 2010 10:39:12 -0000 1.1 +++ subversion16/files/pkg-install.in 11 Jan 2012 22:47:46 -0000 @@ -43,7 +43,7 @@ fi # use only 'egrep -e' else the check works not correct -if [ ! -n "`egrep -e '^(Load|Add)Module.*dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then +if [ ! -n "`egrep -e '^LoadModule[[:blank:]]+dav_module' ${SYSCONFDIR}/${CONFFILE}`" ]; then if [ -f ${LIBEXECDIR}/mod_dav.so ]; then ${APXSCMD} -e -S LIBEXECDIR=${LIBEXECDIR} -a -n dav ${LIBEXECDIR}/mod_dav.so else --- patch_subversion.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted: