-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Yesterday, @rfc1036 raised an issue on irc that apparently our vtest2 integration as a git submodule has broken the workflow of some packagers, who now assume that a project could be completely built from just a git clone:
I have just discovered that now the varnish repository uses the vtest2 submodule, which is a huge pain in a Debian contest. is there any chance to persuade you to use git-subtree instead?
more specifically, Debian is (slowly) moving from the old tar archives source packages to git-first workflows (multiple ones of course, it's Debian...) which can be used to directly build and generate the source packages, and submodules are hard to implement there
of course packages cannot download a submodule at build time because no network access is allowed
I have some reservations against the git-subtree approach, because I fear it would bring us back to the diverging trees as before (despite better tooling, the problem is basically the same as before - having more than one source of truth), so I would like to ponder alternative approaches - all under the premise to help packagers and specifically not make their lives harder than absolutely necessary.
Build from the dist archive
From my perspective, this is the baseline: We as a project produce a distribution archive, and it is complete and self-contained. The problem here is that apparently some packagers now have additional needs (requirements?):
some people like me like to have the full upstream history in their package repository, which I would not have if I just imported the tar archives
yes, there is a bit of a debate about packaging (and verifying the signature of) tar archives vs. git trees. but I think that the future will obviously be about preferring git trees as much as possible
Package vtest2
This option was also mentioned by Md:
if vtest2 had releases then I would just package it by itself, but since it is basically a source-only library I can only create an intermediate upstream branch in the Debian repository where I manually merge the vtest2 repository
This option was already on our list as of #3983
Split vtest into a library and a program
I maintain the position that we do not need this option to fulfill our own requirements, but if it helps packagers, why not add the option to use an external vtest for make check?
This would conflict with the plan to have certain vinyl-cache specific vtest extensions in our tree and not in the vtest tree, but that idea was already shelved by the argument that vtest should be able to use all components which run vtest.
Create a new kind of "dist archive"
If packagers now need the complete git history, why not create a gist archive (pun intended) containing all the git-bundle s of all needed projects?
Then checking out the vinyl repo would not require much more than (pseudo code)
if -f ../vtest2.bundle ; then
git submodule set-url bin/varnishtest/vtest2 ../vtest2.bundle
git -c protocol.file.allow=always submodule update --init
fi