Date: Sat, 4 Jun 2011 09:26:09 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157575: [PATCH] Fix port: biology/distribfold should use USERS Message-ID: <BLU0-SMTP146E535C441BEF9E615C9AFA97E0@phx.gbl> Resent-Message-ID: <201106040830.p548UCN2077071@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157575 >Category: ports >Synopsis: [PATCH] Fix port: biology/distribfold 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 08:30:12 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=. It also broke in my Tinderbox because files/*.sh were not marked executable, problem solved by using ${SH} first. >How-To-Repeat: >Fix: - Use USERS and GROUPS - Use ${SH} instead of calling script directly Submitted by: Chris Rees (utisoft@gmail.com) Please bear in mind that pkg-install has been removed This PR depends on ports/157528 for the UID and GID --- biology-distribfold.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/biology/distribfold/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 16 Apr 2007 11:57:17 -0000 1.15 +++ Makefile 2 Jun 2011 18:00:56 -0000 @@ -34,6 +34,8 @@ # default users DNETFOLD_USER=dnetfold DNETFOLD_GROUP=dnetfold +USERS= ${DNETFOLD_USER} +GROUPS= ${DNETFOLD_GROUP} # default number of processors WITH_NCPU?= 1 @@ -44,11 +46,6 @@ @${REINPLACE_CMD} -E -e 's|%%DESTINATION_DIR%%|${DESTINATION_DIR}/cpu0|' \ ${WRKSRC}/foldit -pre-install: -# create users - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ - ${PKGINSTALL} ${PKGNAME} POST-INSTALL - do-install: # remove any patch scrap files .for ext in bak orig @@ -62,7 +59,7 @@ @${INSTALL_SCRIPT} ${WRKDIR}/distribfold.sh ${PREFIX}/etc/rc.d # for every cpu directory @ncpu=`${CAT} ${WRKDIR}/ncpu` ; \ - for dir in `${FILESDIR}/number_of_dirs.sh $${ncpu}` ; do \ + for dir in `${SH} ${FILESDIR}/number_of_dirs.sh $${ncpu}` ; do \ DESTINATION_DIR=${DESTINATION_DIR}/cpu$${dir} ; \ ${MKDIR} $${DESTINATION_DIR} ; \ ${INSTALL_DATA} ${WRKSRC}/* $${DESTINATION_DIR} ; \ Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- pkg-install 7 Oct 2002 03:07:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,41 +0,0 @@ -#! /bin/sh -# -# $FreeBSD: ports/biology/distribfold/pkg-install,v 1.1 2002/10/07 03:07:13 lioux Exp $ -# taken from devel/perforce - -PATH=/bin:/usr/sbin - -DNETFOLD_USER=${DNETFOLD_USER:-dnetfold} -DNETFOLD_GROUP=${DNETFOLD_GROUP:-dnetfold} - -case $2 in -POST-INSTALL) - USER=${DNETFOLD_USER} - GROUP=${DNETFOLD_GROUP} - - 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 /nonexistent -c "distribfold Daemon" -s /sbin/nologin - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - ;; -esac --- biology-distribfold.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-SMTP146E535C441BEF9E615C9AFA97E0>