ports/157583: Fix port: devel/otrs should use USERS

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


>Number:         157583
>Category:       ports
>Synopsis:       Fix port: devel/otrs 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)


--- devel-otrs.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/devel/otrs/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- Makefile	24 May 2011 11:42:49 -0000	1.43
+++ Makefile	2 Jun 2011 14:22:15 -0000
@@ -53,6 +53,8 @@
 USE_BZIP2=	yes
 
 OTRSDIR=	${PREFIX}/otrs
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
 
 SUB_FILES=	pkg-install pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
@@ -165,7 +167,6 @@
 .endif
 
 do-install:
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 	@${MKDIR} ${ROOT_DIRS_LIST:S!^!${OTRSDIR}/!} ${BIN_DIRS_LIST:S!^!${OTRSDIR}/bin/!} \
 		${SCRIPTS_DIRS_LIST:S!^!${OTRSDIR}/scripts/!}
 	@${INSTALL_DATA} ${WRKSRC}/.*.dist ${OTRSDIR}/
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/devel/otrs/files/pkg-install.in,v
retrieving revision 1.4
diff -u -r1.4 pkg-install.in
--- files/pkg-install.in	5 Dec 2010 13:39:37 -0000	1.4
+++ files/pkg-install.in	2 Jun 2011 14:21:34 -0000
@@ -7,33 +7,8 @@
 WWWGRP="www"
 OTRS_USER="otrs"
 OTRS_GROUP="otrs"
-OTRS_UID=121
-OTRS_GID=121
 
 case $2 in
-PRE-INSTALL)
-
-	if ! pw groupshow -n ${OTRS_GROUP} >/dev/null 2>&1; then
-		if pw groupadd -n ${OTRS_GROUP} -g ${OTRS_GID}; then
-			echo "Added group \"${OTRS_GROUP}\"."
-		else
-			echo "Adding group \"${OTRS_GROUP}\" failed..."
-			exit 1
-		fi
-	fi	
-
-	if ! id -u ${OTRS_USER} >/dev/null 2>&1; then
-		if pw useradd -n ${OTRS_USER} -g ${OTRS_GROUP} \
-		-u ${OTRS_UID} -G ${WWWGRP} -h - -s /bin/csh \
-		-d ${PKG_PREFIX}/otrs -c "OTRS Administrator" ; then
-			echo "Added user \"${OTRS_USER}\"."
-		else
-			echo "Adding user \"${OTRS_USER}\" failed..."
-			exit 1
-		fi
-	fi
-;;
-
 POST-INSTALL)
 	${PKG_PREFIX}/otrs/bin/otrs.SetPermissions.pl \
 		--web-user=${WWWOWN} --web-group=${WWWGRP} \
--- devel-otrs.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