ports/157580: Fix port: irc/hybserv should use USERS
Chris Rees
utisoft at gmail.com
Sat Jun 4 09:10:10 UTC 2011
>Number: 157580
>Category: ports
>Synopsis: Fix port: irc/hybserv 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 09:10:09 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 at 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
Submitted by: Chris Rees (utisoft at gmail.com)
Please bear in mind that pkg-install has been removed.
--- irc-hybserv.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/hybserv/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile 21 Mar 2011 07:13:04 -0000 1.18
+++ Makefile 2 Jun 2011 19:03:04 -0000
@@ -16,6 +16,9 @@
USE_GMAKE= yes
GNU_CONFIGURE= yes
+USERS= ${PORTNAME}
+GROUPS= ${USERS}
+
WRKSRC= ${WRKDIR}/hybserv
.if defined(WITH_DAEMONTOOLS)
@@ -23,9 +26,6 @@
RUN_DEPENDS+= supervise:${PORTSDIR}/sysutils/daemontools
.endif
-pre-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
post-install:
@${SED} -e "s#%PREFIX%#${PREFIX}#" ${FILESDIR}/hybserv.sh \
> ${WRKDIR}/hybserv.sh
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install 31 Mar 2007 12:53:57 -0000 1.4
+++ /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=hybserv
- GROUP=${USER}
- UID=76
- 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 ${NONEXISTENT}
- 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 ${NONEXISTENT} -s /sbin/nologin -c "HybServ Daemon"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
--- irc-hybserv.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:
More information about the freebsd-ports-bugs
mailing list