From owner-svn-ports-all@freebsd.org Thu Apr 18 09:03:11 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A9F9158CD9B; Thu, 18 Apr 2019 09:03:11 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 183B984C3B; Thu, 18 Apr 2019 09:03:11 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E02ED1CAD1; Thu, 18 Apr 2019 09:03:10 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3I93AUZ092782; Thu, 18 Apr 2019 09:03:10 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3I93AHr092779; Thu, 18 Apr 2019 09:03:10 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201904180903.x3I93AHr092779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Thu, 18 Apr 2019 09:03:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r499241 - in head/net/activemq: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/net/activemq: . files X-SVN-Commit-Revision: 499241 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 183B984C3B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 09:03:11 -0000 Author: tobik Date: Thu Apr 18 09:03:10 2019 New Revision: 499241 URL: https://svnweb.freebsd.org/changeset/ports/499241 Log: net/activemq: Fix rc script stop command The stop command fails because it cannot connect to activemq, so the rc script currently always kills activemq which might lead to lost data, database corruption, left-over lock files, etc. Run the stop command under the activemq user too like the jps command in activemq_check_pidfile() so that it can actually shutdown activemq. - While here fix log files location PR: 207881 Reported by: bwilliamson@bex.net Added: head/net/activemq/files/patch-conf_log4j.properties (contents, props changed) Modified: head/net/activemq/Makefile head/net/activemq/files/activemq.in Modified: head/net/activemq/Makefile ============================================================================== --- head/net/activemq/Makefile Thu Apr 18 08:26:44 2019 (r499240) +++ head/net/activemq/Makefile Thu Apr 18 09:03:10 2019 (r499241) @@ -2,6 +2,7 @@ PORTNAME= activemq PORTVERSION= 5.15.9 +PORTREVISION= 1 CATEGORIES= net java MASTER_SITES= APACHE/${PORTNAME}/${PORTVERSION} DISTNAME= apache-${PORTNAME}-${PORTVERSION} @@ -43,12 +44,9 @@ PLIST_SUB= MQUSER="${MQUSER}" \ 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 Modified: head/net/activemq/files/activemq.in ============================================================================== --- head/net/activemq/files/activemq.in Thu Apr 18 08:26:44 2019 (r499240) +++ head/net/activemq/files/activemq.in Thu Apr 18 09:03:10 2019 (r499241) @@ -85,7 +85,7 @@ activemq_stop() { 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} Added: head/net/activemq/files/patch-conf_log4j.properties ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/activemq/files/patch-conf_log4j.properties Thu Apr 18 09:03:10 2019 (r499241) @@ -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