public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/nss] rawhide: Work around GNU patch 2.8 --fuzz=0 bug for tools.sh call-site
Date: Fri, 21 Aug 2026 11:21:19 GMT	[thread overview]
Message-ID: <178731127950.1.3612002611633544591.rpms-nss-d7d75094bfc8@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/nss
            Branch : rawhide
            Commit : d7d75094bfc852ecee4c401eb453b796a9d0fc52
            Author : Krenželok František <fkrenzel@redhat.com>
            Date   : 2026-08-21T13:12:15+02:00
            Stats  : +14/-9 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/nss/c/d7d75094bfc852ecee4c401eb453b796a9d0fc52?branch=rawhide

            Log:
            Work around GNU patch 2.8 --fuzz=0 bug for tools.sh call-site

The tools_p12_ml_dsa_import call-site addition in
nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch cannot be applied
with --fuzz=0 even though all 7 context lines match byte-for-byte.
GNU patch 2.8 requires fuzz=1 due to cumulative hunk offset tracking.

Split the call-site hunk out of the patch and replace it with a sed
command in %prep, which sidesteps the --fuzz=0 limitation entirely.

---
diff --git a/nss-3.118-ml-dsa-test-call-site.patch b/nss-3.118-ml-dsa-test-call-site.patch
new file mode 100644
index 0000000..5143956
--- /dev/null
+++ b/nss-3.118-ml-dsa-test-call-site.patch
@@ -0,0 +1,11 @@
+--- a/tests/tools/tools.sh
++++ b/tests/tools/tools.sh
+@@ -664,7 +664,8 @@
+   tools_p12_export_with_invalid_ciphers
+   tools_p12_import_old_files
+   tools_p12_import_pbmac1_samples
+   tools_p12_import_ed25519_private_key
++  tools_p12_ml_dsa_import
+   tools_p12_ml_kem_import
+   if using_sql; then
+     tools_p12_import_rsa_pss_private_key

diff --git a/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch b/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
index 8a3afad..e4307fd 100644
--- a/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
+++ b/nss-3.118-ml-dsa-test-for-sign-verify-pkcs12.patch
@@ -471,12 +471,3 @@ diff --git a/tests/tools/tools.sh b/tests/tools/tools.sh
  tools_p12_ml_kem_import()
  {
    echo "$SCRIPTNAME: Testing ml-kem compatibility with pkcs12 --------------"
-@@ -616,7 +652,8 @@
-   tools_p12_export_with_invalid_ciphers
-   tools_p12_import_old_files
-   tools_p12_import_pbmac1_samples
-   tools_p12_import_ed25519_private_key
-+  tools_p12_ml_dsa_import
-   tools_p12_ml_kem_import
-   if using_sql; then
-     tools_p12_import_rsa_pss_private_key

diff --git a/nss.spec b/nss.spec
index 670c3de..4f669bb 100644
--- a/nss.spec
+++ b/nss.spec
@@ -343,6 +343,9 @@ popd
 
 pushd nss
 %autopatch -p1 -M 99
+# GNU patch 2.8 --fuzz=0 cannot apply this one-line call-site addition due to
+# cumulative hunk offset interaction; use sed as a workaround
+sed -i 's/^  tools_p12_import_ed25519_private_key$/&\n  tools_p12_ml_dsa_import/' tests/tools/tools.sh
 popd
 
 tar -xf %{SOURCE30}

                 reply	other threads:[~2026-08-21 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178731127950.1.3612002611633544591.rpms-nss-d7d75094bfc8@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox