From owner-svn-ports-head@freebsd.org Thu Apr 5 16:37:20 2018 Return-Path: Delivered-To: svn-ports-head@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 02523F91C98; Thu, 5 Apr 2018 16:37:20 +0000 (UTC) (envelope-from feld@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 A7534850B1; Thu, 5 Apr 2018 16:37:19 +0000 (UTC) (envelope-from feld@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 86BCA2524B; Thu, 5 Apr 2018 16:37:19 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w35GbJbk009263; Thu, 5 Apr 2018 16:37:19 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w35GbJh4009260; Thu, 5 Apr 2018 16:37:19 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201804051637.w35GbJh4009260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Thu, 5 Apr 2018 16:37:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r466569 - in head/net-mgmt/py-pdagent: . files X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head/net-mgmt/py-pdagent: . files X-SVN-Commit-Revision: 466569 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.25 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: Thu, 05 Apr 2018 16:37:20 -0000 Author: feld Date: Thu Apr 5 16:37:19 2018 New Revision: 466569 URL: https://svnweb.freebsd.org/changeset/ports/466569 Log: net-mgmt/py-pdagent: Add dedicated user/group - Also add pkg-message informing how to permit users and services access PR: 227273 Added: head/net-mgmt/py-pdagent/pkg-message (contents, props changed) Modified: head/net-mgmt/py-pdagent/Makefile head/net-mgmt/py-pdagent/files/pdagentd.in Modified: head/net-mgmt/py-pdagent/Makefile ============================================================================== --- head/net-mgmt/py-pdagent/Makefile Thu Apr 5 16:31:06 2018 (r466568) +++ head/net-mgmt/py-pdagent/Makefile Thu Apr 5 16:37:19 2018 (r466569) @@ -4,6 +4,7 @@ PORTNAME= pdagent PORTVERSION= 1.4 DISTVERSIONPREFIX=v +PORTREVISION= 1 CATEGORIES= net-mgmt python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -25,6 +26,9 @@ GH_ACCOUNT= PagerDuty SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" BINFILES= pd-queue pd-send pdagentd.py + +USERS= pdagent +GROUPS= pdagent do-patch: ${REINPLACE_CMD} -e 's|/var/lib/pdagent|/var/db/pdagent|' -e 's|/etc|${ETCDIR}|' ${WRKSRC}/pdagent/confdirs.py Modified: head/net-mgmt/py-pdagent/files/pdagentd.in ============================================================================== --- head/net-mgmt/py-pdagent/files/pdagentd.in Thu Apr 5 16:31:06 2018 (r466568) +++ head/net-mgmt/py-pdagent/files/pdagentd.in Thu Apr 5 16:37:19 2018 (r466569) @@ -20,8 +20,8 @@ rcvar=pdagentd_enable load_rc_config $name : ${pdagentd_enable="NO"} -: ${pdagentd_user:="nobody"} -: ${pdagentd_group:="nogroup"} +: ${pdagentd_user:="pdagent"} +: ${pdagentd_group:="pdagent"} pidfile="/var/run/pdagent/pdagentd.pid" command="%%PREFIX%%/bin/pdagentd.py" @@ -37,12 +37,10 @@ pdagentd_precmd() install -d -o ${pdagentd_user} -g ${pdagentd_group} -m 775 ${i} done - if [ ! -d /var/log/pdagent ]; then - install -d -o ${pdagentd_user} /var/log/pdagent - fi - if [ ! -d /var/run/pdagent ]; then - install -d -o ${pdagentd_user} /var/run/pdagent - fi + chown -R ${pdagentd_user}:${pdagentd_group} /var/db/pdagent + + install -d -o ${pdagentd_user} /var/log/pdagent + install -d -o ${pdagentd_user} /var/run/pdagent } run_rc_command "$1" Added: head/net-mgmt/py-pdagent/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/py-pdagent/pkg-message Thu Apr 5 16:37:19 2018 (r466569) @@ -0,0 +1,6 @@ +!!! NOTICE !!! + +You must add the required users and service accounts to the pdagent +group to permit write access to /var/db/pdagent. + +!!! NOTICE !!!