mt-daapd 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 bear in mind that the now useless files/pkg-install.in and files/pkg-deinstall.in have been removed, and a patch to /usr/ports/UIDs and GIDs at [1] is necessary [1]. [1] http://www.bayofrum.net/~crees/patches/uids/mt-daapd-uids.patch -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.--9NVt5243m23tvNG3zLGk0FxDfbdFjRNyCiO4LOuQcdk6guqD Content-Type: text/plain; name="mt-daapd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mt-daapd.patch" Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/mt-daapd/Makefile,v retrieving revision 1.19 diff -u -r1.19 Makefile --- Makefile 7 Apr 2011 17:29:56 -0000 1.19 +++ Makefile 1 Jun 2011 10:46:51 -0000 @@ -36,13 +36,15 @@ DAAPD_USER?= daapd DAAPD_GROUP?= daapd DAAPD_DBDIR?= ${DAAPD_MASTERDIR}/var/db/${PORTNAME} +USERS= ${DAAPD_USER} +GROUPS= ${DAAPD_GROUP} USE_RC_SUBR= mt-daapd PLIST_SUB+= DAAPD_DBDIR=${DAAPD_DBDIR} SUB_LIST+= USER=${DAAPD_USER} GROUP=${DAAPD_GROUP}\ DAAPD_DBDIR=${DAAPD_DBDIR}\ DAAPD_MASTERDIR=${DAAPD_MASTERDIR} -SUB_FILES+= pkg-install pkg-deinstall mt-daapd.conf +SUB_FILES+= mt-daapd.conf .include <bsd.port.pre.mk> @@ -52,9 +54,6 @@ @${ECHO_CMD} "DAAPD_GROUP=${DAAPD_GROUP} (default: daapd)" @${ECHO_CMD} "DAAPD_DBDIR=${DAAPD_DBDIR} (default: ${DAAPD_MASTERDIR}/var/db/${PORTNAME})" -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 7 Apr 2011 17:29:56 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/audio/mt-daapd/files/pkg-deinstall.in,v 1.2 2011/04/07 17:29:56 culot 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 7 Apr 2011 17:29:56 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/audio/mt-daapd/files/pkg-install.in,v 1.2 2011/04/07 17:29:56 culot 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 rescue this from pending/ . I have no idea how it got in there.
Maintainer of audio/mt-daapd, Please note that PR ports/157507 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/157507
State Changed From-To: open->feedback Note that maintainer has been asked for feedback.
On 06/02/2011 02:35 AM, Chris Rees wrote: > 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. > Please instead mark this port as deprecated? It's been replaced by audio/firefly. -- Mark D. Foster <mark@foster.cc> http://mark.foster.cc/
Responsible Changed From-To: freebsd-ports-bugs->rene Grab
rene 2011-06-06 19:21:48 UTC FreeBSD ports repository Modified files: audio/mt-daapd Makefile Removed files: audio/mt-daapd/files pkg-deinstall.in pkg-install.in Log: - Change this port to use the USERS and GROUPS variables [1] - Deprecate in favor of audio/firefly [2] PR: ports/157507 [1] [2] Submitted by: Chris Rees [utisoft gmail com] [1] maintainer [2] Approved by: maintainer [1] Revision Changes Path 1.20 +5 -4 ports/audio/mt-daapd/Makefile 1.3 +0 -27 ports/audio/mt-daapd/files/pkg-deinstall.in (dead) 1.3 +0 -53 ports/audio/mt-daapd/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"
State Changed From-To: feedback->closed Committed, thanks