Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	Buildroot Mailman <buildroot@buildroot.org>
Subject: Re: [Buildroot] <PACKAGE>_SOURCE with <PACKAGE>_SITE_METHOD = git can result to tar.gz with mismatched file extension
Date: Sat, 3 Dec 2022 17:05:06 +0100	[thread overview]
Message-ID: <20221203160506.GD3302@scaer> (raw)
In-Reply-To: <20221203155247.428cb5a1@windsurf>

Thomas, Bagas, All,

On 2022-12-03 15:52 +0100, Thomas Petazzoni spake thusly:
> On Fri, 2 Dec 2022 21:02:06 +0700
> Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> > Hello,
> > 
> > I noticed odd behavior when <PACKAGE>_SOURCE is set whereas <PACKAGE>
> > is downloaded via git (<PACKAGE>_SITE_METHOD = git).
> > 
> > For example, I'm trying to bump Git package to commit
> > c000d916380bb59db69c78546928eadd076b9c7d (v2.39.0-rc0). On the makefile
> > (package/git/git.mk), I bumped by:
> > 
> > ---- >8 ----  
> > diff --git a/package/git/git.mk b/package/git/git.mk
> > index dc587170e8..1990bf8e67 100644
> > --- a/package/git/git.mk
> > +++ b/package/git/git.mk
> > @@ -4,9 +4,10 @@
> >  #
> >  ################################################################################
> >  
> > -GIT_VERSION = 2.31.4
> > +GIT_VERSION = c000d916380bb59db69c78546928eadd076b9c7d
> >  GIT_SOURCE = git-$(GIT_VERSION).tar.xz
> > -GIT_SITE = $(BR2_KERNEL_MIRROR)/software/scm/git
> > +GIT_SITE = file:///home/bagas/repo/git-scm
> > +GIT_SITE_METHOD = git
> >  GIT_LICENSE = GPL-2.0, LGPL-2.1+
> >  GIT_LICENSE_FILES = COPYING LGPL-2.1
> >  GIT_CPE_ID_VENDOR = git-scm
> > 
> > (note: I fetch from my local Git project repository, hence file:// URI).
> > 
> > When I fetch the sources (make source), the generated tarball is actually
> > .tar.gz with $(GIT_VERSION) as the filename. This causes extracting the
> > tarball to fail. In this case, the tarball is decompressed first with
> > xzcat, and it complains due to unrecognized compressed format (gzip
> > instead of xz).
> 
> I think you're right. We assume that _SOURCE is not defined when a
> _SITE_METHOD using a VCS (git, cvs, svn, hg) is used.
> 
> I guess we have two options here:
> 
>  (1) Detect this situation, and error out, to prevent this situation
>  from happening
> 
>  (2) Actually support overriding _SOURCE, but in this case, we should
>  comply with the specified compression algorithm
> 
> Yann, thoughts? (1) seems easier to me, I don't know if the benefits of
> (2) are really relevant.

I think the only meaningful solution is to go for (1): detect and abort.
I too do not think letting packages each request a different compression
would be interesting...

If we believe that gzip is too slow/big, then we can think about
switching to another scheme globaly, but that's orthogonal...

So, yes: detect and abort.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-12-03 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 14:02 [Buildroot] <PACKAGE>_SOURCE with <PACKAGE>_SITE_METHOD = git can result to tar.gz with mismatched file extension Bagas Sanjaya
2022-12-03 14:52 ` Thomas Petazzoni via buildroot
2022-12-03 16:05   ` Yann E. MORIN [this message]
2022-12-03 17:23     ` Thomas Petazzoni via buildroot
2022-12-03 18:14       ` Yann E. MORIN
2022-12-04 12:31     ` Bagas Sanjaya
2022-12-04 14:05       ` Yann E. MORIN

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=20221203160506.GD3302@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=bagasdotme@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox