ports/157555: [PATCH] fix port: databases/firebird25-server should use USERS and GROUPS

Chris Rees utisoft at gmail.com
Fri Jun 3 10:20:07 UTC 2011


>Number:         157555
>Category:       ports
>Synopsis:       [PATCH] fix port: databases/firebird25-server should use USERS and GROUPS
>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:   Fri Jun 03 10:20:06 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)


--- databases-firebird25-server.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/databases/firebird25-server/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	20 Dec 2010 09:38:49 -0000	1.2
+++ Makefile	2 Jun 2011 12:16:01 -0000
@@ -121,8 +121,9 @@
 .endif
 
 .if !defined(CLIENT_ONLY)
-pre-su-install:
-	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+
+USERS=	${PORTNAME}
+GROUPS=	${USERS}
 
 post-install:
 	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/databases/firebird25-server/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- files/pkg-install.in	20 Dec 2010 08:48:54 -0000	1.1
+++ files/pkg-install.in	2 Jun 2011 12:16:14 -0000
@@ -5,51 +5,6 @@
 PATH=/bin:/usr/bin:/usr/sbin
 
 case $2 in
-PRE-INSTALL)
-
-if [ `id -u` -ne 0 ]; then
-	echo; echo "You must be root to run this step!"; echo; echo
-  exit 1
-fi
-
-nofbuid=0
-fbUID=`id -u firebird 2>/dev/null`
-if [ $? -ne 0 ]; then
-	fbUID=90
-	while [ ! -z `id -un $fbUID 2>/dev/null` ]
-	do
-		fbUID=$(($fbUID+1))
-	done
-	nofbuid=1
-fi
-
-fbGID=`pw groupshow firebird 2>/dev/null`
-if [ $? -ne 0 ]; then
-	fbGID=90
-	while [ ! -z `id -gn $fbGID 2>/dev/null` ]
-	do
-		fbGID=$(($fbGID+1))
-	done
-	echo "firebird:*:$fbGID:" >> /etc/group
-else
-	fbGID=`echo $fbGID | awk -F: '{print $3}'`
-fi
-
-echo "firebird user using uid $fbUID"
-echo "firebird user using gid $fbGID"
-
-if which -s pw; then
-	if [ $nofbuid -ne 0 ]; then
-		pw useradd firebird -u $fbUID -g $fbGID -h - -s /usr/sbin/nologin \
-		-d /nonexistent -c "Firebird Database Administrator"
-	fi
-else
-	echo -n "unable to create user firebird - please create it manually,"
-	echo " before reinstalling this package."
-	exit 1
-fi
-;;
-
 POST-INSTALL)
 cd /var/db/firebird
 
--- databases-firebird25-server.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