From 02a488925d8a68d1b47cf10293487ef0cebb4a24 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Wed, 9 Nov 2016 00:39:18 +0000 Subject: Update to 2.17.5. * Allow https URLs for the WWW line in pkg-descr. Why are we only NOW doing this? [1] * Check TIMESTAMP to make sure it's in the present/past, but not more than 30 days in the past. [2] PR: 212091 [2] Submitted by: amdmi3 [1] Differential Revision: D8462 [1] --- ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.pl | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'ports-mgmt') diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index ae8dce262a1c..008571337ab9 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.17.4 +PORTVERSION= 2.17.5 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 8e2d6331dd2b..97c4bce59844 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.393 2016/07/24 14:20:19 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.396 2016/11/09 00:33:57 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 17; -my $micro = 4; +my $micro = 5; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -393,8 +393,15 @@ sub checkdistinfo { &perror("FATAL", $file, $., "found blank line."); next; } - if (/^TIMESTAMP\s+=\s+\d+$/) { - # TIMESTAMP is a valid distinfo option + if (/^TIMESTAMP\s+=\s+(\d+)$/) { + my $now = time; + if ($_ > $now) { + &perror("FATAL", $file, $., "TIMESTAMP is in the future"); + } else { + if ($now - $_ > 2592000) { + &perror("WARN", $file, $., "TIMESTAMP is over 30 days old"); + } + } next; } if (/(\S+)\s+\((\S+)\)\s+=\s+(\S+)/) { @@ -491,14 +498,14 @@ sub checkdescr { "other local characters. files should be in ". "plain 7-bit ASCII"); } - if ($file =~ /\bpkg-descr/ && $tmp =~ m,http://,) { + if ($file =~ /\bpkg-descr/ && $tmp =~ m,https?://,) { my $has_url = 0; my $has_www = 0; my $cpan_url = 0; my $has_endslash = 0; - foreach my $line (grep($_ =~ "http://", split(/\n+/, $tmp))) { + foreach my $line (grep($_ =~ "https?://", split(/\n+/, $tmp))) { $has_url = 1; - if ($line =~ m,WWW:[ \t]+http://,) { + if ($line =~ m,WWW:[ \t]+https?://,) { $has_www = 1; if ($line =~ m,search.cpan.org,) { $cpan_url = 1; -- cgit v1.2.3