Hello community, here is the log from the commit of package eclipse for openSUSE:Factory checked in at 2020-04-08 19:55:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/eclipse (Old) and /work/SRC/openSUSE:Factory/.eclipse.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "eclipse" Wed Apr 8 19:55:21 2020 rev:9 rq:791946 version:4.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/eclipse/eclipse.changes 2020-04-07 10:28:31.718309954 +0200 +++ /work/SRC/openSUSE:Factory/.eclipse.new.3248/eclipse.changes 2020-04-08 19:55:24.137067229 +0200 @@ -1,0 +2,8 @@ +Tue Apr 7 09:27:52 UTC 2020 - Fridrich Strba <[email protected]> + +- Added patch: + * eclipse-lucene-8.patch + + port to lucene 8.x + + apply if building against lucene >= 8 + +------------------------------------------------------------------- New: ---- eclipse-lucene-8.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ eclipse.spec ++++++ --- /var/tmp/diff_new_pack.w547ZM/_old 2020-04-08 19:55:27.641069789 +0200 +++ /var/tmp/diff_new_pack.w547ZM/_new 2020-04-08 19:55:27.645069792 +0200 @@ -116,6 +116,7 @@ Patch35: eclipse-arm32.patch Patch36: eclipse-force-gtk2.patch Patch37: eclipse-felix-scr-dependencies.patch +Patch38: eclipse-lucene-8.patch BuildRequires: ant >= 1.10.5 BuildRequires: ant-antlr BuildRequires: ant-apache-bcel @@ -337,10 +338,6 @@ Requires: httpcomponents-core Requires: icu4j >= 62.1 Requires: jsch >= 0.1.46 -Requires: lucene-analysis >= %{_lucene_version} -Requires: lucene-analyzers-smartcn >= %{_lucene_version} -Requires: lucene-core >= %{_lucene_version} -Requires: lucene-queryparser >= %{_lucene_version} Requires: osgi-compendium Requires: sac Requires: sat4j @@ -358,6 +355,10 @@ Requires: osgi(org.eclipse.jetty.servlet) >= %{_jetty_version} Requires: osgi(org.eclipse.jetty.util) >= %{_jetty_version} Requires: osgi(org.tukaani.xz) +%requires_ge lucene-analysis +%requires_ge lucene-analyzers-smartcn +%requires_ge lucene-core +%requires_ge lucene-queryparser %if %{with bootstrap} Requires: eclipse-equinox-osgi-bootstrap = %{version}-%{release} @@ -520,6 +521,9 @@ %patch36 -p1 %endif %patch37 -p1 +%if %{?pkg_vcmp:%pkg_vcmp lucene-core >= 8}%{!?pkg_vcmp:0} +%patch38 -p1 +%endif # Use ecj when bootstrapping %if %{with bootstrap} ++++++ eclipse-lucene-8.patch ++++++ diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF 2018-09-06 06:27:51.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF 2020-04-06 14:34:39.932678678 +0200 @@ -44,9 +44,9 @@ org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport, org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)", org.eclipse.core.net;bundle-version="[1.2.200,2.0.0]", - org.apache.lucene.analyzers-common;bundle-version="[7.0.0,8.0.0)", - org.apache.lucene.core;bundle-version="[7.0.0,8.0.0)", - org.apache.lucene.analyzers-smartcn;bundle-version="[7.0.0,8.0.0)" + org.apache.lucene.analyzers-common;bundle-version="[8.0.0,9.0.0)", + org.apache.lucene.core;bundle-version="[8.0.0,9.0.0)", + org.apache.lucene.analyzers-smartcn;bundle-version="[8.0.0,9.0.0)" Import-Package: com.ibm.icu.text, org.eclipse.equinox.http.jetty;resolution:=optional Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java 2018-08-21 14:04:10.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java 2020-04-06 14:40:11.522544528 +0200 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -20,9 +20,10 @@ import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharArraySet; +import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; -import org.apache.lucene.analysis.core.StopFilter; +import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.en.PorterStemFilter; /** @@ -44,9 +45,9 @@ @SuppressWarnings("resource") @Override protected TokenStreamComponents createComponents(String fieldName) { - final Tokenizer source; - source = new LowerCaseAndDigitsTokenizer(); + final Tokenizer source = new CharAndDigitsTokenizer(); TokenStream result = new StopFilter(source, new CharArraySet(getStopWords(), false)); + result = new LowerCaseFilter(result); result = new PorterStemFilter(result); return new TokenStreamComponents(source, result); } diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/CharAndDigitsTokenizer.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/CharAndDigitsTokenizer.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/CharAndDigitsTokenizer.java 1970-01-01 01:00:00.000000000 +0100 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/CharAndDigitsTokenizer.java 2020-04-06 14:40:11.522544528 +0200 @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2000, 2019 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + * Alexander Kurtakov - Bug 460787 + * Sopot Cela - Bug 466829 + *******************************************************************************/ +package org.eclipse.help.internal.search; + +import org.apache.lucene.analysis.util.CharTokenizer; + +/** + * Tokenizer breaking words around letters or digits. Also normalizes to lower + * case. + */ +public class CharAndDigitsTokenizer extends CharTokenizer { + + @Override + protected boolean isTokenChar(int c) { + return Character.isLetterOrDigit(c); + } +} diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java 2018-08-21 14:04:10.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/LowerCaseAndDigitsTokenizer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - * Alexander Kurtakov - Bug 460787 - * Sopot Cela - Bug 466829 - *******************************************************************************/ -package org.eclipse.help.internal.search; - -import org.apache.lucene.analysis.util.CharTokenizer; - -/** - * Tokenizer breaking words around letters or digits. Also normalizes to lower - * case. - */ -public class LowerCaseAndDigitsTokenizer extends CharTokenizer { - - @Override - protected boolean isTokenChar(int c) { - return Character.isLetterOrDigit(c); - } - - @Override - protected int normalize(int c) { - return Character.toLowerCase(c); - } - -} diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java 2018-08-21 14:04:10.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java 2020-04-06 14:40:11.522544528 +0200 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2016 IBM Corporation and others. + * Copyright (c) 2005, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -155,7 +155,7 @@ .getProperty(SearchIndex.DEPENDENCIES_KEY_ANALYZER); if (!targetIndex.isLuceneCompatible(lucene) || !targetIndex.isAnalyzerCompatible(analyzer)) { String message = "Unable to consume Lucene index from bundle '" + bundle.toString() //$NON-NLS-1$ - + "'. The index should be rebuilt with Lucene 7.0.0"; //$NON-NLS-1$ + + "'. The index should be rebuilt with Lucene 8.0.0"; //$NON-NLS-1$ Status warningStatus = new Status(IStatus.WARNING, HelpBasePlugin.PLUGIN_ID, IStatus.OK, message, null); HelpBasePlugin.logStatus(warningStatus); return false; diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java 2018-08-21 14:04:10.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java 2020-04-06 14:40:11.522544528 +0200 @@ -758,9 +758,9 @@ } Version luceneVersion = new Version(luceneVersionString); Version indexVersion = new Version(indexVersionString); - Version v700 = new Version(7, 0, 0); - if (indexVersion.compareTo(v700) < 0) { - // index is older than Lucene 7.0.0 + Version v800 = new Version(8, 0, 0); + if (indexVersion.compareTo(v800) < 0) { + // index is older than Lucene 8.0.0 return false; } if ( luceneVersion.compareTo(indexVersion) >= 0 ) { diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java 2018-08-21 14:04:12.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java 2020-04-06 14:40:11.522544528 +0200 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2016 IBM Corporation and others. + * Copyright (c) 2011, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -86,7 +86,7 @@ /** * Test index built with Lucene 6.1.0 */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = IndexFormatTooOldException.class) public void test6_1_0_IndexUnReadable() throws Exception { checkReadable("data/help/searchindex/index610"); } @@ -94,12 +94,20 @@ /** * Test index built with Lucene 7.0.0 */ - @Test - public void test7_0_0_IndexReadable() throws Exception { + @Test(expected = IndexFormatTooOldException.class) + public void test7_0_0_IndexUnReadable() throws Exception { checkReadable("data/help/searchindex/index700"); } /** + * Test index built with Lucene 8.0.0 + */ + @Test + public void test8_0_0_IndexReadable() throws Exception { + checkReadable("data/help/searchindex/index800"); + } + + /** ** Test compatibility of Lucene 1.9.1 index with current Lucene */ @Test @@ -138,7 +146,7 @@ */ @Test public void test7_0_0Compatible() { - checkCompatible("data/help/searchindex/index700", true); + checkCompatible("data/help/searchindex/index700", false); } @Test @@ -171,7 +179,12 @@ @Test public void test7_0_0LuceneCompatible() { - checkLuceneCompatible("7.0.0", true); + checkLuceneCompatible("7.0.0", false); + } + + @Test + public void test8_0_0LuceneCompatible() { + checkLuceneCompatible("8.0.0", true); } @Test @@ -227,7 +240,7 @@ try (Directory luceneDirectory = new NIOFSDirectory(new File(filePath).toPath())) { searcher = new IndexSearcher(DirectoryReader.open(luceneDirectory)); TopDocs hits = searcher.search(luceneQuery, 500); - assertTrue(hits.totalHits >= 1); + assertTrue(hits.totalHits.value >= 1); } } else { fail("Cannot resolve to file protocol"); diff -urEbwBN eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF --- eclipse-platform-sources-I20180906-0745/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF 2018-09-06 06:27:51.000000000 +0200 +++ eclipse-platform-sources-I20180906-0745.new/eclipse.platform.ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF 2020-04-06 14:40:11.522544528 +0200 @@ -20,9 +20,9 @@ org.eclipse.ui.browser;bundle-version="3.2.300", org.eclipse.equinox.jsp.jasper;bundle-version="1.0.200", org.eclipse.equinox.jsp.jasper.registry;bundle-version="1.0.100", - org.apache.lucene.analyzers-common;bundle-version="7.0.0", - org.apache.lucene.analyzers-smartcn;bundle-version="7.0.0", - org.apache.lucene.core;bundle-version="7.0.0" + org.apache.lucene.analyzers-common;bundle-version="8.0.0", + org.apache.lucene.analyzers-smartcn;bundle-version="8.0.0", + org.apache.lucene.core;bundle-version="8.0.0" Bundle-ActivationPolicy: lazy Bundle-Vendor: Eclipse.org Import-Package: javax.servlet;version="3.1.0",
