mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
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>
This commit is contained in:
parent
6ea40344fa
commit
608d67d39e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421815
2
GIDs
2
GIDs
@ -102,7 +102,7 @@ barman:*:157:
|
||||
pootle:*:158:
|
||||
nocat:*:159:
|
||||
_ypldap:*:160:
|
||||
# free: 161
|
||||
solr:*:161:
|
||||
# free: 162
|
||||
# free: 163
|
||||
# free: 164
|
||||
|
2
UIDs
2
UIDs
@ -107,7 +107,7 @@ barman:*:157:157::0:0:Barman user:/var/barman:/bin/sh
|
||||
pootle:*:158:158::0:0:Pootle User:/var/db/pootle:/usr/sbin/nologin
|
||||
nocat:*:159:159::0:0:NoCat Daemon:/libexec/nocat:/sbin/nologin
|
||||
_ypldap:*:160:160::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin
|
||||
# free: 161
|
||||
solr:*:161:161::0:0:Apache Solr System:/var/db/solr:/usr/sbin/nologin
|
||||
# free: 162
|
||||
# free: 163
|
||||
# free: 164
|
||||
|
@ -2,36 +2,52 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= apache-solr
|
||||
PORTVERSION= 5.5.2
|
||||
PORTVERSION= 6.2.0
|
||||
CATEGORIES= textproc java
|
||||
MASTER_SITES= APACHE/lucene/solr/${PORTVERSION}
|
||||
DISTNAME= solr-${PORTVERSION}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= idefix@fechner.net
|
||||
COMMENT= High performance search server built using Lucene Java
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
CONFLICT= apache-solr3-* apache-solr-4*
|
||||
CONFLICTS_INSTALL= apache-solr3-* apache-solr-4* apache-solr-5*
|
||||
|
||||
RUN_DEPENDS= bash:shells/bash \
|
||||
lsof:sysutils/lsof
|
||||
|
||||
USES= cpe tar:tgz
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.7+
|
||||
JAVA_VERSION= 1.8+
|
||||
JAVA_RUN= yes
|
||||
NO_BUILD= yes
|
||||
NO_ARCH= yes
|
||||
PLIST_SUB+= PORTVERSION="${PORTVERSION}"
|
||||
PORTEXAMPLES= *
|
||||
SUB_FILES= pkg-message pkg-install
|
||||
USE_RC_SUBR= solr
|
||||
USERS= solr
|
||||
GROUPS= ${USERS}
|
||||
|
||||
CPE_PRODUCT= solr
|
||||
CPE_VENDOR= apache
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|solr.log=.*|solr.log=/var/log/solr|g' ${WRKSRC}/server/resources/log4j.properties
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC}/dist && ${COPYTREE_SHARE} . ${STAGEDIR}${JAVAJARDIR}
|
||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
||||
cd ${WRKSRC}/server && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/solr ${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/post ${STAGEDIR}${PREFIX}/bin
|
||||
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/solr ${STAGEDIR}${PREFIX}/${CPE_PRODUCT}/bin
|
||||
${INSTALL_DATA} ${WRKSRC}/bin/solr.in.sh ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
${ECHO} SOLR_HOME=\"/var/db/solr\" >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
${ECHO} LOG4J_PROPS=\"/var/db/solr/log4j.properties\" >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
${ECHO} SOLR_LOGS_DIR=\"/var/log/solr\" >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
${ECHO} SOLR_PORT=\"8983\" >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
${ECHO} SOLR_PID_DIR=\"/var/db/solr\" >> ${STAGEDIR}${PREFIX}/etc/solr.in.sh-dist
|
||||
|
||||
${MKDIR} ${STAGEDIR}/var/db/solr
|
||||
${MKDIR} ${STAGEDIR}/var/log/solr
|
||||
${INSTALL_DATA} ${WRKSRC}/server/solr/solr.xml ${STAGEDIR}/var/db/solr/solr.xml-dist
|
||||
${INSTALL_DATA} ${WRKSRC}/server/resources/log4j.properties ${STAGEDIR}/var/db/solr/log4j.properties-dist
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1469167224
|
||||
SHA256 (solr-5.5.2.tgz) = e62bab565675e10d27f40d5bb090b4181b2f0c21870adf98d1ea873ead7758e1
|
||||
SIZE (solr-5.5.2.tgz) = 136813192
|
||||
TIMESTAMP = 1472734642
|
||||
SHA256 (solr-6.2.0.tgz) = ba7c93e1c8d28717d6d84788ebdc2e8e9211a32f48b5a30b2a904762a0b7cd39
|
||||
SIZE (solr-6.2.0.tgz) = 149049622
|
||||
|
18
textproc/apache-solr/files/patch-bind-localhost.patch
Normal file
18
textproc/apache-solr/files/patch-bind-localhost.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- server/etc/jetty-http.xml.bak 2016-09-01 16:16:13.027176858 +0200
|
||||
+++ server/etc/jetty-http.xml 2016-09-01 16:16:40.498173610 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
- <Set name="host"><Property name="jetty.host" /></Set>
|
||||
+ <Set name="host"><Property name="jetty.host" default="localhost" /></Set>
|
||||
<Set name="port"><Property name="jetty.port" default="8983" /></Set>
|
||||
<Set name="idleTimeout"><Property name="solr.jetty.http.idleTimeout" default="50000"/></Set>
|
||||
<Set name="soLingerTime"><Property name="solr.jetty.http.soLingerTime" default="-1"/></Set>
|
||||
@@ -44,4 +44,4 @@
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
-</Configure>
|
||||
\ No newline at end of file
|
||||
+</Configure>
|
22
textproc/apache-solr/files/pkg-install.in
Normal file
22
textproc/apache-solr/files/pkg-install.in
Normal file
@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
PATH=/bin:/usr/bin:/usr/sbin
|
||||
|
||||
set -e
|
||||
case "$2" in
|
||||
|
||||
POST-INSTALL)
|
||||
echo "---> Starting post-install script"
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
echo "Fix permissions"
|
||||
/usr/sbin/chown -R solr /var/db/solr
|
||||
/usr/bin/chgrp -R solr /var/db/solr
|
||||
/usr/sbin/chown -R solr /var/log/solr
|
||||
/usr/bin/chgrp -R solr /var/log/solr
|
||||
echo "done."
|
||||
echo ""
|
||||
|
||||
;;
|
||||
esac
|
31
textproc/apache-solr/files/pkg-message.in
Normal file
31
textproc/apache-solr/files/pkg-message.in
Normal file
@ -0,0 +1,31 @@
|
||||
=======================================================================
|
||||
|
||||
Make sure to edit the following files to adapt to your setup:
|
||||
|
||||
%%LOCALBASE%%/etc/solr.in.sh
|
||||
/var/db/solr/solr.xml
|
||||
/var/db/solr/log4j.properties
|
||||
|
||||
All files are configured to have your solr instances running in
|
||||
/var/db/solr/<instancename>
|
||||
|
||||
For more information how to configure solr check the manual:
|
||||
http://lucene.apache.org/solr/resources.html#documentation
|
||||
|
||||
The port is configured to listen only on localhost, port 8983.
|
||||
|
||||
To have a working initial config, use:
|
||||
|
||||
cp -R %%LOCALBASE%%/solr/example/example-DIH/solr/solr /var/db/solr/
|
||||
chown -R www /var/db/solr/solr
|
||||
|
||||
To rotate solr log files include /var/log/solr/ to your log rotation
|
||||
configuration.
|
||||
|
||||
To enable the port execute:
|
||||
sysrc solr_enable="YES"
|
||||
|
||||
And start it with:
|
||||
service solr start
|
||||
|
||||
=======================================================================
|
@ -39,12 +39,30 @@ load_rc_config $name
|
||||
: ${solr_enable:=NO}
|
||||
: ${solr_instance:=/var/db/solr}
|
||||
|
||||
required_files=${solr_instance}/solr.xml
|
||||
pidfile=/var/run/solr.pid
|
||||
command=/usr/sbin/daemon
|
||||
procname=`env JAVAVM_DRYRUN=true JAVA_VERSION=1.7+ %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -f 2 -d =`
|
||||
start_precmd="cd %%EXAMPLESDIR%%"
|
||||
solr_start ()
|
||||
{
|
||||
su -m solr -c "${command} start"
|
||||
}
|
||||
|
||||
command_args="-f -p ${pidfile} ${procname} ${solr_flags} -Dsolr.solr.home=${solr_instance} -Dsolr.log=/var/log -jar %%EXAMPLESDIR%%/start.jar"
|
||||
solr_stop ()
|
||||
{
|
||||
su -m solr -c "${command} stop"
|
||||
}
|
||||
|
||||
solr_status ()
|
||||
{
|
||||
su -m solr -c "${command} status"
|
||||
}
|
||||
|
||||
# add %%PREFIX%%/bin to path
|
||||
export PATH=$PATH:%%PREFIX%%/bin
|
||||
# let the start script read some custom settings
|
||||
export SOLR_INCLUDE=/usr/local/etc/solr.in.sh
|
||||
|
||||
required_files="${solr_instance}/solr.xml /usr/local/etc/solr.in.sh ${solr_instance}/log4j.properties"
|
||||
command=%%PREFIX%%/solr/bin/solr
|
||||
start_cmd=solr_start
|
||||
stop_cmd=solr_stop
|
||||
status_cmd=solr_status
|
||||
|
||||
run_rc_command "$1"
|
||||
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Removes jetty war cache
|
||||
#
|
||||
if [ "$2" = "DEINSTALL" ]; then
|
||||
rm -rf $PKG_PREFIX/share/examples/apache-solr/solr-webapp/*
|
||||
fi
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user