Bug 157582

Summary: Fix port: games/ldmud should use USERs
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-06-04 10:20:11 UTC
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=

Fix: - Use USERS and GROUPS

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

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




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--GbQy6X24oUzHRAkrR1BWDIRqXNGbKDi65x551MSlu8F9EKWY
Content-Type: text/plain; name="games-ldmud.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="games-ldmud.patch"

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/games/ldmud/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	20 Nov 2009 22:53:02 -0000	1.8
+++ Makefile	2 Jun 2011 17:44:37 -0000
@@ -20,6 +20,9 @@
 MAN1=		ldmud.1
 MAKE_JOBS_UNSAFE=	yes
 
+USERS=		mud
+GROUPS=		${USERS}
+
 LOGDIR=		${DATADIR}
 .if defined(MUDLIB) && ${MUDLIB} == lpmud
 PLIST_SUB+=	LPMUD="" MUDLIB="@comment "
@@ -55,8 +58,5 @@
 		| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
 	${RM} -f ${DOCSDIR}/Makefile
 .endif
-	# Run package install script
-	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} \
-		POST-INSTALL
 
 .include <bsd.port.post.mk>
Index: pkg-deinstall
===================================================================
RCS file: pkg-deinstall
diff -N pkg-deinstall
--- pkg-deinstall	5 Sep 2003 22:26:41 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/games/ldmud/pkg-deinstall,v 1.1 2003/09/05 22:26:41 glewis Exp $
-#
-
-if [ "$2" != "POST-DEINSTALL" ]; then
-    exit 0
-fi
-
-USER=mud
-
-if pw usershow "${USER}" 2>/dev/null 1>&2; then
-	echo "To delete MUD user permanently, use 'pw userdel \"${USER}\"'"
-fi
-
-exit 0
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	5 Sep 2003 22:26:41 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/games/ldmud/pkg-install,v 1.1 2003/09/05 22:26:41 glewis Exp $
-
-if [ "$2" = "PRE-INSTALL" ]; then
-	exit 0
-fi
-
-PATH=/bin:/sbin:/usr/bin:/usr/sbin
-
-USER=mud
-GROUP=${USER}
-UID=97
-GID=${UID}
-
-if pw groupshow "${GROUP}" 2>/dev/null; then
-	echo "Using existing group \"${GROUP}\"."
-else
-	if pw groupadd "${GROUP}" -g ${GID}; then
-		echo "Added group \"${GROUP}\"."
-	else
-		echo "Adding group \"${GROUP}\" failed..."
-		exit 1
-	fi
-fi
-
-if pw usershow "${USER}" 2>/dev/null; then
-	echo "Using existing user \"${USER}\"."
-else
-	if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \
-		-s "/bin/sh" -d "/nonexistent" -c "MUD Owner"
-	then
-		echo "Added user \"${USER}\"."
-	else
-		echo "Adding user \"${USER}\" failed..."
-		exit 1
-	fi
-fi
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:20:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:52:36 UTC
Responsible Changed
From-To: pgollucci->crees

Invalid autoassignment
Comment 3 Chris Rees freebsd_committer freebsd_triage 2011-06-27 18:48:51 UTC
State Changed
From-To: open->closed

Fixed by johans before this was picked up