From owner-svn-ports-head@freebsd.org Sun Jul 26 17:48:43 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 431123672C3; Sun, 26 Jul 2020 17:48:43 +0000 (UTC) (envelope-from dvl@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4BF9Qz0zDWz3bXK; Sun, 26 Jul 2020 17:48:43 +0000 (UTC) (envelope-from dvl@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 049E910914; Sun, 26 Jul 2020 17:48:43 +0000 (UTC) (envelope-from dvl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06QHmgUC011515; Sun, 26 Jul 2020 17:48:42 GMT (envelope-from dvl@FreeBSD.org) Received: (from dvl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06QHmfsk011510; Sun, 26 Jul 2020 17:48:41 GMT (envelope-from dvl@FreeBSD.org) Message-Id: <202007261748.06QHmfsk011510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dvl set sender to dvl@FreeBSD.org using -f From: Dan Langille Date: Sun, 26 Jul 2020 17:48:41 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: dvl X-SVN-Commit-Paths: in head: . net-mgmt/librenms net-mgmt/librenms/files X-SVN-Commit-Revision: 543487 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2020 17:48:43 -0000 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 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 } ]