ports/157573: [PATCH] Fix port: irc/bopm should use USERS

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


>Number:         157573
>Category:       ports
>Synopsis:       [PATCH] Fix port: irc/bopm 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 08:20:07 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
	- While here, correct indentation of CONFIGURE_ARGS

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


--- irc-bopm.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/bopm/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	4 Dec 2010 07:32:12 -0000	1.13
+++ Makefile	2 Jun 2011 18:59:52 -0000
@@ -18,18 +18,18 @@
 
 USE_AUTOTOOLS=	libtool
 LIBTOOLFILES=	configure src/libopm/configure
-CONFIGURE_ARGS=		--sysconfdir=${PREFIX}/etc --localstatedir=${LOGDIR}
+CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc --localstatedir=${LOGDIR}
+
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
 
 USE_LDCONFIG=	yes
 USE_RC_SUBR=	bopm
 
-SUB_FILES=	pkg-message pkg-install pkg-deinstall
+SUB_FILES=	pkg-message pkg-deinstall
 PLIST_SUB=	LOGDIR=${LOGDIR}
 SUB_LIST=	LOGDIR=${LOGDIR}
 
-pre-su-install:
-	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-patch:
 	@${REINPLACE_CMD} \
 		-e 's,data_DATA = bopm.conf.sample,data_DATA =,g' \
@@ -41,7 +41,6 @@
 		${WRKSRC}/bopm.conf.sample
 
 post-install:
-	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CHOWN} bopm:bopm ${LOGDIR}
 	@${CHMOD} 750 ${LOGDIR}
 	@${CHOWN} bopm:bopm ${PREFIX}/etc/bopm.conf.sample
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- files/pkg-install.in	31 Oct 2006 12:00:37 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-# This script is a modified copy of the pkg-install script 
-# from the ircd-hybrid-ru port.
-
-PATH=/bin:/usr/bin:/usr/sbin
-
-#-----------------------------------------------------------------------
-if [ "x$2" = "xPRE-INSTALL" ]; then
-#-----------------------------------------------------------------------
-
-USER=bopm
-GROUP=${USER}
-UID=717
-GID=${UID}
-SHELL=/bin/sh
-HOMEDIR=/nonexistent
-GECOS="Blitzed Open Proxy Monitor"
-
-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."
-else
-	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-		-d ${HOMEDIR} -s ${SHELL} -c "${GECOS}"
-	then
-		echo "Added user \"${USER}\"."
-	else
-		echo "Adding user \"${USER}\" failed..."
-		exit 1
-	fi
-fi
-
-#-----------------------------------------------------------------------
-fi
-#-----------------------------------------------------------------------
-
-exit 0
--- irc-bopm.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