unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* The sources with a git ref origin should also include the .git directory
@ 2020-08-01 12:50 divoplade
  2020-08-01 13:25 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: divoplade @ 2020-08-01 12:50 UTC (permalink / raw)
  To: help-guix@gnu.org

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The sources with a git ref origin should also include the .git directory
  2020-08-01 12:50 The sources with a git ref origin should also include the .git directory divoplade
@ 2020-08-01 13:25 ` Ricardo Wurmus
  2020-08-01 13:41   ` divoplade
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2020-08-01 13:25 UTC (permalink / raw)
  To: divoplade; +Cc: help-guix


divoplade <d@divoplade.fr> writes:

> 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.

That’s on purpose, because the .git directory contains files that
prevent reproducibility.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: The sources with a git ref origin should also include the .git directory
  2020-08-01 13:25 ` Ricardo Wurmus
@ 2020-08-01 13:41   ` divoplade
  0 siblings, 0 replies; 3+ messages in thread
From: divoplade @ 2020-08-01 13:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Le samedi 01 août 2020 à 15:25 +0200, Ricardo Wurmus a écrit :
> That’s on purpose, because the .git directory contains files that
> prevent reproducibility.
> 
Thank you, I will try something else then.

divoplade



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-01 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-01 12:50 The sources with a git ref origin should also include the .git directory divoplade
2020-08-01 13:25 ` Ricardo Wurmus
2020-08-01 13:41   ` divoplade

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).