From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Sankey Subject: Re: [PATCH] doc: clarification for hashing git checkouts Date: Mon, 11 Jul 2016 13:50:01 -0400 Message-ID: <20160711175001.12557.73043@what> References: <20160710215438.15418.98984@what> <20160710231630.GA10509@jasmine> <20160711051831.15418.45217@what> <87k2gsgmje.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0347742556==" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMfLO-0001TR-2T for guix-devel@gnu.org; Mon, 11 Jul 2016 13:50:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMfLJ-00072K-2A for guix-devel@gnu.org; Mon, 11 Jul 2016 13:50:09 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:36799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMfLI-00072F-TJ for guix-devel@gnu.org; Mon, 11 Jul 2016 13:50:05 -0400 Received: by mail-yw0-x242.google.com with SMTP id y188so9304514ywf.3 for ; Mon, 11 Jul 2016 10:50:04 -0700 (PDT) In-Reply-To: <87k2gsgmje.fsf@we.make.ritual.n0.is> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 , guix-devel --===============0347742556== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Quoting ng0 (2016-07-11 12:35:49) > The patch below reads okay to me, could you add your name or > nickname in the section of guix.texi where document author names > are included, if applicable (ie if your name is missing before > this edit)? Attached patch includes my name. Troy --===============0347742556== Content-Type: text/x-diff; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-doc-clarification-for-hashing-git-checkouts.patch" From=206381b62a3774001f630d868fa7e58acc28b0cc4f Mon Sep 17 00:00:00 2001 From: Troy Sankey Date: Sun, 10 Jul 2016 17:45:55 -0400 Subject: [PATCH] doc: clarification for hashing git checkouts When hashing git checkouts of packages, packagers must first remove the .git directory. This commit adds this clarification to the "Invoking guix hash" section in the documentation, and makes a few more related changes througho= ut the rest of the document. --- doc/guix.texi | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index c9d9bd8..d809694 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19,7 +19,8 @@ Copyright @copyright{} 2015 Taylan Ulrich Bay=C4=B1rl=C4= =B1/Kammer@* Copyright @copyright{} 2015, 2016 Leo Famulari@* Copyright @copyright{} 2016 Ben Woodcroft@* Copyright @copyright{} 2016 Chris Marusich@* -Copyright @copyright{} 2016 Efraim Flashner +Copyright @copyright{} 2016 Efraim Flashner@* +Copyright @copyright{} 2016 Troy Sankey = Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -2425,7 +2426,7 @@ The @code{sha256} field specifies the expected SHA256= hash of the file being downloaded. It is mandatory, and allows Guix to check the integrity of the file. The @code{(base32 @dots{})} form introduces the base32 representation of the hash. You can obtain this information with -@code{guix download} (@pxref{Invoking guix download}) and @code{guix +@code{guix download} (@pxref{Invoking guix download}) or @code{guix hash} (@pxref{Invoking guix hash}). = @cindex patches @@ -2684,7 +2685,9 @@ specified in the @code{uri} field as a @code{git-refe= rence} object; a @item @code{sha256} A bytevector containing the SHA-256 hash of the source. Typically the @code{base32} form is used here to generate the bytevector from a -base-32 string. +base-32 string. You can obtain this information with @code{guix +download} (@pxref{Invoking guix download}) or @code{guix hash} +(@pxref{Invoking guix hash}). = @item @code{file-name} (default: @code{#f}) The file name under which the source code should be saved. When this is @@ -4533,6 +4536,11 @@ hash (@pxref{Invoking guix archive}). @c FIXME: Replace xref above with xref to an ``Archive'' section when @c it exists. = +When hashing a git checkout, be sure to remove the git configuration +directory (@code{rm -r .git}) as it will erroneously impact the hash. +The same is true for other version control checkouts (@code{rm -r .hg}, +@code{rm -r .svn}, etc.) + @end table = @node Invoking guix import -- = 2.1.4 --===============0347742556==--