From owner-svn-ports-all@FreeBSD.ORG Wed Feb 4 17:10:06 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 497E3D51; Wed, 4 Feb 2015 17:10:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2A7D0649; Wed, 4 Feb 2015 17:10:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t14HA6xk042573; Wed, 4 Feb 2015 17:10:06 GMT (envelope-from marcus@FreeBSD.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t14HA5nx042571; Wed, 4 Feb 2015 17:10:05 GMT (envelope-from marcus@FreeBSD.org) Message-Id: <201502041710.t14HA5nx042571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcus set sender to marcus@FreeBSD.org using -f From: Joe Marcus Clarke Date: Wed, 4 Feb 2015 17:10:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r378408 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head 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.18-1 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: Wed, 04 Feb 2015 17:10:06 -0000 Author: marcus Date: Wed Feb 4 17:10:04 2015 New Revision: 378408 URL: https://svnweb.freebsd.org/changeset/ports/378408 QAT: https://qat.redports.org/buildarchive/r378408/ Log: Update to 2.16.2. * Exclude .git directories from error reporting [1] * Add some additional Perl checks for STAGEDIR [2] * Try not to flag on direct use of "install" if we're running a make command [3] * Fix the checks for Perl given the new hierarchy [4] PR: 195780 [1] 194759 [3] 196222 [4] Submitted by: gerald [3] Yasuhiro KIMURA [1] Requested by: mat [2] Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Wed Feb 4 17:07:52 2015 (r378407) +++ head/ports-mgmt/portlint/Makefile Wed Feb 4 17:10:04 2015 (r378408) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.16.1 -PORTREVISION= 1 +PORTVERSION= 2.16.2 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Wed Feb 4 17:07:52 2015 (r378407) +++ head/ports-mgmt/portlint/src/portlint.pl Wed Feb 4 17:10:04 2015 (r378408) @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.344 2014/10/27 16:00:59 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.350 2015/02/04 17:07:25 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 16; -my $micro = 1; +my $micro = 2; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -289,12 +289,12 @@ if ($committer) { "If it still needs to be there, put a dummy comment ". "to state that the file is intentionally left empty."); } elsif (-d && scalar(my @x = <$_/{*,.?*}>) <= 1) { - &perror("FATAL", $fullname, -1, "empty directory should be removed.") unless ($fullname =~ /^\.svn/); + &perror("FATAL", $fullname, -1, "empty directory should be removed.") unless ($fullname =~ /^\.svn/ || $fullname =~ /^\.git/); } elsif (/^\./) { &perror("WARN", $fullname, -1, "dotfiles are not preferred. ". "If this file is a dotfile to be installed as an example, ". "consider importing it as \"dot$_\".") unless - (-d && $_ eq '.svn'); + (-d && ($_ eq '.svn' || $_ eq '.git')); } elsif (/[^-.a-zA-Z0-9_\+]/) { &perror("WARN", $fullname, -1, "only use characters ". "[-_.a-zA-Z0-9+] for patch or script names."); @@ -307,7 +307,7 @@ if ($committer) { } elsif (/README.html/) { &perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ". "README.html files before committing the port."); - } elsif ($_ eq '.svn' && -d) { + } elsif (($_ eq '.svn' || $_ eq '.git') && -d) { &perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ". "Subversion files before committing the port."); @@ -573,9 +573,12 @@ sub checkplist { "be installed."); } - if (m'lib/perl5/site_perl/%%PERL_VER%%') { + if (m'lib/perl5/site_perl/mach/%%PERL_VER%%') { + &perror("WARN", $file, $., "use \%\%SITE_ARCH\%\% ". + "instead of lib/perl5/site_perl/mach/\%\%PERL_VER\%\%"); + } elsif (m'lib/perl5/site_perl') { &perror("WARN", $file, $., "use \%\%SITE_PERL\%\% ". - "instead of lib/perl5/site_perl/\%\%PERL_VER\%\%."); + "instead of lib/perl5/site_perl."); } if (m'([\w\d]+-portbld-freebsd\d+\.\d+)') { @@ -1813,6 +1816,7 @@ xargs xmkmf && $curline !~ /^SHEBANG_FILES(.)?=[^\n]+$i/m && $curline !~ /^[A-Z0-9_]+_DESC=[^\n]+$i/m && $curline !~ /^\s*#.+$/m + && $curline !~ /\$\{MAKE_CMD\}.*\binstall\b/m && $curline !~ /\-\-$i/m && $curline !~ /^COMMENT(.)?=[^\n]+$i/m) { &perror("WARN", $file, $lineno, "possible direct use of ". @@ -1956,12 +1960,32 @@ xargs xmkmf } # - # whole file: ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} + # whole file: ${LOCALBASE}/lib/perl5/site_perl # - if ($j =~ m'\${(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl/\${PERL_VER}') { + if ($j =~ m'\${(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl') { my $lineno = &linenumber($`); - &perror("WARN", $file, $lineno, "possible use of \"\${LOCALBASE}/lib/perl5/site_perl/\${PERL_VER}\" ". - "found. use \"\${SITE_PERL}\" instead."); + if ($1 !~ /PREFIX/) { + &perror("WARN", $file, $lineno, "possible use of \"\${LOCALBASE}/lib/perl5/site_perl\" ". + "found. use \"\${SITE_PERL}\" instead."); + } else { + &perror("WARN", $file, $lineno, "possible use of \"\${PREFIX}/lib/perl5/site_perl\" ". + "found. use \"\${PREFIX}/\${SITE_PERL_REL}\" instead."); + } + } + + # + # whole file: check for misuse of STAGE with SITE_PERL and SITE_ARCH + # + if ($j =~ m'\${STAGEDIR}\${SITE_PERL}') { + my $lineno = &linenumber($`); + &perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_PERL} should be ". + "replaced by \${STAGEDIR}\${PREFIX}/\${SITE_PERL_REL}."); + } + + if ($j =~ m'\${STAGEDIR}\${SITE_ARCH}') { + my $lineno = &linenumber($`); + &perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_ARCH} should be ". + "replaced by \${STAGEDIR}\${PREFIX}/\${SITE_BASE_REL}."); } #