Received: by mail.netbsd.org (Postfix, from userid 605) id 19CB684D4B; Sun, 18 Aug 2019 07:48:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 915A184D33 for ; Sun, 18 Aug 2019 07:47:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id FPIlMTbwuUxh for ; Sun, 18 Aug 2019 07:47:59 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 0D89584CE3 for ; Sun, 18 Aug 2019 07:47:59 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 07968FBF4; Sun, 18 Aug 2019 07:47:59 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1566114478125190" MIME-Version: 1.0 Date: Sun, 18 Aug 2019 07:47:58 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/url2pkg/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20190818074759.07968FBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1566114478125190 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sun Aug 18 07:47:58 UTC 2019 Modified Files: pkgsrc/pkgtools/url2pkg/files: url2pkg.pl Log Message: pkgtools/url2pkg: update SourceForge and GitHub to use https only To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1566114478125190 Content-Disposition: inline Content-Length: 3005 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.pl diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.53 pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.54 --- pkgsrc/pkgtools/url2pkg/files/url2pkg.pl:1.53 Sun Aug 18 07:10:32 2019 +++ pkgsrc/pkgtools/url2pkg/files/url2pkg.pl Sun Aug 18 07:47:58 2019 @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: url2pkg.pl,v 1.53 2019/08/18 07:10:32 rillig Exp $ +# $NetBSD: url2pkg.pl,v 1.54 2019/08/18 07:47:58 rillig Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -340,17 +340,17 @@ sub generate_initial_package_Makefile_li } close(SITES) or die; - if ($url =~ qr"^http://(?:pr)?downloads\.sourceforge\.net/([^/]*)/([^/?]+)(?:\?(?:download|use_mirror=.*))?$") { - my $pkgbase = $1; - $distfile = $2; + if ($url =~ qr"^https://downloads\.sourceforge\.net/project/([^/?]+)/[^?]+/([^/?]+)(?:[?].*)?$") { + my ($project, $filename) = ($1, $2); - $master_sites = "\${MASTER_SITE_SOURCEFORGE:=${pkgbase}/}"; - $homepage = "http://${pkgbase}.sourceforge.net/"; + $master_sites = "\${MASTER_SITE_SOURCEFORGE:=${project}/}"; + $homepage = "https://${project}.sourceforge.net/"; + $distfile = $filename; $found = true; } - if ($url =~ qr"^https?://github\.com/") { - if ($url =~ qr"^https?://github\.com/(.*)/(.*)/archive/(.*)(\.tar\.gz|\.zip)$") { + if ($url =~ qr"^https://github\.com/") { + if ($url =~ qr"^https://github\.com/(.*)/(.*)/archive/(.*)(\.tar\.gz|\.zip)$") { my ($org, $proj, $tag, $ext) = ($1, $2, $3, $4); $master_sites = "\${MASTER_SITE_GITHUB:=$org/}"; @@ -363,7 +363,7 @@ sub generate_initial_package_Makefile_li $distfile = "$tag$ext"; $found = true; - } elsif ($url =~ qr"^https?://github\.com/(.*)/(.*)/releases/download/(.*)/(.*)(\.tar\.gz|\.zip)$") { + } elsif ($url =~ qr"^https://github\.com/(.*)/(.*)/releases/download/(.*)/(.*)(\.tar\.gz|\.zip)$") { my ($org, $proj, $tag, $base, $ext) = ($1, $2, $3, $4, $5); $master_sites = "\${MASTER_SITE_GITHUB:=$org/}"; @@ -496,7 +496,7 @@ sub adjust_package_from_extracted_distfi adjust_po(); adjust_use_languages(); - print("url2pkg> Adjusting the Makefile.\n"); + print("url2pkg> Adjusting the Makefile\n"); my @lines; @@ -569,13 +569,11 @@ sub main() { if (scalar(@extract_cookie) == 0) { if (scalar(@ARGV) == 0) { print("URL: "); - # Pressing Ctrl-D is considered equivalent to - # aborting the process. if (!defined($url = )) { print("\n"); - print("No URL given -- aborting.\n"); exit(0); } + chomp($url); } else { $url = shift(@ARGV); } @@ -588,9 +586,9 @@ sub main() { adjust_package_from_extracted_distfiles(); print("\n"); - print("Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!\n"); + print("Remember to run pkglint when you're done.\n"); + print("See ../../doc/pkgsrc.txt to get some help.\n"); print("\n"); - print("Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)\n"); } main() unless caller(); --_----------=_1566114478125190--