From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggZ5U-0004mf-N6 for guix-patches@gnu.org; Mon, 07 Jan 2019 12:53:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggZ1J-0005vJ-WF for guix-patches@gnu.org; Mon, 07 Jan 2019 12:49:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggZ1J-0005v9-RX for guix-patches@gnu.org; Mon, 07 Jan 2019 12:49:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggZ1J-0002Jf-M0 for guix-patches@gnu.org; Mon, 07 Jan 2019 12:49:01 -0500 Subject: [bug#33801] import: github: Support source URIs that redirect to GitHub Resent-Message-ID: From: Arun Isaac In-Reply-To: <87o98uzo9u.fsf@gnu.org> References: <87d0pxtciz.fsf@gnu.org> <87woo4qxg7.fsf@gnu.org> <87k1k4p3gl.fsf@gnu.org> <877eg2q56k.fsf@gnu.org> <87o98uzo9u.fsf@gnu.org> Date: Mon, 07 Jan 2019 23:18:11 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33801@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain > I just realized that the warning also triggers when the URL is already a > github.com URL: > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix lint -c github-uri stellarium > gnu/packages/astronomy.scm:135:12: stellarium@0.18.1: URL should be 'https://github.com/Stellarium/stellarium/releases/download/v0.18.1/stellarium-0.18.1.tar.gz' > --8<---------------cut here---------------end--------------->8--- This is a simple mistake on my part and it's not because stellarium's origin URI redirects to the github-production-release-asset URI. Please find attached a patch addressing this. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-guix-lint-Warn-only-if-GitHub-URI-is-not-same-as-the.patch Content-Transfer-Encoding: quoted-printable From=20a8bc92f507e35b54afdd24a42f0aa45ff7cb2c0b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 7 Jan 2019 23:11:58 +0530 Subject: [PATCH] guix: lint: Warn only if GitHub URI is not same as the package URI. * guix/scripts/lint.scm (check-github-url): Warn only if the GitHub URI obtained after following redirects is not same as the original URI. =2D-- guix/scripts/lint.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 9acec4857..0f315a935 100644 =2D-- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -8,7 +8,7 @@ ;;; Copyright =C2=A9 2017 Alex Kost ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2017, 2018 Efraim Flashner =2D;;; Copyright =C2=A9 2018 Arun Isaac +;;; Copyright =C2=A9 2018, 2019 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -820,10 +820,11 @@ descriptions maintained upstream." (lambda (uri) (and=3D> (follow-redirects-to-github uri) (lambda (github-uri) =2D (emit-warning =2D package =2D (format #f (G_ "URL should be '~a'") github-uri) =2D 'source)))) + (unless (string=3D? github-uri uri) + (emit-warning + package + (format #f (G_ "URL should be '~a'") github-uri) + 'source))))) (origin-uris origin))))) =20 (define (check-derivation package) =2D-=20 2.19.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAlwzkNsACgkQLiXui2GA K7O/Ugf+OSe+/ewKgqJmp0bT7slbznkam8fY6tdgN+rxlMf/IGcf8mYssC0GyxKV Bq/O7wYbbNJwE4qduZAMJfscoOFsyo/4FYsbplH2cQtEFN43O5KRdIm4Ty7aEheM G3HKZmYabNfa2AjjCzLUeEaw/rhFxJ2c03s5ULbyehJwmG0f83a8YnTCYxGHV/6R QCyZFaBErzr9PAZKz8xENxUIR7DDwnQ4PHMgPt6M9j2F4ooODiAhcE26ebVQtZXG FAvelDzfTUU0oiyWZ9zn5qeq/9dal2oWvVFoZcquVV9A6nwyKOgpQ4OdcD/99ePN 9MIwqnAW+jdDERtqiTqH6fLGV7LrLA== =nvuD -----END PGP SIGNATURE----- --==-=-=--