From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KOCtEu9Ez2H+AAEAgWs5BA (envelope-from ) for ; Fri, 31 Dec 2021 18:59:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qO81D+9Ez2ESBAEAauVa8A (envelope-from ) for ; Fri, 31 Dec 2021 18:59:11 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 00AE822313 for ; Fri, 31 Dec 2021 18:59:11 +0100 (CET) Received: from localhost ([::1]:49136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3MBK-0006Lh-24 for larch@yhetil.org; Fri, 31 Dec 2021 12:59:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3M94-0004YO-9z for guix-devel@gnu.org; Fri, 31 Dec 2021 12:56:50 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]:60720) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3M92-000769-EH for guix-devel@gnu.org; Fri, 31 Dec 2021 12:56:49 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id C1FAD1A982; Fri, 31 Dec 2021 09:56:43 -0800 (PST) From: Vagrant Cascadian To: Liliana Marie Prikler , guix-devel@gnu.org Subject: Re: On raw strings in commit field In-Reply-To: <6e451a878b749d4afb6eede9b476e5faabb0d609.camel@gmail.com> References: <6e451a878b749d4afb6eede9b476e5faabb0d609.camel@gmail.com> Date: Fri, 31 Dec 2021 09:56:39 -0800 Message-ID: <87y240hd48.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=173.255.214.101; envelope-from=vagrant@debian.org; helo=cascadia.aikidev.net X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640973551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+QrmdRboU54UE7lysvLdrpNic29uyn44PjoclY+3fyk=; b=jaIO5USF2XRDWAnH/Owu8WET4gGuTbJB5FWmnv3EG4TglKtRB4nqOErwHBL2WTPVxV8/oq MmRO4F1z4HNSK/CeDOpuJPCM35mSE8yn6cO/rRMuGNLTpuh8WHPYXaacIIyZEaBnmeWSe6 ZG8b6vMcTPtR0J0ST0bDXDSujPJ+tD511T6cGIWcUZrU+Jp01qDjEfgmj+JhfZ9YeraDM0 AcDDIR6JNFwMgKRBsUJbo0lCIXNNvfGa/QXk7Fw/Yg+jugBc5e64/2Ta4dDPkc/M0c8D7T 2CGEsihWsOO9TbMDKnIuTNhOKQQFxCcoUH2bETwYBpF7ch9iiENnD1tXH0DvdA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640973551; a=rsa-sha256; cv=none; b=eHXlkP7IY5aXbJcB4tyNpAlQqHZtnHo6Zn43H4YUZ0XRPM4LMPvq8Hp64bdWjo1ACARxey jg0/SPhxUvf2K5gSB2q2tuAdRd0FiajTCXvOBe7X1dlDheHReuyccXgjFxBDnCWCyd2tGE Q2OGaABPLDpqhA5JmCYGztJohSI13xr1zm4GGcWFxm3apZ0/2LVqBNEIMVJGg+L1rl/ewe nAYiW3JgKS4CpTBRfC+Tr41r0D1LiD3bcEeCeshGqVzECFB5miK7o0PC0AMxDJxKFHhgqx 3R8dd2VNhIUuMtJm3IkjMWzWU8ip3os05wGwaNGtI8yxrZGUpLc3YjcW/FH7eQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.68 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 00AE822313 X-Spam-Score: -4.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: j5I+nrWjw8HE --=-=-= Content-Type: text/plain On 2021-12-28, Liliana Marie Prikler wrote: > Consider a package being added or updated in Guix. At the time of > commit, we have the tag v1.2.3 pointing towards commit deadbeef. We > therefore create a guix package with version "1.2.3" pointing to said > commit (either directly or indirectly). At this point, one of the > following holds: > (1) Guix "1.2.3" -> upstream "v1.2.3" -> upstream "deadbeef" > (2) Guix "1.2.3" -> upstream "deadbeef" <- upstream "v1.2.3" > From either, we can follow that Guix "1.2.3" = upstream "v1.2.3". If > upstream keeps their tags around, then both forms are equivalent, but > (1) is more convenient; it allows us to derive commit from version, > which is often done through an affine mapping. How about using the output of git describe, which can unambigously include the most relevent tag, the number of commits since that tag, and the commit hash: $ git describe --long --abbrev=41 v1.3.0-13278-g60661adfb8ffa28e1acfcfea27c6cc2fc70f88fe $ git describe --long --abbrev=41 v1.3.0 v1.3.0-0-ga0178d34f582b50e9bdbb0403943129ae5b560ff I *think* I've used such git references in the commit field of packages before, and guix seemed fine with it. Occasionally, I've seen git describe pick an odd tag to base on. Not sure how it interacts with software heritage, or multiple tags, or renamed tags... but in theory it could work, and would allow us to detect tag changes "upstream". live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYc9EWAAKCRDcUY/If5cW qgumAP0V3jT0fjQcv0RU7U+DUfrZJspWZpEVtVuUSrc2QVic7wD/coL0moO/kk6a fHgbLw5jBLiLJetztz7UukfVN18YjQ0= =c8ic -----END PGP SIGNATURE----- --=-=-=--