Date: Sat, 4 Jun 2011 10:36:40 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157592: [PATCH] Fix port: games/pvpgn should use USERS Message-ID: <BLU0-SMTP194564A1A774128CF2A42C4A97E0@phx.gbl> Resent-Message-ID: <201106040940.p549eJ9k044264@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157592 >Category: ports >Synopsis: [PATCH] Fix port: games/pvpgn 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@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) --- games-pvpgn.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/games/pvpgn/Makefile,v retrieving revision 1.13 diff -u -r1.13 Makefile --- Makefile 1 Mar 2009 08:10:58 -0000 1.13 +++ Makefile 2 Jun 2011 18:16:49 -0000 @@ -23,6 +23,9 @@ USE_GMAKE= yes SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' +USERS= bnetd +GROUPS= ${USERS} + RC_DIR= ${PREFIX}/etc/rc.d RC_SUFX= .sh SED_SCRIPT+= -e 's|%%RC_DIR%%|${RC_DIR}|g' \ Index: pkg-deinstall =================================================================== RCS file: /exports/cvsroot-freebsd/ports/games/pvpgn/pkg-deinstall,v retrieving revision 1.1 diff -u -r1.1 pkg-deinstall --- pkg-deinstall 20 Jan 2005 13:46:41 -0000 1.1 +++ pkg-deinstall 2 Jun 2011 18:17:45 -0000 @@ -4,18 +4,9 @@ exit 0 fi -USER=bnetd LOGDIR=/var/log/pvpgn PIDDIR=/var/run/pvpgn -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo "To delete PvPGN user permanently, use 'pw userdel ${USER}'" -fi - -if pw groupshow "${USER}" 2>/dev/null 1>&2; then - echo "To delete PvPGN group permanently, use 'pw groupdel ${USER}'" -fi - rm -Rf ${PIDDIR} echo "If you wish to delete pvpgn data and log files, " Index: pkg-install =================================================================== RCS file: /exports/cvsroot-freebsd/ports/games/pvpgn/pkg-install,v retrieving revision 1.2 diff -u -r1.2 pkg-install --- pkg-install 4 Sep 2005 12:18:18 -0000 1.2 +++ pkg-install 2 Jun 2011 18:16:04 -0000 @@ -6,38 +6,11 @@ POST-INSTALL) USER=bnetd GROUP=${USER} - UID=700 - GID=${UID} - HOME_DIR=/nonexistent LOGDIR=/var/log/pvpgn PIDDIR=/var/run/pvpgn PKGNAME=$1 PVPGN_CONFDIR=${PKG_PREFIX:-/usr/local}/etc/pvpgn - 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 ${HOME_DIR} -s /sbin/nologin -c "Bnetd user" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - mkdir -p %%PVPGN_DIR%%/bak/charinfo mkdir -p %%PVPGN_DIR%%/bak/charsave mkdir -p %%PVPGN_DIR%%/bnmail --- games-pvpgn.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-SMTP194564A1A774128CF2A42C4A97E0>