From nobody@FreeBSD.org  Sat Aug 27 20:33:05 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95BD6106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 20:33:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 85A0B8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 20:33:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7RKX5A1075672
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 20:33:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7RKX5FH075662;
	Sat, 27 Aug 2011 20:33:05 GMT
	(envelope-from nobody)
Message-Id: <201108272033.p7RKX5FH075662@red.freebsd.org>
Date: Sat, 27 Aug 2011 20:33:05 GMT
From: Luke Dean <luked@pobox.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: audio/murmur installs directories with incorrect owner
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: ayu@commun.jp

>Number:         160242
>Category:       ports
>Synopsis:       audio/murmur installs directories with incorrect owner
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 27 20:40:09 UTC 2011
>Closed-Date:    Fri Oct 21 15:02:06 UTC 2011
>Last-Modified:  Fri Oct 21 15:10:08 UTC 2011
>Originator:     Luke Dean
>Release:        8.2-STABLE
>Organization:
>Environment:
FreeBSD foo.lukas.is-a-geek.org 8.2-STABLE FreeBSD 8.2-STABLE #1: Mon May 30 10:45:28 PDT 2011     user@foo.lukas.is-a-geek.org:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
The audio/murmur port creates the "murmur" user and runs "murmurd" as this user.  The pkg-install script creates the log, pid, and database directories and assigns ownership to the person running the installation, who may not be "murmur".  murmurd will be unable to access its log, pid, or database in this situation.  
>How-To-Repeat:
Perform a clean installation from ports.  i.e.
su
cd /usr/ports/audio/murmur
make install

You will find that /var/log/murmur, /var/run/murmur, and /var/db/murmur have been created and are owned by ${USER} from your shell environment - you, not murmur.
>Fix:
One possible solution is to hardcode the user "murmur" into pkg-install instead of using ${USER} from the environment.  A better solution would use the USERS variable from the Makefile, but I don't know how to do that.

Patch attached with submission follows:

--- pkg-install	2011-06-25 12:55:42.000000000 -0700
+++ /tmp/pkg-install	2011-08-27 12:45:48.000000000 -0700
@@ -1,6 +1,7 @@
 #!/bin/sh
 # $FreeBSD: ports/audio/murmur/pkg-install,v 1.3 2011/06/25 19:55:42 crees Exp $
 
+MURMUR_USER=murmur
 PATH=/bin:/usr/sbin
 LOGDIR=/var/log/murmur
 RUNDIR=/var/run/murmur
@@ -10,7 +11,7 @@
 	PRE-INSTALL)
 
 		mkdir -m 750 ${LOGDIR} ${DBDIR} ${RUNDIR} 2> /dev/null
-		chown -R ${USER}:${GROUP} ${LOGDIR} ${DBDIR} ${RUNDIR}
+		chown -R ${MURMUR_USER} ${LOGDIR} ${DBDIR} ${RUNDIR}
 
 		;;
 esac


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Aug 27 20:40:19 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160242 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: ayu@commun.jp
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/160242: audio/murmur installs directories with incorrect owner
Date: Sat, 27 Aug 2011 20:40:17 UT

 Maintainer of audio/murmur,
 
 Please note that PR ports/160242 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/160242
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Thu Oct 20 21:46:02 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160242 

From: Ayumi Mitsui <ayu@commun.jp>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/160242: audio/murmur installs directories with incorrect owner
Date: Fri, 21 Oct 2011 08:08:26 +0900

 i approve this patch. Thanks!
 
 2011/8/28 Edwin Groothuis <edwin@freebsd.org>:
 > Maintainer of audio/murmur,
 >
 > Please note that PR ports/160242 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 > =A0 =A0http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/160242
 >
 > --
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 >
 
 
 
 --=20
 Ayumi Mitsui http://ayu.commun.jp/ http://twitter.com/ayunyan
 PGP: EE97 796C 77F6 CFC9 1FBC=A0 C56A 318B F019 E605 D988
State-Changed-From-To: feedback->closed 
State-Changed-By: pawel 
State-Changed-When: Fri Oct 21 15:02:04 UTC 2011 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160242 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/160242: commit references a PR
Date: Fri, 21 Oct 2011 15:01:26 +0000 (UTC)

 pawel       2011-10-21 15:01:17 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/murmur         pkg-install 
   Log:
   Install port specific directories with correct ownership
   
   PR:             ports/160242
   Submitted by:   Luke Dean <luked@pobox.com>
   Approved by:    maintainer
   
   Revision  Changes    Path
   1.4       +2 -2      ports/audio/murmur/pkg-install
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
