All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Konrad Weihmann <kweihmann@outlook.com>,
	bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH 1/2] fetch/git: Handle github dropping git:// support
Date: Tue, 02 Nov 2021 13:27:58 +0000	[thread overview]
Message-ID: <7930bb9f4875fdc32c4fa43395da68bae76a24c0.camel@linuxfoundation.org> (raw)
In-Reply-To: <AM9PR09MB4642729BBF86DB48FCA16DFCA88B9@AM9PR09MB4642.eurprd09.prod.outlook.com>

On Tue, 2021-11-02 at 14:19 +0100, Konrad Weihmann wrote:
> 
> On 02.11.21 13:44, Richard Purdie wrote:
> > github is dropping support for git procotol iun git urls. Add code to remap
> > this to https in a way that could be used in older bitbake versions.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >   lib/bb/fetch2/git.py | 4 ++++
> >   1 file changed, 4 insertions(+)
> > 
> > diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> > index e974445fbe..f5be24d6ab 100644
> > --- a/lib/bb/fetch2/git.py
> > +++ b/lib/bb/fetch2/git.py
> > @@ -142,6 +142,10 @@ class Git(FetchMethod):
> >               ud.proto = 'file'
> >           else:
> >               ud.proto = "git"
> > +        if ud.host == "github.com" and ud.proto == "git":
> > +            # github stopped supporting git protocol
> > +            # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
> 
> While having a warning within the bitbake is something very much 
> appreciated, I don't think it's a good idea to remap to https here, as I 
> think rather the recipes that still use this should be fixed.
> This will just lead to non-core layer (the ones being not so well 
> maintained) just ignoring the warning and leave the original offending 
> recipes as they are.
> 
> I think this solution does scale very well.
> For instance this assumes that github.com is used, but I can also think 
> of DNS aliases, where this rule here simply won't catch up... same for 
> the fact that other hosting platforms will likely go in the same 
> direction and we would end up with an ever growing condition here
> 
> Bottom line: I like the warning, but would rather insist on the recipes 
> that still use git:// + protocol=git to be fixed - at the mentioned 
> 11.1.22 likely fetching them will fail with an explicit error message 
> anyway, so I actually don't see the need to magically fix up things here

With 15 years of legacy branches and recipes out there, this change is intended
to be backported to older bitbakes to at least give some support to people stuck
on older versions. This is why this commit and the warning are separated.

The warning is being added as we're not at 11.1.22 yet and people have
previously said they don't like instant hard breaking error messages. We'll
therefore give people some time to update, then change master to an error.

Cheers,

Richard





  reply	other threads:[~2021-11-02 13:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 12:44 [PATCH 1/2] fetch/git: Handle github dropping git:// support Richard Purdie
2021-11-02 12:45 ` [PATCH 2/2] fetch/git: Show warning for invalid github urls Richard Purdie
2021-11-02 13:19 ` [bitbake-devel] [PATCH 1/2] fetch/git: Handle github dropping git:// support Konrad Weihmann
2021-11-02 13:27   ` Richard Purdie [this message]
2021-11-02 14:06     ` Frank Earl
2021-11-02 14:57       ` Quentin Schulz
2021-11-02 14:51     ` Jan-Simon Moeller
2021-11-02 18:00 ` Peter Kjellerstedt
     [not found] <16B3BB5E65837842.31260@lists.openembedded.org>
2021-11-03 14:13 ` Richard Purdie
2021-11-09 15:40   ` gabriel.valcazar
2021-11-09 15:44     ` [bitbake-devel] " Alexander Kanavin
2021-11-09 15:47     ` Martin Jansa
2021-11-10 15:15       ` gabriel.valcazar
2021-11-11 11:03         ` [bitbake-devel] " Richard Purdie
2021-11-11 12:18           ` gabriel.valcazar
2021-11-11 12:27             ` [bitbake-devel] " Alexander Kanavin

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=7930bb9f4875fdc32c4fa43395da68bae76a24c0.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=kweihmann@outlook.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.
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.