There is a java project (Search server web interface for Lucene) http://lucene.apache.org/solr/ There is no ebuild for it. Reproducible: Always Steps to Reproduce: emerge dev-java/solr ebuild should do something like fragment below, but from source tar zxf apache-solr-1.3.0.tgz cp apache-solr-1.3.0/dist/apache-solr-1.3.0.war /var/lib/tomcat/webapps/solr.war cp apache-solr-1.3.0/example/solr solr-home echo 'export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/home/root/solr/solr-home/"' >> /etc/bash/bashrc source /etc/bash/bashrc
First of all the ebuild should (if not must) build it from source. Apart from that there's infrastructure for Java webapps currently.
(In reply to comment #1) > First of all the ebuild should (if not must) build it from source. Apart from > that there's infrastructure for Java webapps currently. I compiled sources with the following fragment, and then install .war-file and configuration files by hands (with http://wiki.apache.org/solr/SolrTomcat). The framework at http://overlays.gentoo.org/svn/dev/nelchael/eclass/java-webapp.eclass is incomplete now. === part of solr-1.3.0.ebuild === # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ JAVA_PKG_IUSE="tomcat" JAVA_PKG_BSFIX_ALL="no" JAVA_PKG_BSFIX_NAME="" inherit java-pkg-2 java-ant-2 # java-webapp DESCRIPTION="Frontend for Lucene. Backend for LifeRay" HOMEPAGE="http://lucene.apache.org/solr" SRC_URI="mirror://apache/lucene/java/apache-${P}.tgz" LICENSE="Apache-2.0" SLOT="1.3" KEYWORDS="~x86" # ${S} is changed in order to setup build process to the correct folder within archive S="${WORKDIR}/apache-${P}" IUSE="" # dist target creates .war file EANT_BUILD_TARGET="dist" CDEPEND=">=dev-java/lucene-2.4.0" DEPEND="${CDEPEND} >=virtual/jdk-1.5 dev-java/ant-nodeps dev-java/javacc test? ( dev-java/ant-junit =dev-java/junit-3* )" RDEPEND="${CDEPEND} >=virtual/jre-1.5"
Created attachment 278347 [details] another ebuild attempt This ebuild is updated in some aspects but use a more "manual" method as I don't understand the "waf" stuff. I still have difficulties for files installation, jar launcher and sample configuration handling. Advises welcome
I created and tested a solr ebuild that builds and installs apache-solr from source. While it installs fine, there are some remaining issues, partly because this is my first ebuild and I'm lacking the knowledge: solr needs to have a dependency on a servlet container, and I think it should have a dependency on a virtual package like www-server/servlet-container. Unfortunately it seems that there is no such virtual package. According to the solr wiki (http://wiki.apache.org/solr/SolrInstall) I have to stop a running tomcat, install apache-solr, and restart tomcat again. How do I do that in the ebuild? I put the tomcat context fragment into /etc/tomcat-6/Catalina/localhost which is bad as this is a hardcoded path. The reason for this is, I don't know how to query all the installed versions of tomcat in order to install the context fragments into each installed /etc/tomcat-X Deinstalling apache-solr doesn't remove the /etc/tomcat-6/Catalina directory even if nothing is changed. Currently the sample solrconfig.xml is shipped in the files folder (see attachment) because the upstream file has some wrong library paths. Maybe a patch would be better? The eclass function webapp_serverowned doesn't work as I want it, it changes the file owner to lighttpd but not to tomcat and I don't know how to change this; so I inserted a postinst chown command to do the job because otherwise the example installation doesn't work. Note that the chown command has to run *after* the webapp_pkg_postinst call which is the opposite of what the webapp-config documentation tells us. I'm installing all the jar files created by the build. According the the apache solr documentation for tomcat (http://wiki.apache.org/solr/SolrTomcat#Installing_Solr_instances_under_Tomcat) this is not necessary but I wasn't able to even start solr without them. Note that I'm using my own solrconfig.xml file with all the library paths pointing to the place where I install the jar files. I have no idea whether the build/docs/api directory which I'm installing with java-pkg_dojavadoc is the "right" thing to do. regards matthias
Created attachment 295909 [details] ebuild for apache-solr 3.5.0
Created attachment 295911 [details] example solrconfig.xml file I put into files directory with fixed library paths
Should this software wait for an hypothetical maven/ebuild integration [1]; that is bug #175034 ? [1] https://overlays.gentoo.org/proj/java/wiki/Maven Should we wait until all of its deps' are bumped ? or should we bundle them ? Here they are : apache-solr-3.5.0/solr/contrib $ tree --prune -P "*.jar" |-- analysis-extras | `-- lib | `-- icu4j-4_8_1_1.jar |-- clustering | `-- lib | |-- carrot2-core-3.5.0.jar | |-- hppc-0.3.4-jdk15.jar | |-- jackson-core-asl-1.5.2.jar | |-- jackson-mapper-asl-1.5.2.jar | |-- mahout-collections-0.3.jar | |-- mahout-math-0.3.jar | `-- simple-xml-2.4.1.jar |-- dataimporthandler | `-- lib | |-- activation-1.1.jar | `-- mail-1.4.1.jar |-- extraction | `-- lib | |-- apache-mime4j-core-0.7.jar | |-- apache-mime4j-dom-0.7.jar | |-- asm-3.1.jar | |-- bcmail-jdk15-1.45.jar | |-- bcprov-jdk15-1.45.jar | |-- boilerpipe-1.1.0.jar | |-- commons-compress-1.2.jar | |-- dom4j-1.6.1.jar | |-- fontbox-1.6.0.jar | |-- icu4j-4_8_1_1.jar | |-- jempbox-1.6.0.jar | |-- metadata-extractor-2.4.0-beta-1.jar | |-- netcdf-4.2-min.jar | |-- pdfbox-1.6.0.jar | |-- poi-3.8-beta4.jar | |-- poi-ooxml-3.8-beta4.jar | |-- poi-ooxml-schemas-3.8-beta4.jar | |-- poi-scratchpad-3.8-beta4.jar | |-- rome-0.9.jar | |-- tagsoup-1.2.1.jar | |-- tika-core-0.10.jar | |-- tika-parsers-0.10.jar | |-- xercesImpl-2.8.1.jar | |-- xml-apis-1.0.b2.jar | `-- xmlbeans-2.3.0.jar |-- langid | `-- lib | |-- jsonic-1.2.0.jar | `-- langdetect-r111-java5.jar |-- uima | `-- lib | |-- commons-digester-2.0.jar | |-- uima-an-alchemy-2.3.1.jar | |-- uima-an-calais-2.3.1.jar | |-- uima-an-tagger-2.3.1.jar | |-- uima-an-wst-2.3.1.jar | `-- uimaj-core-2.3.1.jar `-- velocity `-- lib |-- commons-beanutils-1.7.0.jar |-- commons-collections-3.2.1.jar |-- velocity-1.6.4.jar `-- velocity-tools-2.0.jar
Tried to cleanup/simplify your ebuild a bit: https://gitorious.org/drzraf/gentoo/commit/5a0af868a01ba9fa06110c067f934c501714fdf0
for those still interested, here is ebuild for latest (binary) solr package: https://cgit.gentoo.org/dev/fordfrog.git/tree/dev-db/apache-solr-bin it is still work in progress. due to the large amount of deps, i decided not to build it from source yet, until all or most of the deps are resolved. then building it from source and providing source ebuild will be much easier. at this moment it does not contain init script and conf.d file. i hope to work on these after cca 5 hours (leaving now), unless somebody can provide those in the meantime. one package that can be unbundled but i did not do that is pdfbox. it's because i have issue with compiling gcc-4.9.3 with gcj USE flag and hence install pdfbox and test it with solr. any comments, bug reports, testing feedback, patches etc are welcome.
Thanks a lot Miroslav. Looking forward to a complete ebuild. =]
Hi Ultrabug Apparently, you've also tried to package solr on your own. https://cgit.gentoo.org/dev/ultrabug.git/tree/dev-db/apache-solr/apache-solr-3.6.0.ebuild CCing you in so that you can maybe contribute to this attempt.
i just added the init script. creating core works fine. there's no revbump, just re-emerge the ebuild. any feedback welcome.
Does anybody have ebuild for solr 5.x or 6.x?