Index: head/net/activemq/Makefile =================================================================== --- head/net/activemq/Makefile (revision 499240) +++ head/net/activemq/Makefile (revision 499241) @@ -1,74 +1,72 @@ # $FreeBSD$ PORTNAME= activemq PORTVERSION= 5.15.9 +PORTREVISION= 1 CATEGORIES= net java MASTER_SITES= APACHE/${PORTNAME}/${PORTVERSION} DISTNAME= apache-${PORTNAME}-${PORTVERSION} EXTRACT_SUFX= -bin.tar.gz MAINTAINER= tobik@FreeBSD.org COMMENT= Messaging and Integration Patterns provider LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= cpe CPE_VENDOR= apache USE_JAVA= yes JAVA_VERSION= 1.7+ NO_ARCH= yes NO_BUILD= yes MQDB?= /var/db/activemq MQUSER?= activemq MQGROUP?= ${MQUSER} USERS= ${MQUSER} GROUPS= ${MQGROUP} ALL_TARGET= ${PORTNAME} USE_RC_SUBR= ${PORTNAME} PORTDATA= * PORTDOCS= * PORTEXAMPLES= * SUB_LIST= MQUSER="${MQUSER}" \ MQGROUP="${MQGROUP}" \ MQDB="${MQDB}" PLIST_SUB= MQUSER="${MQUSER}" \ MQGROUP="${MQGROUP}" \ MQDB="${MQDB}" OPTIONS_DEFINE= DOCS EXAMPLES -post-patch: - @${REINPLACE_CMD} -i '' -e 's|activemq.base}/data|activemq.logs}|g' \ - ${WRKSRC}/conf/log4j.properties - do-install: @${MKDIR} ${STAGEDIR}${DATADIR}/bin ${STAGEDIR}${ETCDIR} ${STAGEDIR}${MQDB} + ${RM} ${WRKSRC}/conf/log4j.properties.orig cd ${WRKSRC}/conf && for f in *; do \ ${INSTALL_DATA} ${WRKSRC}/conf/$$f ${STAGEDIR}${ETCDIR}/$$f.sample; \ done ${INSTALL_SCRIPT} ${WRKSRC}/bin/activemq* ${STAGEDIR}${DATADIR}/bin ${RLN} ${STAGEDIR}${DATADIR}/bin/activemq ${STAGEDIR}${PREFIX}/bin ${RLN} ${STAGEDIR}${DATADIR}/bin/activemq-diag ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/bin/activemq.jar ${WRKSRC}/bin/wrapper.jar \ ${STAGEDIR}${DATADIR}/bin ${RLN} ${STAGEDIR}${MQDB} ${STAGEDIR}${DATADIR}/data ${RLN} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${DATADIR}/conf cd ${WRKSRC} && ${COPYTREE_SHARE} "lib webapps webapps-demo" \ ${STAGEDIR}${DATADIR} do-install-DOCS-on: cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR} ${RLN} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DATADIR}/docs do-install-EXAMPLES-on: cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} ${RLN} ${STAGEDIR}${EXAMPLESDIR} ${STAGEDIR}${DATADIR}/examples .include Index: head/net/activemq/files/activemq.in =================================================================== --- head/net/activemq/files/activemq.in (revision 499240) +++ head/net/activemq/files/activemq.in (revision 499241) @@ -1,141 +1,141 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: activemq # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # activemq_enable (bool): Set to NO by default. # Set it to YES to enable activemq. # activemq_user (username): Set to activemq by default. # Set it to required username. # activemq_group (group): Set to activemq by default. # Set it to required group. # activemq_classpath (path): Set to %%DATADIR%% by default. # Set it to java classes directory. # activemq_home (path): Set to %%DATADIR%% by default. # Set it to java home directory. # activemq_javargs (args): Set to -Xmx256M by default. # See java -h for available arguments. # activemq_stop_timeout (num): Set to "10" by default. # Set the timeout in seconds to shutdown. # . /etc/rc.subr name="activemq" rcvar=activemq_enable load_rc_config $name # Set defaults : ${activemq_enable:=NO} : ${activemq_user:=%%MQUSER%%} : ${activemq_group:=%%MQGROUP%%} : ${activemq_classpath:=%%ETCDIR%%} : ${activemq_conf:=%%ETCDIR%%} : ${activemq_data:=%%MQDB%%} : ${activemq_logs:=/var/log/activemq} : ${activemq_home:=%%DATADIR%%} : ${activemq_javargs:='-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote'} : ${activemq_stop_timeout:="10"} : ${activemq_hostname:=`/bin/hostname`} pidfile=/var/run/${name}.pid required_files="%%ETCDIR%%/activemq.xml" jar_file="%%DATADIR%%/bin/activemq.jar" java_options=" -server -jar ${activemq_javargs} \ -Dactivemq.classpath=${activemq_classpath} \ -Dactivemq.conf=${activemq_conf} \ -Dactivemq.data=${activemq_data} \ -Dactivemq.logs=${activemq_logs} \ -Dactivemq.home=${activemq_home} \ -Dactivemq.base=${activemq_home} \ -Dactivemq.hostname=${activemq_hostname}" java_command="%%LOCALBASE%%/bin/java ${java_options} ${jar_file}" command="/usr/sbin/daemon" command_args="-f -p ${pidfile} ${java_command} start" start_precmd="activemq_precmd" status_cmd="activemq_status" stop_cmd="activemq_stop" activemq_precmd() { touch ${pidfile} chown ${activemq_user}:${activemq_group} ${pidfile} /usr/bin/install -d -m 0750 -o ${activemq_user} -g ${activemq_group} ${activemq_logs} /usr/bin/install -d -m 0750 -o ${activemq_user} -g ${activemq_group} ${activemq_data} } activemq_stop() { rc_pid=$(activemq_check_pidfile $pidfile) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0 echo "${name} not running? (check $pidfile)." return 1 fi echo "Stopping ${name}." - ${java_command} stop >/dev/null + /usr/bin/su -m $activemq_user -c "${java_command} stop" >/dev/null activemq_wait_max_for_pid ${activemq_stop_timeout} ${rc_pid} kill -KILL ${rc_pid} 2> /dev/null && echo "Killed." rm -f ${pidfile} } activemq_status() { rc_pid=$(activemq_check_pidfile $pidfile) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0 echo "${name} not running? (check $pidfile)." return 1 fi echo "${name} is running as pid ${rc_pid}." } activemq_check_pidfile() { _pidfile=$1 if [ -z "$_pidfile" ]; then err 3 'USAGE: activemq_check_pidfile pidfile' fi if [ ! -f $_pidfile ]; then debug "pid file ($_pidfile): not readable." return fi read _pid _junk < $_pidfile if [ -z "$_pid" ]; then debug "pid file ($_pidfile): no pid in file." return fi if [ -n "`/usr/bin/su -m $activemq_user -c '%%LOCALBASE%%/bin/jps -l' | grep -e "^$_pid $jar_file\$"`" ]; then echo -n $_pid fi } activemq_wait_max_for_pid() { _timeout=$1 shift _pid=$1 _prefix= while [ $_timeout -gt 0 ] ; do echo -n ${_prefix:-"Waiting (max $_timeout secs) for PIDS: "}$_pid _prefix=", " sleep 2 kill -0 $_pid 2> /dev/null || break _timeout=$(($_timeout-2)) done if [ -n "$_prefix" ]; then echo "." fi } run_rc_command "$1" Index: head/net/activemq/files/patch-conf_log4j.properties =================================================================== --- head/net/activemq/files/patch-conf_log4j.properties (nonexistent) +++ head/net/activemq/files/patch-conf_log4j.properties (revision 499241) @@ -0,0 +1,20 @@ +--- conf/log4j.properties.orig 2019-03-15 12:04:19 UTC ++++ conf/log4j.properties +@@ -44,7 +44,7 @@ log4j.appender.console.threshold=INFO + + # File appender + log4j.appender.logfile=org.apache.log4j.RollingFileAppender +-log4j.appender.logfile.file=${activemq.data}/activemq.log ++log4j.appender.logfile.file=${activemq.logs}/activemq.log + log4j.appender.logfile.maxFileSize=1024KB + log4j.appender.logfile.maxBackupIndex=5 + log4j.appender.logfile.append=true +@@ -70,7 +70,7 @@ log4j.additivity.org.apache.activemq.audit=false + log4j.logger.org.apache.activemq.audit=INFO, audit + + log4j.appender.audit=org.apache.log4j.RollingFileAppender +-log4j.appender.audit.file=${activemq.data}/audit.log ++log4j.appender.audit.file=${activemq.logs}/audit.log + log4j.appender.audit.maxFileSize=1024KB + log4j.appender.audit.maxBackupIndex=5 + log4j.appender.audit.append=true Property changes on: head/net/activemq/files/patch-conf_log4j.properties ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property