[Buildroot] <PACKAGE>_SOURCE with <PACKAGE>_SITE_METHOD = git can result to tar.gz with mismatched file extension

Bagas Sanjaya bagasdotme at gmail.com
Fri Dec 2 14:02:06 UTC 2022


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).

Thanks.

-- 
An old man doll... just what I always wanted! - Clara



More information about the buildroot mailing list