From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WOIbMUmTvGDrAgAAgWs5BA (envelope-from ) for ; Sun, 06 Jun 2021 11:20:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6K98LEmTvGAMBQAA1q6Kng (envelope-from ) for ; Sun, 06 Jun 2021 09:20: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 F18AA27BA0 for ; Sun, 6 Jun 2021 11:20:08 +0200 (CEST) Received: from localhost ([::1]:49678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpowx-0003Iq-VB for larch@yhetil.org; Sun, 06 Jun 2021 05:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpows-0003Ie-0A for guix-patches@gnu.org; Sun, 06 Jun 2021 05:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpowr-00049q-Pi for guix-patches@gnu.org; Sun, 06 Jun 2021 05:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpowr-0005ZE-MC for guix-patches@gnu.org; Sun, 06 Jun 2021 05:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48667] [PATCH] doc: Add reference for =?UTF-8?Q?=E2=80=98git-ver?= Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jun 2021 09:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48667 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48667@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 48667-submit@debbugs.gnu.org id=B48667.162297118621374 (code B ref 48667); Sun, 06 Jun 2021 09:20:01 +0000 Received: (at 48667) by debbugs.gnu.org; 6 Jun 2021 09:19:46 +0000 Received: from localhost ([127.0.0.1]:50652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpowb-0005Yf-Kt for submit@debbugs.gnu.org; Sun, 06 Jun 2021 05:19:45 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:50614 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpowZ-0005YS-FG for 48667@debbugs.gnu.org; Sun, 06 Jun 2021 05:19:43 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622971177; bh=i91TOKKaLLOjgBVdXAtU4eAIfrA2ZplDCbgUfR2ngh8=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=n9r1/OaaLVc5NaAFftrVjtaf2ZjX+wkP0YE6724L53vlW2qeT3kBkZ1cce7gnrAYE 4ImyOQ5LC2P7RkSjdwZ3hsnPR8XTQOfhy48DiZ221fPf/BLX7e0F6fEZl8T14dKjmT 34E82/VH0IxHaO5UObuvQGAhesDruIrf+SgHBJlo= In-Reply-To: <87zgw4m4xa.fsf_-_@gnu.org> References: <87zgw4m4xa.fsf_-_@gnu.org> Message-Id: <539a1a894dbbe25d5370b7bfb11006f736cbc875.1622971088.git.public@yoctocell.xyz> Date: Sun, 06 Jun 2021 11:19:37 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1622971209; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=k4pS7htzaJ+ZAkNDW3QKYEzjBpQ6yjY3nn85wLRkX9g=; b=HTBbPTf2n5burQPj0vrU3iabktJBB+0IpXO5eiOvGJnzkCKv8RZP8HyHpE2eqGCU9hJ9Sm SBsHti/Wagme6wnrAjZmZylRbNqX8tyPjcZf0xk3t6uvhPJEv6bzldAdh+EN1azyYB5po2 8hhPo66Jj+t6o/TN/0jOadwYDO6MCnzbHSNw1eo8OAZyFuah/bJNBSyYVEYIJZkk6Sz9Uo kXReHG0j/l7TBYkKGN1/Q/8P2ywrer21RuNNvR3CUy/he7G+UYMpA6/7qgjIfGx8u9GYbO xKng6cV6IKvqG1dcpFHeWvnCqj3HfuCgY+0ZuzHdNBS6lqUGoyLfYgCK36rzyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622971209; a=rsa-sha256; cv=none; b=YSPLVzSSob+tlYAXFAv5fEf2FDoJTKYSyMffQnKOUKjju/YXS4pIuKJzbVxLN5CZyjBE+A woL61eCFRPTVmcfblyL6UlVsNXd27Mm7b6pkybeJPcL4jYfai9+ozefZ+35EOWBbvVeR/9 cuGdjpb8AbWJZgW99u9b6hT62Jqu1KG4ip0ifwUtXMFDe6wtXXj8woKPS2NpHuNTYUdPQd mxZQE1Jaj1QBTFcPTv9VC+tUbXh0pDp3EFFXUHK0fFQefLAw75owK9CZqgbQqD4fCnYyj6 7lO4fUsUpwlhulRAN3TAxwVTPIF1fxCe7/ZAn4/RP8AQeEscezfE2JrwMtjJSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="n9r1/Oaa"; 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-Spam-Score: -0.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="n9r1/Oaa"; 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: F18AA27BA0 X-Spam-Score: -0.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: CndhBCDkjnlc * doc/contributing.texi (Version Numbers): Document =E2=80=98git-version=E2= =80=99 and =E2=80=98hg-version=E2=80=99. * doc/guix.texi (package Reference): Reference =E2=80=98Version Numbers=E2= =80=99 section for version naming guidelines. --- doc/contributing.texi | 22 +++++++++++++++++++--- doc/guix.texi | 4 +++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/doc/contributing.texi b/doc/contributing.texi index 87719a4bbe..ee6cb97c8d 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -532,9 +532,11 @@ It is a good idea to strip commit identifiers in the @= code{version} field to, say, 7 digits. It avoids an aesthetic annoyance (assuming aesthetics have a role to play here) as well as problems related to OS limits such as the maximum shebang length (127 bytes for the Linux -kernel). It is best to use the full commit identifiers in -@code{origin}s, though, to avoid ambiguities. A typical package -definition may look like this: +kernel). There are helper functions for doing this for packages using +@code{git-fetch} or @code{hg-fetch} (see below). It is best to use the +full commit identifiers in @code{origin}s, though, to avoid ambiguities. +A typical package definition may look like this: + =20 @lisp (define my-package @@ -553,6 +555,20 @@ definition may look like this: ))) @end lisp =20 +@deffn {Scheme Procedure} git-version @var{VERSION} @var{REVISION} @var{CO= MMIT} +Return the version string for packages using @code{git-fetch}. + +@lisp +(git-version "0.2.3" "0" "93818c936ee7e2f1ba1b315578bde363a7d43d05") +@result{} "0.2.3-0.93818c9" +@end lisp +@end deffn + +@deffn {Scheme Procedure} hg-version @var{VERSION} @var{REVISION} @var{CHA= NGESET} +Return the version string for packages using @code{hg-fetch}. It works +in the same was @code{git-version} +@end deffn + @node Synopses and Descriptions @subsection Synopses and Descriptions =20 diff --git a/doc/guix.texi b/doc/guix.texi index eb64518a95..e71ec70859 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 @@ -6657,7 +6658,8 @@ 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. @xref{Version Numbers}, for +guidelines. =20 @item @code{source} An object telling how the source code for the package should be base-commit: 9caf7112ee50af26fbc4c1bd3c337f1f86b710af --=20 2.31.1