All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/7] core/pkg-infra: prepare for alternate default source archives
Date: Thu, 19 Nov 2020 22:23:45 +0100	[thread overview]
Message-ID: <290464f65f82952a8b2ae2672d330aff1f43e29f.1605821010.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1605821010.git.yann.morin.1998@free.fr>

The .tar.gz default extension is historical, and we initially used to
only fetch tarballs from remote sites.

When we introduced downloads from VCS repositories, we kept that
extension, and kept compressing with gz, by lack of good reason to
switch to some other compression scheme.

However, nowadays, we will want to change the way we construct the
tarballs we generate from VCS. This will de facto change the hashes of
those tarballs.

If we were to keep the .tar.gz extension (and compression), then we'd
have a problem with older archives that would no longer match the newer
hashes (when someone uses s.b.o. for example), or the other way around
(if we updated the archives on s.b.o and someone uses an older
Buildroot).

So we will want that the archives we generate do not clash with the
existing ones, so needs another filename. So, we need a way to be able
to use a different extension, whatever we'll want to use when we
generate archives from VCS.

Note that we do not need to play the host-defaults-to-target-value
dance we do for the _SOURCE variable, because this is a purely internal
variable, not exposed to packages.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Vincent Fazio <vfazio@xes-inc.com>
---
 package/pkg-generic.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 54de03da03..5fe1bfe0e2 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -514,11 +514,12 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),)
 $(2)_VERSION = custom
 endif
 
+$(2)_SOURCE_EXT = .tar.gz
 ifndef $(2)_SOURCE
  ifdef $(3)_SOURCE
   $(2)_SOURCE = $$($(3)_SOURCE)
  else ifdef $(2)_VERSION
-  $(2)_SOURCE			?= $$($(2)_BASENAME_RAW).tar.gz
+  $(2)_SOURCE			?= $$($(2)_BASENAME_RAW)$$($(2)_SOURCE_EXT)
  endif
 endif
 
-- 
2.25.1

  reply	other threads:[~2020-11-19 21:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 21:23 [Buildroot] [PATCH 0/7] support/download: reproducible archives whatever tar version (branch yem/dl-git-tar-pax) Yann E. MORIN
2020-11-19 21:23 ` Yann E. MORIN [this message]
2020-11-19 21:23 ` [Buildroot] [PATCH 2/7] WIP: support/download: change format of archives generated from git Yann E. MORIN
2020-11-19 21:23 ` [Buildroot] [PATCH 3/7] WIP: boot+packages: update hash to new git-tarballs format Yann E. MORIN
2020-11-19 21:23 ` [Buildroot] [PATCH 4/7] WIP: support/testing: update git-hash checks with new archive format Yann E. MORIN
2020-11-19 21:23 ` [Buildroot] [PATCH 5/7] support/download: change format of archives generated from svn Yann E. MORIN
2020-11-19 21:23 ` [Buildroot] [PATCH 6/7] support/dependencies: drop check for maximal tar version Yann E. MORIN
2020-11-19 21:23 ` [Buildroot] [PATCH 7/7] package/tar: drop specific version for host variant Yann E. MORIN
2020-11-19 21:53 ` [Buildroot] [PATCH 0/7] support/download: reproducible archives whatever tar version (branch yem/dl-git-tar-pax) Thomas Petazzoni
2020-11-19 22:25   ` 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=290464f65f82952a8b2ae2672d330aff1f43e29f.1605821010.git.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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.