ports/157590: Fix port: irc/ratbox-services should use USERS
Chris Rees
utisoft at gmail.com
Sat Jun 4 09:30:22 UTC 2011
>Number: 157590
>Category: ports
>Synopsis: Fix port: irc/ratbox-services 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:30:21 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)
--- irc-ratbox-services.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/ratbox-services/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile 9 Aug 2010 16:25:55 -0000 1.13
+++ Makefile 2 Jun 2011 19:47:22 -0000
@@ -19,6 +19,9 @@
USE_RC_SUBR= ratbox-services.sh
+USERS= ircd
+GROUPS= ${USERS}
+
LOGDIR?= /var/log
RUNDIR?= /var/run
DBDIR?= /var/db/${PORTNAME}
@@ -168,7 +171,6 @@
${WRKSRC}/tools/dbupgrade.pl
pre-su-install:
- @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
${MKDIR} ${DATADIR}/help
post-install:
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/ratbox-services/files/pkg-install.in,v
retrieving revision 1.3
diff -u -r1.3 pkg-install.in
--- files/pkg-install.in 9 Mar 2010 22:43:15 -0000 1.3
+++ files/pkg-install.in 2 Jun 2011 19:46:53 -0000
@@ -3,92 +3,11 @@
# Adapted from irc/ircd-hybrid's script
#
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
#-----------------------------------------------------------------------
if [ "x$2" = "xPRE-INSTALL" ]; then
#-----------------------------------------------------------------------
-if which -s pw ; then
- :
-else
- cat <<EOF
-Your system does not include the "pw" utility. You should upgrade
-to a newer version of FreeBSD. Without "pw" this script will not
-run.
-EOF
- exit 1
-fi
-
-echo ""
-if pw groupshow ircservices 2> /dev/null ; then
- echo "You already have a group \"ircservices\", so I will use it."
-else
- if pw groupshow 73 2> /dev/null ; then
- echo "You already have a gid \"73\". Please create a user \"ircservices\""
- echo "with a default group of \"ircservices\"."
- exit 1
- fi
- echo "You need a group \"ircservices\"."
- if which -s pw && yesno "Would you like me to create it" y; then
- pw groupadd ircservices -g 73 || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- if ! pw usershow ircservices 2> /dev/null ; then
- echo "While you're at it, please create a user \"ircservices\""
- echo 'too, with a default group of "ircservices".'
- fi
- exit 1
- fi
-fi
-
-if pw usershow ircservices 2> /dev/null ; then
- echo "You already have a user \"ircservices\", so I will use it."
-else
- if pw usershow 73 2> /dev/null ; then
- echo "You already have a uid \"73\". Please create a user \"irc
-d\""
- echo "with a default group of \"ircservices\"."
- exit 1
- fi
- echo "You need a user \"ircservices\"."
- if which -s pw && yesno "Would you like me to create it" y; then
- pw useradd ircservices -g ircservices -u 73 -h - -d /nonexistent \
- -s /nonexistent -c "IRC services" || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
-fi
+# ${DO_NADA}
#-----------------------------------------------------------------------
elif [ "x$2" = "xPOST-INSTALL" ]; then
--- irc-ratbox-services.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