Bug 201455 - textproc/apache-solr: update 5.5.2 to 6.20
Summary: textproc/apache-solr: update 5.5.2 to 6.20
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kurt Jaeger
URL:
Keywords:
: 201646 (view as bug list)
Depends on: 212313
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-10 12:06 UTC by Matthias Fechner
Modified: 2016-09-11 11:46 UTC (History)
6 users (show)

See Also:


Attachments
more cleanups (61.96 KB, patch)
2015-08-23 11:08 UTC, Kurt Jaeger
no flags Details | Diff
cleanup with solr 5.3.0 (84.46 KB, patch)
2015-08-23 11:30 UTC, Kurt Jaeger
no flags Details | Diff
Upgraded to version 6.2.0 and tested successfully. (488.32 KB, patch)
2016-09-01 21:56 UTC, Matthias Fechner
no flags Details | Diff
Error: Orphaned: @dir /var/db/solr Error: Orphaned: @dir /var/log/solr (488.36 KB, patch)
2016-09-01 22:01 UTC, Matthias Fechner
no flags Details | Diff
Upgraded to version 6.2.0 and tested successfully. (488.36 KB, patch)
2016-09-01 22:02 UTC, Matthias Fechner
no flags Details | Diff
Provide config files now with the @sample method. (488.45 KB, patch)
2016-09-11 08:13 UTC, Matthias Fechner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer freebsd_triage 2015-07-10 12:06:13 UTC
Version 4.10.4 was deployed as war file and I used it together with jetty which worked fine.
The new version 5 seems to have now everything on board to run as standalone application.
I configured to necessary parameters in /etc/rc.conf to point to currect solr_instance and to enable the startup script.

But it fails to execute.
Reason is the file /usr/local/share/examples/apache-solr/start.jar is not existing as required by the startup script.

Could you please ass this script to the package?
Comment 1 Paul Mather 2015-07-15 23:24:45 UTC
As of Solr 5, the startup mechanism has changed dramatically.  In the "Major Changes from Solr 4 to Solr 5" page, https://cwiki.apache.org/confluence/display/solr/Major+Changes+from+Solr+4+to+Solr+5 there is a "Solr is a Standalone Server" section that explains that Solr 5 is meant to be a standalone Java application now.  It now includes a bin/ directory in the distribution that has a "solr" script that is used to start, stop, and otherwise interact with Solr 5.  This bin/ directory (along with the example server/ directory) are missing from the current installed FreeBSD textproc/apache-solr port.

Furthermore, in the "Upgrading from Older Versions of Solr" section of the "Upgrading Solr" page, https://cwiki.apache.org/confluence/display/solr/Upgrading+Solr it says the following:

"Solr has internally been upgraded to use Jetty 9. See SOLR-4839 for full details, but there are a few key details all Solr users should know when upgrading:

- It is no longer possible to run "java -jar start.jar" from inside the server directory. The bin/solr script is the only supported way to run Solr. This is necessary to support HTTP and HTTPS modules in Jetty which can be selectively enabled by the bin/solr scripts.

- The way SSL support is configured has been changed. Please refer to the Enabling SSL section in the Solr Reference Guide for complete details."

So, running via "start.jar" likely won't fix the issue in a proper way.  (The start.jar JAR file is in the missing server/ directory of the Solr 5.2.1 distribution.)

I did test starting and stopping Solr 5 via the bin/solr script provided in the distribution and it did appear to work for me.  That might be a good starting point for updating the rc.d script.  Note, however, I haven't checked the bin/solr script for dependencies.  At the very least, it appears to use bash and implies it also needs curl...
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-03 13:59:46 UTC
@work
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-03 17:14:06 UTC
*** Bug 201646 has been marked as a duplicate of this bug. ***
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-03 17:15:13 UTC
The problems are my fault: At that time I had no test case, I now have one.
A first update will have the necessary files, while I work on the startup script
and README.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-08-03 19:37:02 UTC
A commit references this bug:

Author: pi
Date: Mon Aug  3 19:36:09 UTC 2015
New revision: 393488
URL: https://svnweb.freebsd.org/changeset/ports/393488

Log:
  textproc/apache-solr: fixing the port, providing missing files

  - Provide missing files like bin/solr and bin/post
  - still open: provide a working startup script and some instructions
    on how to configure

  PR:		201455
  Submitted by:	idefix@fechner.net, elferdo@gmail.com

Changes:
  head/textproc/apache-solr/Makefile
  head/textproc/apache-solr/pkg-plist
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-23 11:08:44 UTC
Created attachment 160242 [details]
more cleanups

  o revert apache-solr from 5* to the working 4.10.4
  o svn move apache-solr apache-solr4
  o document the move in MOVED
  o change CONFLICTS in solr4 
  o change CONFLICTS in solr3
  o add apache-solr5

TODO: needs review
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2015-08-23 11:30:12 UTC
Created attachment 160243 [details]
cleanup with solr 5.3.0
Comment 8 Larry Rosenman freebsd_committer freebsd_triage 2015-10-14 14:08:03 UTC
Is there any chance of getting a working apache-solr5 into the tree?  the current apache-solr port doesn't work. 

I'm interested in helping if I can, but this work looks useful.
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-15 18:17:15 UTC
Today I finally got down to a working testcase for solr 4.8.1 and
can now try to get this back in working order. Sorry for the delay.
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-15 18:30:26 UTC
Can you test the startup-script in the solr5 port ?
Comment 11 Matthias Fechner freebsd_committer freebsd_triage 2016-09-01 21:56:48 UTC
Created attachment 174301 [details]
Upgraded to version 6.2.0 and tested successfully.
Comment 12 Matthias Fechner freebsd_committer freebsd_triage 2016-09-01 22:01:33 UTC
Created attachment 174302 [details]
Error: Orphaned: @dir /var/db/solr Error: Orphaned: @dir /var/log/solr
Comment 13 Matthias Fechner freebsd_committer freebsd_triage 2016-09-01 22:02:38 UTC
Created attachment 174303 [details]
Upgraded to version 6.2.0 and tested successfully.
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-02 06:51:02 UTC
testbuilds@work, will take some time...
Comment 15 Matthias Fechner freebsd_committer freebsd_triage 2016-09-11 08:13:07 UTC
Created attachment 174646 [details]
Provide config files now with the @sample method.
Comment 16 commit-hook freebsd_committer freebsd_triage 2016-09-11 11:43:41 UTC
A commit references this bug:

Author: pi
Date: Sun Sep 11 11:43:37 UTC 2016
New revision: 421815
URL: https://svnweb.freebsd.org/changeset/ports/421815

Log:
  textproc/apache-solr: 5.5.2 -> 6.2.0

  - submitter becomes maintainer

  PR:		201455,	212313
  Changes:	https://lucene.apache.org/solr/6_2_0/changes/Changes.html
  Submitted by:	Matthias Fechner <idefix@fechner.net>

Changes:
  head/GIDs
  head/UIDs
  head/textproc/apache-solr/Makefile
  head/textproc/apache-solr/distinfo
  head/textproc/apache-solr/files/patch-bind-localhost.patch
  head/textproc/apache-solr/files/pkg-install.in
  head/textproc/apache-solr/files/pkg-message.in
  head/textproc/apache-solr/files/solr.in
  head/textproc/apache-solr/pkg-deinstall
  head/textproc/apache-solr/pkg-plist
Comment 17 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-11 11:46:56 UTC
Committed, thanks!