Compare commits

...

No commits in common. "c8s" and "c9" have entirely different histories.
c8s ... c9

11 changed files with 208 additions and 28 deletions

1
.clucene.metadata Normal file
View File

@ -0,0 +1 @@
1e7539eb92789f64dd47c2e7461334dd92865a0e SOURCES/clucene-core-2.3.3.4-e8e3d20.tar.xz

1
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/clucene-core-2.3.3.4-e8e3d20.tar.xz
/clucene-core-2.3.3.4-e8e3d20.tar.xz

View File

@ -0,0 +1,40 @@
From 44cc1d696b6528712d92d33660dd8017dcd0b3e2 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 31 Jul 2019 16:57:31 +0200
Subject: [PATCH 1/2] Make sure to return value from non-void function
This had been commented out with 92145f058c88a9607341d8a20c3944a96ec00cf8
"All remaining memory leaks int tests removed. Fixes made by Veit and Anthony
Novatsis are incorporated" for no apparent reason---presumably by accident.
The effect (besides a -Wreturn-type warning) when building e.g. RelWithDebInfo
(i.e., with optimizations) on Fedora 30 (with GCC 9.1) was that the implicit
call to ~WhitespaceAnalyzer at the end of searchDocs was directly followed
(lacking the code sequence corresponding to "return 0;") by some compiler-
generated code to jump into some _Z10searchDocsPv.cold code (which is apparently
meant as an optimization, to be called from certain cold conditions) which
happened to also call ~WhitespaceAnalyzer. The net effect was that the
WhitespaceAnalyzer an;
object was deleted twice, causing a SIGSEGV.
---
src/test/search/TestIndexSearcher.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/search/TestIndexSearcher.cpp b/src/test/search/TestIndexSearcher.cpp
index 5c410ff4..02c21aaf 100644
--- a/src/test/search/TestIndexSearcher.cpp
+++ b/src/test/search/TestIndexSearcher.cpp
@@ -28,7 +28,7 @@ _LUCENE_THREAD_FUNC(searchDocs, _searcher) {
_CLLDELETE(query);
CONDITION_WAIT(deleteMutex, deleteCondition);
-// _LUCENE_THREAD_FUNC_RETURN(0);
+ _LUCENE_THREAD_FUNC_RETURN(0);
}
void testEndThreadException(CuTest *tc) {
--
2.21.0

View File

@ -0,0 +1,112 @@
From bdc374bfbb0ca34ddb40713eb51d8535fdf11952 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 31 Jul 2019 16:27:33 +0200
Subject: [PATCH 2/2] Avoid deadlock in TestIndexSearcher
---
src/test/search/TestIndexSearcher.cpp | 51 +++++++++++++++++++++------
1 file changed, 41 insertions(+), 10 deletions(-)
diff --git a/src/test/search/TestIndexSearcher.cpp b/src/test/search/TestIndexSearcher.cpp
index 02c21aaf..a6dde5ba 100644
--- a/src/test/search/TestIndexSearcher.cpp
+++ b/src/test/search/TestIndexSearcher.cpp
@@ -8,9 +8,11 @@
DEFINE_MUTEX(searchMutex);
DEFINE_CONDITION(searchCondition);
+bool searchReady;
DEFINE_MUTEX(deleteMutex);
DEFINE_CONDITION(deleteCondition);
+bool deleteReady;
_LUCENE_THREAD_FUNC(searchDocs, _searcher) {
@@ -19,15 +21,20 @@ _LUCENE_THREAD_FUNC(searchDocs, _searcher) {
Query * query = QueryParser::parse(_T("one"), _T("content"), &an);
Hits * hits = searcher->search(query);
-// _LUCENE_SLEEP(9999); //make sure that searchMutex is being waited on...
+ {
+ SCOPED_LOCK_MUTEX(searchMutex);
+ searchReady = true;
+ CONDITION_NOTIFYALL(searchCondition);
+ }
- CONDITION_NOTIFYALL(searchCondition);
SCOPED_LOCK_MUTEX(deleteMutex);
_CLLDELETE(hits);
_CLLDELETE(query);
- CONDITION_WAIT(deleteMutex, deleteCondition);
+ while (!deleteReady) {
+ CONDITION_WAIT(deleteMutex, deleteCondition);
+ }
_LUCENE_THREAD_FUNC_RETURN(0);
}
@@ -55,13 +62,24 @@ void testEndThreadException(CuTest *tc) {
// this sequence is OK: delete searcher after search thread finish
{
+ searchReady = false;
+ deleteReady = false;
+
IndexSearcher * searcher = _CLNEW IndexSearcher(&ram);
_LUCENE_THREADID_TYPE thread = _LUCENE_THREAD_CREATE(&searchDocs, searcher);
- SCOPED_LOCK_MUTEX(searchMutex);
- CONDITION_WAIT(searchMutex, searchCondition);
-// _LUCENE_SLEEP(9999); //make sure that deleteMutex is being waited on...
- CONDITION_NOTIFYALL(deleteCondition);
+ {
+ SCOPED_LOCK_MUTEX(searchMutex);
+ while (!searchReady) {
+ CONDITION_WAIT(searchMutex, searchCondition);
+ }
+ }
+
+ {
+ SCOPED_LOCK_MUTEX(deleteMutex);
+ deleteReady = true;
+ CONDITION_NOTIFYALL(deleteCondition);
+ }
_LUCENE_THREAD_JOIN(thread);
@@ -71,14 +89,27 @@ void testEndThreadException(CuTest *tc) {
// this produces memory exception: delete searcher after search finish but before thread finish
{
+ searchReady = false;
+ deleteReady = false;
+
IndexSearcher * searcher = _CLNEW IndexSearcher(&ram);
_LUCENE_THREADID_TYPE thread = _LUCENE_THREAD_CREATE(&searchDocs, searcher);
- SCOPED_LOCK_MUTEX(searchMutex);
- CONDITION_WAIT(searchMutex, searchCondition);
+ {
+ SCOPED_LOCK_MUTEX(searchMutex);
+ while (!searchReady) {
+ CONDITION_WAIT(searchMutex, searchCondition);
+ }
+ }
+
searcher->close();
_CLLDELETE(searcher);
- CONDITION_NOTIFYALL(deleteCondition);
+
+ {
+ SCOPED_LOCK_MUTEX(deleteMutex);
+ deleteReady = true;
+ CONDITION_NOTIFYALL(deleteCondition);
+ }
_LUCENE_THREAD_JOIN(thread);
}
--
2.21.0

View File

@ -1,14 +1,13 @@
%define git_long e8e3d20f20da5ee3e37d347207b01890829a5475
%define git_short e8e3d20
%define snap 20130812
%global git_long e8e3d20f20da5ee3e37d347207b01890829a5475
%global git_short e8e3d20
%global snap 20130812
Summary: A C++ port of Lucene
Name: clucene
Version: 2.3.3.4
Release: 31.%{snap}.%{git_short}git%{?dist}
Release: 42.%{snap}.%{git_short}git%{?dist}
License: LGPLv2+ or ASL 2.0
Group: Development/System
URL: http://www.sourceforge.net/projects/clucene
%if 0%{?snap}
# git archive e8e3d20f20da5ee3e37d347207b01890829a5475 --prefix=clucene-core-2.3.3.4/ | xz -9 > ../clucene-core-2.3.3.4-e8e3d20.tar.xz
@ -20,8 +19,10 @@ Source0: http://downloads.sourceforge.net/clucene/clucene-core-%{version}.tar.gz
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gawk
BuildRequires: gawk
BuildRequires: gcc-c++
BuildRequires: zlib-devel
BuildRequires: make
## upstreamable patches
# include LUCENE_SYS_INCLUDES in pkgconfig --cflags output
@ -38,6 +39,10 @@ Patch51: clucene-core-2.3.3.4-install_contribs_lib.patch
Patch52: clucene-core-2.3.3.4-CLuceneConfig.patch
# Fix tests for undefined usleep
Patch53: clucene-core-2.3.3.4-usleep.patch
# Upstream at <https://sourceforge.net/p/clucene/bugs/232/> "Patches for
# TestIndexSearcher failures":
Patch54: 0001-Make-sure-to-return-value-from-non-void-function.patch
Patch55: 0002-Avoid-deadlock-in-TestIndexSearcher.patch
%description
CLucene is a C++ port of the popular Apache Lucene search engine
@ -48,7 +53,6 @@ date with Lucene 2.3.2. It contains most of the same functionality as the Java v
%package core
Summary: Core clucene module
Group: Development/System
Provides: clucene = %{version}-%{release}
#Requires: %{name} = %{version}-%{release}
%description core
@ -60,7 +64,6 @@ date with Lucene 2.3.2. It contains most of the same functionality as the Java v
%package core-devel
Summary: Headers for developing programs that will use %{name}
Group: Development/Libraries
Requires: %{name}-core%{?_isa} = %{version}-%{release}
Requires: %{name}-contribs-lib%{?_isa} = %{version}-%{release}
%description core-devel
@ -69,7 +72,6 @@ developing with clucene
%package contribs-lib
Summary: Language specific text analyzers for %{name}
Group: Development/System
Requires: %{name}-core%{?_isa} = %{version}-%{release}
%description contribs-lib
%{summary}.
@ -82,26 +84,24 @@ Requires: %{name}-core%{?_isa} = %{version}-%{release}
%patch51 -p1 -b .install_contribs_lib
%patch52 -p1 -b .CLuceneConfig
%patch53 -p1 -b .usleep
%patch54 -p1 -b .return-value
%patch55 -p1 -b .avoid-deadlock
# nuke bundled code
rm -rfv src/ext/{boost/,zlib/}
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
-DBUILD_CONTRIBS_LIB:BOOL=ON \
-DLIB_DESTINATION:PATH=%{_libdir} \
-DLUCENE_SYS_INCLUDES:PATH=%{_libdir} \
..
popd
-DLUCENE_SYS_INCLUDES:PATH=%{_libdir}
make %{?_smp_mflags} -C %{_target_platform}
%cmake_build
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install
%check
@ -119,8 +119,8 @@ time make -C %{_target_platform} test ARGS="--timeout 300 --output-on-failure" |
%ldconfig_scriptlets core
%files core
%defattr(-, root, root, -)
%doc APACHE.license AUTHORS ChangeLog COPYING LGPL.license README
%doc AUTHORS ChangeLog README
%license APACHE.license COPYING LGPL.license
%{_libdir}/libclucene-core.so.1*
%{_libdir}/libclucene-core.so.%{version}
%{_libdir}/libclucene-shared.so.1*
@ -129,12 +129,10 @@ time make -C %{_target_platform} test ARGS="--timeout 300 --output-on-failure" |
%ldconfig_scriptlets contribs-lib
%files contribs-lib
%defattr(-, root, root, -)
%{_libdir}/libclucene-contribs-lib.so.1*
%{_libdir}/libclucene-contribs-lib.so.%{version}
%files core-devel
%defattr(-, root, root, -)
%dir %{_libdir}/CLucene
%{_includedir}/CLucene/
%{_includedir}/CLucene.h
@ -145,6 +143,43 @@ time make -C %{_target_platform} test ARGS="--timeout 300 --output-on-failure" |
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.3.4-42.20130812.e8e3d20git
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.3.3.4-41.20130812.e8e3d20git
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-40.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-39.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 21 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3.4-38.20130812.e8e3d20.git
- pull in some upstream fixes (PR, previous commit)
- use latest %%cmake macros
- s/define/global/
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 2.3.3.4-37.20130812.e8e3d20git
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-36.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-35.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-34.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-33.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Feb 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3.4-3220130812.e8e3d20git
- BR: gcc-c++, .spec cleanup
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3.4-31.20130812.e8e3d20git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -1 +0,0 @@
SHA512 (clucene-core-2.3.3.4-e8e3d20.tar.xz) = afd80dc393079a53d6a95ab6992ce5107f5b0c5ec824fec858f8450e5eca242ba914737fb2b559b456f1d9fff1e4c255786521825f919b7757c70f2957f5e616