diff mbox series

[OSSTEST] ts-xen-build-prep: force use of git protocol v2

Message ID 20230717141745.33470-1-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series [OSSTEST] ts-xen-build-prep: force use of git protocol v2 | expand

Commit Message

Anthony PERARD July 17, 2023, 2:17 p.m. UTC
Recent version of QEMU (to be 8.1) started to use meson subproject to
clone extra repo. With the example of the subproject "dtc", they do a
shallow clone with a sha1. Meson end up running:

    git fetch --depth 1 origin b6910bec11614980a21e46fbccc35934b671bd81

This command fails. I think the error message is something like "the
remote end hung up unexpectedly", on Debian Buster. A more useful
message with more recent version of git seems to be "couldn't find
remote ref".

If we allow git to communicate with the protocol v2, then the shallow
clone works. But git on buster still use v1 by default. Force it to
use v2.

This needs a git-cache-proxy version that can allow to switch to v2 of
the protocol. A bug is open upstream to track this change:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040476

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    I've already apply the patch to our git-cache-proxy version in the
    testlab.
    
    Also, I've been using this osstest patch a few times, and none of my
    flights broke because if it, so I guess git-protocol v2 work well enough
    in buster, even if it isn't the default yet in this git version.

 Osstest/TestSupport.pm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Roger Pau Monné July 18, 2023, 9:23 a.m. UTC | #1
On Mon, Jul 17, 2023 at 03:17:45PM +0100, Anthony PERARD wrote:
> Recent version of QEMU (to be 8.1) started to use meson subproject to
> clone extra repo. With the example of the subproject "dtc", they do a
> shallow clone with a sha1. Meson end up running:
> 
>     git fetch --depth 1 origin b6910bec11614980a21e46fbccc35934b671bd81
> 
> This command fails. I think the error message is something like "the
> remote end hung up unexpectedly", on Debian Buster. A more useful
> message with more recent version of git seems to be "couldn't find
> remote ref".
> 
> If we allow git to communicate with the protocol v2, then the shallow
> clone works. But git on buster still use v1 by default. Force it to
> use v2.
> 
> This needs a git-cache-proxy version that can allow to switch to v2 of
> the protocol. A bug is open upstream to track this change:
>     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040476
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
diff mbox series

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 360cfdea..f0e087aa 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -3254,6 +3254,14 @@  sub gitcache_setup ($) {
         insteadOf = ${proxy}$urlprefix
 END
     }
+
+    # Adding mandadory use of Git protocol v2
+    # necessary on buster when building QEMU v8.1
+    $gitcfg .= <<END;
+[protocol]
+	version = 2
+END
+
     target_putfilecontents_stash($ho,30,$gitcfg,"/home/osstest/.gitconfig",
                                  'home-osstest-gitconfig');
 }