From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8J9pJFUOrmCxdwEAgWs5BA (envelope-from ) for ; Wed, 26 May 2021 11:01:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YIcMIFUOrmC5CAAAbx9fmQ (envelope-from ) for ; Wed, 26 May 2021 09:01:09 +0000 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 8FCF7248C4 for ; Wed, 26 May 2021 11:01:08 +0200 (CEST) Received: from localhost ([::1]:59070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llpPW-0005Ml-8M for larch@yhetil.org; Wed, 26 May 2021 05:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llpPS-0005MG-HD for guix-patches@gnu.org; Wed, 26 May 2021 05:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llpPS-0008HY-9a for guix-patches@gnu.org; Wed, 26 May 2021 05:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llpPS-00039d-6p for guix-patches@gnu.org; Wed, 26 May 2021 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48667] [PATCH] doc: Expound on how to specify the version of a package. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 May 2021 09:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48667 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48667@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162201963912079 (code B ref -1); Wed, 26 May 2021 09:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2021 09:00:39 +0000 Received: from localhost ([127.0.0.1]:47612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llpP5-00038l-Fk for submit@debbugs.gnu.org; Wed, 26 May 2021 05:00:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:46564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llpP3-00038d-Is for submit@debbugs.gnu.org; Wed, 26 May 2021 05:00:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llpP3-0005KB-8Y for guix-patches@gnu.org; Wed, 26 May 2021 05:00:37 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39724 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llpOw-0007wq-Pk for guix-patches@gnu.org; Wed, 26 May 2021 05:00:37 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622019626; bh=jZgbZg/9cr6H7r4QGEQsGtE9CCmBIs11z3X8h6qcV18=; h=From:To:Subject:Date; b=ZJoJq8Ymwdxf/euERn3L2alB8PKCoZ91Y1dfnPyMTs/cuT/+Jhkp6VMVg7T/bzt9c CQFMMgQUxHd5zUhAa7tDiooqvbm87eYmPjDGWFVzo/Nna+EuSaBTP5hRhdllH/TcOF 4TIUfSmuD5ghWvpgcTUrhplR60wROmzP5BZabfn4= Message-Id: <06217762b07f95d2ba2d40277d010647a926df68.1622019402.git.public@yoctocell.xyz> Date: Wed, 26 May 2021 11:00:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 33 X-Spam_score: 3.3 X-Spam_bar: +++ X-Spam_report: (3.3 / 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, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.896, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622019669; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=rabHK+X/X1Bw3eEqktlCLbAHdEMMwR97N0ukKATq7Ac=; b=O6MuI2xjUNSJLVuh1ihNualELCboYfA9/ShwQtFamf+rezOetfa/Nzi01jQaa9W+yafkvh ZpSfyL/JsmajcaqhKlpjWRuQ67DmWAZu3M05a471LpNByb4QWb2j6hSr6SbJ6t87ckfbhD T25twjZ9aWLouIGz8I8kQ8rofpNs97w2T6EtyFQjPtP1L06cNo35QFhZNXPm013+5BbmZM REBDLw7KOXGVz4rbGriVdZsZmjX1ApcGd37RDDDN9PdtyaJlGW4KkqLaDAMaujW5jYPW8W v7R9OWZmF5d02J4WOKrQfb15b2ssuirEdxZdT8uUC4AgQ8K9s43l9183a5zfOA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622019669; a=rsa-sha256; cv=none; b=Qzut55QCdhQlKW0XWvWwQiYIHA82ILWY2VFegI18zt5EH7FUaYs2FI7UiqvLxGtuHm8WwI nh1J0df9dD7aNjTYn/CZuIdJNuNn3OX3EJjmnOSo0jnEeR1v/Hf4idlkBAM2+j5Ib0W0TT /GlJxPrDphsKQ3nL469V3JtRKTFreiRXFY0JxdhG86+QnSEsQyq9ZFXK45DDjc8Ga2WRB5 xF1QqquxBizco1c2MOUYqVx+6M9ypCfIwf9z+yn0swubxrA/IDuuw2WM7Bs5AXhphuP1vf OwoUEH7qlEDssoh9uD4xS3zACETY6jE7R3bgE+x5Sk+1wOu6GXQxSYbLW4G2PA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=ZJoJq8Ym; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=ZJoJq8Ym; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8FCF7248C4 X-Spam-Score: -0.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: zePAU8/HMcf4 * doc/guix.texi (package Reference): Describe how packages that lack a rele= ase or are pinned to an unreleased version should specify the =E2=80=98version= =E2=80=99 field. Add documentation for the =E2=80=98git-version=E2=80=99 procedure. --- I am unsure if the format for packages that don=E2=80=99t have a release sh= ould be =E2=80=980.0.0-REVISION.COMMIT=E2=80=99 or just =E2=80=980-REVISION.COMM= IT=E2=80=99. doc/guix.texi | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index e8b0485f78..083f65c9c5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -89,6 +89,7 @@ Copyright @copyright{} 2020 Jonathan Brielmaier@* Copyright @copyright{} 2020 Edgar Vincent@* Copyright @copyright{} 2021 Maxime Devos@* Copyright @copyright{} 2021 B. Wilson@* +Copyright @copyright{} 2021 Xinglu Chen@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -6651,7 +6652,18 @@ This is the data type representing a package recipe. The name of the package, as a string. =20 @item @code{version} -The version of the package, as a string. +The version of the package, as a string. If there are no releases of +the package, or a unreleased version is desired, the version should +contain @code{VERSION-REVISION.COMMIT}. @code{VERSION} is +@c TODO: 0.0.0 or just 0 ? +@code{0.0.0} or whatever the latest version is, and @code{REVISION} is +the revision of the Guix package (@code{0} if it is a new package), +whenever the package is updated to a newer version the revision should +also be bumped. @code{COMMIT} is the @dfn{commit} or @dfn{changeset} +corresponding to the version, it should only contain 7 characters. If +the fetch method is @code{git-fetch} (@pxref{origin Reference}), there +is the @code{git-version} procedure that makes it easier to specify the +version. =20 @item @code{source} An object telling how the source code for the package should be @@ -6757,6 +6769,15 @@ automatically corrected. @end table @end deftp =20 +@deffn {Scheme Procedure} git-version @var{VERSION} @var{REVISION} @var{CO= MMIT} +Return the version string for packages using @code{git-fetch}. + +@example +(git-version "0.0.0" "0" "93818c936ee7e2f1ba1b315578bde363a7d43d05") +@result{} "0.0.0-0.93818c9" +@end example +@end deffn + @deffn {Scheme Syntax} this-package When used in the @emph{lexical scope} of a package field definition, this identifier resolves to the package being defined. base-commit: 3f2a4b098039bd374c76d524223de3c6c475f23e --=20 2.31.1