From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 24 04:20:15 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0D1F16A4BF for ; Sun, 24 Aug 2003 04:20:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42AC843F85 for ; Sun, 24 Aug 2003 04:20:14 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7OBKEUp049132 for ; Sun, 24 Aug 2003 04:20:14 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7OBKEGF049131; Sun, 24 Aug 2003 04:20:14 -0700 (PDT) Resent-Date: Sun, 24 Aug 2003 04:20:14 -0700 (PDT) Resent-Message-Id: <200308241120.h7OBKEGF049131@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, Edwin Groothuis Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65E3116A4BF for ; Sun, 24 Aug 2003 04:17:02 -0700 (PDT) Received: from mag.barnet.com.au (mag.barnet.com.au [218.185.88.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42E9143F3F for ; Sun, 24 Aug 2003 04:17:01 -0700 (PDT) (envelope-from edwin@mavetju.org) Received: from extmail.barnet.com.au (tim.direct.int.barnet.com.au [10.10.10.2]) by mag.barnet.com.au (Postfix) with ESMTP id 81FA11879 for ; Sun, 24 Aug 2003 21:16:58 +1000 (EST) Received: from k7.mavetju (tim.barnet.com.au [218.185.88.1]) by extmail.barnet.com.au (Postfix) with ESMTP id 68A681E0B for ; Sun, 24 Aug 2003 21:16:56 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id F29926A7101; Sun, 24 Aug 2003 21:16:53 +1000 (EST) Message-Id: <20030824111653.F29926A7101@k7.mavetju> Date: Sun, 24 Aug 2003 21:16:53 +1000 (EST) From: Edwin Groothuis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/55921: [patch] add some pkg-plist checking to devel/portlint X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Edwin Groothuis List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2003 11:20:16 -0000 >Number: 55921 >Category: ports >Synopsis: [patch] add some pkg-plist checking to devel/portlint >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: Sun Aug 24 04:20:13 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Edwin Groothuis >Release: FreeBSD 4.8-RELEASE i386 >Organization: - >Environment: System: FreeBSD k7.mavetju 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sun Aug 17 16:04:25 EST 2003 edwin@k7.mavetju:/usr/src/sys/compile/k7 i386 >Description: Add some checking to portlint for the pkg-plist files: - "@unexec rm " should have a %D in it to specify the prefix - "@unexec rm " should have a redirection and or to true in it - "@unexec rmdir" should have a %D in it to specify the prefix >How-To-Repeat: [/usr/ports/net/dhcpdump] root@k7>cat pkg-plist @unexec rm lib/xmms/General/libinfopipe.so @unexec rm %D/lib/xmms/General/libinfopipe-1.3.so @unexec rm %D/lib/xmms/General/libinfopipe-1.3.so 2>&1 >/dev/null || true @unexec rmdir lib/xmms/General/libinfopipe.so @unexec rmdir %D/lib/xmms/General/libinfopipe.so [/usr/ports/net/dhcpdump] root@k7>portlint -a WARN: pkg-plist:1 use "%D" to specify prefix. WARN: pkg-plist:1 add "2>&1 >/dev/null || true" to "@unexec rm". WARN: pkg-plist:2 add "2>&1 >/dev/null || true" to "@unexec rm". WARN: pkg-plist:4 use "%D" to specify prefix. WARN: pkg-plist:5 use "@dirrm" instead of "@unexec rmdir". WARN: pkg-plist:5 use "@dirrm" instead of "@unexec rmdir". >Fix: --- /usr/local/bin/portlint.orig Sun Aug 24 21:11:11 2003 +++ /usr/local/bin/portlint Sun Aug 24 21:10:53 2003 @@ -444,9 +444,21 @@ if ($_ =~ /^\@/) { if ($_ =~ /^\@(cwd|cd)[ \t]+(\S+)/) { $curdir = $2; + } elsif ($_ =~ /^\@unexec[ \t]+rm[ \t]/) { + if ($_ !~ /%D/) { + &perror("WARN: pkg-plist:$. use \"%D\" to specify prefix."); + } + if ($_ !~ /true$/) { + &perror("WARN: pkg-plist:$. add \"2>&1 ". + ">/dev/null || true\" ". + "to \"\@unexec rm\"."); + } } elsif ($_ =~ /^\@unexec[ \t]+rmdir/) { + if ($_ !~ /%D/) { + &perror("WARN: pkg-plist:$. use \"%D\" to specify prefix."); + } if ($_ !~ /true$/) { - &perror("WARN: use \"\@dirrm\" ". + &perror("WARN: pkg-plist:$. use \"\@dirrm\" ". "instead of \"\@unexec rmdir\"."); } } elsif ($_ =~ /^\@exec[ \t]+scrollkeeper-install[ \t]+-q\s+(\S+)\s+.+$/) { >Release-Note: >Audit-Trail: >Unformatted: