This port 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 note that files/pkg-install.in and files/pkg-deinstall.in have been removed. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.--2oDIYvLrjiiAIc4VbtPEqBQYiMnCMIuYGNbkoZZ7hhiB7VKP Content-Type: text/plain; name="japanese-tiarra.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="japanese-tiarra.patch" Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/japanese/tiarra/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 9 Aug 2010 08:54:34 -0000 1.7 +++ Makefile 2 Jun 2011 20:30:23 -0000 @@ -21,9 +21,10 @@ USE_RC_SUBR= tiarra NO_BUILD= yes -SUB_FILES= pkg-install pkg-deinstall pkg-message -SUB_LIST= TIARRA_USER=${TIARRA_USER} \ - TIARRA_GROUP=${TIARRA_GROUP} +USERS= ${TIARRA_USER} +GROUPS= ${TIARRA_GROUP} + +SUB_FILES= pkg-message PLIST_SUB= TIARRA_USER=${TIARRA_USER} \ TIARRA_GROUP=${TIARRA_GROUP} @@ -32,7 +33,6 @@ TIARRA_GROUP= tiarra do-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @${MKDIR} ${PREFIX}/tiarra @${TAR} cfC - ${WRKSRC} . | ${TAR} xfC - ${PREFIX}/tiarra @if [ ! -f ${PREFIX}/tiarra/tiarra.conf ]; then \ Index: files/pkg-deinstall.in =================================================================== RCS file: files/pkg-deinstall.in diff -N files/pkg-deinstall.in --- files/pkg-deinstall.in 29 Jul 2006 07:17:33 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/japanese/tiarra/files/pkg-deinstall.in,v 1.1 2006/07/29 07:17:33 ume Exp $ - -TIARRA_USER=${TIARRA_USER:=%%TIARRA_USER%%} -TIARRA_GROUP=${TIARRA_GROUP:=%%TIARRA_GROUP%%} - -delete_user() { - if pw usershow ${TIARRA_USER} 2>/dev/null 1>&2; then - echo "To delete tiarra user permanently, use 'pw userdel ${TIARRA_USER}'" - fi - if pw groupshow ${TIARRA_GROUP} 2>/dev/null 1>&2; then - echo "To delete tiarra group permanently, use 'pw groupdel ${TIARRA_GROUP}'" - fi -} - -case $2 in -POST-DEINSTALL) - delete_user - ;; -esac Index: files/pkg-install.in =================================================================== RCS file: files/pkg-install.in diff -N files/pkg-install.in --- files/pkg-install.in 29 Jul 2006 07:17:33 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,71 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/japanese/tiarra/files/pkg-install.in,v 1.1 2006/07/29 07:17:33 ume Exp $ - -TIARRA_USER=${TIARRA_USER:=%%TIARRA_USER%%} -TIARRA_GROUP=${TIARRA_GROUP:=%%TIARRA_GROUP%%} - -UID=398 -GID=398 - -# -# create 'tiarra' user and group before installing -# - -create_user() { - USER=${TIARRA_USER} - GROUP=${TIARRA_GROUP} - PW=/usr/sbin/pw - - if [ -x /usr/sbin/nologin ]; then - shell=/usr/sbin/nologin - elif [ -x /sbin/nologin ]; then - shell=/sbin/nologin - else - shell=/nonexistent - fi - uhome="/nonexistent" - - if ! ${PW} show group ${GROUP} -q >/dev/null; then - gid=${GID} - while ${PW} show group -g ${gid} -q >/dev/null; do - gid=`expr ${gid} + 1` - done - if ! ${PW} add group ${GROUP} -g ${gid}; then - e=$? - echo "*** Failed to add group \`${GROUP}'. Please add it manually." - exit ${e} - fi - echo "*** Added group \`${GROUP}' (id ${gid})" - else - gid=`${PW} show group ${GROUP} 2>/dev/null | cut -d: -f3` - fi - - if ! ${PW} show user ${USER} -q >/dev/null; then - uid=${UID} - while ${PW} show user -u ${uid} -q >/dev/null; do - uid=`expr ${uid} + 1` - done - if ! ${PW} add user ${USER} -u ${uid} -g ${gid} -d "${uhome}" \ - -c "Tiarra IRC Proxy" -s "${shell}" -p "*" \ - ; then - e=$? - echo "*** Failed to add user \`${USER}'. Please add it manually." - exit ${e} - fi - echo "*** Added user \`${USER}' (id ${uid})" - else - if ! ${PW} mod user ${USER} -g ${gid}; then - e=$? - echo "*** Failed to update user \`${USER}'." - exit ${e} - fi - echo "*** Updated user \`${USER}'." - fi -} - -case $2 in -PRE-INSTALL) - create_user - ;; -esac
Responsible Changed From-To: freebsd-ports-bugs->ume Over to maintainer (via the GNATS Auto Assign Tool)
ume 2011-06-11 17:58:32 UTC FreeBSD ports repository Modified files: japanese/tiarra Makefile Removed files: japanese/tiarra/files pkg-deinstall.in pkg-install.in Log: Use USERS and GROUPS. PR: ports/157596 Submitted by: Chris Rees <utisoft__at__gmail.com> Revision Changes Path 1.8 +4 -4 ports/japanese/tiarra/Makefile 1.2 +0 -21 ports/japanese/tiarra/files/pkg-deinstall.in (dead) 1.2 +0 -71 ports/japanese/tiarra/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: open->closed Thanks, committed!