From patchwork Wed May 22 07:02:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3127 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5320040F8B for ; Wed, 22 May 2024 09:03:17 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-578282c81bcsf434033a12.2 for ; Wed, 22 May 2024 00:03:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716361397; cv=pass; d=google.com; s=arc-20160816; b=EqiHg7H1jbmgDkmwiYKPbYDprGWE8DJPXN+zFRsFjl+i4Leh34/MZKraaKHdRy5B6f LFC8FNgWfIu94wiTP0UAl2RG6y3CmJ3bzP9H5wMCE5en7pIahSwGXiAa0MQS29PplUqx GcoqEf6IAoEY3klLXkYfwW2gtmPDwJNgRVNnbH/5NVaUcnKVAm53j3VeFw0d735gWOnG g9OKzde0Gxvo3Vc5htjOZsQP6MLnBmRpYYUdAipMFo4cA0/BObzKGpEg+aOhWF3pqYFF n+vvRTUM5cvodRah2DgaxuRhN0fg0iOk1rACtipl0L8Q8k3tSEuVfMj8NCkBw2X/M7tQ 6XuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=REl3ei1Vat7BHpA5phgnmd2V3W+HURghpuwQ3I7yc+s=; fh=DdYkuV+L42GcOL0/EgiVUIrX315qblZ/U3E7UETIIFY=; b=gGCUENxvAyQjlqvB7xmThxCFYpoiwxUvvfk18f9Q4Nrl4t69JY/wfkBEeyp6Hs4LZP s2fUhmNJCPRmkOT5d+0o57rHw4JV931+gkCOXtJpm4Z77+AvOtOyPFdputuMLItpAvXI V39vO7qLSjN5tGKxESj8MqDVAw5/i09M4gD/xEIX1I+6Em+dZ/Lz9nhKBM2wur+VrgwN /qIi+0RJSp1HouI2ary8Mj7WOcyNiPj991+sU8GgW0mBrtdAAtUVOOrMIwpDP15RzhXn TJEjtkpqROnqkbwuYXRvvUHbYCHUcOjs/Ursd8m+q37cXOkxGrZ/ldxC1wmmIeSHTkc1 S5Pw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PLek2E1b; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1716361397; x=1716966197; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=REl3ei1Vat7BHpA5phgnmd2V3W+HURghpuwQ3I7yc+s=; b=FB5d9P/2nQ6AbARlCHjF68yqH/5XstXa/HaZB2xTxuWpSJQ4tauVADZ5Aqi1JjXTZC 3+gafdsFFlJ8/UUqKXcFa3ubqOMDZcQPEOPlUqVX+L7f7r6dAui8i3Zvxgnov0B6vXp4 WogqahUPBwPFQcoVmpS/moS1BcAf3SBGcKI/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716361397; x=1716966197; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=REl3ei1Vat7BHpA5phgnmd2V3W+HURghpuwQ3I7yc+s=; b=tJSd8FWCpVrIxqZ9FDtBmJB6RwRbtowRPhGCGpHGHCLekUwZVts5+lNp5K8ISuOjix MCRbf9CLGiHu1D2rwtV/nibDFoe3drTpTfMbYo9cZBMnuseDvYncYLxrQD861vT6qpjw 5JhKUF+Dna6rxdSwNe/PPdOXLj1ocGZSh1Xh4VRr1eu1RmoQr2cLIAnQIGiG696Ro0FE vRpkl4AxPB9Sty32dc4wcVOEu9To9lhPGM8iZF7dhmhzfnnZX4GqhVVwmtdYguQ0DreG pFrW2MuL0YkSozsAK4boVPBALOIKjsVEgmGtEoj3tV1PbtU7yox8wl2jOIiTx3tCEnXh +dkg== X-Forwarded-Encrypted: i=2; AJvYcCWzgA+0t/2f1XTh5yKuniJWEtFwhcaGFruLZg5X3bEIsNU+KK28BnlUk0nWVeT8aMQbYhYqVgQCUPqRoKJnmREXBP3Xyt0shoQmNo00q1RvY1QDX6opKz3ib7s+qA== X-Gm-Message-State: AOJu0YzZ7xob7+F7hFwI09KyNv37lZgEZ1aFrlUBIZnAg9vs2XpUjswN 4aP8E3rWTTP/lYnslD97FFqL1YjFpOY6e9qiPC/ajuAZGf+LoWYq8HphfCUJAVMWuA== X-Google-Smtp-Source: AGHT+IF7AD+YRao5td3YpElQcdFXOPFuZYx851oUQzFfxWUZIY8WdXzymrz1IOOqT3xIsV7O8bkcJA== X-Received: by 2002:a50:8e14:0:b0:570:d85:f296 with SMTP id 4fb4d7f45d1cf-57832bedb2bmr935416a12.26.1716361397054; Wed, 22 May 2024 00:03:17 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3217:b0:578:30c5:90ba with SMTP id 4fb4d7f45d1cf-57830c59a78ls211709a12.2.-pod-prod-08-eu; Wed, 22 May 2024 00:03:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3sBa3keAvc4wrJFBaW2FMa+YvDne9aY7sgzNVbqAQzGXIJjF+dVMrcnGQyqKBYljNpmvQJYjRJ9enI4xqs5UuaKagrfQJF6DqB6GKQMOsNNh4 X-Received: by 2002:a17:906:3b48:b0:a5c:e372:222e with SMTP id a640c23a62f3a-a62281e13c6mr98406166b.60.1716361395440; Wed, 22 May 2024 00:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716361395; cv=none; d=google.com; s=arc-20160816; b=rungtw9S3NiliLnO0OHFoC0jGSGnPjEp5wtqcCm1JgmBaE5/zCnzx3oUuoEDYlZAdS 84gbVxYQBsElZVVeQM6ZVKiYzcwvUG/EWCec3JVlJeBaD/OPUsAmA5LU/kAa6ASr8UZM wx3Dm2Qvrf51DXuFma10x8F/L7xg6IpaahaJ0wC5TeQheueR1yWavKL83FLL3gVyLHZ7 t0PLXZJi4b5PBYZ1tbtLAamz2W2MrY9MsHpicd6nl/EseeHL/dpmac4R8HlI/cSnw8kt a7tuHf3GuGMnXOfrA6VvjZBd1va8L9lNroIKE9Hhvpcj+WjI3KDr4RHfZgO/0h6P4r+t ZNvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jKiNYT/2fEi0ORe09gfjLGCr9wdhiNnONIilSaVRxfM=; fh=YMcwRTCyHGM9FClsaq+JfRJG1qYkmtkf7crWhsNWTuU=; b=d1YeymHE7Yyol8zAjfH8la6idmczdOSaxoaSuDn3XlAJifGzvqAWEw/NZf1g6JrMjY AxwePtR0q2/jpGwQMJCRnnygQYou56Pdn+17TZxmlk9TP1tezPvYy8wVMXUiEtJMU+V6 +hxDq7jMT9LeKGAeQKT5T6Z/pGjWr3rMOwA5xF0Jzg5UQEYipAE27fJFLtaQSrVVfslx 7kT8LnKyx6teLCy30UtldrchChvm8elL4kOiuaX+2ig9l0yg8r9D9L0ktgmPURkZ+8eq Q1HFnDorzYpWhPxxKDmZLpdmwMiZCXCpA8tyw0Oz58F7a/57oxYCdrBoeNZN/0O2t/R/ 5z9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PLek2E1b; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a5d16784bf9sor241095666b.19.2024.05.22.00.03.15 for (Google Transport Security); Wed, 22 May 2024 00:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVb74Jv0+/dHYqyxTYL1YG25j0cMTeAmGVdOTGSLqzyQlSW+GMCUAR/cE/znO1M6LxnJB9zLwM09UwbuiM336CwyOIBjyHUGbM/gKGGCyrRY2kn X-Received: by 2002:a50:8acb:0:b0:56e:23e3:bdc2 with SMTP id 4fb4d7f45d1cf-578329fd42cmr995312a12.13.1716361394972; Wed, 22 May 2024 00:03:14 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.40.196]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-574d738c80csm12028365a12.81.2024.05.22.00.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 00:03:14 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: "Yann E . MORIN" , Jagan Teki , Romain Naour , Fabrice Fontaine , Mahyar Koshkouei , Giulio Benetti , Michael Nosthoff , Alex Suykov , =?utf-8?b?TWljaGHFgiDFgXlzemN6?= =?utf-8?q?ek?= , Bernd Kuhls , Peter Korsgaard , Julien Corjon , Sergey Matyukevich , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2 18/18] support/scripts/apply-patches.sh: set the maximum fuzz factor to 0 Date: Wed, 22 May 2024 09:02:37 +0200 Message-ID: <20240522070238.3282121-19-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240522070238.3282121-1-dario.binacchi@amarulasolutions.com> References: <20240522070238.3282121-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PLek2E1b; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch was created as a fix to a problem that occurred during the compilation of QEMU: >>> qemu 8.1.1 Patching Applying 0001-tests-fp-disable-fp-bench-build-by-default.patch using patch: patching file tests/fp/meson.build Hunk #1 succeeded at 138 with fuzz 2 (offset -502 lines). Applying 0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch using patch: patching file softmmu/qemu-seccomp.c Applying 0004-tracing-install-trace-events-file-only-if-necessary.patch using patch: patching file trace/meson.build With the bump to version 8.1.1, the patch that disabled the compilation of the fp-bench test does not report any errors, even though the patch itself is no longer applicable. The only noticeable message is: "Hunk #1 succeeded at 138 with fuzz 2 (offset -502 lines)." As reported by the patch man page: "With context diffs, and to a lesser extent with normal diffs, patch can detect when the line numbers mentioned in the patch are incorrect, and attempts to find the correct place to apply each hunk of the patch. As a first guess, it takes the line number mentioned for the hunk, plus or minus any offset used in applying the previous hunk. If that is not the correct place, patch scans both forwards and backwards for a set of lines matching the context given in the hunk. First patch looks for a place where all lines of the context match. If no such place is found, and it's a context diff, and the maximum fuzz factor is set to 1 or more, then another scan takes place ignoring the first and last line of context. If that fails, and the maximum fuzz factor is set to 2 or more, the first two and last two lines of context are ignored, and another scan is made. The default maximum fuzz factor is 2. If the hunk is installed at a different line from the line number specified in the diff, you are told the offset. A single large offset may indicate that a hunk was installed in the wrong place. You are also told if a fuzz factor was used to make the match, in which case you should also be slightly suspicious." By setting the maximum fuzz factor to 0, we avoid that patches which cannot be applied are incorrectly reported as valid, with positive side-effects on version bumps. Signed-off-by: Dario Binacchi --- Changes v1 -> v2: - Use fuzz factor 0 instead of 1. - Add patches from 1 to 17 to adapt package patches to be applicable with a fuzz factor of 0, ensuring that this patch does not cause regressions. support/scripts/apply-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 6da83f6826e9..36afe489f2ef 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -114,7 +114,7 @@ function apply_patch { exit 1 fi echo "${path}/${patch}" >> ${builddir}/.applied_patches_list - ${uncomp} "${path}/$patch" | patch -g0 -p1 --no-backup-if-mismatch -d "${builddir}" -t -N $silent + ${uncomp} "${path}/$patch" | patch -F0 -g0 -p1 --no-backup-if-mismatch -d "${builddir}" -t -N $silent if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1