From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cDFIFpalvGDeIgAAgWs5BA (envelope-from ) for ; Sun, 06 Jun 2021 12:38:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OZ7LEZalvGD6AgAAB5/wlQ (envelope-from ) for ; Sun, 06 Jun 2021 10:38:14 +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 C60D18735 for ; Sun, 6 Jun 2021 12:38:13 +0200 (CEST) Received: from localhost ([::1]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpqAW-0002nT-R7 for larch@yhetil.org; Sun, 06 Jun 2021 06:38:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpqAM-0002nG-Vs for guix-patches@gnu.org; Sun, 06 Jun 2021 06:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpqAM-0002VB-OL for guix-patches@gnu.org; Sun, 06 Jun 2021 06:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpqAM-0001SS-Lr for guix-patches@gnu.org; Sun, 06 Jun 2021 06:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48667] [PATCH v2] doc: Add refernece for =?UTF-8?Q?=E2=80=98git-version=E2=80=99?= and =?UTF-8?Q?=E2=80=98hg-version=E2=80=99.?= Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jun 2021 10:38:02 +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?= , Maxime Devos Received: via spool by 48667-submit@debbugs.gnu.org id=B48667.16229758515548 (code B ref 48667); Sun, 06 Jun 2021 10:38:02 +0000 Received: (at 48667) by debbugs.gnu.org; 6 Jun 2021 10:37:31 +0000 Received: from localhost ([127.0.0.1]:50746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpq9r-0001RQ-CW for submit@debbugs.gnu.org; Sun, 06 Jun 2021 06:37:31 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52376 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpq9p-0001R9-9f for 48667@debbugs.gnu.org; Sun, 06 Jun 2021 06:37:29 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622975843; bh=e0UaE9yZrubujgO+6CLa62SrnCX2m4J+U04IoY8K3SA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=vRL+BVg2im9xO0sALSJD7u48Lmtd17bmLAcjRlsmnZs/Q1UVg08zxYoCjGvslRSgr MvcJrlEE8tVg93Lo4yWDggEc707BueDZkRCpiiorZ+YpkjaPBUHX9fyE4WfgX+fGTL PKjGwvRVnyuMrXzzhJ0S9OAEeLys100pS6Qz+4o4= In-Reply-To: <539a1a894dbbe25d5370b7bfb11006f736cbc875.1622971088.git.public@yoctocell.xyz> References: <539a1a894dbbe25d5370b7bfb11006f736cbc875.1622971088.git.public@yoctocell.xyz> Message-Id: <7354a84803acc09bb64feb8b94519b9e5093d050.1622975743.git.public@yoctocell.xyz> Date: Sun, 06 Jun 2021 12:37:23 +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=1622975893; 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=0zIGLG1pd00hsT0qx2ox1WcnBSP5A5MtbPOgWr7umac=; b=ITgQ6FzQof9izTpJahhGTl1K7JkfzYd6PJ32r/S1h4zLLqxWbY4CPGjQCE7CrMPRtIwUuD eh4fTS2e5exOOMnhc7HrhVaZV3ve/4OCJy63o4banoCC4i34QbosXqctYzk3lEiFmiV/YR dRt9M7VPRS085Lg8Rtv2eW65AtCLm10RGwlM2zDqwxnPbiVz9LXjRqKK3hMILDEbdtvqlO oplmA/gTgw28XDrndB4FquAoXirbU+4fLgrEOTXZ0GDi52BWnxbROkQOLbX+/8PEgLgCdW D7JAcvuEhLrl/RGNmkixa3O+i05u8RhSgS7omY2OXfBGxSPw7g0DKQCnFbWMFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622975893; a=rsa-sha256; cv=none; b=qBq3ajiZYUzvcANDlt+/cYq0dlwDHV4MXca9MIk9WuMzpQru1P6iaTZfsU82UjosTKC780 eC07jv1feQdpo8p081lSVvlQWelJRx8PN4w9NvhIJl1T1Nggxs14+zUKOD9niU95xTcf/V 2uznyk9diCScGH9LEvXQe6WMFB/gYaV3YAqAEdi9WbwFCuCFhb+vijufiF/qnTqxjuoFAi 8K19dyHvZmbl2JMvDJ1gL1DEzOPtZy6gHk6B/m2J27fJc4sJlunSd0C7bAbugCOAws+Wn9 Pz1EDZ9nPLIbDkHgq/h0AAsg5klogpSxkNu1R+JhaI6ZPG7yb9mv1doMYyxLaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=vRL+BVg2; 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=vRL+BVg2; 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: C60D18735 X-Spam-Score: -0.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: SduKEyLH0r06 * 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. --- Changes since v2: * Fix typos 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..3e2a9c8d2f 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 way as @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