From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 4 04:00:06 2008 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 B2EBC106567B for ; Thu, 4 Sep 2008 04:00:06 +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 8882A8FC15 for ; Thu, 4 Sep 2008 04:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m84406gd025062 for ; Thu, 4 Sep 2008 04:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m84406CY025061; Thu, 4 Sep 2008 04:00:06 GMT (envelope-from gnats) Resent-Date: Thu, 4 Sep 2008 04:00:06 GMT Resent-Message-Id: <200809040400.m84406CY025061@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, Tomoyuki Sakurai Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5908C1065671 for ; Thu, 4 Sep 2008 03:54:06 +0000 (UTC) (envelope-from cherry@spica.trombik.org) Received: from spica.trombik.org (spica.trombik.org [211.19.48.12]) by mx1.freebsd.org (Postfix) with ESMTP id 257228FC16 for ; Thu, 4 Sep 2008 03:54:06 +0000 (UTC) (envelope-from cherry@spica.trombik.org) Received: by spica.trombik.org (Postfix, from userid 999) id BD8AA1CD54; Thu, 4 Sep 2008 12:54:03 +0900 (JST) Message-Id: <20080904035403.BD8AA1CD54@spica.trombik.org> Date: Thu, 4 Sep 2008 12:54:03 +0900 (JST) From: Tomoyuki Sakurai To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: marcus@FreeBSD.org Subject: ports/127081: [PATCH] ports-mgmt/portlint: detect missuse of rmdirtry with absolute path 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: Thu, 04 Sep 2008 04:00:06 -0000 >Number: 127081 >Category: ports >Synopsis: [PATCH] ports-mgmt/portlint: detect missuse of rmdirtry with absolute path >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Sep 04 04:00:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Tomoyuki Sakurai >Release: FreeBSD 7.0-STABLE amd64 >Organization: >Environment: System: FreeBSD spica.trombik.org 7.0-STABLE FreeBSD 7.0-STABLE #5: Thu Jul 10 22:29:26 JST 2008 >Description: Even if you use @rmdirtry with absolute path, it doesn't remove the directory. The path will be prefixed with the current directory pointer. "@rmdirtry /var/foo" will remove ${PREFIX}//var/foo. Port maintainer (marcus@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- portlint-2.10.1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portlint/Makefile /usr/home/cherry/svk/ports/ports-mgmt/portlint/Makefile --- /usr/ports/ports-mgmt/portlint/Makefile 2008-08-25 02:16:03.000000000 +0900 +++ /usr/home/cherry/svk/ports/ports-mgmt/portlint/Makefile 2008-09-04 12:48:04.000000000 +0900 @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.10.0 +PORTVERSION= 2.10.1 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portlint/src/portlint.pl /usr/home/cherry/svk/ports/ports-mgmt/portlint/src/portlint.pl --- /usr/ports/ports-mgmt/portlint/src/portlint.pl 2008-08-25 02:16:03.000000000 +0900 +++ /usr/home/cherry/svk/ports/ports-mgmt/portlint/src/portlint.pl 2008-09-04 12:49:46.000000000 +0900 @@ -750,6 +750,11 @@ $rcsidseen++ if (/\$$rcsidstr[:\$]/); } elsif ($_ =~ /^\@(owner|group|mode)\s/) { &perror("WARN", $file, $., "\@$1 should not be needed"); + } elsif ($_ =~ m!^\@(dirrm|dirrmtry)\s+/! ) { + &perror("WARN", $file, $., "Using \@$1 with absolute path will not work ". + "as you expected in most cases. ". + "Use pkg-deinstall if you want to remove a directory ". + "such as /var/\${PORTNAME}"); } elsif ($_ =~ /^\@(dirrm|option|stopdaemon)/) { ; # no check made } elsif ($_ eq "\@cwd") { --- portlint-2.10.1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: