Bug 157555 - [PATCH] fix port: databases/firebird25-server should use USERS and GROUPS
Summary: [PATCH] fix port: databases/firebird25-server should use USERS and GROUPS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 11:20 UTC by Chris Rees
Modified: 2011-07-10 18:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees 2011-06-03 11:20:06 UTC
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=.

Fix: - Use USERS and GROUPS

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




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--jhM0m5EwYJVTwZaRGyFrY8bABTNY5hfqmOPUjPJBQFJyGoTT
Content-Type: text/plain; name="databases-firebird25-server.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="databases-firebird25-server.patch"

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
Comment 1 Edwin Groothuis freebsd_committer 2011-06-03 11:20:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->acm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2011-07-10 18:37:25 UTC
crees       2011-07-10 17:37:11 UTC

  FreeBSD ports repository

  Modified files:
    databases/firebird25-server Makefile 
    databases/firebird25-server/files pkg-install.in 
  Log:
  Use USERS and GROUPS
  
  PR:             ports/157555
  Submitted by:   crees (me)
  Approved by:    rene (mentor, implicit), maintainer timeout (acm, 35 days)
  
  Revision  Changes    Path
  1.3       +3 -2      ports/databases/firebird25-server/Makefile
  1.2       +1 -46     ports/databases/firebird25-server/files/pkg-install.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Chris Rees freebsd_committer 2011-07-10 18:38:30 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 Chris Rees freebsd_committer 2011-07-10 18:38:48 UTC
Responsible Changed
From-To: acm->crees

Maintainer timeout