Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/v1.6.2.tar.gz
|
||||
/v1.7.0.tar.gz
|
||||
|
@ -1 +0,0 @@
|
||||
6572d1459deafd358b886d4482c179b715bc92e8 SOURCES/v1.6.2.tar.gz
|
25
0001-invalid-read-memory-access-624.patch
Normal file
25
0001-invalid-read-memory-access-624.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 12 Nov 2019 20:03:15 +0000
|
||||
Subject: [PATCH] invalid read memory access #624
|
||||
|
||||
---
|
||||
src/hunspell/suggestmgr.cxx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
|
||||
index dba084e..c23f165 100644
|
||||
--- a/src/hunspell/suggestmgr.cxx
|
||||
+++ b/src/hunspell/suggestmgr.cxx
|
||||
@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring(
|
||||
int l2 = su2.size();
|
||||
// decapitalize dictionary word
|
||||
if (complexprefixes) {
|
||||
- if (su1[l1 - 1] == su2[l2 - 1])
|
||||
+ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
|
||||
return 1;
|
||||
} else {
|
||||
unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l;
|
||||
--
|
||||
2.23.0
|
||||
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
@ -2,19 +2,25 @@
|
||||
|
||||
Name: hunspell
|
||||
Summary: A spell checker and morphological analyzer library
|
||||
Version: 1.6.2
|
||||
Release: 1%{?dist}
|
||||
Version: 1.7.0
|
||||
Release: 11%{?dist}
|
||||
Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz
|
||||
Group: System Environment/Libraries
|
||||
URL: https://github.com/hunspell/hunspell
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
License: LGPLv2+ or GPLv2+ or MPLv1.1
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: autoconf, automake, libtool, ncurses-devel, gettext
|
||||
BuildRequires: perl-generators
|
||||
%ifarch %{ix86} x86_64
|
||||
BuildRequires: valgrind
|
||||
%endif
|
||||
%if %{double_profiling_build}
|
||||
BuildRequires: words
|
||||
%endif
|
||||
BuildRequires: make
|
||||
Requires: hunspell-en-US
|
||||
Requires: hunspell-filesystem
|
||||
|
||||
Patch0: 0001-invalid-read-memory-access-624.patch
|
||||
|
||||
%description
|
||||
Hunspell is a spell checker and morphological analyzer library and program
|
||||
@ -25,13 +31,20 @@ Curses library, Ispell pipe interface, LibreOffice UNO module.
|
||||
%package devel
|
||||
Requires: hunspell = %{version}-%{release}, pkgconfig
|
||||
Summary: Files for developing with hunspell
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
Includes and definitions for developing with hunspell
|
||||
|
||||
%package filesystem
|
||||
Summary: Hunspell filesystem layout
|
||||
|
||||
%description filesystem
|
||||
Provides a directory in which to store dictionaries provided by other
|
||||
packages.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .CVE-2019-16707
|
||||
|
||||
%build
|
||||
autoreconf -vfi
|
||||
@ -46,7 +59,7 @@ configureflags="--disable-rpath --disable-static --with-ui --with-readline"
|
||||
|
||||
%if !%{double_profiling_build}
|
||||
%configure $configureflags
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
%else
|
||||
#Generate a word list to use for profiling, take half of it to ensure
|
||||
#that the original word list is then considered to contain correctly
|
||||
@ -56,7 +69,7 @@ head -n $((`cat /usr/share/dict/words | wc -l`/2)) /usr/share/dict/words |\
|
||||
|
||||
#generate profiling
|
||||
%{profilegenerate} %configure $configureflags
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
./src/tools/affixcompress words > /dev/null 2>&1
|
||||
./src/tools/hunspell -d words -l /usr/share/dict/words > /dev/null
|
||||
make check
|
||||
@ -64,39 +77,34 @@ make distclean
|
||||
|
||||
#use profiling
|
||||
%{profileuse} %configure $configureflags
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
%endif
|
||||
cd po && make %{?_smp_mflags} update-gmo && cd ..
|
||||
cd po && %make_build update-gmo && cd ..
|
||||
|
||||
%check
|
||||
%ifarch %{ix86} x86_64
|
||||
VALGRIND=memcheck make check
|
||||
make check
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%make_install
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc README README.myspell COPYING COPYING.LESSER COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS
|
||||
%doc README COPYING COPYING.LESSER COPYING.MPL AUTHORS license.hunspell license.myspell THANKS
|
||||
%{_libdir}/*.so.*
|
||||
%{_datadir}/myspell
|
||||
%{_bindir}/hunspell
|
||||
%{_mandir}/man1/hunspell.1.gz
|
||||
%lang(hu) %{_mandir}/hu/man1/hunspell.1.gz
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/%{name}
|
||||
%{_libdir}/*.so
|
||||
%{_bindir}/affixcompress
|
||||
@ -116,7 +124,51 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man3/hunspell.3.gz
|
||||
%{_mandir}/man5/hunspell.5.gz
|
||||
|
||||
%files filesystem
|
||||
%{_datadir}/myspell
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.0-11
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.0-10
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Wed Feb 03 2021 Peter Oliver <rpm@mavit.org.uk> - 1.7.0-9
|
||||
- Accomodate Nuspell by putting the dictionary dir in its own subpackage.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 1.7.0-6
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Nov 12 2019 Caolán McNamara <caolanm@redhat.com> - 1.7.0-4
|
||||
- Resolves: rhbz#1771027 CVE-2019-16707
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Nov 13 2018 Caolán McNamara <caolanm@redhat.com> - 1.7.0-1
|
||||
- latest release
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Fri Nov 24 2017 Caolán McNamara <caolanm@redhat.com> - 1.6.2-1
|
||||
- latest release
|
||||
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (v1.7.0.tar.gz) = 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903
|
4
tests/scripts/data.txt
Normal file
4
tests/scripts/data.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Cloud
|
||||
Linux
|
||||
Fedora
|
||||
Fedoraaa
|
59
tests/scripts/run_tests.sh
Executable file
59
tests/scripts/run_tests.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_pkg() {
|
||||
local pkg=$1
|
||||
if rpm -q $pkg
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
check_dict() {
|
||||
if [ -f "/usr/share/myspell/de_DE.dic" ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
check_misspelled_word() {
|
||||
VAR1="Fedoraaa"
|
||||
VAR2=$(hunspell -l data.txt)
|
||||
if [ "$VAR1" = "$VAR2" ]; then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
check_misspelled_line() {
|
||||
VAR1="Fedoraaa"
|
||||
VAR2=$(hunspell -L data.txt)
|
||||
if [ "$VAR1" = "$VAR2" ]; then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
check_correct_word() {
|
||||
VAR1="Cloud\nLinux\nFedora"
|
||||
VAR1=$(echo -e "$VAR1")
|
||||
VAR2=$(hunspell -G data.txt)
|
||||
if [ "$VAR1" = "$VAR2" ]; then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
check_pkg "hunspell"
|
||||
check_pkg "hunspell-de"
|
||||
check_dict
|
||||
check_misspelled_word
|
||||
check_misspelled_line
|
||||
check_correct_word
|
||||
|
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
required_packages:
|
||||
- hunspell
|
||||
- hunspell-de
|
||||
tests:
|
||||
- simple:
|
||||
dir: scripts
|
||||
run: ./run_tests.sh
|
Loading…
Reference in New Issue
Block a user