GNU bug report logs - #50072
[PATCH WIP 0/4] Add upstream updater for git-fetch origins.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Sarah Morgensen <iskarian@HIDDEN>; Keywords: patch; dated Sun, 15 Aug 2021 23:17:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 7 Sep 2021 17:51:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 07 13:51:14 2021
Received: from localhost ([127.0.0.1]:57619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNfFa-00052F-4g
	for submit <at> debbugs.gnu.org; Tue, 07 Sep 2021 13:51:14 -0400
Received: from out2.migadu.com ([188.165.223.204]:49079)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mNfFX-000523-HF
 for 50072 <at> debbugs.gnu.org; Tue, 07 Sep 2021 13:51:13 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1631037069;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=QIdr60V2P+5C2KDeHFspc05pxRDAl/xo9dSTP4pIkJA=;
 b=Dk0ztGNlblTrUvutaRpoZazPQI9Zb2tT31YpPSuinuX/A63PpaDHfnHdQnMUJWlUxm3/KE
 3+69/4TS2DUCRVj3d5GgtWagUO3sHYTNGiMm4/MCJjulRFGCsZ1d3CQiTmbOnuxD+zRtRg
 s1kiqVBjuK/dkypJ1W6lI7EA882jt/g=
From: Sarah Morgensen <iskarian@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86mtopi3s7.fsf@HIDDEN>
 <470a95f159120d14384c3096cff91e3ce8d3c6c8.camel@HIDDEN>
Date: Tue, 07 Sep 2021 10:51:07 -0700
In-Reply-To: <470a95f159120d14384c3096cff91e3ce8d3c6c8.camel@HIDDEN>
 (Maxime Devos's message of "Tue, 07 Sep 2021 12:00:42 +0200 (7 hours, 45
 minutes, 41 seconds ago)")
Message-ID: <86a6koi8ac.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50072
Cc: 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Maxime Devos <maximedevos@HIDDEN> writes:

> Sarah Morgensen schreef op ma 06-09-2021 om 18:16 [-0700]:
>> Hi Maxime,
>> 
>> Maxime Devos <maximedevos@HIDDEN> writes:
>> 
>> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> > > * guix/git-download.scm (checkout-to-store): New procedure.
>> > > * guix/upstream.scm (guess-version-transform)
>> > > (package-update/git-fetch): New procedures.
>> > > (%method-updates): Add GIT-FETCH mapping.
>> > 
>> > Does it support packages defined like (a)
>> > 
>> > (define-public gnash
>> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>> >         (revision "0"))
>> >     (package
>> >       (name "gnash")
>> >       (version (git-version "0.8.11" revision commit))
>> >       (source (git-reference
>> >                 (url "https://example.org")
>> >                 (commit commit)))
>> >       [...])))
>> 
>> Thinking about this again, since updaters typically returns actual
>> versions (tags) instead of commits, how much would such a
>> feature be used?
>
> The minetest updater returns version numbers.
> It also returns a git-reference object, which includes the commit.
> Just returning a version number often isn't sufficient,
> because many repositories of minetest mods do not keep version tags.

Thanks for the explanation.

So there is a version number indicated elsewhere than in the tags for
some minetest packages?  (Is this data in the package's git repo or in
e.g. minetest repo metadata?)  That is, the minetest updater always uses
"blessed versions" (not just random commits), such that "revision" will
always be "0"?

Are current minetest packages like this formatted like 'gnash' above?

> See <https://issues.guix.gnu.org/50072#5>.

That's the message I quoted ;)

--
Sarah




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 7 Sep 2021 10:00:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 07 06:00:47 2021
Received: from localhost ([127.0.0.1]:55449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNXuI-00047Z-Vi
	for submit <at> debbugs.gnu.org; Tue, 07 Sep 2021 06:00:47 -0400
Received: from laurent.telenet-ops.be ([195.130.137.89]:37340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mNXuH-00047O-2y
 for 50072 <at> debbugs.gnu.org; Tue, 07 Sep 2021 06:00:45 -0400
Received: from butterfly.local ([188.188.3.227])
 by laurent.telenet-ops.be with bizsmtp
 id qy0i2500W4tskic01y0jej; Tue, 07 Sep 2021 12:00:43 +0200
Message-ID: <470a95f159120d14384c3096cff91e3ce8d3c6c8.camel@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Date: Tue, 07 Sep 2021 12:00:42 +0200
In-Reply-To: <86mtopi3s7.fsf@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86mtopi3s7.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-3W3wFcBMFBedcZevcPSQ"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1631008843; bh=IYUU/W/pUIzsQ3BLfyq7oDgDZA3jUENYJlyUusxNxq8=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=Tuh9TXNkMnT+iHVtAphzuU+tkt7JbeFBsgWHRydn34gDQ4V37ya1DgJ7+lcvLvTGJ
 WY+DUYYjWmTFWOmHAScZkyE1iazUnLPDT3pJGlEMEkFSqBfr7UFyBvx/WDxtXj/6ZP
 iuAWWbBc8PxVG60vzPfHDbwBm8semKtkQy3tLRl8P28KH/nIinFBFCzrSa5dWLyALa
 M7fOAr/uUI1BOsncJQGFJwCafeDtUBrAlUbKme74RUCYmDvBe1242izOEnGmHtEhIz
 k5e3SpG4VN0eMNThwratSDWXVp/Z9odyKjp6FlaFcgfex8lwmvCPlxWf2FkggauD2/
 bTGxQJPmmQYzQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-3W3wFcBMFBedcZevcPSQ
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sarah Morgensen schreef op ma 06-09-2021 om 18:16 [-0700]:
> Hi Maxime,
>=20
> Maxime Devos <maximedevos@HIDDEN> writes:
>=20
> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
> > > * guix/git-download.scm (checkout-to-store): New procedure.
> > > * guix/upstream.scm (guess-version-transform)
> > > (package-update/git-fetch): New procedures.
> > > (%method-updates): Add GIT-FETCH mapping.
> >=20
> > Does it support packages defined like (a)
> >=20
> > (define-public gnash
> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
> >         (revision "0"))
> >     (package
> >       (name "gnash")
> >       (version (git-version "0.8.11" revision commit))
> >       (source (git-reference
> >                 (url "https://example.org")
> >                 (commit commit)))
> >       [...])))
>=20
> Thinking about this again, since updaters typically returns actual
> versions (tags) instead of commits, how much would such a
> feature be used?

The minetest updater returns version numbers.
It also returns a git-reference object, which includes the commit.
Just returning a version number often isn't sufficient,
because many repositories of minetest mods do not keep version tags.

See <https://issues.guix.gnu.org/50072#5>.

Greetings,
Maxime.

--=-3W3wFcBMFBedcZevcPSQ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTc4ShccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oCxAP9Ij02MwmdqzRHO0untiA8XMwvQ
5mIZFI/F4rGBs+bFVAEA/HGbTDWV65zhq7GRhx3iSkL8dQ7TNZLaOhn1KKNnpAc=
=OfIQ
-----END PGP SIGNATURE-----

--=-3W3wFcBMFBedcZevcPSQ--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 7 Sep 2021 02:00:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 22:00:07 2021
Received: from localhost ([127.0.0.1]:54880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNQP8-00064b-Rq
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 22:00:07 -0400
Received: from out2.migadu.com ([188.165.223.204]:20950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mNQP5-00063G-67
 for 50072 <at> debbugs.gnu.org; Mon, 06 Sep 2021 22:00:04 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1630980001;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=sD4XhDKWWQF65W3dGTImGWwLVGH3Ic6CCmA7eteB6vE=;
 b=kgA6Tqo2QJE8t/TRhMmPfBuf3qMZk1DSeg6Yb7CyCu9AH7mrgijxuCOaIyzqaD+7gVjTLO
 i0/trvhW1Ta/KRo9VV7i4G6o4cE7TjH1c43msJ8U9+unHOP8jfOyPl3it221Oso7N7JY5E
 IzFIi3DmWFjCvONpTJzXHHNTd4uqNyo=
From: Sarah Morgensen <iskarian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <87fsui80dd.fsf_-_@HIDDEN>
Date: Mon, 06 Sep 2021 18:59:59 -0700
In-Reply-To: <87fsui80dd.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?=
 =?utf-8?Q?=22's?= message of "Mon,
 06 Sep 2021 12:27:42 +0200 (14 hours, 48 minutes, 39 seconds ago)")
Message-ID: <86k0jti1r4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50072
Cc: 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi Sarah,
>
> I like this patch series.  :-)

Thanks for taking a look!

>
> Sarah Morgensen <iskarian@HIDDEN> skribis:
>
>> * guix/git-download.scm (checkout-to-store): New procedure.
>> * guix/upstream.scm (guess-version-transform)
>> (package-update/git-fetch): New procedures.
>> (%method-updates): Add GIT-FETCH mapping.
>
> This LGTM.

Thanks.  WDYT about pre-emptively adding support for non-url URIs as
well?  That is,

1. change "urls" in <upstream-source> to "uri"

2. in 'git-fetch'

  a) if the upstream-source-uri is a git-reference, just use it as-is
     rather than guessing the tag

  b) if it's not, return an 'upstream-source' with a git-reference URI=20

3. update 'upstream-source-compiler' to work for git-reference URIs.

If there are no objections, I think I'll make those changes and send
that as a proper patch.

>
> Nitpick:
>
>> +(define* (checkout-to-store store ref #:key (log (current-error-port)))
>> +  "Checkout REF to STORE.  Write progress reports to LOG.  RECURSIVE? h=
as the
>> +same effect as the same-named parameter of 'latest-repository-commit'."
>> +  ;; XXX: (guix git) does not use shallow clones, so this will be slow
>> +  ;; for long-running repositories.
>> +  (match-record ref <git-reference>
>
> [...]
>
>> +  ;; Only use the first element of URLS.
>> +  (match-record source <upstream-source>
>> +    (version urls)
>
> I=E2=80=99d use the record acceesors in this cases rather than =E2=80=98m=
atch-record=E2=80=99;
> currently =E2=80=98match-record=E2=80=99 is not super efficient and I fin=
d it slightly
> less readable when you=E2=80=99re just accessing a couple of fields.

Fair.  I got a little excited to discover new syntax :)

--
Sarah




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 7 Sep 2021 01:16:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 21:16:15 2021
Received: from localhost ([127.0.0.1]:54861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNPih-00050t-FZ
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 21:16:15 -0400
Received: from out0.migadu.com ([94.23.1.103]:58996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mNPid-00050i-SB
 for 50072 <at> debbugs.gnu.org; Mon, 06 Sep 2021 21:16:13 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1630977370;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=8iyvOhaY+3kNs84M8MiKXnW9p8M5JIIje9zC1QfALbc=;
 b=RDOlMmEUscGwwLv1AmShUgkF9OabDNc05xRhDf0FOHrSlvSQgvBOsuG8K5wt1s5IK8IXrD
 jOvdo7GbQaUdW0wC77xQ+Q3dgrEW8WrUOxEmr/0ssb0E1lTOdoUFOp3qUhc3ls1g243gsj
 JbBwAX/59hkSPRxIFiuyTsqrkrI6lSc=
From: Sarah Morgensen <iskarian@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
Date: Mon, 06 Sep 2021 18:16:08 -0700
In-Reply-To: <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 (Maxime Devos's message of "Mon, 16 Aug 2021 12:46:25 +0200 (3 weeks, 14
 hours, 27 minutes ago)")
Message-ID: <86mtopi3s7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Maxime,

Maxime Devos <maximedevos@HIDDEN> writes:

> Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> * guix/git-download.scm (checkout-to-store): New procedure.
>> * guix/upstream.scm (guess-version-transform)
>> (package-update/git-fetch): New procedures.
>> (%method-updates): Add GIT-FETCH mapping.
>
> Does it support packages defined like (a)
>
> (define-public gnash
>   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>         (revision "0"))
>     (package
>       (name "gnash")
>       (version (git-version "0.8.11" revision commit))
>       (source (git-reference
>                 (url "https://example.org")
>                 (commit commit)))
>       [...])))

Thinking about this again, since updaters typically returns actual
versions (tags) instead of commits, how much would such a
feature be used?

OTOH, I could definitely see use for an ability to update packages like
these to proper versions (removing the surrounding 'let') but that's
probably more rare and may not be worth the implementation effort.

--
SEarah




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 6 Sep 2021 11:47:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 07:47:48 2021
Received: from localhost ([127.0.0.1]:52208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mND6J-0004kY-VA
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 07:47:48 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:55228)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mND6H-0004kJ-EO
 for 50072 <at> debbugs.gnu.org; Mon, 06 Sep 2021 07:47:46 -0400
Received: from butterfly.local ([188.188.57.172])
 by michel.telenet-ops.be with bizsmtp
 id qbni250053ix9AL06bniSq; Mon, 06 Sep 2021 13:47:43 +0200
Message-ID: <10996c63a8690ceea6c88a5fc88ddabad7b000dd.camel@HIDDEN>
Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Date: Mon, 06 Sep 2021 13:47:35 +0200
In-Reply-To: <87k0ju80kk.fsf_-_@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86fsv9jh8h.fsf_-_@HIDDEN>
 <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
 <87k0ju80kk.fsf_-_@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-v5Hhn2n+7sUb2T2OY7dt"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630928863; bh=+wgEu9X7wVJIzWD/KjNKPrKL7CGeR9Fe11JK3/vWzq4=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=KNtzuNSN5MsmsNen0vw5N6ysNiJ1yNdt7of3z7Q0hutN6D2o4uN7rAkOOamron42s
 UAsdJLDZo1H38PXxx/uICTubxJoGetZGnFHC7T2v0h1AxFF3RzYU+Wu8Ogyl5+XthS
 lGBM0e6wabAKHwQw22dweve0l+3L9/7ZObqJlxoPmyoeMdbt/xp93QZz0J0RAbHbGL
 zuIFVyTseHB0GIeQwDQe80en1Edy3v1UomZ80B+7fABMqNKJ92oqQ1ScOime/C510+
 kkYtlsfVwzSsAqqei59Y0GxjhXaogpoDnEHDd2+hWGQBKep9MuvXvnBYjquWZDeuOa
 WauI2ZuJpvJzQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: Sarah Morgensen <iskarian@HIDDEN>, Xinglu Chen <public@HIDDEN>,
 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-v5Hhn2n+7sUb2T2OY7dt
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

Ludovic Court=C3=A8s schreef op ma 06-09-2021 om 12:23 [+0200]:
> > > >=20
> > > > [...]
> > > > Does it support packages defined like (a)
> > > >=20
> > > > (define-public gnash
> > > >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
> > > >         (revision "0"))
> > > >     (package
> > > >       (name "gnash")
> > > >       (version (git-version "0.8.11" revision commit))
> > > >       (source (git-reference
> > > >                 (url "https://example.org")
> > > >                 (commit commit)))
> > > >       [...])))
> > >=20
> > > No, it doesn't.  Since the commit definition isn't part of the actual
> > > package definition, the current code has no way of updating it.  It
> > > would require a rewrite of the edit-in-place logic with probably a lo=
t
> > > of special-casing.
> >=20
> > Perhaps a 'surrounding-expression-location' procedure can be defined?
> >=20
> > (define (surrounding-expression-location inner-location)
> >   "Determine the location of the S-expression that surrounds the S-expr=
ession
> > at INNER-LOCATION, or #false if the inner S-expression is at the top-le=
vel."
> >   ??? Something like 'read', but in reverse, maybe?
> >   Doesn't need to support every construct, just "string without escapes=
" and
> >   (parentheses other-things) might be good enough in practice for now)
> >=20
> > Seems tricky to implement, but it would be more robust than relying
> > on conventions like =E2=80=98the surrounding 'let' can be found by movi=
ng two columns
> > and two lines backwards=E2=80=99.  Or see another method (let&) below t=
hat is actually
> > implemented ...
>=20
> I think we can work incrementally.  It wouldn=E2=80=99t be unreasonable t=
o start
> with a =E2=80=98definition-location=E2=80=99 procedure that would work in=
 a way similar
> to =E2=80=98package-field-location=E2=80=99 (essentially =E2=80=98read=E2=
=80=99 each top-level sexp of
> the file and record the location of the one that immediately precedes
> the package location.)

=E2=80=98package-field-location=E2=80=99 (currently) doesn't work like that=
.  Currently,
it extracts the location from the package, opens the file, uses a procedure
'goto' that works like 'seek' except that it accepts line and column number=
s
instead of byte offsets.

What you proposed could work, though it seems a bit inefficient to me.
Asking upstream for an update probably takes a lot more time though.

> But maybe the discussion in <https://issues.guix.gnu.org/50286> will
> give us something nice.

Greetings,
Maxime

--=-v5Hhn2n+7sUb2T2OY7dt
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTX/1xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ophAQC7GSfWH0C/M+dLr8Jkdg0mny/r
yoG85v0kcMpD6jIk/AD+MgzJwEj1oLYkRndZc9Ql4ILaODgpj0tHD0orEEKA/gk=
=koNy
-----END PGP SIGNATURE-----

--=-v5Hhn2n+7sUb2T2OY7dt--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 6 Sep 2021 10:28:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 06:28:11 2021
Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNBrG-0000JU-Ux
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:28:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mNBrF-0000JH-QZ
 for 50072 <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:28:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34870)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mNBrA-00015F-Kd; Mon, 06 Sep 2021 06:28:04 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47200 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mNBqr-0000Yf-O9; Mon, 06 Sep 2021 06:27:46 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
Date: Mon, 06 Sep 2021 12:27:42 +0200
In-Reply-To: <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 (Sarah Morgensen's message of "Sun, 15 Aug 2021 16:25:27 -0700")
Message-ID: <87fsui80dd.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50072
Cc: 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Sarah,

I like this patch series.  :-)

Sarah Morgensen <iskarian@HIDDEN> skribis:

> * guix/git-download.scm (checkout-to-store): New procedure.
> * guix/upstream.scm (guess-version-transform)
> (package-update/git-fetch): New procedures.
> (%method-updates): Add GIT-FETCH mapping.

This LGTM.

Nitpick:

> +(define* (checkout-to-store store ref #:key (log (current-error-port)))
> +  "Checkout REF to STORE.  Write progress reports to LOG.  RECURSIVE? ha=
s the
> +same effect as the same-named parameter of 'latest-repository-commit'."
> +  ;; XXX: (guix git) does not use shallow clones, so this will be slow
> +  ;; for long-running repositories.
> +  (match-record ref <git-reference>

[...]

> +  ;; Only use the first element of URLS.
> +  (match-record source <upstream-source>
> +    (version urls)

I=E2=80=99d use the record acceesors in this cases rather than =E2=80=98mat=
ch-record=E2=80=99;
currently =E2=80=98match-record=E2=80=99 is not super efficient and I find =
it slightly
less readable when you=E2=80=99re just accessing a couple of fields.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 6 Sep 2021 10:23:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 06:23:38 2021
Received: from localhost ([127.0.0.1]:52025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNBmo-0008TR-Uj
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:23:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60926)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mNBmn-0008TD-RL
 for 50072 <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:23:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34512)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mNBmg-0005Lu-18; Mon, 06 Sep 2021 06:23:26 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47198 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mNBmf-0005sm-Oj; Mon, 06 Sep 2021 06:23:25 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86fsv9jh8h.fsf_-_@HIDDEN>
 <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
Date: Mon, 06 Sep 2021 12:23:23 +0200
In-Reply-To: <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
 (Maxime Devos's message of "Tue, 17 Aug 2021 12:18:28 +0200")
Message-ID: <87k0ju80kk.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50072
Cc: Sarah Morgensen <iskarian@HIDDEN>, Xinglu Chen <public@HIDDEN>,
 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Maxime Devos <maximedevos@HIDDEN> skribis:

> Sarah Morgensen schreef op ma 16-08-2021 om 12:56 [-0700]:
>> Hi Maxime,
>>=20
>> Thanks for taking a look at this. :)
>>=20
>> Maxime Devos <maximedevos@HIDDEN> writes:
>>=20
>> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> > > * guix/git-download.scm (checkout-to-store): New procedure.
>> > > * guix/upstream.scm (guess-version-transform)
>> > > (package-update/git-fetch): New procedures.
>> > > (%method-updates): Add GIT-FETCH mapping.
>> >=20
>> > Does it support packages defined like (a)
>> >=20
>> > (define-public gnash
>> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>> >         (revision "0"))
>> >     (package
>> >       (name "gnash")
>> >       (version (git-version "0.8.11" revision commit))
>> >       (source (git-reference
>> >                 (url "https://example.org")
>> >                 (commit commit)))
>> >       [...])))
>>=20
>> No, it doesn't.  Since the commit definition isn't part of the actual
>> package definition, the current code has no way of updating it.  It
>> would require a rewrite of the edit-in-place logic with probably a lot
>> of special-casing.
>
> Perhaps a 'surrounding-expression-location' procedure can be defined?
>
> (define (surrounding-expression-location inner-location)
>   "Determine the location of the S-expression that surrounds the S-expres=
sion
> at INNER-LOCATION, or #false if the inner S-expression is at the top-leve=
l."
>   ??? Something like 'read', but in reverse, maybe?
>   Doesn't need to support every construct, just "string without escapes" =
and
>   (parentheses other-things) might be good enough in practice for now)
>
> Seems tricky to implement, but it would be more robust than relying
> on conventions like =E2=80=98the surrounding 'let' can be found by moving=
 two columns
> and two lines backwards=E2=80=99.  Or see another method (let&) below tha=
t is actually
> implemented ...

I think we can work incrementally.  It wouldn=E2=80=99t be unreasonable to =
start
with a =E2=80=98definition-location=E2=80=99 procedure that would work in a=
 way similar
to =E2=80=98package-field-location=E2=80=99 (essentially =E2=80=98read=E2=
=80=99 each top-level sexp of
the file and record the location of the one that immediately precedes
the package location.)

But maybe the discussion in <https://issues.guix.gnu.org/50286> will
give us something nice.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 30 Aug 2021 21:36:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 30 17:36:33 2021
Received: from localhost ([127.0.0.1]:60524 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mKoxE-000086-Pw
	for submit <at> debbugs.gnu.org; Mon, 30 Aug 2021 17:36:33 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:60426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mKoxD-00007w-6R
 for 50072 <at> debbugs.gnu.org; Mon, 30 Aug 2021 17:36:31 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by andre.telenet-ops.be with bizsmtp
 id nxcV250010mfAB401xcV83; Mon, 30 Aug 2021 23:36:29 +0200
Message-ID: <2c76cd38605f4358df29ed0d464a8f5512b1b662.camel@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Date: Mon, 30 Aug 2021 23:36:28 +0200
In-Reply-To: <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86fsv9jh8h.fsf_-_@HIDDEN>
 <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-2SRZl0L+QxP2qcI0kBXc"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630359389; bh=2haoJGEyEXryPRNsEylaoN7w6eEKtjHUIhKYdkC2zTs=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=lki+YMZLgGfbTltLk/9GQHq6BC38Ms4FZOK+RjlwjuOgKaN5KUZsuEDUdJa+vKPPS
 68aB1/RH3rSdJAbujO4nRZZEjXXRbQcvEGAVuaDH/0RkGgQs8RQWyts431/yeUtbHx
 Idl9nV9RfvTVDN1k9c8B3Pkfr6OAJg0/7aiIfPauf5MjUA4JL7rlTa4ao4XgaDUSGo
 rtdZQkR5SANAawih2Mds+7/V6und3bjQ176MUsrGA5RvXs4KfKoaPPqxfb1bs1CVZ4
 0D0/cL0INN21HIsoH5OdRac7RBy5piQbRr0vCFuMcN93p32GMx7vxyF6/IL3sl9fiS
 SP83IuE1PFMKg==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: Xinglu Chen <public@HIDDEN>, 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-2SRZl0L+QxP2qcI0kBXc
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Maxime Devos schreef op di 17-08-2021 om 12:18 [+0200]:
> [... stuff about let&, let*&, supporting packages like:
> > > (define-public gnash
> > >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
> > >         (revision "0"))
> > >     (package
> > >       (name "gnash")
> > >       (version (git-version "0.8.11" revision commit))
> > >       (source (git-reference
> > >                 (url "https://example.org")
> > >                 (commit commit)))
> > >       [...])))
> > ...
> ... by fudging the source locations ...]

I went ahead and send a patch replacing 'let' with 'let&':
<https://issues.guix.gnu.org/50286>.

Greetings,
Maxime.

--=-2SRZl0L+QxP2qcI0kBXc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYS1PXBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h2rAP0VJi/wmuk0zSVG122dfNY7jHOM
b27we11DqPJz77yfpgEA8Io5XvYfNa2WMyAt84BkSWyM/IlMlsrnLUtm9ImBcQM=
=P2nY
-----END PGP SIGNATURE-----

--=-2SRZl0L+QxP2qcI0kBXc--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 18 Aug 2021 14:45:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 10:45:53 2021
Received: from localhost ([127.0.0.1]:57209 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGMpB-0003Xu-Kc
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 10:45:53 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:58368
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mGMp5-0003Lk-Ek
 for 50072 <at> debbugs.gnu.org; Wed, 18 Aug 2021 10:45:48 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1629297932;
 bh=Pbsr4GAOeBvVspx8pYJkYdGlGX0xZ/d5bmOPe8s/DZI=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=g/V8d767FNKL3PiY5FxDc54Qy9TZi13IkcgRQxzvvsql/EnSYdQk+9hOhhNw6fep9
 F097GVho4u4kTuyfbwO2hmLMR37/ws2l3W6PvvgFquWbWWjpFMRr/Ui1LhWZbru6fW
 9Wr1bhQ9KCXBrSSyjslL33SsYOCS5HoOEwL7FJmU=
To: Maxime Devos <maximedevos@HIDDEN>, Sarah Morgensen
 <iskarian@HIDDEN>, 50072 <at> debbugs.gnu.org
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
In-Reply-To: <12f985cd431b8b8099f680a3b25ed2eb90e6b26d.camel@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <87wnol8rw3.fsf@HIDDEN>
 <12f985cd431b8b8099f680a3b25ed2eb90e6b26d.camel@HIDDEN>
Date: Wed, 18 Aug 2021 16:45:11 +0200
Message-ID: <878s0yke14.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Mon, Aug 16 2021,
 Maxime Devos wrote: > Xinglu Chen schreef
 op ma 16-08-2021 om 15:02 [+0200]: >> On Mon, Aug 16 2021, Maxime Devos wrote:
 >> >> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]: >> > >
 * guix/git-download.scm ( [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Mon, Aug 16 2021, Maxime Devos wrote: > Xinglu Chen schreef
    op ma 16-08-2021 om 15:02 [+0200]: >> On Mon, Aug 16 2021, Maxime Devos wrote:
    >> >> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]: >> > >
    * guix/git-download.scm ( [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Maxime Devos wrote:

> Xinglu Chen schreef op ma 16-08-2021 om 15:02 [+0200]:
>> On Mon, Aug 16 2021, Maxime Devos wrote:
>>=20
>> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> > > * guix/git-download.scm (checkout-to-store): New procedure.
>> > > * guix/upstream.scm (guess-version-transform)
>> > > (package-update/git-fetch): New procedures.
>> > > (%method-updates): Add GIT-FETCH mapping.
>> >=20
>> > Does it support packages defined like (a)
>> >=20
>> > (define-public gnash
>> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>> >         (revision "0"))
>> >     (package
>> >       (name "gnash")
>> >       (version (git-version "0.8.11" revision commit))
>> >       (source (git-reference
>> >                 (url "https://example.org")
>>=20
>> IIUC, it only supports GitHub URLs at the moment.  I have a WIP patch
>> for adding support for any arbitrary Git repository[1].
>
> This patch series doesn't mention GitHub anywhere (except in the patch
> series description) so I don't think it only supports GitHub URLs.
> Admittedly, only one updater, "github", currently produces git-reference
> URLs,

That was what I was referring to, sorry for not making it clearer.

Only the =E2=80=98github=E2=80=99 updater can update =E2=80=98git-fetch=E2=
=80=99 origins;
=3D> only GitHub URLs can are recognized by the =E2=80=98github=E2=80=99 up=
dater;
=3D> thus, only packages hosted on GitHub can be updated.

> but I sent a patch series [2] that adds an importer which produces
> git-reference URLs and the corresponding updater (see =E2=80=98git-fetch.=
patch=E2=80=99)
> produces appropriate git-reference objects.
>
> [2]: <https://issues.guix.gnu.org/49828#51>.

I haven=E2=80=99t looked at the patches yet, but that looks very cool!  :-)


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEdHPcVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5iSgQAIzTNsUOYtetadiDvv7HCvaXGbG4
RSC+bJmKVaayMPBsOcSPOIkiT+YwYambXyGSZqyyuxc6oSbBXtmuUHxD63tpoYIJ
NMutoH8f4GLsJxLwojZP+OWoduIC8cQtyxr24KJyqN58tIkFgg+QYihGPktg9CsN
XI8AurDzCA8DFnT1r6sDM3+5zQV7PTKBvRavPh6bJDvUQgh7m3rNOu7rfC8XGcO7
VAOIHni8TW66MKcgXHDVLlSxzG9Ab0OhpaTSOKhcNNc0dGjrp4jR+CMqjR8Yg+bO
7JB6fWfEYJRxjHV27NslJ26qn7NgpXEIDoXUSxAT7C0qQ81Xv0RCavV7ZT6USb0R
NpQCNcblrV0maoYP2aQPSvKNSTTI9t19Z5jBghQZ0iuIUpu6lhf12BULemR+Pv3O
6yy9m3OOLvaMJRzQjs4BmVqHaUMaYrpNODl6f3TrBEWW6eBaV6YU5qm4Ub+u8glM
fCiiCexYjMeJZhftS3M5FQnWMMk31Li+11uuixT73kARVW3ukNZothcQAX3KSG0d
+jP/gPeunZ0EwAAlVYEmo8A8h6MZtyP8DMlAo0fvc7XuTeMbSnD9Dx/DsTb4niOj
SWi7zeqxJS6koXAFd3KnOZ6steMEBZZuBvak74UOMVK0cK/y0Pm3k/gG86VmufF9
j/jetFShbiDluYa6
=Ct9e
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 17 Aug 2021 10:18:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 06:18:40 2021
Received: from localhost ([127.0.0.1]:51756 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFwB6-0003tA-26
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 06:18:40 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:52772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mFwB2-0003sz-Ia
 for 50072 <at> debbugs.gnu.org; Tue, 17 Aug 2021 06:18:38 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by andre.telenet-ops.be with bizsmtp
 id iaJa2500Q0mfAB401aJarM; Tue, 17 Aug 2021 12:18:35 +0200
Message-ID: <7986923ce7712dc341e859e62675abee12072922.camel@HIDDEN>
Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Date: Tue, 17 Aug 2021 12:18:28 +0200
In-Reply-To: <86fsv9jh8h.fsf_-_@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <86fsv9jh8h.fsf_-_@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-AH/+dNebwLIhoKM5nARb"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1629195515; bh=jp/2pHV0Tj+XdZ8epX9Lk/Ju5XEcEvgfdciAka6dwoU=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=DEJu7rOhh2GLqJb3l5lCTbNpl9SmQOrPT0yc6Z8ssoxV3lMjlsPxijxAAH0fuVxfs
 c1O31sv+9JHVaDfjrV2pLAcpiXzW5P4foK4Unth8V4bzbPXPGw5cvLQaWck6giBv/u
 UMisq9UdhMgFogonJ737Tpp0Zm3+5KBUvaojYkLYkbTZvWdJWXzAqLvEBAenBcEx/W
 qA5s5MZPvbQZ+EiL/HZVPcJWv57cXI/nYEYcfYesdPywFi7zl7hAc45mccTCBFAQ2L
 J9GilvNOpVVUb0Gx+FJ4HvJI5RLIsMiD3lhCkVtC+47LGJ+4fV+RFlXzlVYRXtAhdo
 radGMTVcyaX7w==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: Xinglu Chen <public@HIDDEN>, 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-AH/+dNebwLIhoKM5nARb
Content-Type: multipart/mixed; boundary="=-yiIn7AhCV0N/+pc8ogPA"


--=-yiIn7AhCV0N/+pc8ogPA
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sarah Morgensen schreef op ma 16-08-2021 om 12:56 [-0700]:
> Hi Maxime,
>=20
> Thanks for taking a look at this. :)
>=20
> Maxime Devos <maximedevos@HIDDEN> writes:
>=20
> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
> > > * guix/git-download.scm (checkout-to-store): New procedure.
> > > * guix/upstream.scm (guess-version-transform)
> > > (package-update/git-fetch): New procedures.
> > > (%method-updates): Add GIT-FETCH mapping.
> >=20
> > Does it support packages defined like (a)
> >=20
> > (define-public gnash
> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
> >         (revision "0"))
> >     (package
> >       (name "gnash")
> >       (version (git-version "0.8.11" revision commit))
> >       (source (git-reference
> >                 (url "https://example.org")
> >                 (commit commit)))
> >       [...])))
>=20
> No, it doesn't.  Since the commit definition isn't part of the actual
> package definition, the current code has no way of updating it.  It
> would require a rewrite of the edit-in-place logic with probably a lot
> of special-casing.

Perhaps a 'surrounding-expression-location' procedure can be defined?

(define (surrounding-expression-location inner-location)
  "Determine the location of the S-expression that surrounds the S-expressi=
on
at INNER-LOCATION, or #false if the inner S-expression is at the top-level.=
"
  ??? Something like 'read', but in reverse, maybe?
  Doesn't need to support every construct, just "string without escapes" an=
d
  (parentheses other-things) might be good enough in practice for now)

Seems tricky to implement, but it would be more robust than relying
on conventions like =E2=80=98the surrounding 'let' can be found by moving t=
wo columns
and two lines backwards=E2=80=99.  Or see another method (let&) below that =
is actually
implemented ...

> There are currently ~1250 package which use this format, though, so it
> could be worth it...  Perhaps what we actually need is a better idiom to
> express this situation.  Package properties ('git-commit)?  A 'git-versio=
n*'?
>=20
> --8<---------------cut here---------------start------------->8---
> (define (git-version* version revision)
>   (let* ((source (package-source this-package))
>          (commit (git-reference-commit (origin-uri source))))
>     (git-version version revision commit)))
> --8<---------------cut here---------------end--------------->8---
>=20
> I'm not sure if binding order would be an issue with that.

The 'file-name' field of 'origin' is not thunked, and refers to the 'versio=
n'
field of the 'package' (also not thunked).  If 'version' would use the 'git=
-version*'
from above, then there would be a loop (I'm having the 'gnash' package in m=
ind,
see "guix edit gnash").  And git-version* cannot be a procedure, it must be=
 a macro,
as it used 'this-package', which can only be expanded inside a package defi=
nition.

Alternatively, what do you think of a let& macro, that adjusts the inner ex=
pression
to have the source location of the 'let&' form:

(define-syntax with-source-location
  (lambda (s)
    (syntax-case s ()
      ((_ (exp . exp*) source)
       "Expand to (EXP . EXP*), but with the source location replaced
by the source location of SOURCE."
       (datum->syntax s (cons #'exp #'exp*) #:source (syntax-source #'sourc=
e))))))

(define-syntax let&
  (lambda (s)
    "Like 'let', but let the inner expression have the location
of the 'let&' form when it is expanded.  Only a single inner
expression is allowed."
    (syntax-case s ()
      ((_ bindings exp)
       #'(let bindings
           (with-source-location exp s))))))

That way, 'update-package-source' doesn't need to know about the surroundin=
g
'let' form; it would simply use 'edit-expression' as usual (though somethin=
g
like

                                    ,@(if (and old-commit new-commit)
                                          `((,old-commit . ,new-commit))
                                          '())

would need to be added, and something to replace =E2=80=98(revision "N")=E2=
=80=99 with
=E2=80=98(revision "N+1")=E2=80=99.)

A complete example is attached (a.scm).  The previous usages of
(let ((commit ...) (revision ...)) ...) would need to be adjusted
to use let& instead (build-aux/update-guix-package.scm needs to
be adjusted as well).

Personally, I'd go with the 'let&' form

> > and (b)
> >=20
> > (define-public gnash
> >   (package
> >     (name "gnash")
> >     (version "0.8.11")
> >     (source (git-reference
> >               (url "https://example.org")
> >               (commit commit))
> >     [...]))
> > ?
>=20
> Is this missing a definition for commit? If it's like above, the same
> applies.  Or if you mean
>=20
> --8<---------------cut here---------------start------------->8---
>      (source (git-reference
>                (url "https://example.org")
>                (commit "583ccbc1275c7701dc4843ec12142ff86bb305b"))
> --8<---------------cut here---------------end--------------->8---

The latter.

> Then that wouldn't be too hard to support.  There seem to be ~136
> packages with this idiom.

FWIW, the patch I sent modified 'update-package-source' to replace
the commit in this case (b) (but not case (a)).

> > [the patch Maxime sent]
> >=20
> >    upstream-source?
> >    (package        upstream-source-package)        ;string
> >    (version        upstream-source-version)        ;string
> > -  (urls           upstream-source-urls)           ;list of strings
> > +  ; list of strings or a <git-reference>
> > +  (urls           upstream-source-urls)
>=20
> Is it possible for an updater to want to return a list of
> <git-reference>?

No, 'git-fetch' from (guix git-download) only accepts a single <git-referen=
ce>
object, it doesn't support lists of <git-reference>.  It will throw a type
error if a list is passed.  Compare with 'url-fetch*', which does accept a =
list
of URLs (in which case it will fall-back to the second, the third, the four=
th ...
entry when the first entry gives a 404 or something).

>   I'm still not sure what the purpose of multiple urls
> is, since nearly everthing seems to just take (first urls)...

As I understand it, the second, third, fourth ... URL (when using url-fetch=
)
are fall-backs.  Also, (guix upstream) sometimes distinguishes between the
different URLs, see e.g. package-update/url-fetch, which will try to choose=
 a
tarball with the same kind of extension (.zip, .tar.gz, .tar.xz, ...) as th=
e original
URI.

> >    (signature-urls upstream-source-signature-urls  ;#f | list of string=
s
> >                    (default #f))
> >    (input-changes  upstream-source-input-changes
> > @@ -361,6 +368,11 @@ values: 'interactive' (default), 'always', and 'ne=
ver'."
> >                                                  system target)
> >    "Download SOURCE from its first URL and lower it as a fixed-output
> >  derivation that would fetch it."
> > +  (define url
> > +    (match (upstream-source-urls source)
> > +      ((first . _) first)
> > +      (_ (raise (formatted-message
> > +                 (G_ "git origins are unsupported by --with-latest")))=
)))
> >    (mlet* %store-monad ((url -> (first (upstream-source-urls source)))
> >                         (signature
> >                          -> (and=3D> (upstream-source-signature-urls so=
urce)
> > @@ -430,9 +442,23 @@ SOURCE, an <upstream-source>."
> >                                          #:key-download key-download)))
> >           (values version tarball source))))))
>=20
> What is this 'upstream-source-compiler' actually used for?  I couldn't
> figure that out, so I just left it untouched.

It is used to =E2=80=98lower=E2=80=99 <upstream-source> objects.  More spec=
ifically,
transform-package-latest from (guix transformations) will sometimes
replace the 'source' of a package with a <upstream-source> object,
and 'upstream-source-compiler' is used to turn the <upstream-source>
into a (fixed-output) derivation that can be built into a
/gnu/store/...-checkout or /gnu/store/...-version.tar.gz file in the store.

Greetings,
Maxime

--=-yiIn7AhCV0N/+pc8ogPA
Content-Disposition: inline; filename="a.scm"
Content-Type: text/x-scheme; name="a.scm"; charset="UTF-8"
Content-Transfer-Encoding: base64

Ozs7IEdOVSBHdWl4IC0tLSBGdW5jdGlvbmFsIHBhY2thZ2UgbWFuYWdlbWVudCBmb3IgR05VCjs7
OyBDb3B5cmlnaHQgwqkgMjAyMSBNYXhpbWUgRGV2b3MgPG1heGltZWRldm9zQHRlbGVuZXQuYmU+
Cjs7Owo7OzsgVGhpcyBmaWxlIGlzIHBhcnQgb2YgR05VIEd1aXguCjs7Owo7OzsgR05VIEd1aXgg
aXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBp
dAo7OzsgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBh
cyBwdWJsaXNoZWQgYnkKOzs7IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2
ZXJzaW9uIDMgb2YgdGhlIExpY2Vuc2UsIG9yIChhdAo7OzsgeW91ciBvcHRpb24pIGFueSBsYXRl
ciB2ZXJzaW9uLgo7OzsKOzs7IEdOVSBHdWl4IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRo
YXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dAo7OzsgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhv
dXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgo7OzsgTUVSQ0hBTlRBQklMSVRZIG9yIEZJ
VE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQo7OzsgR05VIEdlbmVyYWwg
UHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KOzs7Cjs7OyBZb3Ugc2hvdWxkIGhhdmUg
cmVjZWl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==


--=-yiIn7AhCV0N/+pc8ogPA--

--=-AH/+dNebwLIhoKM5nARb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYRuM9BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sCHAP9xBj75KhXqSDRyCSSQFyATroZ3
K22ko8hK0JHF1DtoFAD/U7vAsQq8rQXjBlwMe2f+W0O55HD6OTDRwZ99pKRdwwo=
=BfS0
-----END PGP SIGNATURE-----

--=-AH/+dNebwLIhoKM5nARb--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 16 Aug 2021 19:56:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 15:56:56 2021
Received: from localhost ([127.0.0.1]:51079 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFij9-0005WC-JI
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 15:56:56 -0400
Received: from out1.migadu.com ([91.121.223.63]:17779)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFij6-0005W2-HF
 for 50072 <at> debbugs.gnu.org; Mon, 16 Aug 2021 15:56:54 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629143810;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=XcPzAOGC3MLrGTlnAIv+DLhlnggw2fMpY0o03x7a+Hw=;
 b=DNeb0tYuw5dCQCHQlCGNjXV5JCA2fchfmNg56SltBRorJQCYse6Egz/2dN3wChuDq8BTeb
 PSFcpfY6kUb8ouuoTKnpCTPEWQmiqNaB24EzGZGOVypPDT513jVJW1dE1R04T6Y98oYWZS
 FW8MKJmBL3p0vdmC+MhjQawuC88dysY=
From: Sarah Morgensen <iskarian@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch
 origins.
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
Date: Mon, 16 Aug 2021 12:56:46 -0700
In-Reply-To: <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 (Maxime Devos's message of "Mon, 16 Aug 2021 12:46:25 +0200")
Message-ID: <86fsv9jh8h.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
Cc: Xinglu Chen <public@HIDDEN>, 50072 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Maxime,

Thanks for taking a look at this. :)

Maxime Devos <maximedevos@HIDDEN> writes:

> Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> * guix/git-download.scm (checkout-to-store): New procedure.
>> * guix/upstream.scm (guess-version-transform)
>> (package-update/git-fetch): New procedures.
>> (%method-updates): Add GIT-FETCH mapping.
>
> Does it support packages defined like (a)
>
> (define-public gnash
>   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>         (revision "0"))
>     (package
>       (name "gnash")
>       (version (git-version "0.8.11" revision commit))
>       (source (git-reference
>                 (url "https://example.org")
>                 (commit commit)))
>       [...])))

No, it doesn't.  Since the commit definition isn't part of the actual
package definition, the current code has no way of updating it.  It
would require a rewrite of the edit-in-place logic with probably a lot
of special-casing.

There are currently ~1250 package which use this format, though, so it
could be worth it...  Perhaps what we actually need is a better idiom to
express this situation.  Package properties ('git-commit)?  A 'git-version*'?

--8<---------------cut here---------------start------------->8---
(define (git-version* version revision)
  (let* ((source (package-source this-package))
         (commit (git-reference-commit (origin-uri source))))
    (git-version version revision commit)))
--8<---------------cut here---------------end--------------->8---

I'm not sure if binding order would be an issue with that.

> and (b)
>
> (define-public gnash
>   (package
>     (name "gnash")
>     (version "0.8.11")
>     (source (git-reference
>               (url "https://example.org")
>               (commit commit))
>     [...]))
> ?

Is this missing a definition for commit? If it's like above, the same
applies.  Or if you mean

--8<---------------cut here---------------start------------->8---
     (source (git-reference
               (url "https://example.org")
               (commit "583ccbc1275c7701dc4843ec12142ff86bb305b"))
--8<---------------cut here---------------end--------------->8---

Then that wouldn't be too hard to support.  There seem to be ~136
packages with this idiom.

> (Maybe (a) and (b) can be used as test cases.)
>
> FWIW, I had a try at supporting git-fetch origins in "--with-latest" and
> "guix refresh -e" myself, and had to modify 'package-update' to replace
> commit strings.  IIRC, it supports (b), but not (a).  The patch is
> attached, hopefully it will be useful.
>
> Greetings,
> Maxime.
>
> diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm
> index 4264341d6a..2904c3f94a 100644
> --- a/guix/import/minetest.scm
> +++ b/guix/import/minetest.scm
> @@ -297,7 +297,7 @@ results.  The return value is a list of <package/keys> records."
>  (define (make-minetest-sexp author/name version repository commit
>                              inputs home-page synopsis
>                              description media-license license)
> -  "Return a S-expression for the minetest package with the given author/NAME,
> +  "Return a S-expression for the minetest package with the given AUTHOR/NAME,
>  VERSION, REPOSITORY, COMMIT, INPUTS, HOME-PAGE, SYNOPSIS, DESCRIPTION,
>  MEDIA-LICENSE and LICENSE."
>    `(package
> @@ -452,3 +452,37 @@ list of AUTHOR/NAME strings."
>                      #:repo->guix-package minetest->guix-package*
>                      #:guix-name
>                      (compose contentdb->package-name author/name->name)))
> +
> +#|
> +(define (minetest-package? pkg)
> +  (and (string-prefix? "minetest-" (package:package-name pkg))
> +       (assq-ref (package:package-properties pkg) 'upstream-name)))
> +
> +(define (latest-minetest-release pkg)
> +  "Return an <upstream-source> for the latest release of the package PKG."
> +  (define upstream-name
> +    (assoc-ref (package:package-properties pkg) 'upstream-name))
> +  (define contentdb-package (contentdb-fetch upstream-name))
> +  (define release (latest-release upstream-name))
> +  (and contentdb-package release
> +       (and-let* ((old-origin (package:package-source pkg))
> +                  (old-reference (package:origin-uri old-origin))
> +                  (is-git? (download:git-reference? old-reference))
> +                  (commit (release-commit release)))
> +         (upstream-source
> +          (package (package:package-name pkg))
> +          (version (release-title release))
> +          (urls (download:git-reference
> +                 (url (package-repository contentdb-package))
> +                 (commit commit)))))))

Aha! This is actually what should be done, having the updater put the
git-reference into upstream-source, since the updater is going to know
better how to manipulate the uri.

> +
> +(define %minetest-updater
> +  (upstream-updater
> +   (name 'minetest)
> +   (description "Updater for Minetest packages on ContentDB")
> +   (pred minetest-package?)
> +   (latest latest-minetest-release)))
> +|#
> +;;  #:use-module (guix upstream)
> +;;  #:use-module ((guix git-download) #:prefix download:)
> +;;  #:use-module ((guix packages) #:prefix package:)
> diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
> index fb6c52a567..4f3bbbcb94 100644
> --- a/guix/scripts/refresh.scm
> +++ b/guix/scripts/refresh.scm
> @@ -28,8 +28,10 @@
>    #:use-module (guix ui)
>    #:use-module (gcrypt hash)
>    #:use-module (guix scripts)
> +  #:use-module (guix serialization)
>    #:use-module ((guix scripts build) #:select (%standard-build-options))
>    #:use-module (guix store)
> +  #:use-module (guix build utils)
>    #:use-module (guix utils)
>    #:use-module (guix packages)
>    #:use-module (guix profiles)
> @@ -307,6 +309,17 @@ update would trigger a complete rebuild."
>             (G_ "no updater for ~a~%")
>             (package-name package)))
>  
> +
> +;; XXX adapted from (guix scripts hash)
> +(define (file-hash file select? recursive?)
> +  ;; Compute the hash of FILE.
> +  (if recursive?
> +      (let-values (((port get-hash) (open-sha256-port)))
> +        (write-file file port #:select? select?)
> +        (force-output port)
> +        (get-hash))
> +      (call-with-input-file file port-sha256)))
> +
>  (define* (update-package store package updaters
>                           #:key (key-download 'interactive) warn?)
>    "Update the source file that defines PACKAGE with the new version.
> @@ -347,8 +360,8 @@ warn about packages that have no matching updater."
>                             (package-name package)
>                             (upstream-input-change-name change)))
>                   (upstream-source-input-changes source))
> -                (let ((hash (call-with-input-file tarball
> -                              port-sha256)))
> +                (let ((hash (file-hash tarball (const #t)
> +                                       (directory-exists? tarball))))
>                    (update-package-source package source hash)))
>                (warning (G_ "~a: version ~a could not be \
>  downloaded and authenticated; not updating~%")
> diff --git a/guix/upstream.scm b/guix/upstream.scm
> index 632e9ebc4f..61f67b57c1 100644
> --- a/guix/upstream.scm
> +++ b/guix/upstream.scm
> @@ -24,6 +24,11 @@
>    #:use-module (guix discovery)
>    #:use-module ((guix download)
>                  #:select (download-to-store url-fetch))
> +  #:use-module ((guix git-download)
> +                #:select (git-fetch git-reference?
> +                                    git-reference-url
> +                                    git-reference-commit
> +                                    git-reference-recursive?))
>    #:use-module (guix gnupg)
>    #:use-module (guix packages)
>    #:use-module (guix diagnostics)
> @@ -33,6 +38,7 @@
>    #:use-module (guix store)
>    #:use-module ((guix derivations) #:select (built-derivations derivation->output-path))
>    #:autoload   (gcrypt hash) (port-sha256)
> +  #:autoload   (guix git) (latest-repository-commit)
>    #:use-module (guix monads)
>    #:use-module (srfi srfi-1)
>    #:use-module (srfi srfi-9)
> @@ -93,7 +99,8 @@
>    upstream-source?
>    (package        upstream-source-package)        ;string
>    (version        upstream-source-version)        ;string
> -  (urls           upstream-source-urls)           ;list of strings
> +  ; list of strings or a <git-reference>
> +  (urls           upstream-source-urls)

Is it possible for an updater to want to return a list of
<git-reference>?  I'm still not sure what the purpose of multiple urls
is, since nearly everthing seems to just take (first urls)...

>    (signature-urls upstream-source-signature-urls  ;#f | list of strings
>                    (default #f))
>    (input-changes  upstream-source-input-changes
> @@ -361,6 +368,11 @@ values: 'interactive' (default), 'always', and 'never'."
>                                                  system target)
>    "Download SOURCE from its first URL and lower it as a fixed-output
>  derivation that would fetch it."
> +  (define url
> +    (match (upstream-source-urls source)
> +      ((first . _) first)
> +      (_ (raise (formatted-message
> +                 (G_ "git origins are unsupported by --with-latest"))))))
>    (mlet* %store-monad ((url -> (first (upstream-source-urls source)))
>                         (signature
>                          -> (and=> (upstream-source-signature-urls source)
> @@ -430,9 +442,23 @@ SOURCE, an <upstream-source>."
>                                          #:key-download key-download)))
>           (values version tarball source))))))

What is this 'upstream-source-compiler' actually used for?  I couldn't
figure that out, so I just left it untouched.

>  
> +(define* (package-update/git-fetch store package source #:key key-download)
> +  "Return the version, source code directory, and SOURCE, to update PACKAGE to
> +SOURCE, an <upstream-source>."
> +  (match source
> +    (($ <upstream-source> _ version ref _)
> +     (values version
> +             (latest-repository-commit
> +              store
> +              (git-reference-url ref)
> +              #:ref `(commit . ,(git-reference-commit ref))
> +              #:recursive? (git-reference-recursive? ref))
> +             source))))
> +
>  (define %method-updates
>    ;; Mapping of origin methods to source update procedures.
> -  `((,url-fetch . ,package-update/url-fetch)))
> +  `((,url-fetch . ,package-update/url-fetch)
> +    (,git-fetch . ,package-update/git-fetch)))
>  
>  (define* (package-update store package
>                           #:optional (updaters (force %updaters))
> @@ -492,9 +518,22 @@ new version string if an update was made, and #f otherwise."
>                               (origin-hash (package-source package))))
>                 (old-url     (match (origin-uri (package-source package))
>                                ((? string? url) url)
> +                              ((? git-reference? ref)
> +                               (git-reference-url ref))
>                                (_ #f)))
>                 (new-url     (match (upstream-source-urls source)
> -                              ((first _ ...) first)))
> +                              ((first _ ...) first)
> +                              ((? git-reference? ref)
> +                               (git-reference-url ref))
> +                              (_ #f)))
> +               (old-commit  (match (origin-uri (package-source package))
> +                              ((? git-reference? ref)
> +                               (git-reference-commit ref))
> +                              (_ #f)))
> +               (new-commit  (match (upstream-source-urls source)
> +                              ((? git-reference? ref)
> +                               (git-reference-commit ref))
> +                              (_ #f)))
>                 (file        (and=> (location-file loc)
>                                     (cut search-path %load-path <>))))
>            (if file
> @@ -508,6 +547,9 @@ new version string if an update was made, and #f otherwise."
>                                             'filename file))
>                      (replacements `((,old-version . ,version)
>                                      (,old-hash . ,hash)
> +                                    ,@(if (and old-commit new-commit)
> +                                          `((,old-commit . ,new-commit))
> +                                          '())
>                                      ,@(if (and old-url new-url)
>                                            `((,(dirname old-url) .
>                                               ,(dirname new-url)))

Thanks for sharing your work; it was very helpful!

--
Sarah




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 16 Aug 2021 18:15:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 14:15:20 2021
Received: from localhost ([127.0.0.1]:50939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFh8q-0002tB-Hk
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:15:20 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:43252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mFh8n-0002t0-4h
 for 50072 <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:15:19 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by michel.telenet-ops.be with bizsmtp
 id iJFF250050mfAB406JFFpg; Mon, 16 Aug 2021 20:15:15 +0200
Message-ID: <12f985cd431b8b8099f680a3b25ed2eb90e6b26d.camel@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Xinglu Chen <public@HIDDEN>, Sarah Morgensen <iskarian@HIDDEN>,
 50072 <at> debbugs.gnu.org
Date: Mon, 16 Aug 2021 20:15:07 +0200
In-Reply-To: <87wnol8rw3.fsf@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
 <87wnol8rw3.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-Wnjy/215xV3t45c6cSB/"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1629137715; bh=yx3K2jknvMUYfwobNqENYOK1CSvN4GLhCxHEXri7HWk=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=jCVZOL+KU07IKB0wxtERVsqX4d/DhSvL6enZ7SMLSNzoybGTWaznK0AZDxslXz8f4
 oeZns+WL3b9KhVvnzcbKueohcC3IIY+quQmfEZl/fcPY/KiFMaKPbqhpMaeqxYCacM
 IgJEuJ7UaOsZtfchNsPjG4GcZm2FaVlYuFwP4kLYQzRO8BqIMNzQCWClHjsSGPTCFb
 qEo0YhyDBiCIwGxXY2I3dA0l8cKTAdfiBTGkiAVmPCh1RXpMqk+/nQk4lzlfo8svMD
 i9b7BRYaepY7necPLnD0V2z5ldijpODLgAkj5GY+FUH5DC9h4+aidxFImGOlCQW+Oc
 VpeFVPFNuXF1w==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-Wnjy/215xV3t45c6cSB/
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Xinglu Chen schreef op ma 16-08-2021 om 15:02 [+0200]:
> On Mon, Aug 16 2021, Maxime Devos wrote:
>=20
> > Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
> > > * guix/git-download.scm (checkout-to-store): New procedure.
> > > * guix/upstream.scm (guess-version-transform)
> > > (package-update/git-fetch): New procedures.
> > > (%method-updates): Add GIT-FETCH mapping.
> >=20
> > Does it support packages defined like (a)
> >=20
> > (define-public gnash
> >   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
> >         (revision "0"))
> >     (package
> >       (name "gnash")
> >       (version (git-version "0.8.11" revision commit))
> >       (source (git-reference
> >                 (url "https://example.org")
>=20
> IIUC, it only supports GitHub URLs at the moment.  I have a WIP patch
> for adding support for any arbitrary Git repository[1].

This patch series doesn't mention GitHub anywhere (except in the patch
series description) so I don't think it only supports GitHub URLs.
Admittedly, only one updater, "github", currently produces git-reference
URLs, but I sent a patch series [2] that adds an importer which produces
git-reference URLs and the corresponding updater (see =E2=80=98git-fetch.pa=
tch=E2=80=99)
produces appropriate git-reference objects.

[2]: <https://issues.guix.gnu.org/49828#51>.

Greetings,
Maxime.

--=-Wnjy/215xV3t45c6cSB/
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYRqrKxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hj2AQDWxLAJXlGpJDkETEBgpnyP1iqC
LTkAy45kWUZkOdqY1AD6A2CMB630ENX8F2HOy6f9iMU1h6G/+xqqCy7ltH39AwI=
=487y
-----END PGP SIGNATURE-----

--=-Wnjy/215xV3t45c6cSB/--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 16 Aug 2021 13:02:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 09:02:29 2021
Received: from localhost ([127.0.0.1]:48939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFcG5-0004VG-CW
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 09:02:29 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:48970
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mFcG0-0004Ng-Ne
 for 50072 <at> debbugs.gnu.org; Mon, 16 Aug 2021 09:02:27 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1629118934;
 bh=4xBrwGayeBXpG6wLN2y102+EPOtbsiAK7Z/wqpSDorI=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=LqScsT4fdXYvDZULhBuznqgusO/eWg8OeEz4oQRRtrzI/Hjt2tgvihHN662Jj7kQg
 1/ADnhuHNFZ8LFuQTbYDou4e0IdUDYD1r4utZtM3YSGdHZvZ4lrr3KuwxPceqp+I5C
 8NZKj+7GD+sWSfpRegBrlcbkWp5o2GblPllpggUU=
To: Maxime Devos <maximedevos@HIDDEN>, Sarah Morgensen
 <iskarian@HIDDEN>, 50072 <at> debbugs.gnu.org
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
In-Reply-To: <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
 <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
Date: Mon, 16 Aug 2021 15:02:04 +0200
Message-ID: <87wnol8rw3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Mon, Aug 16 2021, Maxime Devos wrote: > Sarah Morgensen
 schreef op zo 15-08-2021 om 16:25 [-0700]: >> * guix/git-download.scm
 (checkout-to-store):
 New procedure. >> * guix/upstream.scm (guess-version-transform) >>
 (package-update/git-fetc [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Mon, Aug 16 2021, Maxime Devos wrote: > Sarah Morgensen
    schreef op zo 15-08-2021 om 16:25 [-0700]: >> * guix/git-download.scm (checkout-to-store):
    New procedure. >> * guix/upstream.scm (guess-version-transform) >> (package-update/git-fetc
    [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

--=-=-=
Content-Type: text/plain

On Mon, Aug 16 2021, Maxime Devos wrote:

> Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
>> * guix/git-download.scm (checkout-to-store): New procedure.
>> * guix/upstream.scm (guess-version-transform)
>> (package-update/git-fetch): New procedures.
>> (%method-updates): Add GIT-FETCH mapping.
>
> Does it support packages defined like (a)
>
> (define-public gnash
>   (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
>         (revision "0"))
>     (package
>       (name "gnash")
>       (version (git-version "0.8.11" revision commit))
>       (source (git-reference
>                 (url "https://example.org")

IIUC, it only supports GitHub URLs at the moment.  I have a WIP patch
for adding support for any arbitrary Git repository[1].

[1]:
<https://git.yoctocell.xyz/guix/commit/?h=guix-upstream-git-fetch&id=0356c7603a4611d40875b4eb352e3378295f34bc>

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEaYcwVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5r9oQAI3ATDH9rGTsS0dn7stOIBBvrjqs
NAfqeBKClrHTptYn+8G3AZ+XEiaqrbRGIZ8aHkXjg6mD4B7d03mUdqIu3JedYeRY
Y+/iA5kE9HhohRmUwdUqCBjYYMZOO8SsrRKAUpgTu1dwIK8sb+fkwgZWG1ZYuGLU
ya1zGkVfeBailLxvfpUFneKLmY0gvEryVfVoYasbiYmCLSAQxiE6aJUSLpv20FUm
jdyPWwPcwhLz5n9SkPHIzoNdlBv7e/M3sG63V7wwceeNeEgIOXD/rhwHluj5GgMz
qOdcUN+qkHZDB4Nh5RGqHGTahqh2EuG5Vj6pVDOagZR+30chqiMpm3Py4O2E74ul
mMw7LeTROBXwDoapdCkY3YWn1LutFKW3asZR7A5OWB6wKMjNn3p9nSlZHWb2bAxp
XFvOhu89oVtokQKzbCHyF99v/5/aWNXSmT0FM6tVL9j8tT0SD+7TYwEWReMaPmtA
b6XsDk7dpmK6Y9hjPV3uA/FojaVjHWuJim5xQG75NcjtG2mf3A+hXgumFuznpPLY
KuJklLd6HjH3BfVxrOQC3ISJa0SJxvUG/lt2LV866QBgJPjCnox9TIr4nKzTm/Tq
xaIKQOzF/40TWPMZOyH2/ujmNpq2qarY6BOmah6lI/nFM47I/wcbHOqhDBDTV1B0
VseqEL6DUR1mKlHd
=ViNI
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 16 Aug 2021 10:46:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 06:46:44 2021
Received: from localhost ([127.0.0.1]:48612 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFa8e-0006mW-40
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 06:46:43 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:37734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mFa8X-0006mI-LY
 for 50072 <at> debbugs.gnu.org; Mon, 16 Aug 2021 06:46:38 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by michel.telenet-ops.be with bizsmtp
 id iAmX2500E0mfAB406AmXgz; Mon, 16 Aug 2021 12:46:32 +0200
Message-ID: <cbcef388b1df20c24b6615a006c0daaf50f74b1f.camel@HIDDEN>
Subject: Re: [bug#50072] [PATCH WIP 4/4] upstream: Support updating
 git-fetch origins.
From: Maxime Devos <maximedevos@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>, 50072 <at> debbugs.gnu.org
Date: Mon, 16 Aug 2021 12:46:25 +0200
In-Reply-To: <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
 <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-9mgKTjabCdrk2qjTMUh7"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1629110792; bh=Hrbyv12u/y89xtr1hGfsNsqGzX/rZo4WgsLM0uWQY6I=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=eWARWO3vQfCHneBxhTvA6f6shcvmiwfJby2uElrnbkEr2NeKIYBdbMLjnJM04q9yA
 C+f6glE2MTGRJW0s52xHrJphHTQxqU1NqtDJZtMxhhbHavF3iMwZFsyBdBGoDw4+wW
 +fwedWbU8ortwAZ6AdguE+m6MHNiY2yO9iAWzravEKpXC+6Oza0UrG77WejI3Ob6o1
 D+1hbAPgFDfJj9B5vqhfqIaiCbHpkBhi0g5CaxCLE2lyDEXuBh+xVVzIwm7pieQgW/
 0rmWdyIxD8q4xSZmuxm5g9LerCMKVerEEV1CD+p1kKLH37BEeTEtyHZ0Ggee6+/H8k
 7VTDWQ9Ct3MFg==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--=-9mgKTjabCdrk2qjTMUh7
Content-Type: multipart/mixed; boundary="=-zr7+3QxMtVYPT37XqX5g"


--=-zr7+3QxMtVYPT37XqX5g
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Sarah Morgensen schreef op zo 15-08-2021 om 16:25 [-0700]:
> * guix/git-download.scm (checkout-to-store): New procedure.
> * guix/upstream.scm (guess-version-transform)
> (package-update/git-fetch): New procedures.
> (%method-updates): Add GIT-FETCH mapping.

Does it support packages defined like (a)

(define-public gnash
  (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
        (revision "0"))
    (package
      (name "gnash")
      (version (git-version "0.8.11" revision commit))
      (source (git-reference
                (url "https://example.org")
                (commit commit)))
      [...])))

and (b)

(define-public gnash
  (package
    (name "gnash")
    (version "0.8.11")
    (source (git-reference
              (url "https://example.org")
              (commit commit))
    [...]))
?

(Maybe (a) and (b) can be used as test cases.)

FWIW, I had a try at supporting git-fetch origins in "--with-latest" and
"guix refresh -e" myself, and had to modify 'package-update' to replace
commit strings.  IIRC, it supports (b), but not (a).  The patch is
attached, hopefully it will be useful.

Greetings,
Maxime.

--=-zr7+3QxMtVYPT37XqX5g
Content-Disposition: inline; filename="git-fetch.patch"
Content-Type: text/x-patch; name="git-fetch.patch"; charset="UTF-8"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2d1aXgvaW1wb3J0L21pbmV0ZXN0LnNjbSBiL2d1aXgvaW1wb3J0L21pbmV0
ZXN0LnNjbQppbmRleCA0MjY0MzQxZDZhLi4yOTA0YzNmOTRhIDEwMDY0NAotLS0gYS9ndWl4L2lt
cG9ydC9taW5ldGVzdC5zY20KKysrIGIvZ3VpeC9pbXBvcnQvbWluZXRlc3Quc2NtCkBAIC0yOTcs
NyArMjk3LDcgQEAgcmVzdWx0cy4gIFRoZSByZXR1cm4gdmFsdWUgaXMgYSBsaXN0IG9mIDxwYWNr
YWdlL2tleXM+IHJlY29yZHMuIgogKGRlZmluZSAobWFrZS1taW5ldGVzdC1zZXhwIGF1dGhvci9u
YW1lIHZlcnNpb24gcmVwb3NpdG9yeSBjb21taXQKICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBpbnB1dHMgaG9tZS1wYWdlIHN5bm9wc2lzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ZGVzY3JpcHRpb24gbWVkaWEtbGljZW5zZSBsaWNlbnNlKQotICAiUmV0dXJuIGEgUy1leHByZXNz
aW9uIGZvciB0aGUgbWluZXRlc3QgcGFja2FnZSB3aXRoIHRoZSBnaXZlbiBhdXRob3IvTkFNRSwK
KyAgIlJldHVybiBhIFMtZXhwcmVzc2lvbiBmb3IgdGhlIG1pbmV0ZXN0IHBhY2thZ2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FnZS11cGRhdGUvdXJsLWZldGNoKQorICAgICgsZ2l0LWZl
dGNoIC4gLHBhY2thZ2UtdXBkYXRlL2dpdC1mZXRjaCkpKQogCiAoZGVmaW5lKiAocGFja2FnZS11
cGRhdGUgc3RvcmUgcGFja2FnZQogICAgICAgICAgICAgICAgICAgICAgICAgICM6b3B0aW9uYWwg
KHVwZGF0ZXJzIChmb3JjZSAldXBkYXRlcnMpKQpAQCAtNDkyLDkgKzUxOCwyMiBAQCBuZXcgdmVy
c2lvbiBzdHJpbmcgaWYgYW4gdXBkYXRlIHdhcyBtYWRlLCBhbmQgI2Ygb3RoZXJ3aXNlLiIKICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKG9yaWdpbi1oYXNoIChwYWNrYWdlLXNvdXJjZSBw
YWNrYWdlKSkpKQogICAgICAgICAgICAgICAgKG9sZC11cmwgICAgIChtYXRjaCAob3JpZ2luLXVy
aSAocGFja2FnZS1zb3VyY2UgcGFja2FnZSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAoKD8gc3RyaW5nPyB1cmwpIHVybCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgo
PyBnaXQtcmVmZXJlbmNlPyByZWYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdp
dC1yZWZlcmVuY2UtdXJsIHJlZikpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoXyAj
ZikpKQogICAgICAgICAgICAgICAgKG5ldy11cmwgICAgIChtYXRjaCAodXBzdHJlYW0tc291cmNl
LXVybHMgc291cmNlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChmaXJzdCBfIC4u
LikgZmlyc3QpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZmlyc3QgXyAuLi4p
IGZpcnN0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg/IGdpdC1yZWZlcmVuY2U/
IHJlZikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ2l0LXJlZmVyZW5jZS11cmwg
cmVmKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfICNmKSkpCisgICAgICAgICAg
ICAgICAob2xkLWNvbW1pdCAgKG1hdGNoIChvcmlnaW4tdXJpIChwYWNrYWdlLXNvdXJjZSBwYWNr
YWdlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPyBnaXQtcmVmZXJlbmNlPyBy
ZWYpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdpdC1yZWZlcmVuY2UtY29tbWl0
IHJlZikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoXyAjZikpKQorICAgICAgICAg
ICAgICAgKG5ldy1jb21taXQgIChtYXRjaCAodXBzdHJlYW0tc291cmNlLXVybHMgc291cmNlKQor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCg/IGdpdC1yZWZlcmVuY2U/IHJlZikKKyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ2l0LXJlZmVyZW5jZS1jb21taXQgcmVmKSkK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfICNmKSkpCiAgICAgICAgICAgICAgICAo
ZmlsZSAgICAgICAgKGFuZD0+IChsb2NhdGlvbi1maWxlIGxvYykKICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgKGN1dCBzZWFyY2gtcGF0aCAlbG9hZC1wYXRoIDw+KSkpKQogICAg
ICAgICAgIChpZiBmaWxlCkBAIC01MDgsNiArNTQ3LDkgQEAgbmV3IHZlcnNpb24gc3RyaW5nIGlm
IGFuIHVwZGF0ZSB3YXMgbWFkZSwgYW5kICNmIG90aGVyd2lzZS4iCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2ZpbGVuYW1lIGZpbGUpKQogICAgICAgICAgICAg
ICAgICAgICAocmVwbGFjZW1lbnRzIGAoKCxvbGQtdmVyc2lvbiAuICx2ZXJzaW9uKQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCxvbGQtaGFzaCAuICxoYXNoKQorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLEAoaWYgKGFuZCBvbGQtY29tbWl0IG5ldy1j
b21taXQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgKCgsb2xk
LWNvbW1pdCAuICxuZXctY29tbWl0KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICcoKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICxAKGlm
IChhbmQgb2xkLXVybCBuZXctdXJsKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgYCgoLChkaXJuYW1lIG9sZC11cmwpIC4KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICwoZGlybmFtZSBuZXctdXJsKSkpCg==


--=-zr7+3QxMtVYPT37XqX5g--

--=-9mgKTjabCdrk2qjTMUh7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYRpCAhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mtFAQC2K6AYws89maCmlssXfSbym3b2
9CG2Ima2OaxW4a7k3wD/Z1vXqq7oTCNKbFPVwtQSEH++PEd83p7UKB2LMsw+cgg=
=ilA3
-----END PGP SIGNATURE-----

--=-9mgKTjabCdrk2qjTMUh7--





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 15 Aug 2021 23:25:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 19:25:41 2021
Received: from localhost ([127.0.0.1]:47948 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFPVc-0001pt-M6
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:41 -0400
Received: from out0.migadu.com ([94.23.1.103]:31077)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFPVa-0001pZ-D7
 for 50072 <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:39 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629069937;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=SaBFF2tRm7PZlrCixzWhD5HmIJdo0elYCu26DpndMPE=;
 b=dYLKoTk49hRJ19rfQYYfqNKaWd9X0R6fYgzpstssHtb/XZIq3EMi172z11IVqhPsIXGsY8
 xq3uPcxRKHwCpB5UknK7kd20P19lcX0xvlrbqhtgCp4g/+RPYmR287UpiPtpL58fwe0PDU
 xEOmetKcpXJK0zb/1cSDMete83ra7f8=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50072 <at> debbugs.gnu.org
Subject: [PATCH WIP 4/4] upstream: Support updating git-fetch origins.
Date: Sun, 15 Aug 2021 16:25:27 -0700
Message-Id: <8d1ae518b23fac5b15812a30b11df1c360ab3fbf.1629068119.git.iskarian@HIDDEN>
In-Reply-To: <cover.1629068119.git.iskarian@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* guix/git-download.scm (checkout-to-store): New procedure.
* guix/upstream.scm (guess-version-transform)
(package-update/git-fetch): New procedures.
(%method-updates): Add GIT-FETCH mapping.
---
 guix/git-download.scm | 18 +++++++++++++++++-
 guix/upstream.scm     | 41 ++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/guix/git-download.scm b/guix/git-download.scm
index 5e624b9ae9..a7bdc16718 100644
--- a/guix/git-download.scm
+++ b/guix/git-download.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Mathieu Lirzin <mthl@HIDDEN>
 ;;; Copyright © 2017 Christopher Baines <mail@HIDDEN>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (guix records)
   #:use-module (guix packages)
   #:use-module (guix modules)
+  #:use-module (guix git)
   #:autoload   (guix build-system gnu) (standard-packages)
   #:autoload   (git bindings)   (libgit2-init!)
   #:autoload   (git repository) (repository-open
@@ -53,7 +55,9 @@
             git-fetch
             git-version
             git-file-name
-            git-predicate))
+            git-predicate
+
+            checkout-to-store))
 
 ;;; Commentary:
 ;;;
@@ -287,4 +291,16 @@ absolute file name and STAT is the result of 'lstat'."
             (#f        #f)))))
     (const #f)))
 
+(define* (checkout-to-store store ref #:key (log (current-error-port)))
+  "Checkout REF to STORE.  Write progress reports to LOG.  RECURSIVE? has the
+same effect as the same-named parameter of 'latest-repository-commit'."
+  ;; XXX: (guix git) does not use shallow clones, so this will be slow
+  ;; for long-running repositories.
+  (match-record ref <git-reference>
+    (url commit recursive?)
+    (latest-repository-commit store url
+                              #:ref `(tag-or-commit . ,commit)
+                              #:recursive? recursive?
+                              #:log-port log)))
+
 ;;; git-download.scm ends here
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 632e9ebc4f..927260cd89 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2015 Alex Kost <alezost@HIDDEN>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
   #:use-module (guix discovery)
   #:use-module ((guix download)
                 #:select (download-to-store url-fetch))
+  #:use-module (guix git-download)
   #:use-module (guix gnupg)
   #:use-module (guix packages)
   #:use-module (guix diagnostics)
@@ -430,9 +432,46 @@ SOURCE, an <upstream-source>."
                                         #:key-download key-download)))
          (values version tarball source))))))
 
+(define (guess-version-transform commit from-version)
+  "Return a one-argument proc that transforms FROM-VERSION to COMMIT, or #f
+if no such transformation could be determined."
+  ;; Just handle prefixes for now, since that's the most common.
+  (if (string-suffix? from-version commit)
+      (let* ((version-length (string-length from-version))
+             (commit-prefix (string-drop-right commit version-length)))
+        (lambda (version)
+          (string-append commit-prefix version)))
+      #f))
+
+(define* (package-update/git-fetch store package source
+                                   #:key key-download)
+  "Return the version, checkout, and SOURCE, to update PACKAGE to
+SOURCE, an <upstream-source>."
+
+  (define (uri-update/git old-uri old-version url version)
+    (let* ((old-commit (git-reference-commit old-uri))
+           (transform (guess-version-transform old-commit old-version)))
+      (and transform
+           (git-reference
+            (inherit old-uri)
+            (url url)
+            (commit (transform version))))))
+
+  ;; Only use the first element of URLS.
+  (match-record source <upstream-source>
+    (version urls)
+    (let* ((old-uri (origin-uri (package-source package)))
+           (old-version (package-version package))
+           (new-uri (uri-update/git old-uri old-version
+                                    (first urls) version)))
+      (if new-uri
+          (values version (checkout-to-store store new-uri) source)
+          (values #f #f #f)))))
+
 (define %method-updates
   ;; Mapping of origin methods to source update procedures.
-  `((,url-fetch . ,package-update/url-fetch)))
+  `((,url-fetch . ,package-update/url-fetch)
+    (,git-fetch . ,package-update/git-fetch)))
 
 (define* (package-update store package
                          #:optional (updaters (force %updaters))
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 15 Aug 2021 23:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 19:25:40 2021
Received: from localhost ([127.0.0.1]:47946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFPVc-0001pr-Cs
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:40 -0400
Received: from out0.migadu.com ([94.23.1.103]:31065)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFPVZ-0001pT-8L
 for 50072 <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:38 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629069935;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=i3sWwu6rP2yY7l+g2SazGbRfisouEZXzlss71KFp3gU=;
 b=M3pDhzn0gAYR/P6gLql49wXSbrh7B4Fk918vASVXGKs2Qg993jglgq4fruM4TMYuxAtn+J
 C2HQEqjSE9LSzO7TG9b8QyReAAaMuRjDGuoi5MvEf8cLYZkaQl1WL9zRO6N5gH4L61urKE
 apvb4MriGBP1r/4KOvf5WedHDyylgJ8=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50072 <at> debbugs.gnu.org
Subject: [PATCH WIP 3/4] refresh: Support non-tarball sources.
Date: Sun, 15 Aug 2021 16:25:26 -0700
Message-Id: <54668cb99babc81db0edfcdf2a8fa870bde96863.1629068119.git.iskarian@HIDDEN>
In-Reply-To: <cover.1629068119.git.iskarian@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* guix/scripts/refresh.scm (update-package): Use 'file-hash*' instead of
'port-sha256'.  Rename TARBALL to OUTPUT.
---
 guix/scripts/refresh.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index fb6c52a567..abb0c24e96 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2018 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@HIDDEN>
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,7 +27,6 @@
 
 (define-module (guix scripts refresh)
   #:use-module (guix ui)
-  #:use-module (gcrypt hash)
   #:use-module (guix scripts)
   #:use-module ((guix scripts build) #:select (%standard-build-options))
   #:use-module (guix store)
@@ -38,6 +38,7 @@
   #:use-module (guix scripts graph)
   #:use-module (guix monads)
   #:use-module (guix gnupg)
+  #:use-module (guix hash)
   #:use-module (gnu packages)
   #:use-module ((gnu packages commencement) #:select (%final-inputs))
   #:use-module (ice-9 match)
@@ -314,14 +315,14 @@ KEY-DOWNLOAD specifies a download policy for missing OpenPGP keys; allowed
 values: 'interactive' (default), 'always', and 'never'.  When WARN? is true,
 warn about packages that have no matching updater."
   (if (lookup-updater package updaters)
-      (let-values (((version tarball source)
+      (let-values (((version output source)
                     (package-update store package updaters
                                     #:key-download key-download))
                    ((loc)
                     (or (package-field-location package 'version)
                         (package-location package))))
         (when version
-          (if (and=> tarball file-exists?)
+          (if (and=> output file-exists?)
               (begin
                 (info loc
                       (G_ "~a: updating from version ~a to version ~a...~%")
@@ -347,8 +348,7 @@ warn about packages that have no matching updater."
                            (package-name package)
                            (upstream-input-change-name change)))
                  (upstream-source-input-changes source))
-                (let ((hash (call-with-input-file tarball
-                              port-sha256)))
+                (let ((hash (file-hash* output)))
                   (update-package-source package source hash)))
               (warning (G_ "~a: version ~a could not be \
 downloaded and authenticated; not updating~%")
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 15 Aug 2021 23:25:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 19:25:38 2021
Received: from localhost ([127.0.0.1]:47943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFPVZ-0001pW-Ic
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:38 -0400
Received: from out2.migadu.com ([188.165.223.204]:47102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFPVW-0001pL-Gp
 for 50072 <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:35 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629069932;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=7akfLvRyHvBOWqyJCG4HKD+1hne9n2Xo0apkJYmGmzY=;
 b=KPtZsDwr0kwJOix07b9YzqdBLYRFmDcul3feNT/EMuYAjOAxjTQrAntdUz55xoZ4BscaJD
 aibBAPHpGhqGo40MH7Ojqzs8n2kt7T+UYXY1/+ZLxWXHkTFmcIr0ZSykFIS22h1wsJBimY
 sw+7Nb/6p03I60V04zovmDv1OGPV0CM=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50072 <at> debbugs.gnu.org
Subject: [PATCH WIP 2/4] import: Factorize file hashing.
Date: Sun, 15 Aug 2021 16:25:25 -0700
Message-Id: <82bab33f2d4a03c8e83d1825648577fbae3aee7e.1629068119.git.iskarian@HIDDEN>
In-Reply-To: <cover.1629068119.git.iskarian@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/cran.scm (vcs-file?, file-hash): Remove procedures.
(description->package): Use 'file-hash*' instead.
* guix/import/elpa.scm (vcs-file?, file-hash): Remove procedures.
(git-repository->origin, elpa-package->sexp): Use 'file-hash* instead'.
* guix/import/go.scm (vcs-file?, file-hash): Remove procedures.
(git-checkout-hash): Use 'file-hash*' instead.
---
 guix/import/cran.scm | 32 +++-----------------------------
 guix/import/elpa.scm | 28 ++++------------------------
 guix/import/go.scm   | 26 +++-----------------------
 3 files changed, 10 insertions(+), 76 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index f649928c5a..ac24bc117e 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,9 +35,8 @@
   #:use-module (web uri)
   #:use-module (guix memoization)
   #:use-module (guix http-client)
-  #:use-module (gcrypt hash)
+  #:use-module (guix hash)
   #:use-module (guix store)
-  #:use-module ((guix serialization) #:select (write-file))
   #:use-module (guix base32)
   #:use-module ((guix download) #:select (download-to-store))
   #:use-module (guix import utils)
@@ -194,17 +194,6 @@ bioconductor package NAME, or #F if the package is unknown."
                (bioconductor-packages-list type))
          (cut assoc-ref <> "Version")))
 
-;; XXX taken from (guix scripts hash)
-(define (vcs-file? file stat)
-  (case (stat:type stat)
-    ((directory)
-     (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
-    ((regular)
-     ;; Git sub-modules have a '.git' file that is a regular text file.
-     (string=? (basename file) ".git"))
-    (else
-     #f)))
-
 ;; Little helper to download URLs only once.
 (define download
   (memoize
@@ -437,16 +426,6 @@ reference the pkg-config tool."
 (define (needs-knitr? meta)
   (member "knitr" (listify meta "VignetteBuilder")))
 
-;; XXX adapted from (guix scripts hash)
-(define (file-hash file select? recursive?)
-  ;; Compute the hash of FILE.
-  (if recursive?
-      (let-values (((port get-hash) (open-sha256-port)))
-        (write-file file port #:select? select?)
-        (force-output port)
-        (get-hash))
-      (call-with-input-file file port-sha256)))
-
 (define (description->package repository meta)
   "Return the `package' s-expression for an R package published on REPOSITORY
 from the alist META, which was derived from the R package's DESCRIPTION file."
@@ -544,12 +523,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
                         (sha256
                          (base32
                           ,(bytevector->nix-base32-string
-                            (case repository
-                              ((git)
-                               (file-hash source (negate vcs-file?) #t))
-                              ((hg)
-                               (file-hash source (negate vcs-file?) #t))
-                              (else (file-sha256 source))))))))
+                            (file-hash* source))))))
               ,@(if (not (and git? hg?
                               (equal? (string-append "r-" name)
                                       (cran-guix-name name))))
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index c0dc5acf51..22c937ca5f 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@HIDDEN>
 ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,10 +37,10 @@
   #:use-module (guix import utils)
   #:use-module (guix http-client)
   #:use-module (guix git)
+  #:use-module (guix hash)
   #:use-module ((guix serialization) #:select (write-file))
   #:use-module (guix store)
   #:use-module (guix ui)
-  #:use-module (gcrypt hash)
   #:use-module (guix base32)
   #:use-module (guix upstream)
   #:use-module (guix packages)
@@ -226,27 +227,6 @@ keywords to values."
     (close-port port)
     (data->recipe (cons ':name data))))
 
-;; XXX adapted from (guix scripts hash)
-(define (file-hash file select? recursive?)
-  ;; Compute the hash of FILE.
-  (if recursive?
-      (let-values (((port get-hash) (open-sha256-port)))
-        (write-file file port #:select? select?)
-        (force-output port)
-        (get-hash))
-      (call-with-input-file file port-sha256)))
-
-;; XXX taken from (guix scripts hash)
-(define (vcs-file? file stat)
-  (case (stat:type stat)
-    ((directory)
-     (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
-    ((regular)
-     ;; Git sub-modules have a '.git' file that is a regular text file.
-     (string=? (basename file) ".git"))
-    (else
-     #f)))
-
 (define (git-repository->origin recipe url)
   "Fetch origin details from the Git repository at URL for the provided MELPA
 RECIPE."
@@ -268,7 +248,7 @@ RECIPE."
        (sha256
         (base32
          ,(bytevector->nix-base32-string
-           (file-hash directory (negate vcs-file?) #t)))))))
+           (file-hash* directory)))))))
 
 (define* (melpa-recipe->origin recipe)
   "Fetch origin details from the MELPA recipe and associated repository for
@@ -379,7 +359,7 @@ type '<elpa-package>'."
                         (sha256
                          (base32
                           ,(if tarball
-                               (bytevector->nix-base32-string (file-sha256 tarball))
+                               (bytevector->nix-base32-string (file-hash* tarball))
                                "failed to download package")))))))
       (build-system emacs-build-system)
       ,@(maybe-inputs 'propagated-inputs dependencies)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 617a0d0e23..c6425667f8 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -25,6 +25,7 @@
 (define-module (guix import go)
   #:use-module (guix build-system go)
   #:use-module (guix git)
+  #:use-module (guix hash)
   #:use-module (guix i18n)
   #:use-module (guix diagnostics)
   #:use-module (guix import utils)
@@ -35,9 +36,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix memoization)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
-  #:autoload   (guix git) (update-cached-checkout)
-  #:autoload   (gcrypt hash) (open-hash-port hash-algorithm sha256)
-  #:autoload   (guix serialization) (write-file)
+  #:autoload   (gcrypt hash) (hash-algorithm sha256)
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
   #:use-module (ice-9 match)
@@ -494,25 +493,6 @@ source."
       goproxy
       (module-meta-repo-root meta-data)))
 
-;; XXX: Copied from (guix scripts hash).
-(define (vcs-file? file stat)
-  (case (stat:type stat)
-    ((directory)
-     (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
-    ((regular)
-     ;; Git sub-modules have a '.git' file that is a regular text file.
-     (string=? (basename file) ".git"))
-    (else
-     #f)))
-
-;; XXX: Adapted from 'file-hash' in (guix scripts hash).
-(define* (file-hash file #:optional (algorithm (hash-algorithm sha256)))
-  ;; Compute the hash of FILE.
-  (let-values (((port get-hash) (open-hash-port algorithm)))
-    (write-file file port #:select? (negate vcs-file?))
-    (force-output port)
-    (get-hash)))
-
 (define* (git-checkout-hash url reference algorithm)
   "Return the ALGORITHM hash of the checkout of URL at REFERENCE, a commit or
 tag."
@@ -531,7 +511,7 @@ tag."
                   (update-cached-checkout url
                                           #:ref
                                           `(tag-or-commit . ,reference)))))
-    (file-hash checkout algorithm)))
+    (file-hash* checkout #:algorithm algorithm)))
 
 (define (vcs->origin vcs-type vcs-repo-url version)
   "Generate the `origin' block of a package depending on what type of source
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at 50072 <at> debbugs.gnu.org:


Received: (at 50072) by debbugs.gnu.org; 15 Aug 2021 23:25:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 19:25:32 2021
Received: from localhost ([127.0.0.1]:47939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFPVU-0001pD-5j
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:32 -0400
Received: from out1.migadu.com ([91.121.223.63]:59878)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFPVS-0001p4-6V
 for 50072 <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:25:31 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629069929;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=0WFMFSUuUYWVX08e2b+zqvIdj2OOvXmGMXdblJEeCyg=;
 b=Hj3SRdhXdJXsM1ywtCvt7jpZwMt76EonHF4eWORW+FRYmOWeiEWZQBd6KAMk8QvbO624cr
 i0Q2C+xoemwEMvhf/ANeBbHTBD890vCE9JIIBK158jkpXAQVk2KRGxmPesvesvd8iNZtXZ
 f+RLBB2nyPNtvWOKNs8LxQjiZe0sII0=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50072 <at> debbugs.gnu.org
Subject: [PATCH WIP 1/4] guix hash: Extract file hashing procedures.
Date: Sun, 15 Aug 2021 16:25:24 -0700
Message-Id: <9ba0b798de2fdf859f94ca7b2f1ee052bceac63a.1629068119.git.iskarian@HIDDEN>
In-Reply-To: <cover.1629068119.git.iskarian@HIDDEN>
References: <cover.1629068119.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50072
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* guix/scripts/hash.scm (guix-hash)[vcs-file?, file-hash]: Extract logic
to...
* guix/hash.scm: ...here. New file.
---
 guix/hash.scm         | 51 +++++++++++++++++++++++++++++++++++++++++++
 guix/scripts/hash.scm | 29 ++++++------------------
 2 files changed, 58 insertions(+), 22 deletions(-)
 create mode 100644 guix/hash.scm

diff --git a/guix/hash.scm b/guix/hash.scm
new file mode 100644
index 0000000000..8c2ab8187f
--- /dev/null
+++ b/guix/hash.scm
@@ -0,0 +1,51 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix hash)
+  #:use-module (gcrypt hash)
+  #:use-module (guix serialization)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-11)
+  #:export (vcs-file?
+            file-hash*))
+
+(define (vcs-file? file stat)
+  "Returns true if FILE is a version control system file."
+  (case (stat:type stat)
+    ((directory)
+     (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
+    ((regular)
+     ;; Git sub-modules have a '.git' file that is a regular text file.
+     (string=? (basename file) ".git"))
+    (else
+     #f)))
+
+(define* (file-hash* file #:key
+                     (algorithm (hash-algorithm sha256))
+                     (recursive? #t)
+                     (select? (negate vcs-file?)))
+  "Compute the hash of FILE with ALGORITHM.  If RECURSIVE? is true, recurse
+into subdirectories of FILE, computing the combined hash of all files for
+which (SELECT?  FILE STAT) returns true."
+  (if recursive?
+      (let-values (((port get-hash)
+                    (open-hash-port algorithm)))
+        (write-file file port #:select? select?)
+        (force-output port)
+        (get-hash))
+      (file-hash algorithm file)))
diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm
index b8622373cc..353ca30c2c 100644
--- a/guix/scripts/hash.scm
+++ b/guix/scripts/hash.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@HIDDEN>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@HIDDEN>
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
   #:use-module (gcrypt hash)
   #:use-module (guix serialization)
   #:use-module (guix ui)
+  #:use-module (guix hash)
   #:use-module (guix scripts)
   #:use-module (guix base16)
   #:use-module (guix base32)
@@ -125,16 +127,6 @@ and 'base16' ('hex' and 'hexadecimal' can be used as well).\n"))
     (parse-command-line args %options (list %default-options)
                         #:build-options? #f))
 
-  (define (vcs-file? file stat)
-    (case (stat:type stat)
-      ((directory)
-       (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
-      ((regular)
-       ;; Git sub-modules have a '.git' file that is a regular text file.
-       (string=? (basename file) ".git"))
-      (else
-       #f)))
-
   (let* ((opts (parse-options))
          (args (filter-map (match-lambda
                             (('argument . value)
@@ -150,18 +142,11 @@ and 'base16' ('hex' and 'hexadecimal' can be used as well).\n"))
       ;; Compute the hash of FILE.
       ;; Catch and gracefully report possible '&nar-error' conditions.
       (with-error-handling
-        (if (assoc-ref opts 'recursive?)
-            (let-values (((port get-hash)
-                          (open-hash-port (assoc-ref opts 'hash-algorithm))))
-              (write-file file port #:select? select?)
-              (force-output port)
-              (get-hash))
-            (match file
-              ("-" (port-hash (assoc-ref opts 'hash-algorithm)
-                              (current-input-port)))
-              (_   (call-with-input-file file
-                     (cute port-hash (assoc-ref opts 'hash-algorithm)
-                           <>)))))))
+        (match file
+          ("-" (port-hash (assoc-ref opts 'hash-algorithm)
+                          (current-input-port)))
+          (_   (file-hash* #:algorithm (assoc-ref opts 'hash-algorithm)
+                           #:recursive? (assoc-ref opts 'recursive?))))))
 
     (match args
       ((file)
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Aug 2021 23:16:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 19:16:28 2021
Received: from localhost ([127.0.0.1]:47934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFPMh-0001bx-Nf
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:16:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:43464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mFPMc-0001bd-Cj
 for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 19:16:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36232)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1mFPMc-0006ea-4h
 for guix-patches@HIDDEN; Sun, 15 Aug 2021 19:16:22 -0400
Received: from out1.migadu.com ([91.121.223.63]:57916)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1mFPMZ-0006Xx-3S
 for guix-patches@HIDDEN; Sun, 15 Aug 2021 19:16:21 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1629069376;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=fdwVozHOIoneJWc/FOIByFwOsv6rNoZsKsHyUvUXw58=;
 b=A+Qy9yZJI/pZC9Vp8iOUn579Zfr53G1blnjXw5a1uTHWGOObbbD6zEJ7Hw95oLXdk7k+HO
 RmZK4Tg6B4eZ7NRV0uekaoOODK9GrY2mE2HYZFwYOqSUNsnrjZxMpmkVDVlshuBj6U/Ut4
 NxcnFJDZ4mhBgj88kKpZ4LQJU7OOY20=
From: Sarah Morgensen <iskarian@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH WIP 0/4] Add upstream updater for git-fetch origins.
Date: Sun, 15 Aug 2021 16:16:13 -0700
Message-Id: <cover.1629068119.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
Received-SPF: pass client-ip=91.121.223.63; envelope-from=iskarian@HIDDEN;
 helo=out1.migadu.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hello Guix,

This is a proof-of-concept for extending `guix refresh -u` to support packages
with git-fetch origins.  The potential impact is large: approximately 4.5k
packages use git-fetch, although only some fraction would be supported.

Currently, this enables update support for (at least) any package where

* github-updater finds an update,
* origin-method is 'git-fetch', and
* the package version is a suffix of the 'commit' field.

Drawbacks currently include the fact that libgit2 doesn't (yet) support
shallow checkouts [0], so the entire repository must be cloned. There is also
no support for verifying commits.

There should probably also be a few tests added.

WDYT?

[0] https://github.com/libgit2/libgit2/issues/3058

--
Sarah Morgensen (4):
  guix hash: Extract file hashing procedures.
  import: Factorize file hashing.
  refresh: Support non-tarball sources.
  upstream: Support updating git-fetch origins.

 guix/git-download.scm    | 18 +++++++++++++-
 guix/hash.scm            | 51 ++++++++++++++++++++++++++++++++++++++++
 guix/import/cran.scm     | 32 +++----------------------
 guix/import/elpa.scm     | 28 ++++------------------
 guix/import/go.scm       | 26 +++-----------------
 guix/scripts/hash.scm    | 29 ++++++-----------------
 guix/scripts/refresh.scm | 10 ++++----
 guix/upstream.scm        | 41 +++++++++++++++++++++++++++++++-
 8 files changed, 130 insertions(+), 105 deletions(-)
 create mode 100644 guix/hash.scm


base-commit: 12099eac1b161d364be923451d27d7d739d0f14d
-- 
2.31.1





Acknowledgement sent to Sarah Morgensen <iskarian@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#50072; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 7 Sep 2021 18:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.