Date: Thu, 16 Jun 2011 20:35:59 +0100 From: Chris Rees <crees@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157927: Fix port: irc/undernet-ircu Direct use of pw in pkg-install Message-ID: <BLU0-SMTP43FC8E6ED6E210730913CEA96A0@phx.gbl> Resent-Message-ID: <201106161940.p5GJe7cb055564@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157927 >Category: ports >Synopsis: Fix port: irc/undernet-ircu Direct use of pw in pkg-install >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: Thu Jun 16 19:40:06 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= >How-To-Repeat: >Fix: - Use USERS and GROUPS --- irc-undernet-ircu.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/irc/undernet-ircu/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- Makefile 22 Aug 2009 00:24:18 -0000 1.8 +++ Makefile 16 Jun 2011 19:24:55 -0000 @@ -15,6 +15,9 @@ CONFLICTS= ircd-hybrid-7.[0-9]* +USERS= undernet +GROUPS= ${USERS} + GNU_CONFIGURE= yes USE_RC_SUBR= undernet.sh CONFIGURE_ARGS= --with-dpath=${PREFIX}/etc/ --with-symlink=no @@ -86,9 +89,6 @@ CONFIGURE_ARGS+= --with-leak-detect .endif -pre-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @${ECHO_MSG} "" @${ECHO_MSG} " To run undernet ircu you must add 'undernet_enable=\"YES\" to" Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- pkg-install 1 May 2008 00:31:56 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,40 +0,0 @@ -#!/bin/sh - -if [ "x$2" != "xPRE-INSTALL" ]; then - exit 0; -fi - - USER=undernet - GROUP=${USER} - UID=134 - GID=${UID} - 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} -g ${GID}; 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." - if pw usermod ${USER} -d "/nonexistant" - then - echo "Changed home directory of \"${USER}\" to \"${NONEXISTENT}\"" - else - echo "Changing home directory of \"${USER}\" to \"${NONEXISTENT}\" failed..." - exit 1 - fi - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "/nonexistant" -s "/sbin/nologin" -c "Undernet ircu Daemon" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi --- irc-undernet-ircu.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-SMTP43FC8E6ED6E210730913CEA96A0>