FreeBSD Bugzilla – Attachment 241792 Details for
Bug 271100
net/activemq: Version update, explict jdk specification and rc script bug fixes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for the port update.
net_activemq_0001-Made-multiple-changes-allowing-a-fresh-installation-.patch (text/plain), 6.75 KB, created by
James Elstone
on 2023-04-27 16:11:17 UTC
(
hide
)
Description:
Patch for the port update.
Filename:
MIME Type:
Creator:
James Elstone
Created:
2023-04-27 16:11:17 UTC
Size:
6.75 KB
patch
obsolete
>From 762cdcc8f20f56b5791f52a6593260134aec9e8b Mon Sep 17 00:00:00 2001 >From: James Elstone <james@elstone.net> >Date: Thu, 27 Apr 2023 17:08:19 +0100 >Subject: [PATCH] Made multiple changes, allowing a fresh installation to work > out of the box, as well as an upgrade working OK. > >Makefile: > - Bumped to version 5.18.1 > - Added maintainer information > - Specified version of openJDK to use > - Updated initial audit.log and activemq.log to match thoses set in /etc/rc.conf > - Removed .orig file deletion of non-existant file > >distinfo: > - Updated checksum for new distfile > >files/activemq: (activemq rc.d startup file) > - Added explict JAVA_HOME path to use, and defaulted to java/openjdk18 > - Added rc.conf tunable to allow the full java command to be echoed on stdout on service start (debuging for people not so familiar with activemq and how it is envoked) > - Added audit logging to be turned on by default, with explaination in rc file. > - Added Jolokia configuration file path to activemq invokation, supressing null pointer error on start-up > >James. >--- > net/activemq/Makefile | 8 +++-- > net/activemq/distinfo | 6 ++-- > net/activemq/files/activemq.in | 57 ++++++++++++++++++++++++++++------ > 3 files changed, 55 insertions(+), 16 deletions(-) > >diff --git a/net/activemq/Makefile b/net/activemq/Makefile >index 6d85ef5be430..953c048cb821 100644 >--- a/net/activemq/Makefile >+++ b/net/activemq/Makefile >@@ -1,11 +1,11 @@ > PORTNAME= activemq >-PORTVERSION= 5.17.2 >+PORTVERSION= 5.18.1 > CATEGORIES= net java > MASTER_SITES= APACHE/${PORTNAME}/${PORTVERSION} > DISTNAME= apache-${PORTNAME}-${PORTVERSION} > EXTRACT_SUFX= -bin.tar.gz > >-MAINTAINER= ports@FreeBSD.org >+MAINTAINER= james@elstone.net > COMMENT= Messaging and Integration Patterns provider > WWW= https://activemq.apache.org > >@@ -15,6 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE > USES= cpe > CPE_VENDOR= apache > USE_JAVA= yes >+JAVA_VERSION= 18 > USE_RC_SUBR= activemq > > NO_ARCH= yes >@@ -30,7 +31,8 @@ PORTEXAMPLES= * > OPTIONS_DEFINE= DOCS EXAMPLES > > do-install: >- ${RM} ${WRKSRC}/conf/log4j.properties.orig >+ @${REINPLACE_CMD} -i '' -e 's|$\{sys:activemq.data\}\/audit.log|\$\{sys:activemq.logs\}\/audit.log|g' ${WRKSRC}/conf/log4j2.properties >+ @${REINPLACE_CMD} -i '' -e 's|$\{sys:activemq.data\}\/activemq.log|\$\{sys:activemq.logs\}\/activemq.log|g' ${WRKSRC}/conf/log4j2.properties > @${MKDIR} ${STAGEDIR}${ETCDIR} > cd ${WRKSRC}/conf && for f in *; do \ > ${INSTALL_DATA} ${WRKSRC}/conf/$$f ${STAGEDIR}${ETCDIR}/$$f.sample; \ >diff --git a/net/activemq/distinfo b/net/activemq/distinfo >index 71379e3fc510..1b9119985556 100644 >--- a/net/activemq/distinfo >+++ b/net/activemq/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1668099098 >-SHA256 (apache-activemq-5.17.2-bin.tar.gz) = 4216387240ef38e912f88162c52e26128f0f72d15910852d12eb0a7845819195 >-SIZE (apache-activemq-5.17.2-bin.tar.gz) = 48943814 >+TIMESTAMP = 1682592741 >+SHA256 (apache-activemq-5.18.1-bin.tar.gz) = fedd7bde9af5babaeb072bf7aeb2065d9021c26163ded639c87a32d673795472 >+SIZE (apache-activemq-5.18.1-bin.tar.gz) = 49261889 >diff --git a/net/activemq/files/activemq.in b/net/activemq/files/activemq.in >index cc399619b130..3f50839ff9cd 100644 >--- a/net/activemq/files/activemq.in >+++ b/net/activemq/files/activemq.in >@@ -10,19 +10,40 @@ > # > # 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. > # >+# activemq_java_home (path): Set the path to the jvm to use. >+# Set to openJDK18 by default. >+# >+# activemq_debug_precmd (bool): Give java command line that >+# will be run, when started for debugging outside >+# of being demonised. Helpful for people new to >+# activemq. >+# >+# activemq_audit_log (bool): Enable audit logging by default. >+# In production, you will have to evaluate enabling >+# this option (set to NO to disable), as it has >+# disk I/O and storage implications which may >+# impact expected performance. By disabling the >+# audit log, security logging maybe reduced >+# depending on your configuration. > > . /etc/rc.subr > >@@ -42,24 +63,37 @@ load_rc_config $name > : ${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`} >+: ${activemq_java_home:='%%LOCALBASE%%/openjdk18/bin/java'} >+: ${activemq_debug_precmd:=NO} >+: ${activemq_audit_log:=YES} > > 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}" >+activemq_audit_args="" >+if checkyesno activemq_audit_log; then >+ activemq_audit_args="-Dorg.apache.activemq.audit=true" >+fi >+ >+jolokia_conf="file:${activemq_conf}/jolokia-access.xml" >+ >+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} \ >+-Djolokia.conf=${jolokia_conf} \ >+${activemq_audit_args} \ >+-Dactivemq.hostname=${activemq_hostname}" >+ >+java_command="${activemq_java_home} ${java_options} ${jar_file}" > > command="/usr/sbin/daemon" >-command_args="-f -p ${pidfile} ${java_command} start" >+command_args="-p ${pidfile} -o ${activemq_logs}/daemon.log ${java_command} start" > start_precmd="activemq_precmd" > status_cmd="activemq_status" > stop_cmd="activemq_stop" >@@ -69,6 +103,9 @@ activemq_precmd() { > 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} >+ if checkyesno activemq_debug_precmd; then >+ echo "Starting with Java command: ${java_command}" >+ fi > } > > activemq_stop() { >-- >2.40.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271100
:
241791
| 241792