ports/157588: Fix port: irc/ptlink-ircd should use USERS

Chris Rees utisoft at gmail.com
Sat Jun 4 09:30:21 UTC 2011


>Number:         157588
>Category:       ports
>Synopsis:       Fix port: irc/ptlink-ircd 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:30:19 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-install has been removed.


--- irc-ptlink-ircd.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/ptlink-ircd/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	16 Aug 2009 08:20:29 -0000	1.7
+++ Makefile	2 Jun 2011 19:36:21 -0000
@@ -21,6 +21,9 @@
 USE_RC_SUBR=	ptlink-ircd.sh
 SUB_FILES=	pkg-message
 
+USERS=		${PORTNAME:L}
+GROUPS=		${USERS}
+
 SYSCONFDIR=	${PREFIX}/etc/ptlink-ircd
 
 CONFIGURE_ARGS=	--sysconfdir=${SYSCONFDIR} --localstatedir=/var \
@@ -35,7 +38,6 @@
 .endif
 
 post-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CHOWN} -R ircd:ircd ${SYSCONFDIR}
 	@${CAT} ${PKGMESSAGE}
 
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	18 Sep 2005 15:22:04 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/irc/ptlink-ircd/pkg-install,v 1.2 2005/09/18 15:22:04 pav Exp $
-#
-
-case $2 in
-POST-INSTALL)
-	USER=ircd
-	GROUP=ircd
-	UID=72
-	GID=72
-
-	if pw groupshow "${GROUP}" > /dev/null 2>&1; then
-	   echo "===> Using existing group ${GROUP}"
-	else
-	   echo "===> Adding group ${GROUP}"
-	   pw groupadd ${GROUP} -g ${GID} || exit 1
-	fi
-
-	if pw usershow "${USER}" > /dev/null 2>&1; then
-	   echo "===> Using existing user ${USER}"
-	else
-	   echo "===> Adding user ${USER}"
-	   pw adduser ${USER} -u ${UID} -g ${GROUP} -h - -d "/nonexistent" \
-	      -s "/nonexistent" -c "IRC daemon" || exit 1
-	fi
-	;;
-esac
--- irc-ptlink-ircd.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