From nobody Tue Nov 29 13:52:44 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NM3gc2YPhz4htSR; Tue, 29 Nov 2022 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NM3gc222kz49yJ; Tue, 29 Nov 2022 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669729964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JgJ2Cfy8Vb6zZGRrq+NCeSdj65zdxlUBoDbKDkDH9Fw=; b=UUfavamukkkqmk+Smi0911T7olzyIjtr9W4Nt4A+lI6aSETJLNzy6Z8HU9FPIyCK5yT920 ggEqgWbUIzCbPDd9SOGjS0w0ur6gNd6NmAeik5D5izPF4SUKY1m28zH+9iMJnAE1PlG04u jVHzcXEJML+qOGiouW3Kh3fPL8OhDo4dQud0S0n3UJqQTD/kjAm/2Z1gFB8yybdL9sN/z8 M27Pb6lTz8uUN3rJSTeDI2fw+oRSblWW76zu7d4OTXSKSa9chsd0u7pyvl1k80GU5/ds27 R0KIMJcOhBxY8BdjnR+5BJYicy4xH4OONvqzsNH8eCCl1PUO6wQKw2FBNBb7dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669729964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JgJ2Cfy8Vb6zZGRrq+NCeSdj65zdxlUBoDbKDkDH9Fw=; b=rY+XO+ruRtbhtOWNQbMKebUNElYoA/Hmg1eC+smvkS7kesTS/sYjyQK9SPsFC4DQsN/Zv6 Jp6O5dxfMLls+55X1FElTy+n00USmlLJO1sed8oRa6721MynQfdzgrtALlO+oAp1/A4b1/ L1u5JP58rKFigUjK9fkv10KixiOdYAfy3nS5HxI8CZ5JVA/P1Y1bAdkDoFx/DWyS9ZSmYK xOD1vH0zINkK2SkMxQuJF0KabCz8OecxyaleyWWQN/BCexMKMH0VwplZgP04MxX43dP7fp ZYviWqFwvEWZTvEacxp5d+oJSpfoEtZ88nv+Xrj0oe3/8TII/JGyKoyokEZ8fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669729964; a=rsa-sha256; cv=none; b=kfrtxBzs0ntz0o+KjKlxzR7ZnOmqN1z/2lgfFp5EGY4guQTd/KjeswOO4XC1H6duLUXeYK hZMRAB+VuRNv7ahqFXhNdVKhDgtaE1g6AcjzyjiEP0optVVKbNCfLrZZKALaib/CXUNg7N WD9z0p0bp6Wu73tGJGaSyaZTPpGGvdSxEDUh8QehwCabVpQzxyfEFTjFag+5hRSGprPZXQ HNSxhCEe56lpbhPEaYSRAdEMn6mWpusphs9e+OZ4umXk+8+4n98mAUVhNOWQmHQhxr5BIy ixTVoMGeqxcn1zBIHgXEvVx/mCNHep73Ppb8O+ro3jimy6OB6R5mN5XBBkmBLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NM3gc16DfzKdj; Tue, 29 Nov 2022 13:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ATDqirA028464; Tue, 29 Nov 2022 13:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ATDqi1F028463; Tue, 29 Nov 2022 13:52:44 GMT (envelope-from git) Date: Tue, 29 Nov 2022 13:52:44 GMT Message-Id: <202211291352.2ATDqi1F028463@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joe Marcus Clarke Subject: git: ce9d05567d60 - main - ports-mgmt/portlint: Update to 2.20.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marcus X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce9d05567d60574b86558af0431f68b682960203 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by marcus: URL: https://cgit.FreeBSD.org/ports/commit/?id=ce9d05567d60574b86558af0431f68b682960203 commit ce9d05567d60574b86558af0431f68b682960203 Author: Joe Marcus Clarke AuthorDate: 2022-11-29 13:50:03 +0000 Commit: Joe Marcus Clarke CommitDate: 2022-11-29 13:50:03 +0000 ports-mgmt/portlint: Update to 2.20.0 * Check for duplicate distinfo items [1] * Remove vestiges of SVN [2] [2] Switch to using `git status` to determine if a file is under git version control. Also, PL_SVN_IGNORE has been renamed to PL_GIT_IGNORE. PR: 267168 [1] 267145 [2] Submitted by: rodrigo [1] Thanks to: pauamma for the `git status` command [2] --- ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.1 | 7 ++++--- ports-mgmt/portlint/src/portlint.pl | 32 ++++++++++++++------------------ 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index c59b29f5d535..9773520ccc1a 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -1,5 +1,5 @@ PORTNAME= portlint -PORTVERSION= 2.19.14 +PORTVERSION= 2.20.0 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.1 b/ports-mgmt/portlint/src/portlint.1 index e19cf0df1848..5d97ade83bae 100644 --- a/ports-mgmt/portlint/src/portlint.1 +++ b/ports-mgmt/portlint/src/portlint.1 @@ -1,3 +1,4 @@ +.\" $MCom$ .\" .\" Copyright (c) 1997 by Jun-ichiro Hagino . .\" All Rights Reserved. Absolutely no warranty. @@ -100,10 +101,10 @@ If omitted, check will be performed over the current directory. .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : -.Bl -tag -width ".Ev PL_SVN_IGNORE" -.It Ev PL_SVN_IGNORE +.Bl -tag -width ".Ev PL_GIT_IGNORE" +.It Ev PL_GIT_IGNORE Set to a Perl-compatible regular expression, of patterns -to ignore when checking to see if files are in the SVN +to ignore when checking to see if files are in the git repository. For example, .Li '^\ed+$|^pr-patch$' . .It Ev PORTSDIR diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index c88184c55cc7..a9918a4e2b36 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -48,8 +48,8 @@ $portdir = '.'; # version variables my $major = 2; -my $minor = 19; -my $micro = 14; +my $minor = 20; +my $micro = 0; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -131,7 +131,7 @@ if (defined $ENV{'PORTSDIR'}) { $portsdir = $mconf_portsdir; } } -$ENV{'PL_SVN_IGNORE'} //= ''; +$ENV{'PL_GIT_IGNORE'} //= ''; my $mfile_moved = "${portsdir}/MOVED"; my $mfile_uids = "${portsdir}/UIDs"; my $mfile_gids = "${portsdir}/GIDs"; @@ -338,12 +338,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/ || $fullname =~ /^\.git/); + &perror("FATAL", $fullname, -1, "empty directory should be removed.") unless ($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' || $_ eq '.git')); + (-d && $_ eq '.git'); } elsif (/[^-.a-zA-Z0-9_\+]/) { &perror("WARN", $fullname, -1, "only use characters ". "[-_.a-zA-Z0-9+] for patch or script names."); @@ -356,27 +356,20 @@ 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' || $_ eq '.git') && -d) { + } elsif ($_ eq '.git' && -d) { &perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ". - "Subversion files before committing the port."); - - $File::Find::prune = 1; - } elsif ($_ eq 'CVS' && -d) { - if ($newport) { - &perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ". - "CVS directories before importing the new port."); - } + "git files before committing the port."); $File::Find::prune = 1; } elsif (-f) { my $fullpath = $makevar{'.CURDIR'}.'/'.$fullname; - my $result = `type svn >/dev/null 2>&1 && svn -q status $fullpath`; + my $result = `type git >/dev/null 2>&1 && git status --porcelain $fullpath`; chomp $result; if (substr($result, 0, 1) eq '?') { - &perror("FATAL", "", -1, "$fullname not under SVN.") - unless (eval { /$ENV{'PL_SVN_IGNORE'}/, 1 } && - /$ENV{'PL_SVN_IGNORE'}/); + &perror("FATAL", "", -1, "$fullname not under git.") + unless (eval { /$ENV{'PL_GIT_IGNORE'}/, 1 } && + /$ENV{'PL_GIT_IGNORE'}/); } } } @@ -445,6 +438,9 @@ sub checkdistinfo { } if (/(\S+)\s+\((\S+)\)\s+=\s+(\S+)/) { my ($tag, $path, $value) = ($1, $2, $3); + if ($records{$path}{$tag}) { + &perror("FATAL", $file, $., "duplicate file listed."); + } $records{$path}{$tag} = $value; if (!$algorithms{$tag} && $tag ne "SIZE") {