aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2016-11-09 00:39:18 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2016-11-09 00:39:18 +0000
commit02a488925d8a68d1b47cf10293487ef0cebb4a24 (patch)
treead84248daa75ca1724cc67698f8aff300125ffa3 /ports-mgmt/portlint
parent2a4f06cb5c174a7cdf7e575807c2d31312fa80ba (diff)
downloadports-02a488925d8a68d1b47cf10293487ef0cebb4a24.tar.gz
ports-02a488925d8a68d1b47cf10293487ef0cebb4a24.zip
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]
Notes
Notes: svn path=/head/; revision=425779
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl21
2 files changed, 15 insertions, 8 deletions
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;