This port uses pkg-install to create new users instead of using USERS= and GROUPS=, and also tries to delete users on deinstall without prompting -- this is a problem if another installed port uses that username. 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.--PrS7bf7aNPbARCmwUM30GrZwnlRh6NEBELJdhwlDa9hsdAW4 Content-Type: text/plain; name="audio-teamspeak_server.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="audio-teamspeak_server.patch" Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/teamspeak_server/Makefile,v retrieving revision 1.14 diff -u -r1.14 Makefile --- Makefile 5 Dec 2009 16:20:12 -0000 1.14 +++ Makefile 2 Jun 2011 10:13:03 -0000 @@ -21,14 +21,11 @@ ONLY_FOR_ARCHS= i386 NO_BUILD= yes USE_LINUX= yes -PKGDEINSTALL= ${PKGINSTALL} +USERS= teamspeak +GROUPS= ${USERS} USE_RC_SUBR= teamspeak-server -pre-install: - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL - do-install: @${MKDIR} ${PREFIX}/lib/teamspeak_server ${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${PREFIX}/lib/teamspeak_server -xf - @@ -39,8 +36,4 @@ @${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL -post-deinstall: - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGDEINSTALL} ${PORTNAME} POST-DEINSTALL - .include <bsd.port.mk> Index: pkg-install =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/teamspeak_server/pkg-install,v retrieving revision 1.1 diff -u -r1.1 pkg-install --- pkg-install 8 Oct 2003 07:53:26 -0000 1.1 +++ pkg-install 2 Jun 2011 10:12:15 -0000 @@ -9,64 +9,8 @@ GROUP=${USER} case $2 in -PRE-INSTALL) - 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}; 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} -g ${GROUP} -h - \ - -d ${TSHOME} -c "Teamspeak Server" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - if ! [ -x ~${USER} ] ; then - mkdir -p ${TSHOME} - chown ${USER}:${GROUP} ${TSHOME} - fi - ;; - POST-INSTALL) chown -R ${USER}:${GROUP} ${TSHOME} chmod -R u+w,o-rx ${TSHOME} ;; - - -POST-DEINSTALL) - if pw group show "${GROUP}" 2>/dev/null; then - if pw groupdel ${GROUP}; then - echo "Removed group \"${GROUP}\"." - else - echo "Removing group \"${GROUP}\" failed..." - exit 1 - fi - else - echo "Group \"${GROUP}\" doesn't exist!" - fi - - if pw user show "${USER}" 2>/dev/null; then - if pw userdel ${USER}; then - echo "Removed user \"${USER}\"." - else - echo "Removing user \"${USER}\" failed..." - exit 1 - fi - else - echo "User \"${USER}\" doesn't exist!" - fi - ;; esac
Responsible Changed From-To: freebsd-ports-bugs->pgollucci pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Responsible Changed From-To: pgollucci->crees
State Changed From-To: open->closed Committed.
crees 2011-06-25 19:57:41 UTC FreeBSD ports repository Modified files: audio/teamspeak_server Makefile pkg-install Log: - Use USERS and GROUPS PR: ports/157538 Submitted by: Chris Rees (utisoft@gmail.com) (me) Approved by: tabthorpe (co-mentor) Revision Changes Path 1.15 +2 -9 ports/audio/teamspeak_server/Makefile 1.2 +1 -57 ports/audio/teamspeak_server/pkg-install _______________________________________________ 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"