ports/157591: [PATCH] Fix port: databases/mysql40-server should use USERS

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


>Number:         157591
>Category:       ports
>Synopsis:       [PATCH] Fix port: databases/mysql40-server 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:40: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.


--- databases-mysql40-server.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/databases/mysql40-server/Makefile,v
retrieving revision 1.219
diff -u -r1.219 Makefile
--- Makefile	8 Feb 2011 12:01:34 -0000	1.219
+++ Makefile	2 Jun 2011 12:51:24 -0000
@@ -78,6 +78,9 @@
 
 # MySQL-Server part
 .if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY)
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
+
 USE_MYSQL=	yes
 WANT_MYSQL_VER=	40
 
@@ -121,11 +124,6 @@
 	@${REINPLACE_CMD} -e 's|\&\& defined(__GNUC__)|\&\& defined(__GNUC__) \&\& 0|' \
 		${WRKSRC}/include/my_global.h
 
-post-install:
-.if !defined(PACKAGE_BUILDING)
-	@${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
-
 .else
 # MySQL-Client part
 .if defined(CLIENT_ONLY)
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	14 Mar 2005 10:52:45 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-PATH=/bin:/usr/sbin
-
-case $2 in
-POST-INSTALL)
-	USER=mysql
-	GROUP=${USER}
-	UID=88
-	GID=${UID}
-
-	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 /nonexistent -s /sbin/nologin -c "MySQL Daemon"
-		then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			exit 1
-		fi
-	fi
-	;;
-esac
--- databases-mysql40-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