Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 10:03:27 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/157580: Fix port: irc/hybserv should use USERS
Message-ID:  <BLU0-SMTP344BDBCF08C5984CE8A89DA97E0@phx.gbl>
Resent-Message-ID: <201106040910.p549A9bS014044@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157580
>Category:       ports
>Synopsis:       Fix port: irc/hybserv 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:10:09 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@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@gmail.com)


	Please bear in mind that pkg-install has been removed.

--- irc-hybserv.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/hybserv/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	21 Mar 2011 07:13:04 -0000	1.18
+++ Makefile	2 Jun 2011 19:03:04 -0000
@@ -16,6 +16,9 @@
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
+
 WRKSRC=		${WRKDIR}/hybserv
 
 .if defined(WITH_DAEMONTOOLS)
@@ -23,9 +26,6 @@
 RUN_DEPENDS+=	supervise:${PORTSDIR}/sysutils/daemontools
 .endif
 
-pre-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 	@${SED} -e "s#%PREFIX%#${PREFIX}#" ${FILESDIR}/hybserv.sh \
 		> ${WRKDIR}/hybserv.sh
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	31 Mar 2007 12:53:57 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-if [ "x$2" != "xPRE-INSTALL" ]; then
-       exit 0;
-fi
-
-	USER=hybserv
-	GROUP=${USER}
-	UID=76
-	GID=${UID}
-	if pw group show "${GROUP}" 2>/dev/null; then
-		echo "You already have a group \"${GROUP}\", so I will use it."
-	else
-		if pw groupadd ${GROUP} -g ${GID}; then
-			echo "Added group \"${GROUP}\"."
-		else
-			echo "Adding group \"${GROUP}\" failed..."
-			exit 1
-		fi
-	fi
-
-	if pw user show "${USER}" 2>/dev/null; then
-		echo "You already have a user \"${USER}\", so I will use it."
-		if pw usermod ${USER} -d ${NONEXISTENT}
-		then
-			echo "Changed home directory of \"${USER}\" to \"${NONEXISTENT}\""
-		else
-			echo "Changing home directory of \"${USER}\" to \"${NONEXISTENT}\" failed..."
-			exit 1
-		fi
-	else
-		if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-			-d ${NONEXISTENT} -s /sbin/nologin -c "HybServ Daemon"
-		then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			exit 1
-		fi
-	fi
--- irc-hybserv.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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP344BDBCF08C5984CE8A89DA97E0>