Date: Sat, 4 Jun 2011 10:15:25 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157585: Fix port: java/jboss2 should use USERS Message-ID: <BLU0-SMTP1096C2B02DDBE3343358CC1A97E0@phx.gbl> Resent-Message-ID: <201106040930.p549UDEo032813@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157585 >Category: ports >Synopsis: Fix port: java/jboss2 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:30:12 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@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@gmail.com) Please note that pkg-install has been removed --- java-jboss2.patch begins here --- 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 --- java-jboss2.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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP1096C2B02DDBE3343358CC1A97E0>