public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Parag Nemade <panemade AT redhat DOT com>
To: git-commits@fedoraproject.org
Subject: [rpms/mythes] f45: Fix build failure in rawhide by using upstream patch
Date: Mon, 02 Nov 2026 13:03:05 GMT	[thread overview]
Message-ID: <179362458552.1.6628943713461031410.rpms-mythes-484bed54a0b5@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/mythes
Branch : f45
Commit : 484bed54a0b5d7252718076c84d657adde9850c9
Author : Parag Nemade <panemade AT redhat DOT com>
Date   : 2026-11-02T11:59:58+05:30
Stats  : +30/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mythes/c/484bed54a0b5d7252718076c84d657adde9850c9?branch=f45

Log:
Fix build failure in rawhide by using upstream patch

---
diff --git a/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch b/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
new file mode 100644
index 0000000..e6490ce
--- /dev/null
+++ b/mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
@@ -0,0 +1,24 @@
+From 61597ef51bf9e82d0387a12d5a42ad77f2a572cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
+Date: Sat, 17 Oct 2026 18:08:39 +0000
+Subject: [PATCH] return no meanings for a word longer than any index word
+
+---
+ mythes.cxx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mythes.cxx b/mythes.cxx
+index e43aca0..9b92a5e 100644
+--- a/mythes.cxx
++++ b/mythes.cxx
+@@ -159,9 +159,9 @@ int MyThes::Lookup(const char * pText, int len, mentry** pme)
+     // handle the case of missing file or file related errors
+     if (! pdfile) return 0;
+ 
+-    // check we can allocate enough memory for the string
++    // index words are shorter than MAX_WD_LEN, so a longer word has no entry
+     std::vector<char> buffer;
+-    if (len < 1 || len > buffer.max_size() - 1) {
++    if (len < 1 || len >= MAX_WD_LEN) {
+         return 0;
+     }

diff --git a/mythes.spec b/mythes.spec
index 6c74369..30c049a 100644
--- a/mythes.spec
+++ b/mythes.spec
@@ -4,6 +4,8 @@ Version:   1.2.6
 Release:   1%{?dist}
 Source:    https://github.com/hunspell/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
 URL:       https://github.com/hunspell/mythes
+# upstream fix https://github.com/hunspell/mythes/commit/61597ef51bf9e82d0387a12d5a42ad77f2a572cd
+Patch0:    mythes-1.2.6-index-words-shorter-than-MAX_WD_LEN.patch
 License:   BSD-3-Clause-Modification AND MIT
 BuildRequires: make
 BuildRequires: hunspell-devel, gcc-c++
@@ -21,7 +23,7 @@ Summary: Files for developing with mythes
 Includes and definitions for developing with mythes
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 %configure --disable-rpath --disable-static
@@ -33,7 +35,6 @@ make check
 ./example morph.idx morph.dat morph.lst morph.aff morph.dic
 
 %install
-rm -rf $RPM_BUILD_ROOT
 %make_install
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
@@ -54,6 +55,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes
 %{_bindir}/th_gen_idx.pl
 
 %changelog
+* Mon Nov 02 2026 Parag Nemade <panemade AT redhat DOT com> - 1.2.6-2
+- Fix build failure in rawhide by using upstream patch
+
 * Mon Nov 02 2026 Parag Nemade <panemade AT redhat DOT com> - 1.2.6-1
 - New upstream release 1.2.6 (rhbz#2564591)
 

                 reply	other threads:[~2026-11-02 13:03 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=179362458552.1.6628943713461031410.rpms-mythes-484bed54a0b5@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