From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GPV5GUNlJV/1KQAA0tVLHw (envelope-from ) for ; Sat, 01 Aug 2020 12:51:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OO1MFUNlJV9abwAAB5/wlQ (envelope-from ) for ; Sat, 01 Aug 2020 12:51:15 +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 E72C1940223 for ; Sat, 1 Aug 2020 12:51:14 +0000 (UTC) Received: from localhost ([::1]:35610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1qyn-00022y-TP for larch@yhetil.org; Sat, 01 Aug 2020 08:51:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1qyd-00022l-0k for help-guix@gnu.org; Sat, 01 Aug 2020 08:51:03 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:42399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1qya-0001QB-Ju for help-guix@gnu.org; Sat, 01 Aug 2020 08:51:02 -0400 Received: from gnou.home (lfbn-lyo-1-1004-144.w86-194.abo.wanadoo.fr [86.194.80.144]) (Authenticated sender: d@divoplade.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id E16E624000D for ; Sat, 1 Aug 2020 12:50:52 +0000 (UTC) Message-ID: <1eef66018703ced70a6e4b81e1297519e234645e.camel@divoplade.fr> Subject: The sources with a git ref origin should also include the .git directory From: divoplade To: "help-guix@gnu.org" Date: Sat, 01 Aug 2020 14:50:52 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=217.70.178.230; envelope-from=d@divoplade.fr; helo=relay10.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/01 08:50:53 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: SahTY6DUT2UN Hello guix, I am in the process of writing some code, and I like the fact that the source of a guix package can have a git reference. However, when I use it, the .git directory is not present when building the source. Did I missed something? This is very inconvenient, because I use "git describe" to compute the version number, and there is nothing I can do without the .git. I could update the version number on each commit, but then it will not work when merging branches, and the tag system is generally better, so I have no version information in the sources checked in the git repository. Please note that this could benefit all the packages that use the git- veersion-gen script. For the meson build system, the .git directory is also mandatory, I think. My solution for now is to write the version to a file named ".tarball- version" at the root of the package, create an artificial commit, and use that as the source. However, it is not reproducible because re- creating the same commit (with the same date and authorship information) will lead to another commit ID. Can I do something better? Is it possible to include the ".git" directory with a git source? divoplade