From patchwork Thu May 2 09:09:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3086 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B8F3D3F1F7 for ; Thu, 2 May 2024 11:09:51 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-572a175621bsf806042a12.3 for ; Thu, 02 May 2024 02:09:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714640991; cv=pass; d=google.com; s=arc-20160816; b=YJLFhuS6vhTR37xAP5FEfAx8ieRMvwbpVvPO/vE1xQfcwnIEjfis5oLPTJT8bQTwQe Ab8AxTSrEy+AvdmGAIS6OWaw32dGtqKOJqokEnx2jLIdatT8H/p7n+NUCxIBMTefPNOI AchDEpRa+EQpOfXvQRqBzJTqySzPvz2x3L65LOg2A0fDv3z7gDUN+MZlIlpbFdI+W/vx 6H0pPcFcAYcxAN6aEQoR3018bK6P4omnwnJCJrMbIc5aFgyWsI2d6ga5eEQ/aq4Qwl70 vUbsCe9MeWEItPzUOn2mdwLesM9lgtk6XPMoheyzAe0QF67ZWm9HNkWDWMKUtB1bUdR+ YvoQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=vZKot9OJrYwMd6iEHZ+Bocuki9zd1leAFuzqx4bdYQ4=; fh=exNj17xTRA/biD/S3Gu6wA0NRHNY6Cxr8uFcDouqxo4=; b=yjGKBPys0utujqFzDMNGfYPVIdmH5QDZ2WHTSA7VEXQJMIEKYRgT509Nzut/2tDyFX ZQBmLY6z80s7XulGKW48FMCiyyCldbaSqKiC2kSreKnYuyq7Nd9WGLEJexPBPlPdqvfv xnx3w55qQ3eL2XIW0RM7kcnpZFD+rP9xLVZ1Bs+ZTeiFyA5CVvBFFVgp1tpDA275Syxz 7K+dmasV7x+QMHE8wK8pDACAuI9FHKH4/QJAV47FgA8v4PYfyHxbwIST7JPQgNj+uu8s ZyjW9WcqSEoWop9Wz4sDz3pie5glVSkKMa2NgEEuk2WNCI/6dY7cEhQ7lxvRhf6x1MNx jrxQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VsquxePQ; 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=1714640991; x=1715245791; 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:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=vZKot9OJrYwMd6iEHZ+Bocuki9zd1leAFuzqx4bdYQ4=; b=n8MTImaDCw29tl4POD3/egUZ6i7PFKUDmaI59R94GhuHDm/nfL0M3fQAiS8CVf7UmU k/9BbWKYPO/aUoxuAlzUhwezLCCM/q2fINDLaKkaWatxiE5v30p5G+oA5eDWs1LKHAHN 15GDhA0H09DswWRX4XDr43xzMZRacZgDf/Zd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714640991; x=1715245791; 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 :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vZKot9OJrYwMd6iEHZ+Bocuki9zd1leAFuzqx4bdYQ4=; b=WsSbOqzL7TYfx2wKkljpv9dHhbkkc51QzUb5FLQWCwXDftyMp1dAQfb5P+RslvYRoy Zxb0r5/oB3ZpFaDIvn2Il2/hmZk13kY2H02etnkfMIaJqt0I//Kwrf4CB/c0zuyckPTX Z5TseV3nAwND/pCm/f+eMCeIIHesG8UTh4A9mqOacd6MHloRvxt5T4qbYNCClku8GJn2 vZXHLlnupyFlT0udRB+1wvdaSGNlpBVu1SPEKx0zR77VqIIWYjajDgK4Ls6qAmHGtAy9 lBMZZuuONNVMnM9torBKLR23l3AQh7tpAtHtYqZn6E7FNyC/Dd6Iqsjx+oE5UYnH03uO XZlA== X-Forwarded-Encrypted: i=2; AJvYcCURRYs2nmcdBhnN6oicQLAT52F85aEUgJf2iJ4aTwmovqd02wvFoiPRPmeAgiZ1bVnnhKUxJl/3Q7xWzcFESsohUwx8edGm/ewbhjCZzal66+68vq/10wepGaL2mQ== X-Gm-Message-State: AOJu0YwfaAT4sp4jK1jWHjjKJB+3t2e/u7Ya2iLj0vHLs/mcTXOz6Vpp gUfcVtGA9MNvarphfspvOrgsT3rkCsgrTikHZFJzkNS2BOHKHl7FMI9opyWy5r6fIKE88bne6Q= = X-Google-Smtp-Source: AGHT+IGSMJS32lCOYRwlcXCG/AqOz5eMwQecpVUsU0OkzDn7yHUYWjwC4xG+bBNEhTrj8xzInILs6A== X-Received: by 2002:a50:f68c:0:b0:572:8b30:bef7 with SMTP id d12-20020a50f68c000000b005728b30bef7mr2840141edn.2.1714640991107; Thu, 02 May 2024 02:09:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:399a:b0:572:34a6:f04f with SMTP id 4fb4d7f45d1cf-572b9fbc236ls13938a12.2.-pod-prod-06-eu; Thu, 02 May 2024 02:09:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUoJFE3hQEbgj+z0r2eo4j/7qmOSucV73fkp6Da1Ob5U+4DTJOu0E3oKxLKPVQiICgtiqdj4E7EbRiHqMboMoyrEV/PV/FDA6iyKTtpvAZU207b X-Received: by 2002:a17:906:da04:b0:a58:78ac:b98b with SMTP id fi4-20020a170906da0400b00a5878acb98bmr3403387ejb.75.1714640989472; Thu, 02 May 2024 02:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714640989; cv=none; d=google.com; s=arc-20160816; b=c+7/mIcyCgKXYfW2Qrd4vvR5LZubFc4C8QKVsJsDs95EoKaqNlmiCtDxnIkTzIkOK9 pN2TlJA2EYsxxkwTzz4fi1i2Epb5P10RL9OKcqfCKy9489rCixVRe4f+F2mScbr2tl5w PTEH9rkM3mf/vAFJliCUDihXPkAJhK/0exZjX8hcVYY4xSn4fhbcRZ1x7wm+FzcFXkEq tn0y8fbOd8Y04LKD18uollEW8zs2GZNkczUk3aW2SXOMr87bD8M0Z2Xi3IMeU9IUq+F+ SUDs2p/ASekrXvymIl2lGiatrUJn5LjisP9Ft4ECIRf+q31VsEz8YD18TbL7ORogu1DW Ixqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=ExyApp9g7DjZ36XC43wSdGQvgnXLfGj8KUz8Tum+1ys=; fh=bLxQcy1Vk9jVh8DkWh0bvWQQgUmF4c0k7zbCJByOucQ=; b=pF1p7CpxU/y6U/lY57BHzGO6wPhEmM8deLTeB5nAstLBeVTSUV6Ccy8OI+k5lJ8dZM CT92pXPdCXS/tttz6fJS3PAB64W2o4OwlV9OWpmvQMfIozLOCilsLB6IanHzMVm32sop SD12qbZ7jMvfI/REeX2L4aFT4Ny9Ti3Tl7Tbm3hdL9c2HKthoJHXvbOP5TfFxzKe8d1l igu9De7nr3PxLEmnKqIRbfMlhJrsYBcvoJndxWs4Y3HCPeNOimzD4T3P4Ox/bePB1krE FhQAKfkcinrwPN0Ai3/5tK2K0PktAMdPMTcYccGMm51uautn+clhUTshETlcsnHLD+0L t7mw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VsquxePQ; 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 f2-20020a17090631c200b00a593921b843sor177310ejf.8.2024.05.02.02.09.49 for (Google Transport Security); Thu, 02 May 2024 02:09:49 -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; AJvYcCVsKkasUy4jxgS8gK4qHOopEyblkmckRquVyNb0pjQvZpwU8Mmsxavycqe/wotm0VetbX8BsX+U+sv7LbzjGsHf3+FGA0DnWAjH7WIMpGeYX4j0 X-Received: by 2002:a50:ab57:0:b0:572:9a52:6696 with SMTP id t23-20020a50ab57000000b005729a526696mr2975158edc.12.1714640989020; Thu, 02 May 2024 02:09:49 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([176.201.29.159]) by smtp.gmail.com with ESMTPSA id c17-20020a50f611000000b00572b239c79esm311542edn.31.2024.05.02.02.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:09:48 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [RFC PATCH 1/1] support/scripts/apply-patches.sh: set the maximum fuzz factor to 1 Date: Thu, 2 May 2024 11:09:39 +0200 Message-ID: <20240502090939.748610-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 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=VsquxePQ; 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 1, we reduce the possibility that patches which cannot be applied are incorrectly reported as valid. Signed-off-by: Dario Binacchi --- 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..999384cbbd5b 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 -F1 -g0 -p1 --no-backup-if-mismatch -d "${builddir}" -t -N $silent if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1