unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: divoplade <d@divoplade.fr>
To: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: The sources with a git ref origin should also include the .git directory
Date: Sat, 01 Aug 2020 14:50:52 +0200	[thread overview]
Message-ID: <1eef66018703ced70a6e4b81e1297519e234645e.camel@divoplade.fr> (raw)

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



             reply	other threads:[~2020-08-01 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 12:50 divoplade [this message]
2020-08-01 13:25 ` The sources with a git ref origin should also include the .git directory Ricardo Wurmus
2020-08-01 13:41   ` divoplade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1eef66018703ced70a6e4b81e1297519e234645e.camel@divoplade.fr \
    --to=d@divoplade.fr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).