From patchwork Tue Mar 17 12:59:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 450979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 5D8F314017B for ; Wed, 18 Mar 2015 00:00:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=jdm8DrYl; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9366C336CB; Tue, 17 Mar 2015 13:00:11 +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 QYmCs0MCt41S; Tue, 17 Mar 2015 13:00:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7044D33651; Tue, 17 Mar 2015 12:59:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 535CF1C25F1 for ; Tue, 17 Mar 2015 12:59:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 501B49527B for ; Tue, 17 Mar 2015 12:59:50 +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 bOXktw7Dwrb2 for ; Tue, 17 Mar 2015 12:59:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by hemlock.osuosl.org (Postfix) with ESMTPS id 743399527C for ; Tue, 17 Mar 2015 12:59:49 +0000 (UTC) Received: by wgdm6 with SMTP id m6so7794368wgd.2 for ; Tue, 17 Mar 2015 05:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=2Wwmk0wl0UJ5LlG5UbcNRrS/B5yqj9SS10WE71wRLrs=; b=jdm8DrYl3aKYtTAWrdc2mggPa3KRbeuok1S5rHD4y2hYhT1Ip2KT+JvRlny2/kivKy VuuAo56ZcY9dqYgyn0RKeq7MF9p5TMRa1hb+mOPW7ypiAWivjszyZPWhTlgdmZ04c7pF 8EQ3EVKOga29DVi32Zr9j0XcxMXc3G21FOYqHuxUKO3Qi4G6ZPZLQbazWxK6bazPlRms kmNl+T7moBFZEHRb+MUf77ia5SUSqrUoklyP2jJQggcc9kiuEN93OBjVlP7/M8smQqJx G/NvW9W/jSzILBUONSHZ4wIEQWmAXWsDE7XiTFrp8cdIrmdnJ0zq7mYrm6j4nMUr5/Vl n9SQ== X-Received: by 10.194.175.39 with SMTP id bx7mr135006782wjc.22.1426597187891; Tue, 17 Mar 2015 05:59:47 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by mx.google.com with ESMTPSA id nd15sm2618288wic.8.2015.03.17.05.59.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2015 05:59:47 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 17 Mar 2015 13:59:38 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 5/5 v2] support/download: always fail when there's no hash 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" At the time we introduced hashes, we did not want to be too harsh in the beginning, and give people some time to adapt and accept the hashes. So we so far only whined^Wwarned about a missing hash (when the .hash file exists). Some time has passed now, and people are still missing updating hashes when bumping packages. Let's make that warning a little bit more annoying... Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Reviewed-by: Samuel Martin --- docs/manual/adding-packages-directory.txt | 6 ++---- support/download/check-hash | 8 ++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt index 1ce9a3b..febb33c 100644 --- a/docs/manual/adding-packages-directory.txt +++ b/docs/manual/adding-packages-directory.txt @@ -469,9 +469,7 @@ not match, Buildroot considers this an error, deletes the downloaded file, and aborts. If the +.hash+ file is present, but it does not contain a hash for a -downloaded file, no check is done for that file. If you set the -environment variable +BR2_ENFORCE_CHECK_HASH+ to a non-empty value, and -there is no hash for a downloaded file, Buildroot considers this an -error, deletes the downloaded file, and aborts. +downloaded file, Buildroot considers this an error and aborts (but leaves +the downloaded file in place). If the +.hash+ file is missing, then no check is done at all. diff --git a/support/download/check-hash b/support/download/check-hash index 9c62d7f..0caa619 100755 --- a/support/download/check-hash +++ b/support/download/check-hash @@ -88,10 +88,6 @@ while read t h f; do done <"${h_file}" if [ ${nb_checks} -eq 0 ]; then - if [ -n "${BR2_ENFORCE_CHECK_HASH}" ]; then - printf "ERROR: No hash found for %s\n" "${base}" >&2 - exit 2 - else - printf "WARNING: No hash found for %s\n" "${base}" >&2 - fi + printf "ERROR: No hash found for %s\n" "${base}" >&2 + exit 2 fi