ports/157582: Fix port: games/ldmud should use USERs

Chris Rees utisoft at gmail.com
Sat Jun 4 09:20:11 UTC 2011


>Number:         157582
>Category:       ports
>Synopsis:       Fix port: games/ldmud should use USERs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 04 09:20:11 UTC 2011
>Closed-Date:
>Last-Modified:
>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 at 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=

>How-To-Repeat:
	
>Fix:

	

	- Use USERS and GROUPS

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

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


--- games-ldmud.patch begins here ---
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
--- games-ldmud.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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list