From patchwork Sun Jun 6 10:37:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 29963 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 62F2527BC81; Sun, 6 Jun 2021 11:38:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2B51F27BC78 for ; Sun, 6 Jun 2021 11:38:13 +0100 (BST) Received: from localhost ([::1]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpqAW-0002nT-9m for patchwork@mira.cbaines.net; 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?b?4oCYZ2l0?= =?utf-8?b?LXZlcnNpb27igJk=?= and =?utf-8?b?4oCYaGctdmVyc2lvbuKAmS4=?= 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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * doc/contributing.texi (Version Numbers): Document ‘git-version’ and ‘hg-version’. * doc/guix.texi (package Reference): Reference ‘Version Numbers’ 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(-) base-commit: 9caf7112ee50af26fbc4c1bd3c337f1f86b710af 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: + @lisp (define my-package @@ -553,6 +555,20 @@ definition may look like this: ))) @end lisp +@deffn {Scheme Procedure} git-version @var{VERSION} @var{REVISION} @var{COMMIT} +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{CHANGESET} +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 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@* 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. @item @code{version} -The version of the package, as a string. +The version of the package, as a string. @xref{Version Numbers}, for +guidelines. @item @code{source} An object telling how the source code for the package should be