Bug 157585

Summary: Fix port: java/jboss2 should use USERS
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-06-04 10:30:12 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)

	Please note that pkg-install has been removed




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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/java/jboss2/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile	8 Dec 2009 09:23:20 -0000	1.27
+++ Makefile	2 Jun 2011 20:35:44 -0000
@@ -41,7 +41,8 @@
 STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${STARTUP_SCRIPT_NAME}
 USER=		www
 GROUP=		www
-PW?=		/usr/sbin/pw
+USERS=		${USER}
+GROUPS=		${GROUP}
 STDOUT_LOG=	${LOG_DIR}/stdout.log
 STDERR_LOG=	${LOG_DIR}/stderr.log
 AUTO_START?=	NO
@@ -116,7 +117,6 @@
 	@${ECHO_CMD} "   Logfile stderr:           ${STDERR_LOG}"
 	@${ECHO_CMD} "   Starting after install:   ${AUTO_START}"
 	@${ECHO_CMD} "   Stop time-out:            ${STOP_TIMEOUT} sec."
-	@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
 
 do-install:
 	@${ECHO_CMD} -n ">> Creating destination directory..."
Index: pkg-deinstall
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/java/jboss2/pkg-deinstall,v
retrieving revision 1.1
diff -u -r1.1 pkg-deinstall
--- pkg-deinstall	26 Apr 2002 21:54:15 -0000	1.1
+++ pkg-deinstall	2 Jun 2011 20:33:49 -0000
@@ -35,11 +35,4 @@
 	fi
 fi
 
-if [ "$2" = "POST-DEINSTALL" ]; then
-	# If the user exists, then display a message
-	if pw usershow "www" 2>/dev/null 1>&2; then
-		echo "To delete the www user permanently, use 'pw userdel www'"
-	fi
-fi
-
 exit 0
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	26 Apr 2002 21:54:15 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# Checks if the 'www' user and group exist. If they don't, then
-# an attempt is made to create both.
-#
-# $FreeBSD: ports/java/jboss2/pkg-install,v 1.1 2002/04/26 21:54:15 znerd Exp $
-#
-
-# Make sure we're called during the 'make install' process
-if [ "$2" != "PRE-INSTALL" ]; then
-    exit 0
-fi
-
-# Set some constants
-USER=www
-GROUP=${USER}
-UID=80
-GID=${UID}
-
-# See if the group already exists
-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
-
-	# If not, try to create it
-	if pw groupadd ${GROUP} -g ${GID}; then
-		echo "Added group \"${GROUP}\"."
-	else
-		echo "Adding group \"${GROUP}\" failed..."
-		exit 1
-	fi
-fi
-
-# See if the user already exists
-if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
-
-	# If not, try to create it
-	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-		-s "/sbin/nologin" -d "/nonexistent" \
-		-c "World Wide Web Owner"; \
-	then
-		echo "Added user \"${USER}\"."
-	else
-		echo "Adding user \"${USER}\" failed..."
-		exit 1
-	fi
-fi
-exit 0
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:30:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:52:41 UTC
Responsible Changed
From-To: pgollucci->crees

Invalid autoassignment
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-06-27 19:01:29 UTC
crees       2011-06-27 18:01:18 UTC

  FreeBSD ports repository

  Modified files:
    java/jboss2          Makefile pkg-deinstall 
  Removed files:
    java/jboss2          pkg-install 
  Log:
  - Use USERS and GROUPS
  
  PR:             ports/157585
  Submitted by:   Chris Rees (utisoft@gmail.com)
  Approved by:    tabthorpe (co-mentor)
  
  Revision  Changes    Path
  1.28      +2 -2      ports/java/jboss2/Makefile
  1.2       +1 -8      ports/java/jboss2/pkg-deinstall
  1.2       +0 -46     ports/java/jboss2/pkg-install (dead)
_______________________________________________
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 4 Chris Rees freebsd_committer freebsd_triage 2011-06-27 19:01:31 UTC
State Changed
From-To: open->closed

Committed. Thanks!