From owner-svn-ports-head@freebsd.org Fri Jan 19 14:32:18 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6264BEB56A2; Fri, 19 Jan 2018 14:32:18 +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 1540F84029; Fri, 19 Jan 2018 14:32:18 +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 3F3936B65; Fri, 19 Jan 2018 14:32:17 +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 w0JEWHtZ040797; Fri, 19 Jan 2018 14:32:17 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0JEWHwW040794; Fri, 19 Jan 2018 14:32:17 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201801191432.w0JEWHwW040794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Fri, 19 Jan 2018 14:32:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459420 - in head/databases/memcached: . files X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head/databases/memcached: . files X-SVN-Commit-Revision: 459420 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: Fri, 19 Jan 2018 14:32:18 -0000 Author: feld Date: Fri Jan 19 14:32:16 2018 New Revision: 459420 URL: https://svnweb.freebsd.org/changeset/ports/459420 Log: databases/memcached: Fix user/group handling for running process You can now set memcached_user and memcached_group in rc.conf and get expected results of running process and socket ownership. MFH: 2018Q1 Differential Revision: https://reviews.freebsd.org/D13967 Modified: head/databases/memcached/Makefile head/databases/memcached/files/memcached.in Modified: head/databases/memcached/Makefile ============================================================================== --- head/databases/memcached/Makefile Fri Jan 19 14:27:15 2018 (r459419) +++ head/databases/memcached/Makefile Fri Jan 19 14:32:16 2018 (r459420) @@ -3,6 +3,7 @@ PORTNAME= memcached PORTVERSION= 1.5.4 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= http://www.memcached.org/files/ \ GENTOO Modified: head/databases/memcached/files/memcached.in ============================================================================== --- head/databases/memcached/files/memcached.in Fri Jan 19 14:27:15 2018 (r459419) +++ head/databases/memcached/files/memcached.in Fri Jan 19 14:32:16 2018 (r459420) @@ -14,6 +14,8 @@ # Default is empty "". # memcached_user (user): Set user to run memcached. # Default is "nobody". +# memcached_group (group): Set group to run memcached. +# Default is "nobody". # memcached_profiles (str): Set to "" by default. # Define your profiles here. # memcached_post_start (str): Set extra commands that should be executed after memcached was successfully @@ -30,6 +32,7 @@ pidfile="${_piddir}/memcached.pid" : ${memcached_enable="NO"} : ${memcached_user="nobody"} +: ${memcached_group="nobody"} load_rc_config ${name} @@ -39,6 +42,7 @@ if [ -n "$2" ]; then pidfile="${_piddir}/memcached.${profile}.pid" eval memcached_enable="\${memcached_${profile}_enable:-${memcached_enable}}" eval memcached_user="\${memcached_${profile}_user:-${memcached_user}}" + eval memcached_group="\${memcached_${profile}_group:-${memcached_group}}" eval memcached_flags="\${memcached_${profile}_flags:-${memcached_flags}}" eval memcached_post_start="\${memcached_${profile}_post_start:-${memcached_post_start}}" else @@ -103,9 +107,8 @@ memcached_poststop() } command=%%PREFIX%%/bin/memcached -command_args="-d -u ${memcached_user} -P ${pidfile} " +command_args="-d -P ${pidfile} " -memcached_group=`id -gn $memcached_user` start_precmd="install -d -o $memcached_user -g $memcached_group -m 755 $_piddir" start_postcmd="${name}_poststart" stop_postcmd="${name}_poststop"