Date: Sun, 26 Jul 2020 17:48:41 +0000 (UTC) From: Dan Langille <dvl@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r543487 - in head: . net-mgmt/librenms net-mgmt/librenms/files Message-ID: <202007261748.06QHmfsk011510@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dvl Date: Sun Jul 26 17:48:41 2020 New Revision: 543487 URL: https://svnweb.freebsd.org/changeset/ports/543487 Log: Fix double logging HEADS UP: See UPDATING for changes affecting your upgrade. New installs not affected. This patch adds a new rc_variable: librenms_daemonflags The -T option is gone as that will force a log to syslog, doubling up on log entries. A new APP_LOG setting has been added to the .env file. Please update and move your logs. See UPDATING. PR: 246598 Submitted by: Dries Michiels <driesm.michiels@gmail.com> Modified: head/UPDATING head/net-mgmt/librenms/Makefile head/net-mgmt/librenms/files/librenms.in head/net-mgmt/librenms/files/patch-.env.example head/net-mgmt/librenms/files/pkg-message.in Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jul 26 15:31:18 2020 (r543486) +++ head/UPDATING Sun Jul 26 17:48:41 2020 (r543487) @@ -6,6 +6,18 @@ You should get into the habit of checking this file fo you update your ports collection, before attempting any port upgrades. +20200726: + AFFECTS: users of net-mgmt/librenms + AUTHOR: dvl@FreeBSD.org + + The %%WWWDIR%%%/logs directory has been relocated to /var/log/librenms/ + via the APP_LOG directive in %%WWWDIR%%%/.env.example - this won't affect + existing installs, but you are strongly encouraged to update your .env file + settings and relocate your logs. + + Logs which were going to /var/log/messages and /var/log/librenms/ now only go + to /var/log/librenms/ + 20200720: AFFECTS: users of net-mgmt/librenms AUTHOR: dvl@FreeBSD.org Modified: head/net-mgmt/librenms/Makefile ============================================================================== --- head/net-mgmt/librenms/Makefile Sun Jul 26 15:31:18 2020 (r543486) +++ head/net-mgmt/librenms/Makefile Sun Jul 26 17:48:41 2020 (r543487) @@ -3,7 +3,7 @@ PORTNAME= librenms PORTVERSION= 1.65.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= LOCAL/dvl:vendor @@ -109,7 +109,7 @@ ROOT_FILES= addhost.php adduser.php alerts.php artisan SCRIPT_FILES= daily.sh lnms -ROOT_DIRS= LibreNMS app bootstrap config contrib database doc html includes licenses logs mibs misc resources routes scripts sql-schema storage tests +ROOT_DIRS= LibreNMS app bootstrap config contrib database doc html includes licenses mibs misc resources routes scripts sql-schema storage tests # these are directories which require a generic @DIR entry in pkg-plist OTHER_DIRS= html/js/lang \ @@ -134,6 +134,7 @@ post-patch: @${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/includes/common.php @${REINPLACE_CMD} 's|%%RELEASE_TIMESTAMP%%|${RELEASE_TIMESTAMP}|g' ${WRKSRC}/includes/common.php @${RM} ${WRKSRC}/LibreNMS/Validations/Updates.php + @${RM} -rf ${WRKSRC}/logs do-install: ${MKDIR} ${STAGEDIR}/${WWWDIR} @@ -186,7 +187,6 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/.env.example ${STAGEDIR}/${WWWDIR} @${ECHO_CMD} "@(root,www,0750) ${WWWDIR}/.env.example" >> ${TMPPLIST} - @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/logs" >> ${TMPPLIST} @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/bootstrap/cache" >> ${TMPPLIST} @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage" >> ${TMPPLIST} @${ECHO_CMD} "@dir(www,www,0775) ${WWWDIR}/storage/framework/cache" >> ${TMPPLIST} Modified: head/net-mgmt/librenms/files/librenms.in ============================================================================== --- head/net-mgmt/librenms/files/librenms.in Sun Jul 26 15:31:18 2020 (r543486) +++ head/net-mgmt/librenms/files/librenms.in Sun Jul 26 17:48:41 2020 (r543487) @@ -17,6 +17,8 @@ # Default: %%GROUP%% # librenms_pid: Path of the pid file. # Default /var/run/librenms/librenms.pid +# librenms_daemonflags: Flags passed to daemon(8), overwrite this to use eg syslog +# Default "-o /var/log/librenms/librenms-service.log" # # Contributed by: Dries Michiels (driesm.michiels@gmail.com) @@ -31,6 +33,7 @@ load_rc_config $name : ${librenms_user:="%%USER%%"} : ${librenms_group:="%%GROUP%%"} : ${librenms_pid:="/var/run/librenms/librenms.pid"} +: ${librenms_daemonflags:="-o /var/log/$name/$name-service.log"} pidfile="$librenms_pid" procname="%%PYTHON%%" @@ -44,6 +47,6 @@ librenms_precmd() [ -f /var/log/$name/$name.log ] || install -g $librenms_group -o $librenms_user -m 644 /dev/null /var/log/$name/$name.log } -command_args="-T $name -o /var/log/$name/$name-service.log -p $pidfile $procname %%WWWDIR%%/librenms-service.py" +command_args="$librenms_daemonflags -p $pidfile $procname %%WWWDIR%%/librenms-service.py" run_rc_command "$1" Modified: head/net-mgmt/librenms/files/patch-.env.example ============================================================================== --- head/net-mgmt/librenms/files/patch-.env.example Sun Jul 26 15:31:18 2020 (r543486) +++ head/net-mgmt/librenms/files/patch-.env.example Sun Jul 26 17:48:41 2020 (r543487) @@ -1,6 +1,6 @@ ---- .env.example.orig 2019-01-11 21:46:24 UTC +--- .env.example.orig 2020-07-10 19:56:16 UTC +++ .env.example -@@ -1,8 +1,12 @@ +@@ -1,8 +1,13 @@ APP_KEY= -#DB_HOST= @@ -17,3 +17,4 @@ +DB_PORT=3306 +LIBRENMS_USER=www + ++APP_LOG=/var/log/librenms/librenms.log Modified: head/net-mgmt/librenms/files/pkg-message.in ============================================================================== --- head/net-mgmt/librenms/files/pkg-message.in Sun Jul 26 15:31:18 2020 (r543486) +++ head/net-mgmt/librenms/files/pkg-message.in Sun Jul 26 17:48:41 2020 (r543487) @@ -106,6 +106,11 @@ For more information, see pkg info --pkg-message libre You probably want to install lang/python3 to get validate.php clean. +Logs have been relocated to /var/log/librenms - see UPDATING 20200726 +Logs which were going to /var/log/messages and /var/log/librenms/ now only go +to /var/log/librenms/ + + EOM } ]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007261748.06QHmfsk011510>