From utisoft@hotmail.com  Thu Jun  2 17:50:47 2011
Return-Path: <utisoft@hotmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6315D106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 17:50:47 +0000 (UTC)
	(envelope-from utisoft@hotmail.com)
Received: from blu0-omc1-s2.blu0.hotmail.com (blu0-omc1-s2.blu0.hotmail.com [65.55.116.13])
	by mx1.freebsd.org (Postfix) with ESMTP id 1EFC78FC1B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 17:50:46 +0000 (UTC)
Received: from BLU0-SMTP168 ([65.55.116.9]) by blu0-omc1-s2.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 10:50:46 -0700
Received: from zeus.bayofrum.net ([90.221.7.100]) by BLU0-SMTP168.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 10:50:44 -0700
Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1])
	by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p52Ho6UC060161
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 2 Jun 2011 18:50:06 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p52Ho6J5060155;
	Thu, 2 Jun 2011 18:50:06 +0100 (BST)
	(envelope-from crees)
Message-Id: <BLU0-SMTP1686F18B249D7C97BFDFA38A97C0@phx.gbl>
Date: Thu, 2 Jun 2011 18:50:06 +0100
From: Chris Rees <utisoft@gmail.com>
Sender: <utisoft@hotmail.com>
Reply-To: Chris Rees <utisoft@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Fix port: audio/squeezeboxserver should use USERS= and GROUPS=
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         157535
>Category:       ports
>Synopsis:       [PATCH] Fix port: audio/squeezeboxserver should use USERS= and GROUPS=
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 02 18:00:19 UTC 2011
>Closed-Date:    Sat Jul 09 17:46:09 UTC 2011
>Last-Modified:  Sat Jul  9 17:50:08 UTC 2011
>Originator:     Chris Rees
>Release:        FreeBSD 8.2-RELEASE-p1 i386
>Organization:
bayofrum
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386


	
>Description:
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=.talled port uses that username.
>How-To-Repeat:
	
>Fix:


	- Use USERS and GROUPS
	- Remove redundant PKGINSTALL assignment

	Submitted by: Chris Rees (utisoft@gmail.com)


--- audio-squeezeboxserver.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/squeezeboxserver/Makefile,v
retrieving revision 1.80
diff -u -r1.80 Makefile
--- Makefile	22 Apr 2011 16:52:25 -0000	1.80
+++ Makefile	2 Jun 2011 09:57:22 -0000
@@ -50,8 +50,8 @@
 # Work around a bug in p5-Package-Stash port
 RUN_DEPENDS+=	p5-Package-DeprecationManager>=0.10:${PORTSDIR}/devel/p5-Package-DeprecationManager
 
-PKGINSTALL=	${WRKDIR}/pkg-install
-
+USERS=		${SLIMUSER}
+GROUPS=		${SLIMGROUP}
 USE_PERL5=	yes
 
 .include <bsd.port.pre.mk>
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/squeezeboxserver/files/pkg-install.in,v
retrieving revision 1.10
diff -u -r1.10 pkg-install.in
--- files/pkg-install.in	14 Oct 2009 22:33:31 -0000	1.10
+++ files/pkg-install.in	2 Jun 2011 09:55:33 -0000
@@ -2,11 +2,6 @@
 # $FreeBSD: ports/audio/squeezeboxserver/files/pkg-install.in,v 1.10 2009/10/14 22:33:31 brooks Exp $
 
 name=%%PORTNAME%%
-u=%%SLIMUSER%%
-g=%%SLIMGROUP%%
-ugid=104
-homedir=/nonexistent
-shell=/sbin/nologin
 comment="Slim Devices SlimServer/SqueezeCenter pseudo-user"
 slimdir="%%PREFIX%%/%%SLIMDIR%%"
 statedir=%%SLIMDBDIR%%
@@ -23,29 +18,6 @@
 serverlogline="${serverlogfile}	${u}:${g} 644 3	   100	*     J     ${pidfile}"
 
 case $2 in
-PRE-INSTALL)
-	if pw group show "${g}" >/dev/null 2>&1; then
-		echo "Using existing group \"${g}\"."
-	else
-		echo "Creating group \"${g}\", (gid: ${ugid})."
-		pw groupadd ${g} -g ${ugid}
-		if [ $? != 0 ]; then
-			echo "Failed to add group \"${g}\"."
-			exit 1
-		fi
-	fi
-	if pw user show "${u}" >/dev/null 2>&1; then
-		echo "Using existing user \"${u}\"."
-	else
-		echo "Creating user \"${u}\", (uid: ${ugid})."
-		pw useradd ${u} -u ${ugid} -g ${ugid} -h - \
-		    -d ${homedir} -s ${shell} -c "${comment}"
-		if [ $? != 0 ]; then
-			echo "Failed to add user \"${u}\"."
-			exit 1
-		fi
-	fi
-	;;
 POST-INSTALL)
 	if egrep -q "^${serverlogfile}\>" ${newsyslogfile}; then
 		echo "Using existing ${newsyslogfile} entry."
--- audio-squeezeboxserver.patch ends here ---



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->brooks 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jun 2 18:00:45 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Chris Rees <crees@FreeBSD.org>
To: bug-followup@FreeBSD.org, utisoft@gmail.com
Cc:  
Subject: Re: ports/157535: [PATCH] Fix port: audio/squeezeboxserver should
 use USERS= and GROUPS=
Date: Tue, 5 Jul 2011 22:17:00 +0100

 Hey,
 
 This is a pretty trivial change, mostly cosmetic. I can assure you I've 
 Tinderbox tested it, and I'm perfectly happy to commit it and take the 
 flak for you!
 
 If you're happy, please commit or pass the PR to me.
 
 Thanks!
 
 Chris
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sat Jul 9 17:45:54 UTC 2011 
State-Changed-Why:  
Committed. 


Responsible-Changed-From-To: brooks->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sat Jul 9 17:45:54 UTC 2011 
Responsible-Changed-Why:  
Timeout. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157535: commit references a PR
Date: Sat,  9 Jul 2011 17:44:23 +0000 (UTC)

 crees       2011-07-09 17:44:14 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/squeezeboxserver Makefile 
     audio/squeezeboxserver/files pkg-install.in 
   Log:
   - Use USERS and GROUPS
   - Remove redundant PKGINSTALL assignment
   
   PR:             ports/157535
   Submitted by:   crees (me)
   Approved by:    rene (mentor, implicit), maintainer timeout (brooks, 35 days)
   
   Revision  Changes    Path
   1.81      +2 -2      ports/audio/squeezeboxserver/Makefile
   1.11      +1 -29     ports/audio/squeezeboxserver/files/pkg-install.in
 _______________________________________________
 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:
