From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:42980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghVDq-0004ju-7w for guix-patches@gnu.org; Thu, 10 Jan 2019 02:57:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghV2R-0007nV-LV for guix-patches@gnu.org; Thu, 10 Jan 2019 02:46:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53619) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghV2Q-0007nJ-Ey for guix-patches@gnu.org; Thu, 10 Jan 2019 02:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ghV2Q-0001LS-5q for guix-patches@gnu.org; Thu, 10 Jan 2019 02:46:02 -0500 Subject: [bug#33801] import: github: Support source URIs that redirect to GitHub Resent-Message-ID: From: Arun Isaac In-Reply-To: <87d0p57wfv.fsf@gnu.org> References: <87d0pxtciz.fsf@gnu.org> <87woo4qxg7.fsf@gnu.org> <87k1k4p3gl.fsf@gnu.org> <877eg2q56k.fsf@gnu.org> <87o98uzo9u.fsf@gnu.org> <87zhsb1r0x.fsf@gnu.org> <87d0p57wfv.fsf@gnu.org> Date: Thu, 10 Jan 2019 13:15:36 +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; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> gnu/packages/lisp.scm:3806:7: In procedure inputs: >> error: xclip: unbound variable > > Ouch. This is fixed by 804b9b18ac9188ffb6c6891cbb9241c6a80ed7c8. I > think we were just lucky it didn=E2=80=99t bite before. Ok. > You can recheck your patch and push it I guess. Please find attached an updated patch complete with the test case. --=-=-= 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=202711c58b8d713bf87e2a01d21a4bc6c77ccc7b7d 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. * tests/lint.scm ("github-url: already the correct github url"): New test. =2D-- guix/scripts/lint.scm | 11 ++++++----- tests/lint.scm | 11 ++++++++++- 2 files changed, 16 insertions(+), 6 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) diff --git a/tests/lint.scm b/tests/lint.scm index fe12bebd8..521e9fb40 100644 =2D-- a/tests/lint.scm +++ b/tests/lint.scm @@ -775,7 +775,16 @@ (method url-fetch) (uri (%local-url)) (sha256 %null-sha256)))))))))) =2D github-url))) + github-url)) + (test-assert "github-url: already the correct github url" + (string-null? + (with-warnings + (check-github-url + (dummy-package "x" (source + (origin + (method url-fetch) + (uri github-url) + (sha256 %null-sha256))))))))) =20 (test-assert "cve" (mock ((guix scripts lint) package-vulnerabilities (const '())) =2D-=20 2.19.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAlw2+CAACgkQLiXui2GA K7OH9AgApq8OxXPsEWEvSsaK2SI3ABt8G+cnXLi2zt6rcTpNQbnXZ9BVohfqmrcw WqmXgFQHdTyjxOF+CVXj+42hboyqwTWcR04d5PNzP70vKAiWzS84zuKvXdFispcm nfqkyi9tGclj4bnzZDGoyi+WOMHqw+dEPbTlzePb1PZabLCgTHJpZgi89V/8IeIh de6v0v/8JIKImI7UKd8Q/igAwQKGp6qg0vXo4ac2MY+6Ei68y19xLbcB/kgqf1dx X1Sx2uJcbxSxdqp2XQOZQqBi12CjJN8FBR5Gy5dUXAEveKviWshxAcQyqVQjzJU+ C7HtGGQBbTi/BTtGAuWHEEtBWgyY+w== =srBk -----END PGP SIGNATURE----- --==-=-=--