From utisoft@hotmail.com  Thu Jun  2 09:50:51 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 A49F5106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 09:50:51 +0000 (UTC)
	(envelope-from utisoft@hotmail.com)
Received: from blu0-omc1-s22.blu0.hotmail.com (blu0-omc1-s22.blu0.hotmail.com [65.55.116.33])
	by mx1.freebsd.org (Postfix) with ESMTP id E470F8FC1B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2011 09:50:50 +0000 (UTC)
Received: from BLU0-SMTP143 ([65.55.116.7]) by blu0-omc1-s22.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 02:50:50 -0700
Received: from zeus.bayofrum.net ([90.221.7.100]) by BLU0-SMTP143.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675);
	 Thu, 2 Jun 2011 02:50:48 -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 p529lTNJ000181
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 2 Jun 2011 10:47:29 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p529lT3M000180;
	Thu, 2 Jun 2011 10:47:29 +0100 (BST)
	(envelope-from crees)
Message-Id: <BLU0-SMTP143AB2D1025576E001C3BB0A97C0@phx.gbl>
Date: Thu, 2 Jun 2011 10:47:29 +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/firefly creates users manually
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         157521
>Category:       ports
>Synopsis:       [PATCH] Fix port: audio/firefly creates users manually
>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 10:00:15 UTC 2011
>Closed-Date:    Tue Jun 21 20:44:23 UTC 2011
>Last-Modified:  Tue Jun 21 20:50:11 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=, and also tries to delete users on deinstall without prompting -- this is a problem if another installed port uses that username.
>How-To-Repeat:
	
>Fix:

	- Use USERS and GROUPS
	- Stop removing users on deinstall -- other ports may use them

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

	Please note that files/pkg-deinstall.in and files/pkg-install.in have been removed.

	Also please note that the patch required for UIDs and GIDs is in ports/157507, if this is committed first please follow up to that PR saying it's no longer needed.

--- firefly.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/firefly/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	26 Nov 2010 23:07:50 -0000	1.6
+++ Makefile	2 Jun 2011 09:12:49 -0000
@@ -38,12 +38,10 @@
 DAAPD_GROUP?=	daapd
 DAAPD_DBDIR?=	${PREFIX}/var/db/${PORTNAME}
 USE_RC_SUBR=	mt-daapd
+USERS=		${DAAPD_USER}
+GROUPS=		${DAAPD_GROUP}
 
 PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR}
-SUB_LIST+=	USER=${DAAPD_USER}\
-		GROUP=${DAAPD_GROUP}\
-		DAAPD_DBDIR=${DAAPD_DBDIR}
-SUB_FILES+=	pkg-install pkg-deinstall
 
 USE_LDCONFIG=	yes
 
@@ -57,9 +55,6 @@
 	@${REINPLACE_CMD} -e 's|echo aout|echo elf|' \
 	    ${WRKSRC}/configure
 
-pre-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
Index: files/pkg-deinstall.in
===================================================================
RCS file: files/pkg-deinstall.in
diff -N files/pkg-deinstall.in
--- files/pkg-deinstall.in	26 Nov 2010 23:07:50 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/audio/firefly/files/pkg-deinstall.in,v 1.2 2010/11/26 23:07:50 beech Exp $
-#
- 
-PATH=/bin:/usr/bin:/usr/sbin
-       
-case $2 in
-       
-POST-DEINSTALL)
-  echo '---> Starting post-deinstall script:'
-
-  if [ -f %%PREFIX%%/etc/mt-daapd.conf ]; then
-    echo '---> You seem to have made some custom daapd configuration.'
-    echo '--->   The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
-    echo '--->   You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
-
-  else
-    echo '---> Removing group "%%GROUP%%"'
-    /usr/sbin/pw groupdel -n %%GROUP%%
-    echo '---> Removing user "%%USER%%"'
-    echo 'y' | /usr/sbin/pw userdel -n %%USER%%
-  fi
-
-  ;;
-
-esac
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- files/pkg-install.in	26 Nov 2010 23:07:50 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/audio/firefly/files/pkg-install.in,v 1.2 2010/11/26 23:07:50 beech Exp $
-#
-
-if [ "$2" != "PRE-INSTALL" ]; then
-	exit 0
-fi
-
-SC_GROUP=%%GROUP%%
-SC_USER=%%USER%%
-SC_SHELL=/sbin/nologin
-SC_HOME=/nonexistent
-PW=`which pw`
-
-if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then
-	gid=3689
-	while ${PW} show group -g ${gid} -q >/dev/null; do
-		gid=`expr ${gid} + 1`
-	done
-	if ! ${PW} add group ${SC_GROUP} -g ${gid}; then
-		e=$?
-		echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually."
-		exit ${e}
-	fi
-	echo "*** Added group \`${SC_GROUP}' (id ${gid})"
-else
-	gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3`
-fi
-
-if ! ${PW} show user ${SC_USER} -q >/dev/null; then
-	uid=3689
-	while ${PW} show user -u ${uid} -q >/dev/null; do
-		uid=`expr ${uid} + 1`
-	done
-	if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \
-	-c "daapd User" -s "${SC_SHELL}" -p "*" \
-	; then
-		e=$?
-		echo "*** Failed to add user \`${SC_USER}'. Please add it manually."
-		exit ${e}
-	fi
-	echo "*** Added user \`${SC_USER}' (id ${uid})"
-else
-	if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \
-	-c "daapd User" -s "${SC_SHELL}" -p "*" \
-	; then
-		e=$?
-		echo "*** Failed to update user \`${SC_USER}'."
-		exit ${e}
-	fi
-		echo "*** Updated user \`${SC_USER}'."
-fi
--- firefly.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: gnats-admin->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Jun 2 14:05:06 UTC 2011 
Responsible-Changed-Why:  
ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157521 
Responsible-Changed-From-To: freebsd-ports-bugs->rene 
Responsible-Changed-By: rene 
Responsible-Changed-When: Fri Jun 3 14:02:54 UTC 2011 
Responsible-Changed-Why:  
Grab 

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

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, mark@foster.cc
Cc: utisoft@gmail.com
Subject: Re: ports/157521: [PATCH] Fix port: audio/firefly creates users manually
Date: Mon, 06 Jun 2011 21:08:24 +0200

 Maintainer of audio/mt-daapd,
 
 Please note that PR ports/157521 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/157521

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, mark@foster.cc
Cc: utisoft@gmail.com
Subject: Re: ports/157521: [PATCH] Fix port: audio/firefly creates users manually
Date: Mon, 06 Jun 2011 21:10:55 +0200

 Copy-pasted from a similar mail, this mail is about audio/firefly.
 
 Op 06-06-2011 21:08, Rene Ladan schreef:
 > Maintainer of audio/mt-daapd,
 > 
 > Please note that PR ports/157521 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/157521
Responsible-Changed-From-To: rene->crees 
Responsible-Changed-By: rene 
Responsible-Changed-When: Sat Jun 11 17:02:13 UTC 2011 
Responsible-Changed-Why:  
Over to new committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157521 
State-Changed-From-To: open->feedback 
State-Changed-By: crees 
State-Changed-When: Sun Jun 12 12:08:15 UTC 2011 
State-Changed-Why:  
Maintainer has been asked for approval 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157521 
State-Changed-From-To: feedback->open 
State-Changed-By: crees 
State-Changed-When: Tue Jun 21 16:50:09 UTC 2011 
State-Changed-Why:  
Maintainer has timed out 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157521 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Tue Jun 21 20:44:22 UTC 2011 
State-Changed-Why:  
Committed 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157521: commit references a PR
Date: Tue, 21 Jun 2011 20:44:25 +0000 (UTC)

 crees       2011-06-21 20:44:12 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/firefly        Makefile 
   Removed files:
     audio/firefly/files  pkg-deinstall.in pkg-install.in 
   Log:
   - Use USERS and GROUPS
   - Stop removing users on deinstall
   
   PR:             ports/157521
   Submitted by:   Chris Rees (me)
   Approved by:    rene (mentor), maintainer timeout (14 days)
   
   Revision  Changes    Path
   1.7       +2 -7      ports/audio/firefly/Makefile
   1.3       +0 -27     ports/audio/firefly/files/pkg-deinstall.in (dead)
   1.3       +0 -53     ports/audio/firefly/files/pkg-install.in (dead)
 _______________________________________________
 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:
