From patchwork Wed Nov 15 01:04:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1863968 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=252O9lFV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SVQbV0vrfz1yRV for ; Wed, 15 Nov 2023 12:30:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Date:From: References:In-Reply-To:Message-Id:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F70VXAU8rJHojcgS8HY2MUpVpcHoVvYkFFRkHkQUxqk=; b=252O9lFVA30bRK pMtOgKPllIDTTsI5VK/vD2wGya07+Y3IXKrZwEQGbdl2n5ECUY96yqENOGSUvsK4MJCYNo1CBbmOG eHdvPTnrIzPyREsymHCf9LwukxCNixdTCcf4QrQqMMFXDI+BQXhCBpqOK6APHhRggiT8MZwOVpsMD bEe8mtIKK8QMOEJheMLFZUeXIOBFydGi6iPF64fStSnzfQsTQBckBaeukGo57yPN+zvxGoiJRWX5H m4JzGXj0DrwCAtkl1nAOYYm5tpvvO2KCCENdKVInx11KAP2IgHv4bY9sj1h2wbtohwXXEVAliaifE KXfefLggD5X7oXR2Rhcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r34ih-00H7t7-30; Wed, 15 Nov 2023 01:29:31 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r34ie-00H7sC-2E for openwrt-devel@lists.openwrt.org; Wed, 15 Nov 2023 01:29:30 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 3AF1TL4h088762 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 14 Nov 2023 20:29:26 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 3AF1TLAH088761; Tue, 14 Nov 2023 17:29:21 -0800 (PST) (envelope-from ehem) Message-Id: In-Reply-To: References: From: Elliott Mitchell Date: Tue, 14 Nov 2023 17:04:46 -0800 Subject: [PATCH 04/20] patch: always backup files To: openwrt-devel@lists.openwrt.org X-Spam-Status: No, score=0.0 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=unavailable autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_172928_868203_C4FD77F5 X-CRM114-Status: GOOD ( 10.04 ) X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Date: Thu, 26 Oct 2023 18:44:33 -0700 Avoiding modification of the original files allows their reuse. This is a first step towards being able to reuse unpacked kernel (or other) source. Signed-off-by: Elliott Mitchell --- include/autotools.mk | 2 +- scripts/patch-kernel.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Date: Thu, 26 Oct 2023 18:44:33 -0700 Avoiding modification of the original files allows their reuse. This is a first step towards being able to reuse unpacked kernel (or other) source. Signed-off-by: Elliott Mitchell --- include/autotools.mk | 2 +- scripts/patch-kernel.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/autotools.mk b/include/autotools.mk index d0e4b3642f..53e8a0d6e6 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -61,7 +61,7 @@ define patch_libtool lt_version="$$$$($$(STAGING_DIR_HOST)/bin/sed -ne 's,^[[:space:]]*VERSION="\?\([0-9]\.[0-9]\+\).*,\1,p' $$$$lt)"; \ case "$$$$lt_version" in \ 1.5|2.2|2.4) echo "autotools.mk: Found libtool v$$$$lt_version - applying patch to $$$$lt"; \ - (cd $$$$(dirname $$$$lt) && $$(PATCH) -N -s -p1 < $$(TOPDIR)/tools/libtool/files/libtool-v$$$$lt_version.patch || true) ;; \ + (cd $$$$(dirname $$$$lt) && $$(PATCH) -b -N -s -p1 < $$(TOPDIR)/tools/libtool/files/libtool-v$$$$lt_version.patch || true) ;; \ *) echo "autotools.mk: error: Unsupported libtool version v$$$$lt_version - cannot patch $$$$lt"; exit 1 ;; \ esac; \ done; \ diff --git a/scripts/patch-kernel.sh b/scripts/patch-kernel.sh index c2b7e72049..d3f1042343 100755 --- a/scripts/patch-kernel.sh +++ b/scripts/patch-kernel.sh @@ -37,7 +37,7 @@ for i in ${patchdir}/${patchpattern} ; do [ -d "${i}" ] && echo "Ignoring subdirectory ${i}" && continue echo "" echo "Applying ${i} using ${type}: " - ${uncomp} ${i} | ${PATCH:-patch} -f -p1 -d ${targetdir} + ${uncomp} ${i} | ${PATCH:-patch} -b -f -p1 -d ${targetdir} if [ $? != 0 ] ; then echo "Patch failed! Please fix $i!" exit 1