diff --git a/0001-Disable-ivy-settings.patch b/0001-Disable-ivy-settings.patch new file mode 100644 index 0000000000000000000000000000000000000000..8a39c17c6bb9bb8c075568c80d42b20ddc59f14d --- /dev/null +++ b/0001-Disable-ivy-settings.patch @@ -0,0 +1,23 @@ +From f80ad58a1f6d253b5dab2f78ad49881c6b0aa25d Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Thu, 25 Feb 2016 12:26:12 +0100 +Subject: [PATCH 1/2] Disable ivy-settings + +--- + lucene/common-build.xml | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lucene/common-build.xml b/lucene/common-build.xml +index 9e259e9..5416e1e 100644 +--- a/lucene/common-build.xml ++++ b/lucene/common-build.xml +@@ -394,7 +394,6 @@ + you have an idea, fix it. + unless="ivy.settings.uptodate" --> + +- + + + +-- +2.5.0 diff --git a/0002-Dependency-generation.patch b/0002-Dependency-generation.patch new file mode 100644 index 0000000000000000000000000000000000000000..a7778984c40307b0cc11b322a27b5d81101407ba --- /dev/null +++ b/0002-Dependency-generation.patch @@ -0,0 +1,71 @@ +From e345146f765c5f07db205694106b035866183b19 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Thu, 25 Feb 2016 15:03:17 +0100 +Subject: [PATCH 2/2] Dependency generation + +--- + lucene/build.xml | 6 ++++-- + lucene/common-build.xml | 4 ++-- + .../org/apache/lucene/dependencies/GetMavenDependenciesTask.java | 2 ++ + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/lucene/build.xml b/lucene/build.xml +index 8aef144..2318a78 100644 +--- a/lucene/build.xml ++++ b/lucene/build.xml +@@ -421,12 +421,14 @@ + + + +- +- ++ ++ + ++ + + + +diff --git a/lucene/common-build.xml b/lucene/common-build.xml +index 5416e1e..783c63e 100644 +--- a/lucene/common-build.xml ++++ b/lucene/common-build.xml +@@ -1792,9 +1792,9 @@ ${ant.project.name}.test.dependencies=${test.classpath.list} + + + +- ++ + +diff --git a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java +index c998342..ddfd42c 100644 +--- a/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java ++++ b/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java +@@ -480,6 +480,7 @@ public class GetMavenDependenciesTask extends Task { + private Collection getTransitiveDependenciesFromIvyCache + (String groupId, String artifactId, String version) { + SortedSet transitiveDependencies = new TreeSet<>(); ++ /* + // E.g. ~/.ivy2/cache/xerces/xercesImpl/ivy-2.9.1.xml + File ivyXmlFile = new File(new File(new File(ivyCacheDir, groupId), artifactId), "ivy-" + version + ".xml"); + if ( ! ivyXmlFile.exists()) { +@@ -501,6 +502,7 @@ public class GetMavenDependenciesTask extends Task { + + groupId + ':' + artifactId + ':' + version + " from " + + ivyXmlFile.getAbsolutePath(), e); + } ++ */ + return transitiveDependencies; + } + +-- +2.5.0 + diff --git a/lucene.spec b/lucene.spec new file mode 100644 index 0000000000000000000000000000000000000000..bc123550f6ae8e002cc567f8933cab9222fa9072 --- /dev/null +++ b/lucene.spec @@ -0,0 +1,384 @@ +%bcond_with jp_minimal + +Name: lucene +Version: 7.1.0 +Release: 4 +Epoch: 0 +Summary: Ultra-fast Search Library +License: ASL 2.0 +URL: http://lucene.apache.org/ +Source0: https://archive.apache.org/dist/lucene/solr/%{version}/solr-%{version}-src.tgz + +Patch0001: 0001-Disable-ivy-settings.patch +Patch0002: 0002-Dependency-generation.patch + +BuildRequires: ant ivy-local maven-local mvn(org.apache:apache:pom:) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +%if %{without jp_minimal} +BuildRequires: mvn(com.carrotsearch.randomizedtesting:randomizedtesting-runner) +BuildRequires: mvn(com.ibm.icu:icu4j) mvn(commons-codec:commons-codec) +BuildRequires: mvn(commons-logging:commons-logging) mvn(javax.servlet:javax.servlet-api) +BuildRequires: mvn(javax.servlet:servlet-api) mvn(junit:junit) mvn(net.sourceforge.nekohtml:nekohtml) +BuildRequires: mvn(org.antlr:antlr4-runtime) mvn(org.apache.commons:commons-compress) +BuildRequires: mvn(org.apache.httpcomponents:httpclient) mvn(org.apache.httpcomponents:httpcore) +BuildRequires: mvn(org.apache.uima:Tagger) mvn(org.apache.uima:uimaj-core) +BuildRequires: mvn(org.apache.uima:WhitespaceTokenizer) mvn(org.carrot2:morfologik-fsa) +BuildRequires: mvn(org.carrot2:morfologik-polish) mvn(org.carrot2:morfologik-stemming) +BuildRequires: mvn(org.eclipse.jetty:jetty-continuation) mvn(org.eclipse.jetty:jetty-http) +BuildRequires: mvn(org.eclipse.jetty:jetty-io) mvn(org.eclipse.jetty:jetty-server) +BuildRequires: mvn(org.eclipse.jetty:jetty-servlet) mvn(org.eclipse.jetty:jetty-util) +BuildRequires: mvn(org.locationtech.spatial4j:spatial4j) mvn(org.ow2.asm:asm) +BuildRequires: mvn(org.ow2.asm:asm-commons) mvn(xerces:xercesImpl) +%endif + +Provides: %{name}-core = %{epoch}:%{version}-%{release} + +BuildArch: noarch + +%description +Apache Lucene is a high-performance, full-featured text search engine library written entirely in +Java. It is a technology suitable for nearly any application that requires full-text search, +especially cross-platform. + +%package analysis +Summary: Lucene Common Analyzers + +%description analysis +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "analysis" module for Lucene. + +%package analyzers-smartcn +Summary: Smart Chinese Analyzer + +%description analyzers-smartcn +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "analyzers-smartcn" module for Lucene. + +%package grouping +Summary: Lucene Grouping Module + +%description grouping +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "grouping" module for Lucene. + +%package highlighter +Summary: Lucene Highlighter Module + +%description highlighter +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "highlighter" module for Lucene. + +%package join +Summary: Lucene Join Module + +%description join +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "join" module for Lucene. + +%package memory +Summary: Lucene Memory Module + +%description memory +This package provides the high-performance single-document index to compare against Query. + +%package misc +Summary: Miscellaneous Lucene extensions + +%description misc +This package provides the miscellaneous extensions for Lucene. + +%package queries +Summary: Lucene Queries Module + +%description queries +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "queries" module for Lucene. + +%package queryparser +Summary: Lucene QueryParsers Module + +%description queryparser +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "queryparser" module for Lucene. + +%package sandbox +Summary: Lucene Sandbox Module + +%description sandbox +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "sandbox" module for Lucene. + +%if %{without jp_minimal} +%package parent +Summary: Parent POM for Lucene + +%description parent +This package provides the parent POM for Lucene. + +%package solr-grandparent +Summary: Lucene Solr grandparent POM + +%description solr-grandparent +This package provides the solr grandparent POM for Lucene. + +%package backward-codecs +Summary: Lucene Backward Codecs Module + +%description backward-codecs +This package provides the codecs for older versions of Lucene. + +%package benchmark +Summary: Lucene Benchmarking Module + +%description benchmark +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "benchmark" module for Lucene. + +%package replicator +Summary: Lucene Replicator Module + +%description replicator +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "replicator" module for Lucene. + +%package test-framework +Summary: Apache Lucene Java Test Framework + +%description test-framework +This package provides the Java Test Framework for Apache Lucene Java. + +%package expressions +Summary: Lucene Expressions Module + +%description expressions +This package provides the dynamically computed values to sort/facet/search on based on pluggable grammars. + +%package demo +Summary: Lucene Demo Module + +%description demo +This package provides the demo for Apache Lucene Java. + +%package classification +Summary: Lucene Classification Module + +%description classification +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "classification" module for Lucene. + +%package suggest +Summary: Lucene Suggest Module + +%description suggest +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "suggest" module for Lucene. + +%package facet +Summary: Lucene Facets Module + +%description facet +This package provides the Faceted Indexing and Search. + +%package spatial +Summary: Geospatial indexing APIs for Apache Lucene + +%description spatial +This package provides the geospatial indexing APIs for Apache Lucene. + +%package spatial-extras +Summary: Spatial Strategies for Apache Lucene + +%description spatial-extras +This package provides the spatial Strategies for Apache Lucene. + +%package spatial3d +Summary: Lucene Spatial 3D + +%description spatial3d +This package provides the spatial shapes implemented using 3D planar geometry. + +%package codecs +Summary: Codecs and postings formats for Apache Lucene + +%description codecs +This package provides the codecs and postings formats for Apache Lucene. + +%package analyzers-phonetic +Summary: Lucene Phonetic Filters + +%description analyzers-phonetic +This package provides the phonetic encoding via Commons Codec. + +%package analyzers-icu +Summary: Lucene ICU Analysis Components + +%description analyzers-icu +This package provides the integration with ICU (International Components for Unicode) for stronger +Unicode and internationalization support. + +%package analyzers-morfologik +Summary: Lucene Morfologik Polish Lemmatizer + +%description analyzers-morfologik +This package provides a dictionary-driven lemmatizer for Polish (includes morphosyntactic annotations). + +%package analyzers-uima +Summary: Lucene UIMA Analysis Components + +%description analyzers-uima +This package provides the integration with UIMA for extracting metadata from arbitrary (text) fields +and enrich document with features extracted from UIMA types (language,sentences, concepts, named +entities, etc.). + +%package analyzers-kuromoji +Summary: Lucene Kuromoji Japanese Morphological Analyzer + +%description analyzers-kuromoji +This package provides a Kuromoji Japanese Morphological Analyzer for Apache Lucene. + +%package analyzers-stempel +Summary: Lucene Stempel Analyzer + +%description analyzers-stempel +Apache Lucene is a full-text search engine written entirely in Java. +This package provides the "analyzers-stempel" module for Lucene. + +%endif + +%package help +Summary: Help documents for Lucene +Provides: %{name}-javadoc = %{epoch}:%{version}-%{release} +Obsoletes: %{name}-javadoc < %{epoch}:%{version}-%{release} + +%description help +Manauals of API and other help documents for %{name}. + +%prep +%autosetup -n solr-%{version} -p1 + +rm -rf solr +find -name "*.jar" | xargs rm -f + +sed -i -e "//a<_nouses>true" dev-tools/maven/pom.xml.template +sed -i 's/-filter-pom-templates/filter-pom-templates/' lucene/common-build.xml + +%mvn_alias :%{name}-suggest :%{name}-spellchecker +%mvn_alias :%{name}-analyzers-common :%{name}-analyzers +%mvn_package ":%{name}-analysis-modules-aggregator" %{name}-analysis +%mvn_package ":%{name}-analyzers-common" %{name}-analysis +%mvn_package ":{*}-aggregator" @1 + +%build +cd %{name} +find -maxdepth 2 -type d -exec mkdir -p '{}/lib' \; +ant -f common-build.xml filter-pom-templates -Divy.mode=local -Dversion=%{version} -Divy.available=true + +for pom in `find build/poms/%{name} -name pom.xml` +do + sed 's/\${module-path}/${basedir}/g' "$pom" > "${pom##build/poms/%{name}/}" +done + +%pom_disable_module src/test core +%pom_disable_module src/test codecs +%pom_remove_dep org.locationtech.spatial4j:spatial4j::test spatial-extras +%pom_remove_dep ua.net.nlp:morfologik-ukrainian-search analysis/morfologik +%pom_add_dep org.antlr:antlr-runtime::test demo +cd - + +mv lucene/build/poms/pom.xml . + +%pom_xpath_set "pom:Export-Package" "*;version=\"%{version}\"" +%pom_add_plugin org.apache.felix:maven-bundle-plugin lucene/misc \ +" +org.apache.lucene.core;bundle-version=\"%{version}\" + + org.apache.lucene.document;version=\"%{version}\";misc=split;mandatory:=misc, + org.apache.lucene.index;version=\"%{version}\";misc=split;mandatory:=misc, + org.apache.lucene.search;version=\"%{version}\";misc=split;mandatory:=misc, + org.apache.lucene.store;version=\"%{version}\";misc=split;mandatory:=misc, + org.apache.lucene.util.fst;version=\"%{version}\";misc=split;mandatory:=misc, + *;version=\"%{version}\" +" +%pom_add_plugin org.apache.felix:maven-bundle-plugin lucene/analysis/common \ +" +org.apache.lucene.core;bundle-version=\"%{version}\" + + org.apache.lucene.analysis.standard;version=\"%{version}\";analysis=split;mandatory:=analysis, + *;version=\"%{version}\" +" + +%pom_disable_module solr + +for plugin in buildnumber-maven-plugin forbiddenapis gmaven-plugin maven-enforcer-plugin +do + %pom_remove_plugin -r :$plugin +done + +%if %{with jp_minimal} +cd lucene +for module in backward-codecs benchmark classification codecs demo expressions facet\ + replicator spatial spatial-extras spatial3d suggest test-framework +do + %pom_disable_module $module +done + +for module in icu kuromoji morfologik phonetic stempel uima +do + %pom_disable_module $module analysis +done +cd - + +%mvn_package :lucene-parent __noinstall +%mvn_package :lucene-solr-grandparent __noinstall +%endif + +%mvn_build -s -f + +%install +%mvn_install + +%global _docdir_fmt %{name} + +%files -f .mfiles-%{name}-core +%license lucene/{LICENSE,NOTICE}.txt + +%files analysis -f .mfiles-%{name}-analysis +%files analyzers-smartcn -f .mfiles-%{name}-analyzers-smartcn +%files grouping -f .mfiles-%{name}-grouping +%files highlighter -f .mfiles-%{name}-highlighter +%files join -f .mfiles-%{name}-join +%files memory -f .mfiles-%{name}-memory +%files misc -f .mfiles-%{name}-misc +%files queries -f .mfiles-%{name}-queries +%files queryparser -f .mfiles-%{name}-queryparser +%files sandbox -f .mfiles-%{name}-sandbox +%if %{without jp_minimal} +%files parent -f .mfiles-%{name}-parent +%files solr-grandparent -f .mfiles-%{name}-solr-grandparent +%files benchmark -f .mfiles-%{name}-benchmark +%files backward-codecs -f .mfiles-%{name}-backward-codecs +%files replicator -f .mfiles-%{name}-replicator +%files test-framework -f .mfiles-%{name}-test-framework +%files expressions -f .mfiles-%{name}-expressions +%files demo -f .mfiles-%{name}-demo +%files classification -f .mfiles-%{name}-classification +%files suggest -f .mfiles-%{name}-suggest +%files facet -f .mfiles-%{name}-facet +%files spatial -f .mfiles-%{name}-spatial +%files spatial-extras -f .mfiles-%{name}-spatial-extras +%files spatial3d -f .mfiles-%{name}-spatial3d +%files codecs -f .mfiles-%{name}-codecs +%files analyzers-phonetic -f .mfiles-%{name}-analyzers-phonetic +%files analyzers-icu -f .mfiles-%{name}-analyzers-icu +%files analyzers-morfologik -f .mfiles-%{name}-analyzers-morfologik +%files analyzers-uima -f .mfiles-%{name}-analyzers-uima +%files analyzers-kuromoji -f .mfiles-%{name}-analyzers-kuromoji +%files analyzers-stempel -f .mfiles-%{name}-analyzers-stempel +%endif + +%files help -f .mfiles-javadoc +%doc lucene/{CHANGES,README,MIGRATE,JRE_VERSION_MIGRATION}.txt + +%changelog +* Mon Dec 23 2019 zhouyihang - 0:7.1.0-4 +- Package init diff --git a/solr-7.1.0-src.tgz b/solr-7.1.0-src.tgz new file mode 100644 index 0000000000000000000000000000000000000000..52ba09bd7405ab1ac8396dcb302d51095d7a634a Binary files /dev/null and b/solr-7.1.0-src.tgz differ