git: 0a0c3ea9f5be - main - ports-mgmt/portlint: Update to 2.22.2
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 12:43:16 UTC
The branch main has been updated by marcus: URL: https://cgit.FreeBSD.org/ports/commit/?id=0a0c3ea9f5be43f4a16b3a02d5b77d3d98525895 commit 0a0c3ea9f5be43f4a16b3a02d5b77d3d98525895 Author: Joe Marcus Clarke <marcus@FreeBSD.org> AuthorDate: 2024-09-30 12:39:28 +0000 Commit: Joe Marcus Clarke <marcus@FreeBSD.org> CommitDate: 2024-09-30 12:42:42 +0000 ports-mgmt/portlint: Update to 2.22.2 * Check for executable files [1] * Check that shared objects were installed in ${PREFIX}/lib [2] * Allow MASTERDIR to contain :H[:H] [3] PR: 278404 [1] 278773 [2] Submitted by: Piotr Smyrak <piotr@smyrak.com> [3] --- ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.pl | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index 7e3df9f319fd..df48ea0825d6 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -1,5 +1,5 @@ PORTNAME= portlint -PORTVERSION= 2.22.1 +PORTVERSION= 2.22.2 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 53d80a8847c0..ac205b93ba29 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -52,7 +52,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 22; -my $micro = 1; +my $micro = 2; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -171,7 +171,7 @@ my @varlist = qw( ALLFILES CHECKSUM_ALGORITHMS INSTALLS_ICONS GNU_CONFIGURE CONFIGURE_ARGS MASTER_SITE_SUBDIR LICENSE LICENSE_COMB NO_STAGE DEVELOPER SUB_FILES SHEBANG_LANG MASTER_SITES_SUBDIRS FLAVORS - USE_PYTHON LICENSE_PERMS USE_PYQT USE_GITHUB USE_GITLAB + USE_PYTHON LICENSE_PERMS USE_PYQT USE_GITHUB USE_GITLAB PREFIX ); my %makevar; @@ -364,6 +364,9 @@ if ($committer) { "git files before committing the port."); $File::Find::prune = 1; + } elsif (-f && -x) { + &perror("WARN", $fullname, -1, "this file is executable and likely ". + "does not need to be."); } elsif (-f) { my $fullpath = $makevar{'.CURDIR'}.'/'.$fullname; my $result = `type git >/dev/null 2>&1 && git status --porcelain $fullpath`; @@ -559,6 +562,7 @@ sub checkplist { my $owner_seen = 0; my $group_seen = 0; my $found_so = 0; + my $found_prefix_so = 0; # Variables that are allowed to be out-of-sync in the XXXDIR check. # E.g., %%PORTDOCS%%%%RUBY_MODDOCDIR%% will be OK because there is @@ -774,6 +778,8 @@ sub checkplist { $makevar{USE_LDCONFIG} eq '') { &perror("WARN", $file, $., "installing shared libraries, ". "please define USE_LDCONFIG as appropriate"); + } elsif ($_ =~ m|^lib/lib[^\/]+\.so[.\d]*$|) { + $found_prefix_so++; } elsif ($_ =~ m|lib[^\/]+\.so[.\d]*$|) { $found_so++; } @@ -908,9 +914,12 @@ sub checkplist { &perror("WARN", $file, -1, "There are only $item_count items in the plist. Consider using PLIST_FILES instead of pkg-plist when installing less than $numpitems items."); } - if ($makevar{USE_LDCONFIG} ne '' && !$found_so) { + if ($makevar{USE_LDCONFIG} ne "$makevar{PREFIX}/lib" && !$found_so) { &perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ". "port does not install any shared objects."); + } elsif ($makevar{USE_LDCONFIG} eq "$makevar{PREFIX}/lib" && !$found_prefix_so) { + &perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ". + "port does not install any shared objects into \${PREFIX}/lib."); } close(IN); @@ -2603,7 +2612,8 @@ xargs xmkmf if (! -e "$masterdir/Makefile") { &perror("WARN", "", -1, "unable to locate master port in $masterdir"); } - if ($whole !~ /^MASTERDIR=\s*\$\{\.CURDIR\}(?:\/\.\.){1,2}(?:\/[\w\@.+-]+){1,2}\s*$/m) { + if ($whole !~ /^MASTERDIR=\s*\$\{\.CURDIR\}(?:\/\.\.){1,2}(?:\/[\w\@.+-]+){1,2}\s*$/m && + $whole !~ /^MASTERDIR=\s*\$\{\.CURDIR(:H){1,2}\}(?:\/[\w\@.+-]+){1,2}\s*$/m) { &perror("WARN", $file, -1, "slave ports must define MASTERDIR=". '${.CURDIR}/..(/../<category>)/<port>'); }