From owner-svn-ports-branches@freebsd.org Sun Apr 29 14:18:47 2018 Return-Path: Delivered-To: svn-ports-branches@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 2D97FFADF3C; Sun, 29 Apr 2018 14:18:47 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D40567CC5D; Sun, 29 Apr 2018 14:18:46 +0000 (UTC) (envelope-from woodsb02@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 CBBDD25681; Sun, 29 Apr 2018 14:18:46 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3TEIkZm096577; Sun, 29 Apr 2018 14:18:46 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3TEIkuZ096575; Sun, 29 Apr 2018 14:18:46 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201804291418.w3TEIkuZ096575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Sun, 29 Apr 2018 14:18:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r468629 - in branches/2018Q2/sysutils/zrepl: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: in branches/2018Q2/sysutils/zrepl: . files X-SVN-Commit-Revision: 468629 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2018 14:18:47 -0000 Author: woodsb02 Date: Sun Apr 29 14:18:46 2018 New Revision: 468629 URL: https://svnweb.freebsd.org/changeset/ports/468629 Log: MFH: r468402 sysutils/zrepl: Fix rc.d init script on FreeBSD < 11.1 This change removes the daemon syslog feature on FreeBSD < 11.1. This has little effect to the usefulness of zrepl logging, as the daemon itself has inbuilt syslog support which is enabled by default in the sample config file /usr/local/etc/zrepl/zrepl.yml. The only output to stdout/stderr from zrepl will be if its inbuilt syslog feature is not working. PR: 224844 Reported by: Bernhard Approved by: ports-secteam (riggs) Modified: branches/2018Q2/sysutils/zrepl/Makefile branches/2018Q2/sysutils/zrepl/files/zrepl.in Directory Properties: branches/2018Q2/ (props changed) Modified: branches/2018Q2/sysutils/zrepl/Makefile ============================================================================== --- branches/2018Q2/sysutils/zrepl/Makefile Sun Apr 29 13:35:08 2018 (r468628) +++ branches/2018Q2/sysutils/zrepl/Makefile Sun Apr 29 14:18:46 2018 (r468629) @@ -3,6 +3,7 @@ PORTNAME= zrepl PORTVERSION= 0.0.2 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= woodsb02@FreeBSD.org @@ -35,6 +36,14 @@ GH_TUPLE= davecgh:go-spew:v1.1.0:go_spew/src/github.co GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} +.include + +.if ${OPSYS} == "FreeBSD" && ((${OSVERSION} >= 1100513 && ${OSVERSION} < 1200000) || ${OSVERSION} >= 1200015) +SUB_LIST+= DAEMON_LOGGING="-S -l \$${zrepl_facility} -s \$${zrepl_priority} -T \$${name}" +.else +SUB_LIST+= DAEMON_LOGGING="" +.endif + post-extract: ${LN} -sf ${WRKSRC}/src ${WRKDIR} @@ -49,4 +58,4 @@ post-install: ${INSTALL_DATA} ${FILESDIR}/syslog-zrepl.conf.sample ${STAGEDIR}${PREFIX}/etc/syslog.d/zrepl.conf.sample ${INSTALL_DATA} ${FILESDIR}/zrepl.yml.sample ${STAGEDIR}${PREFIX}/etc/zrepl/zrepl.yml.sample -.include +.include Modified: branches/2018Q2/sysutils/zrepl/files/zrepl.in ============================================================================== --- branches/2018Q2/sysutils/zrepl/files/zrepl.in Sun Apr 29 13:35:08 2018 (r468628) +++ branches/2018Q2/sysutils/zrepl/files/zrepl.in Sun Apr 29 14:18:46 2018 (r468629) @@ -9,18 +9,24 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# zrepl_enable: Set to YES to enable the zrepl service. +# zrepl_enable (bool): Set to YES to enable the zrepl service. # Default: NO -# zrepl_config: File containing zrepl configuration details. +# zrepl_config (str): File containing zrepl configuration details. # Default: %%PREFIX%%/etc/zrepl/zrepl.yml -# zrepl_user: The user account used to run the zrepl daemon. +# zrepl_user (str): The user account used to run the zrepl daemon. # Do not specifically set this to an empty string as this # will cause the daemon to run as root. # Default: root -# zrepl_group: The group account used to run the zrepl daemon. +# zrepl_group (str): The group account used to run the zrepl daemon. # Do not specifically set this to an empty string as this # will cause the daemon to run with group wheel. # Default: wheel +# zrepl_flags (str): Extra flags passed to zrepl +# Default: "" +# zrepl_facility (str): Syslog facility to use +# Default: local0 +# zrepl_priority (str): Syslog priority to use +# Default: alert . /etc/rc.subr name=zrepl @@ -31,13 +37,19 @@ load_rc_config $name : ${zrepl_config:="%%PREFIX%%/etc/zrepl/zrepl.yml"} : ${zrepl_user:="root"} : ${zrepl_group:="wheel"} +: ${zrepl_flags:=""} +: ${zrepl_facility:="local0"} +: ${zrepl_priority:="alert"} +: ${zrepl_options:="${zrepl_flags} --config ${zrepl_config} daemon"} pidfile="/var/run/zrepl/daemon.pid" command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/zrepl" -command_args="-p ${pidfile} -S -l local0 -s alert -T zrepl ${procname} --config ${zrepl_config} daemon" +command_args="-p ${pidfile} %%DAEMON_LOGGING%% ${procname} ${zrepl_options}" start_precmd=zrepl_precmd +stop_postcmd=zrepl_postcmd + zrepl_precmd() { if [ ! -d "/var/run/zrepl/stdinserver" ]; then @@ -50,7 +62,6 @@ zrepl_precmd() fi } -stop_postcmd=zrepl_postcmd zrepl_postcmd() { rm -f -- "${pidfile}"