From crees@zeus.bayofrum.net  Wed Jun  1 21:04:16 2011
Return-Path: <crees@zeus.bayofrum.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 21F361065672
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Jun 2011 21:04:16 +0000 (UTC)
	(envelope-from crees@zeus.bayofrum.net)
Received: from mail.skyusermail.com (mail.skyusermail.com [77.240.11.49])
	by mx1.freebsd.org (Postfix) with ESMTP id AA87D8FC14
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Jun 2011 21:04:15 +0000 (UTC)
Received: from Spooler by mail.skyusermail.com (Mercury/32 v4.52) ID MO03E466;
    1 Jun 2011 22:04:13 +0100
Received: from spooler by mail.skyusermail.com (Mercury/32 v4.52); 1 Jun 2011 21:34:03 +0100
Received: from zeus.bayofrum.net (90.221.7.100) by mail.skyusermail.com (Mercury/32 v4.52) with ESMTP
  ID MG03E465 (Using SSL/TLS, 3DES, CBC mode, keysize 192 bits) ; 1 Jun 2011 21:33:52 +0100
Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1])
	by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p51KXSp8041702
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 1 Jun 2011 21:33:28 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p51KXR3p041701;
	Wed, 1 Jun 2011 21:33:27 +0100 (BST)
	(envelope-from crees)
Message-Id: <201106012033.p51KXR3p041701@zeus.bayofrum.net>
Date: Wed, 1 Jun 2011 21:33:27 +0100 (BST)
From: Chris Rees <utisoft@gmail.com>
Reply-To: Chris Rees <utisoft@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Fix port: audio/mt-daapd should use USERS and GROUPS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         157507
>Category:       ports
>Synopsis:       [PATCH] Fix port: audio/mt-daapd should use USERS and GROUPS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rene
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 01 21:10:08 UTC 2011
>Closed-Date:    Mon Jun 06 19:22:36 UTC 2011
>Last-Modified:  Mon Jun  6 19:30: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:
	
	mt-daapd uses pkg-install to create new users
	instead of using USERS= and GROUPS=
>How-To-Repeat:
	
>Fix:

	

	- Use USERS and GROUPS

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


	Please bear in mind that the now useless files/pkg-install.in and files/pkg-deinstall.in have been removed, and a patch to /usr/ports/UIDs and GIDs at [1] is necessary [1].

	[1] http://www.bayofrum.net/~crees/patches/uids/mt-daapd-uids.patch


--- mt-daapd.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/mt-daapd/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	7 Apr 2011 17:29:56 -0000	1.19
+++ Makefile	1 Jun 2011 10:46:51 -0000
@@ -36,13 +36,15 @@
 DAAPD_USER?=	daapd
 DAAPD_GROUP?=	daapd
 DAAPD_DBDIR?=	${DAAPD_MASTERDIR}/var/db/${PORTNAME}
+USERS=		${DAAPD_USER}
+GROUPS=		${DAAPD_GROUP}
 USE_RC_SUBR=	mt-daapd
 
 PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR}
 SUB_LIST+=	USER=${DAAPD_USER} GROUP=${DAAPD_GROUP}\
 		DAAPD_DBDIR=${DAAPD_DBDIR}\
 		DAAPD_MASTERDIR=${DAAPD_MASTERDIR}
-SUB_FILES+=	pkg-install pkg-deinstall mt-daapd.conf
+SUB_FILES+=	mt-daapd.conf
 
 .include <bsd.port.pre.mk>
 
@@ -52,9 +54,6 @@
 	@${ECHO_CMD} "DAAPD_GROUP=${DAAPD_GROUP} (default: daapd)"
 	@${ECHO_CMD} "DAAPD_DBDIR=${DAAPD_DBDIR} (default: ${DAAPD_MASTERDIR}/var/db/${PORTNAME})"
 
-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	7 Apr 2011 17:29:56 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/audio/mt-daapd/files/pkg-deinstall.in,v 1.2 2011/04/07 17:29:56 culot 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	7 Apr 2011 17:29:56 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/audio/mt-daapd/files/pkg-install.in,v 1.2 2011/04/07 17:29:56 culot 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
--- mt-daapd.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: Wed Jun 1 22:48:30 UTC 2011 
Responsible-Changed-Why:  
rescue this from pending/ .  I have no idea how it got in there. 

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

From: Chris Rees <utisoft@gmail.com>
To: mark@foster.cc
Cc: bug-followup@freebsd.org
Subject: Re: ports/157507: [PATCH] Fix port: audio/mt-daapd should use USERS
 and GROUPS
Date: Thu, 2 Jun 2011 10:35:31 +0100

 Maintainer of audio/mt-daapd,
 
 Please note that PR ports/157507 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/157507
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Jun 2 14:12:04 UTC 2011 
State-Changed-Why:  
Note that maintainer has been asked for feedback. 

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

From: Mark Foster <mark@foster.cc>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/157507: [PATCH] Fix port: audio/mt-daapd should use USERS
 and GROUPS
Date: Thu, 02 Jun 2011 08:09:10 -0700

 On 06/02/2011 02:35 AM, Chris Rees wrote:
 > 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.
 > 
 Please instead mark this port as deprecated? It's been replaced by
 audio/firefly.
 
 -- 
 Mark D. Foster <mark@foster.cc>
 http://mark.foster.cc/
 
Responsible-Changed-From-To: freebsd-ports-bugs->rene 
Responsible-Changed-By: rene 
Responsible-Changed-When: Fri Jun 3 14:01:56 UTC 2011 
Responsible-Changed-Why:  
Grab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157507 
State-Changed-From-To: feedback->closed 
State-Changed-By: rene 
State-Changed-When: Mon Jun 6 19:22:16 UTC 2011 
State-Changed-Why:  
Committed, thanks 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157507: commit references a PR
Date: Mon,  6 Jun 2011 19:22:07 +0000 (UTC)

 rene        2011-06-06 19:21:48 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/mt-daapd       Makefile 
   Removed files:
     audio/mt-daapd/files pkg-deinstall.in pkg-install.in 
   Log:
   - Change this port to use the USERS and GROUPS variables [1]
   - Deprecate in favor of audio/firefly [2]
   
   PR:             ports/157507 [1] [2]
   Submitted by:   Chris Rees [utisoft gmail com] [1]
                   maintainer [2]
   Approved by:    maintainer [1]
   
   Revision  Changes    Path
   1.20      +5 -4      ports/audio/mt-daapd/Makefile
   1.3       +0 -27     ports/audio/mt-daapd/files/pkg-deinstall.in (dead)
   1.3       +0 -53     ports/audio/mt-daapd/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:
