diff mbox series

[OSSTEST,02/36] ts-xen-build-prep: Only force git protocol v2 on buster

Message ID 20240318165545.3898-3-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Switch to Debian Bookworm | expand

Commit Message

Anthony PERARD March 18, 2024, 4:55 p.m. UTC
Newer version of Debian and thus git would use this automatically, no
need to force it.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 Osstest/TestSupport.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Roger Pau Monné March 20, 2024, 3:20 p.m. UTC | #1
On Mon, Mar 18, 2024 at 04:55:11PM +0000, Anthony PERARD wrote:
> Newer version of Debian and thus git would use this automatically, no
> need to force it.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  Osstest/TestSupport.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> index f0e087aa..0dded9b2 100644
> --- a/Osstest/TestSupport.pm
> +++ b/Osstest/TestSupport.pm
> @@ -3257,7 +3257,7 @@ END
>  
>      # Adding mandadory use of Git protocol v2
>      # necessary on buster when building QEMU v8.1
> -    $gitcfg .= <<END;
> +    $gitcfg .= <<END if $ho->{Suite} =~ m/buster/;
>  [protocol]
>  	version = 2

Do we need to limit ourselves to version 2 for the git cache stuff, or
that doesn't matter?

I'm wondering whether it case version 3 of the protocol appears we
would be in trouble by not having version = 2 in the config file.

Thanks, Roger.
Anthony PERARD March 20, 2024, 4:34 p.m. UTC | #2
On Wed, Mar 20, 2024 at 04:20:00PM +0100, Roger Pau Monné wrote:
> On Mon, Mar 18, 2024 at 04:55:11PM +0000, Anthony PERARD wrote:
> > Newer version of Debian and thus git would use this automatically, no
> > need to force it.
> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > ---
> >  Osstest/TestSupport.pm | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> > index f0e087aa..0dded9b2 100644
> > --- a/Osstest/TestSupport.pm
> > +++ b/Osstest/TestSupport.pm
> > @@ -3257,7 +3257,7 @@ END
> >  
> >      # Adding mandadory use of Git protocol v2
> >      # necessary on buster when building QEMU v8.1
> > -    $gitcfg .= <<END;
> > +    $gitcfg .= <<END if $ho->{Suite} =~ m/buster/;
> >  [protocol]
> >  	version = 2
> 
> Do we need to limit ourselves to version 2 for the git cache stuff, or
> that doesn't matter?

It's not a limitation, this settings forces `git` to use an experimental
feature. In buster, git still default to version 1, which was an issue
for a single git repo, one of QEMU's meson wrap dependency.

In bookworm, git default to version 2, so I don't think there's need to
deviate from default beyond buster.

Once git-cache-proxy knows how to handle this version=2, and pass it on
to `git-upload-pack`, it will know how to handle v3 and beyond.

> I'm wondering whether it case version 3 of the protocol appears we
> would be in trouble by not having version = 2 in the config file.

No, git should be able to negotiate with itself. Even today, if a git
server only have protocol v1, it will just ignore that a client ask for
v2.

Thanks,
diff mbox series

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index f0e087aa..0dded9b2 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -3257,7 +3257,7 @@  END
 
     # Adding mandadory use of Git protocol v2
     # necessary on buster when building QEMU v8.1
-    $gitcfg .= <<END;
+    $gitcfg .= <<END if $ho->{Suite} =~ m/buster/;
 [protocol]
 	version = 2
 END