From: zimoun <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Cc: Marius Bakke <mbakke@fastmail.com>, Brice Waegeneire <brice@waegenei.re>
Subject: Re: best practise between git-fetch vs url-fetch?
Date: Tue, 26 May 2020 13:41:25 +0200 [thread overview]
Message-ID: <CAJ3okZ2yiaSv_BmY+uX4E7C4g1qmVBXQOdyVyWWh7JiqEhjaXA@mail.gmail.com> (raw)
In-Reply-To: <CAJ3okZ0v3VvmT=eWAVeAQoFqZh4L3H4tUkEJn1-5EXcJgRB_tQ@mail.gmail.com>
Dear all,
On Thu, 14 May 2020 at 18:16, Jack Hill <jackhill@jackhill.us> wrote:
> Heh, I'll take the bait. I also really appreciate how easy we make it for
> people to exercise their software freedom and run modified software. How
> best to make that possible and balance it with other usability constraints
> (e.g. mirror:// urls should be more robust) may vary by package, so I
> agree with Leo that some discretion is needed. However, that's not to say
> that I wouldn't appreciate some guidance as to our default preference when
> there is no package-specific reason to prefer one way over the other.
I second these words. :-)
On Wed, 13 May 2020 at 19:13, Leo Famulari <leo@famulari.name> wrote:
> Do we need a consensus? Sometimes it's enough for the reviewer to 1)
> bite their tongue or 2) fix before pushing. Often it's a matter of taste
> and it is beneficial to not second-guess the patch author too much, to
> not hurt their confidence.
From my point of view, it should not be a matter of taste. To me, it
should ideally be uniform per file. For example, bioconductor.scm
uses mainly 'url-fetch' and emacs-xyz.scm mainly 'git-fetch'.
However, some are mixed which does no appear to me right; for example
bioinformatics.scm.
--8<---------------cut here---------------start------------->8---
for f in $(ls -1 gnu/packages/*.scm);
do
echo $f
grep "\-fetch" $f \
| sed -e 's/^[[:space:]]*//' \
| sort | uniq -c | sort -n
echo ""
done | less
--8<---------------cut here---------------end--------------->8---
> I think we should try to avoid a situation where we have to bootstrap
> Git. We do have git-minimal, which works for now. Libgit2 recently
> started releasing tarballs, so that could be an option, too.
But, is Git bootstrapped anyway? Somehow, Guix bootstraps Git, isn't it?
Your point is remove 'git' to the implicit dependency graph, right?
> Another point for url-fetch is that Git's transition from SHA1 to SHA256
> identifiers may be easy for us, or it may not be. We don't know yet.
Tempus narrabo. :-)
On Wed, 13 May 2020 at 10:24, Brice Waegeneire <brice@waegenei.re> wrote:
> An other argument in recommending the 'git-fetch' method is that it
> facilitate the use of “guix build --with-commit”:
+1 for some packages! :-)
-1 for some other ones; for example the ones coming from big
collection as BioConductor released like a whole.
> It does, it avoid having to discuss it with each new contributor
> and avoid noise in patches about changing the source's method based
> on each developer preference (I'm personally guilty of that).
Especially when there is no committer attached to some specific set of packages.
On Wed, 13 May 2020 at 20:07, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> That's only tautologically true if we limit ourselves to using raw
> commit hashes instead of the more common (because far more
> practical) named tags. I obviously don't think we should do that.
Why? If there is a good motivation.
We could imagine a transition: recommanding and encouraging
'git-fetch' with raw commit for any addition/update.
However, it is not clear that there is a strong value for such transition. :-)
> For the sake of argument¹, though, so is --with-source=<actually
> released and supported upstream tarball dot tar>.
Well, in my workflow I never used '--with-source' because there is an
extra step that '--with-commit' does not have. But it is a minor
detail. The real issue is what Jack described with the autotools (or
any other pre-built X generated files).
For a concrete example, let consider 'htop':
--8<---------------cut here---------------start------------->8---
git clone https://github.com/hishamhm/htop /tmp/htop
git -C /tmp/htop checkout 2.2.0
guix build htop --with-source=/tmp/htop
[...]
running './autogen.sh'
patch-shebang: ./autogen.sh: changing `/bin/sh' to
`/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh'
./autogen.sh: line 3: autoreconf: command not found
--8<---------------cut here---------------end--------------->8---
In my scientific workflow, I find easier to do, e.g.,
guix build bamm --with-commit=bamm=XXXXX
to test new features or reproduce something based on a paper using one
specific commit. Well, it is easier to hack on some packages and it
saves time by collectively maintain the burden.
What annoys me is that I cannot predict* for which package it works.
That's why a recommendation per file seems right to me.
*obviously, we could add the method of origin in "guix show"; even it
would help, it is not really the point, IMHO.
> Somehow erasing that hard distinction is the real winning move.
To me, today 'git-fetch' provides more flexibility / hackability than
'url-fetch'.
On Sun, 24 May 2020 at 22:30, Ludovic Courtès <ludo@gnu.org> wrote:
> Probably we should aim towards not using pre-built Autotools generated
> files and, by extension, probably not using pre-built tarballs when VCS
> checkouts are available.
This would help to reduce the "hard distinction". Well, what could be
a working plan?
> It’s kinda happening on leaf packages, often upstream developers people
> don’t bother running “make dist”. It’ll take some time before tarballs
> disappear and needs some thought in particular from a bootstrapping
> standpoint.
Well, from a reproducibility point of view, we should not use the
pre-built Autotools generated files, IMHO.
All the best,
simon
prev parent reply other threads:[~2020-05-26 11:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200306091524.5044.11103@vcs0.savannah.gnu.org>
[not found] ` <20200306091525.E8A1621163@vcs0.savannah.gnu.org>
2020-03-06 14:37 ` 01/02: gnu: fmt: Use HTTPS and git-fetch Marius Bakke
2020-03-06 15:07 ` Pierre Neidhardt
2020-03-06 17:40 ` Marius Bakke
2020-03-07 7:46 ` Pierre Neidhardt
2020-03-07 11:37 ` Pierre Neidhardt
2020-03-11 14:39 ` Ludovic Courtès
2020-03-11 14:54 ` Pierre Neidhardt
2020-05-13 1:08 ` best practise between git-fetch vs url-fetch? zimoun
2020-05-13 8:24 ` Brice Waegeneire
2020-05-13 18:07 ` Tobias Geerinckx-Rice
2020-05-14 16:16 ` Jack Hill
2020-05-24 20:04 ` Josh Marshall
2020-05-24 20:30 ` Ludovic Courtès
2020-05-25 4:54 ` Jack Hill
2020-05-25 21:17 ` Ludovic Courtès
2020-05-26 2:05 ` Jack Hill
2020-05-13 17:13 ` Leo Famulari
2020-05-24 20:34 ` Ludovic Courtès
2020-05-26 11:41 ` zimoun [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ3okZ2yiaSv_BmY+uX4E7C4g1qmVBXQOdyVyWWh7JiqEhjaXA@mail.gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=brice@waegenei.re \
--cc=guix-devel@gnu.org \
--cc=mbakke@fastmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.