From patchwork Sun Jun 25 22:03:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 780547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wwmRm4JgLz9s65 for ; Mon, 26 Jun 2017 08:04:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Bd7TcqtF"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7C5A8857BF; Sun, 25 Jun 2017 22:04:01 +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 dxF_wFLxJ_-2; Sun, 25 Jun 2017 22:04:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C3AC0858AC; Sun, 25 Jun 2017 22:03:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 993611C24A1 for ; Sun, 25 Jun 2017 22:03:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 935E1857B0 for ; Sun, 25 Jun 2017 22:03:50 +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 hu-w--j5b3FM for ; Sun, 25 Jun 2017 22:03:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B53A38578B for ; Sun, 25 Jun 2017 22:03:49 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id 77so26608134wrb.3 for ; Sun, 25 Jun 2017 15:03:49 -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=V8KjsDk20JURq5GiBalWkMRq9YMEmFCKoh1JsM6ri48=; b=Bd7TcqtF3htMuWcrNugIdMQVVnQar0ElHXUspLDPf2x2AwI97ZiugWMMdqWxZnN3Nw cIgvhmJQduyflpaO0DoV7AESTZ3vV7S/EXrViwQbnDC/Db7Umbp8BdsGUsw1vKNrhYv0 z118HXi5oqjpOJSZId8xl8nS+9uYkYH3JSvRZl7ZLnf1bL38ODC+dbgKJbQ0/utJzp2q YrXkfxDUYA2UO4/ETiqXyAberSRxRms40a44qE2vuO6mYQt1k2xuGD1lOh3FVi+pIhaK IfEeHscdpIvPmph8c0F6RLut8YLdWmWkEloqsZApSEEXZ4ukoW5S4aqSh3W3k3uzQNcc Jgxg== 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=V8KjsDk20JURq5GiBalWkMRq9YMEmFCKoh1JsM6ri48=; b=RshdrhAhl0j8wZ/j8z6ecmlWqF8WQ26HIpfCVEtPSFffpYhhK0+toIWC+3A5JALjqj rsNP/FDiyUfxZJV8KBvPIq4jANyfr8RI9nIfDcx2CHJEeG0mY7WRmqPw9ct3pCXJ75fW bjO2Ci76mzLdmM83jfF7xoTc/Ylm02ke8TJlOFyuSmkzDD3AhRjnnWvKIZVmB5hJcdij uiHrAV2FSoo8opvdxSTR9GPVLfvmWjqxagDDCgnNNIcyDU/EWBf+kuHq+2FWoBuFN4X3 AMtsfLPY/Xk9YW2KZ7zbVUy2HoGSxlojqCFLVXQYzCr4F3Dm4D5zqCdhWXzoL5M5UN/q 7ogQ== X-Gm-Message-State: AKS2vOwyyYxhDuSPnqdO15NSBVhvRgTs4thph3bf/X7+AuSOjlYmlzU3 0S2YhCH+Rf+zmpYB X-Received: by 10.223.173.140 with SMTP id w12mr12955366wrc.4.1498428228035; Sun, 25 Jun 2017 15:03:48 -0700 (PDT) Received: from localhost.localdomain (2a01cb088610730061214b82f487065d.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:6121:4b82:f487:65d]) by smtp.gmail.com with ESMTPSA id m188sm6280170wmg.34.2017.06.25.15.03.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jun 2017 15:03:47 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Mon, 26 Jun 2017 00:03:40 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Cc: Luca Ceresoli , "Yann E. MORIN" , Rahul Bedarkar Subject: [Buildroot] [PATCH 4/5] core/pkg-utils: check hashes of license files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This will help catch a change of license even if the filename does not change. For now, a missing hash for the license files is not a fatal error, to let people catch up and add them. When we switch to make it mandatory, we can simplify the code by just removing the case statement. Signed-off-by: "Yann E. MORIN" Cc: Luca Ceresoli Cc: Peter Korsgaard Cc: Rahul Bedarkar --- package/pkg-utils.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index e9ac56276f..accf48c464 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -85,5 +85,10 @@ endef define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-fullpath, {HOST|TARGET} mkdir -p $(LICENSE_FILES_DIR_$(6))/$(2)/$(dir $(4)) && \ + { \ + support/download/check-hash $(3)/$(1).hash $(5) $(4); \ + ret=$${?}; \ + case $${ret} in (0|3) ;; (*) exit 1;; esac; \ + } && \ cp $(5) $(LICENSE_FILES_DIR_$(6))/$(2)/$(4) endef