From patchwork Mon Sep 28 21:40:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1372901 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EWZ8rdyG; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C0bYl5xclz9sSJ for ; Tue, 29 Sep 2020 07:41:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 22B322052E; Mon, 28 Sep 2020 21:41:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d7f8j0HQFV42; Mon, 28 Sep 2020 21:41:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2FF0820764; Mon, 28 Sep 2020 21:41:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 38A061BF2B0 for ; Mon, 28 Sep 2020 21:41:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6F38F86C7A for ; Mon, 28 Sep 2020 21:41:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4HtzyqarFUhv for ; Mon, 28 Sep 2020 21:41:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by hemlock.osuosl.org (Postfix) with ESMTPS id 238AE8707B for ; Mon, 28 Sep 2020 21:41:07 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id l15so5257415wmh.1 for ; Mon, 28 Sep 2020 14:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kT6FQp7NR2TaFkpoKNWl+Hg8+tj3QDy8NWgJ7EQn78s=; b=EWZ8rdyGLkFwKIIx/BrBRG+LUyijIFvazzFpClmQtCcAI3T3I5WXkimJ892MzIz4dF cDfClEGoP5oFug7Ymtt4x22byJMgYg/mJ5BmElkEQpR5C7wJ/sRR8dxqNCcd5TIUrI4X uGD74Hg6sx+xsUJaziUquwNGC66Om/S/YGAbW0N+CPebMq5RQlPYIK5BeDsgZjKT+OPK EpiNQ5B1xRF/sy/QhgfUNfX2YeJ0MJBV5WH5zODvZdDNuuMWHzm/pCEnPRB1iwtj1xzF aPh5bUshjwO8q7RgaWMpENMXLkgi6rLVzEebHzTDx1Xpdv51kTxesYyiQcVvcpu0V+Oq 3tTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kT6FQp7NR2TaFkpoKNWl+Hg8+tj3QDy8NWgJ7EQn78s=; b=ZLX7Q8+TjvAKFszH1Bv9sznIBAJ49LlWiJfNEUYh1T6FwAm2J5Ip3nG37CvXPTx3vc y99aCJPMe5J5DUCgbaBhRkSD8JmgH8YTSD7wzR2vJHOk5jFYKJIhbN0z7ihEzwFPaIGk lLvLJoGyv4YE0oWY1tCjkVB1+vC3HWU1fl0i8Zryma+VUTDXS9emuEPy5ZWSXW1MMKB+ H+xLD6l/iKC0+Zi0vJNt+R0vouSGLEwUBZ2jAGRu7rtKcOh0kPWOuvUfIw60DBR1+4Ut OS+liOxkmH3xg+bqTICWzzuIJXtGJznkRfn3kpAVXVVIsUHVDxHTXamMf1XXepDGHe5N QXYQ== X-Gm-Message-State: AOAM5300ctV/owRNVeXaNqiOj62Z2mt5E/qhBVZMShC1zShMX+2KBUUl rPAOfieYFssIRz3bNMHoHUmxM2Tvf60= X-Google-Smtp-Source: ABdhPJygtk2mSgljOrGSwD0swcNYu2EuPuPeW7pwCzveTyqrUMww6BB4bfTo0FodSZCfYtnUOTsPcg== X-Received: by 2002:a1c:18e:: with SMTP id 136mr1136617wmb.22.1601329265201; Mon, 28 Sep 2020 14:41:05 -0700 (PDT) Received: from scaer.home ([2a01:cb19:8b51:cb00:5813:e43d:77fe:58e5]) by smtp.gmail.com with ESMTPSA id h76sm2950163wme.10.2020.09.28.14.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:41:04 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 28 Sep 2020 23:40:57 +0200 Message-Id: <57e5997999dc95e5ab54d625b3d8893c6bad17a3.1601329249.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/7 RFC] core/pkg-infra: prepare for alternate default source archives X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas Petazzoni , Vincent Fazio Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 externsion (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 exampe), 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" Cc: Thomas Petazzoni Cc: Vincent Fazio --- 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