From patchwork Wed May 20 19:30:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1294672 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=fail (p=none dis=none) header.from=gmail.com 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=jJb+Mkkh; 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 49S2sy0d99z9sSF for ; Thu, 21 May 2020 05:30:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9DEED2011A; Wed, 20 May 2020 19:30:57 +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 HI0tjynLI2A9; Wed, 20 May 2020 19:30:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9FE1A20484; Wed, 20 May 2020 19:30:55 +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 B8BDE1BF2F9 for ; Wed, 20 May 2020 19:30:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B2F0888C26 for ; Wed, 20 May 2020 19:30:54 +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 YbbXw-S3dDRa for ; Wed, 20 May 2020 19:30:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id EBE6288C15 for ; Wed, 20 May 2020 19:30:53 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id c3so100973wru.12 for ; Wed, 20 May 2020 12:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fPxApZgHbEKR7ixNbP76/xaAwS++pzigEhUvlcz7SAg=; b=jJb+Mkkhf/ZYOI6nPQw6D9VVWX8iyj2CmuKyc7BvrxynFZKSEO2HOtzxF6M84oYlc+ hBHVs5NtrKrnghrNecb9i1rQOiYnfy2pYtqrcmPhHH6cqrUlocXAtxuvf1NuVKsd9Bg7 AB1uhGz77JBXqklJY/XOfzA7Pcq+C3GCSEROY/g9VouuhW/kyBqw/cQTMThWl3LrVFWC ySxDuJ5/9QZXgXSqtC5Zkq21cDt/i5FME7YW+mU02r/H6Oj2EJs8nn2ERM7HDjH+D3+A LBtQvrstIKUVGV50rjiNZ3nIun+K1KQRiq3vO20q/QDK/K182/1qKJ7pdbZI2DjTIWi7 x8DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fPxApZgHbEKR7ixNbP76/xaAwS++pzigEhUvlcz7SAg=; b=fdjt/5BBCxO45OqFGBd7BlOly3YI/XsTACS348MGFPXb4a1/RENodYqh1s6BeTUZKO Us+ZzDt9+AmKqGA1vvc7Jx9AwjzjIpIMkE09JGhK7bQO5AEky0wc9g/ofpOR5YCiw/MG LCuYWBQgrE8Zq7BKJsCzr0GGZmsSOBwxuiW+UtS1hG+he/Q0Pav6NqvgCBLQxtG2A7ce Rfo57SQRKARRy6C4nsqyT8UWSqHC8NEcLX1i308Y0uJv+FvRFFimGlcmobw9RYVTLWxp Ms642o1ndfIXR3tSTDBPrhsKUCoOkl8JyGF8biFQxjqGJzLkPNzYIT36XYgaTjPdRDlV vT+g== X-Gm-Message-State: AOAM532iFAUrCMJLORq490dlW4YHZfPbeV4UV0vycWwEH88yid+9xp0B 5SM02J78Dkf4z8k7KaL8ZVFpiS7Q X-Google-Smtp-Source: ABdhPJzLnzNTzDsmAgqBUV4elTV9ZFt9YdK2qhdi5/14UWkfVVcMRT7N92SQ2c0vJxinTTK9S0XTfg== X-Received: by 2002:adf:d0c6:: with SMTP id z6mr5847364wrh.219.1590003051506; Wed, 20 May 2020 12:30:51 -0700 (PDT) Received: from kali.home (lfbn-ren-1-2144-158.w92-167.abo.wanadoo.fr. [92.167.223.158]) by smtp.gmail.com with ESMTPSA id u23sm4236935wmu.20.2020.05.20.12.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 12:30:50 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Wed, 20 May 2020 21:30:45 +0200 Message-Id: <20200520193045.92597-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] support/scripts/apply-patches.sh: manage uncompression 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: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Extract from bug report: "Code line 120 to line 128 is to check whether the patch containing "rename from" and "rename to". But it directly use grep to find, ignoring the patch may be a tar file or else. It can only work on patch of textfile form." Fixes: - https://bugs.buildroot.org/show_bug.cgi?id=11931 Signed-off-by: Fabrice Fontaine --- support/scripts/apply-patches.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 66fef262ee..80e2264497 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -113,8 +113,8 @@ function apply_patch { echo " to be applied : ${path}/${patch}" exit 1 fi - if grep -q "^rename from" ${path}/${patch} && \ - grep -q "^rename to" ${path}/${patch} ; then + if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \ + ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then echo "Error: patch contains some renames, not supported by old patch versions" exit 1 fi