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 - Stop removing users on deinstall -- other ports may use them Submitted by: Chris Rees (utisoft@gmail.com) Please note that files/pkg-deinstall.in and files/pkg-install.in have been removed. Also please note that the patch required for UIDs and GIDs is in ports/157507, if this is committed first please follow up to that PR saying it's no longer needed. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.--RxBOo3W9eUfVFjtWh1hwlSuz26LqlxD1SDYQTeQkoUNQzzTi Content-Type: text/plain; name="firefly.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="firefly.patch" Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/firefly/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- Makefile 26 Nov 2010 23:07:50 -0000 1.6 +++ Makefile 2 Jun 2011 09:12:49 -0000 @@ -38,12 +38,10 @@ DAAPD_GROUP?= daapd DAAPD_DBDIR?= ${PREFIX}/var/db/${PORTNAME} USE_RC_SUBR= mt-daapd +USERS= ${DAAPD_USER} +GROUPS= ${DAAPD_GROUP} PLIST_SUB+= DAAPD_DBDIR=${DAAPD_DBDIR} -SUB_LIST+= USER=${DAAPD_USER}\ - GROUP=${DAAPD_GROUP}\ - DAAPD_DBDIR=${DAAPD_DBDIR} -SUB_FILES+= pkg-install pkg-deinstall USE_LDCONFIG= yes @@ -57,9 +55,6 @@ @${REINPLACE_CMD} -e 's|echo aout|echo elf|' \ ${WRKSRC}/configure -pre-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} Index: files/pkg-deinstall.in =================================================================== RCS file: files/pkg-deinstall.in diff -N files/pkg-deinstall.in --- files/pkg-deinstall.in 26 Nov 2010 23:07:50 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/audio/firefly/files/pkg-deinstall.in,v 1.2 2010/11/26 23:07:50 beech Exp $ -# - -PATH=/bin:/usr/bin:/usr/sbin - -case $2 in - -POST-DEINSTALL) - echo '---> Starting post-deinstall script:' - - if [ -f %%PREFIX%%/etc/mt-daapd.conf ]; then - echo '---> You seem to have made some custom daapd configuration.' - echo '---> The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.' - echo '---> You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".' - - else - echo '---> Removing group "%%GROUP%%"' - /usr/sbin/pw groupdel -n %%GROUP%% - echo '---> Removing user "%%USER%%"' - echo 'y' | /usr/sbin/pw userdel -n %%USER%% - fi - - ;; - -esac Index: files/pkg-install.in =================================================================== RCS file: files/pkg-install.in diff -N files/pkg-install.in --- files/pkg-install.in 26 Nov 2010 23:07:50 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/audio/firefly/files/pkg-install.in,v 1.2 2010/11/26 23:07:50 beech Exp $ -# - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -SC_GROUP=%%GROUP%% -SC_USER=%%USER%% -SC_SHELL=/sbin/nologin -SC_HOME=/nonexistent -PW=`which pw` - -if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then - gid=3689 - while ${PW} show group -g ${gid} -q >/dev/null; do - gid=`expr ${gid} + 1` - done - if ! ${PW} add group ${SC_GROUP} -g ${gid}; then - e=$? - echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually." - exit ${e} - fi - echo "*** Added group \`${SC_GROUP}' (id ${gid})" -else - gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3` -fi - -if ! ${PW} show user ${SC_USER} -q >/dev/null; then - uid=3689 - while ${PW} show user -u ${uid} -q >/dev/null; do - uid=`expr ${uid} + 1` - done - if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \ - -c "daapd User" -s "${SC_SHELL}" -p "*" \ - ; then - e=$? - echo "*** Failed to add user \`${SC_USER}'. Please add it manually." - exit ${e} - fi - echo "*** Added user \`${SC_USER}' (id ${uid})" -else - if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \ - -c "daapd User" -s "${SC_SHELL}" -p "*" \ - ; then - e=$? - echo "*** Failed to update user \`${SC_USER}'." - exit ${e} - fi - echo "*** Updated user \`${SC_USER}'." -fi
Responsible Changed From-To: gnats-admin->freebsd-ports-bugs ports PR.
Responsible Changed From-To: freebsd-ports-bugs->rene Grab
Maintainer of audio/mt-daapd, Please note that PR ports/157521 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157521
Copy-pasted from a similar mail, this mail is about audio/firefly. Op 06-06-2011 21:08, Rene Ladan schreef: > Maintainer of audio/mt-daapd, > > Please note that PR ports/157521 has just been submitted. > > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. > > The full text of the PR can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157521
Responsible Changed From-To: rene->crees Over to new committer
State Changed From-To: open->feedback Maintainer has been asked for approval
State Changed From-To: feedback->open Maintainer has timed out
State Changed From-To: open->closed Committed
crees 2011-06-21 20:44:12 UTC FreeBSD ports repository Modified files: audio/firefly Makefile Removed files: audio/firefly/files pkg-deinstall.in pkg-install.in Log: - Use USERS and GROUPS - Stop removing users on deinstall PR: ports/157521 Submitted by: Chris Rees (me) Approved by: rene (mentor), maintainer timeout (14 days) Revision Changes Path 1.7 +2 -7 ports/audio/firefly/Makefile 1.3 +0 -27 ports/audio/firefly/files/pkg-deinstall.in (dead) 1.3 +0 -53 ports/audio/firefly/files/pkg-install.in (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"