From patchwork Sun Oct 7 11:57:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 980144 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.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.b="U9fJ90xb"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42ShpG3pCSzB2xn for ; Sun, 7 Oct 2018 22:58:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 12B87858F7; Sun, 7 Oct 2018 11:58:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q75tXwB3FANV; Sun, 7 Oct 2018 11:58:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4AC0D8592A; Sun, 7 Oct 2018 11:58:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 900FE1BF429 for ; Sun, 7 Oct 2018 11:58:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8D34B220C2 for ; Sun, 7 Oct 2018 11:58:09 +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 7FjDoDdNRvch for ; Sun, 7 Oct 2018 11:58:08 +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 silver.osuosl.org (Postfix) with ESMTPS id 2F63021578 for ; Sun, 7 Oct 2018 11:58:08 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id z204-v6so5697423wmc.5 for ; Sun, 07 Oct 2018 04:58:08 -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; bh=gJJbdaBZ6U5Mgmwx2GHw1Rgqz6qoouwO+1Bn0gjYopQ=; b=U9fJ90xbNY5uM9vpu/T9QSzstZUk/YWNTkYJhmZDeV66B3gIj/upF5zsdn/YOF3r6o Ap/EFExfQixacPrNon6+fI6KjdlkGZuXo/V0ZObz66CxnSR06dM1yx8XWPqjel0wTSSJ sTkHpLFO8TrOQabBpkBipzdf/3cn83ErqgdnmiyP46zKH0O8PYxoZb2UeBFVLVyv4XC3 ymHkQkkqifWZXBdkVFlI7oizPkgxWdU/SXdhzR5jDtw21utHkgn4c6eiRacQgzNhgQIy ceBvfueTSoOZIsfrlUhtxjE2tvEAgZfvTSOS3LdPls2pGxv3wuYK9/kGGKojme763jZJ aROA== 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; bh=gJJbdaBZ6U5Mgmwx2GHw1Rgqz6qoouwO+1Bn0gjYopQ=; b=AcPB5h0KYzBb4UGDhFwEUkETsABqMMrd8R7IWW+OQYUAlWlEO1lMpVRa07zvoblL7j dKKTab8xD0ceWRfjPbMIS7tg7wjywY+ag/HaFEiuMJocwr2knP0QfDAolOttLjASokxv ANZjJD0wJbUtzhRcaJbrQxwScD0KT02b4aIczP2ZXSzXVqphU6RkoF+u12U40IaCLIWY /E+ocIUSuxamzbCL+6I23yysJylWefps51q99yhIGznZet9WMW2+dk/138V7bIEEmcbP 4ezy4K6NJ8R/KvoDtp9yzBJulrp9ljVai/1B//MGyavv5vR2hsIq2NnJrGeeVeZL3/e+ mp6Q== X-Gm-Message-State: ABuFfohOYMRln7G7HnCKn2wOYo8ruSNdbfcDd8D2MZzLM9OfsQXY/Dcs I2qdmZ1OQ+w//wQ97lCocy+MUtmV X-Google-Smtp-Source: ACcGV61np4AXsPpVRKHazXoskIfWBJbzlIc9q40303/UPQXmG7vIKliJdrlp3xaS/feaMq6xW8MH9w== X-Received: by 2002:a1c:2d4:: with SMTP id 203-v6mr11875810wmc.148.1538913486358; Sun, 07 Oct 2018 04:58:06 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb19:829a:2800:68e8:7a61:9bb9:12a]) by smtp.gmail.com with ESMTPSA id v1-v6sm11373138wrd.24.2018.10.07.04.58.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Oct 2018 04:58:05 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 7 Oct 2018 13:57:39 +0200 Message-Id: <7861534001e4844e3737d2fb88ff42a19d4ab68e.1538913431.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 2/6] legal-info: use the per-package variable to get the hash file 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: Luca Ceresoli , "Yann E. MORIN" , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle Cc: Luca Ceresoli Cc: Baruch Siach Reviewed-by: Luca Ceresoli --- Makefile | 2 +- package/pkg-generic.mk | 2 +- package/pkg-utils.mk | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 82dd76ea76..4948b7f5b1 100644 --- a/Makefile +++ b/Makefile @@ -792,7 +792,7 @@ legal-info-clean: .PHONY: legal-info-prepare legal-info-prepare: $(LEGAL_INFO_DIR) @$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info") - @$(call legal-license-file,buildroot,buildroot,support/legal-info,COPYING,COPYING,HOST) + @$(call legal-license-file,buildroot,buildroot,support/legal-info/buildroot.hash,COPYING,COPYING,HOST) @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET) @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST) @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved,HOST) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index b3d9ffe932..5bd131481f 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -912,7 +912,7 @@ ifneq ($$(call qstrip,$$($(2)_SOURCE)),) ifeq ($$(call qstrip,$$($(2)_LICENSE_FILES)),) $(Q)$$(call legal-warning-pkg,$$($(2)_BASENAME_RAW),cannot save license ($(2)_LICENSE_FILES not defined)) else - $(Q)$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$($(2)_BASENAME_RAW),$$($(2)_PKGDIR),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep)) + $(Q)$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$($(2)_BASENAME_RAW),$$($(2)_HASH_FILE),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep)) endif # license files ifeq ($$($(2)_SITE_METHOD),local) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index c3acc22b17..be287dc817 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -83,14 +83,10 @@ define legal-manifest # pkg, version, license, license-files, source, url, {HOST echo '"$(1)","$(2)","$(3)","$(4)","$(5)","$(6)"' >>$(LEGAL_MANIFEST_CSV_$(7)) endef -define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-fullpath, {HOST|TARGET} +define legal-license-file # pkgname, pkgname-pkgver, pkg-hashfile, filename, file-fullpath, {HOST|TARGET} mkdir -p $(LICENSE_FILES_DIR_$(6))/$(2)/$(dir $(4)) && \ { \ - if [ -f $(3)/$($(PKG)_VERSION)/$(1).hash ]; then \ - support/download/check-hash $(3)/$($(PKG)_VERSION)/$(1).hash $(5) $(4); \ - else \ - support/download/check-hash $(3)/$(1).hash $(5) $(4); \ - fi; \ + support/download/check-hash $(3) $(5) $(4); \ case $${?} in (0|3) ;; (*) exit 1;; esac; \ } && \ cp $(5) $(LICENSE_FILES_DIR_$(6))/$(2)/$(4)