Bug 157611

Summary: Fix port: irc/ircd-ratbox should use USERS
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-06-04 14:30:13 UTC
	

	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)




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--WOrqtpTvsc5LqdYOh72VpoLY71Tki7iyDAHSNP77tsz9W0c8
Content-Type: text/plain; name="irc-ircd-ratbox.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="irc-ircd-ratbox.patch"

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/ircd-ratbox/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	28 Jan 2010 21:29:16 -0000	1.17
+++ Makefile	4 Jun 2011 12:24:35 -0000
@@ -25,6 +25,9 @@
 USE_RC_SUBR=	ircd-ratbox.sh
 USE_PERL5_BUILD=	yes
 
+USERS=		ircd
+GROUPS=		${USERS}
+
 LOGDIR=		/var/log/${PORTNAME}
 RUNDIR=		/var/run/${PORTNAME}
 SUB_FILES=	pkg-message pkg-install
@@ -179,13 +182,12 @@
 	${PERL} ${WRKSRC}/contrib/ircd-shortcut.pl
 
 pre-su-install:
-	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 	${MKDIR} ${PREFIX}/etc/${PORTNAME}
-	${CHOWN} ircd:ircd ${PREFIX}/etc/${PORTNAME}
 	${MKDIR} ${DATADIR}/help
 	${MKDIR} ${PREFIX}/lib/${PORTNAME}/modules
 
 post-install:
+	${CHOWN} -R ircd:ircd ${PREFIX}/etc/${PORTNAME}
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/irc/ircd-ratbox/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- files/pkg-install.in	27 Jan 2006 06:09:27 -0000	1.1
+++ files/pkg-install.in	2 Jun 2011 19:19:42 -0000
@@ -3,93 +3,12 @@
 # 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 ircd 2> /dev/null ; then
-	echo "You already have a group \"ircd\", so I will use it."
-else
-	if pw groupshow 72 2> /dev/null ; then
-		echo "You already have a gid \"72\".  Please create a user \"ircd\""
-		echo "with a default group of \"ircd\"."
-		exit 1
-	fi
-	echo "You need a group \"ircd\"."
-	if which -s pw && yesno "Would you like me to create it" y; then
-		pw groupadd ircd -g 72 || exit
-		echo "Done."
-	else
-		echo "Please create it, and try again."
-		if ! pw usershow ircd 2> /dev/null ; then
-			echo "While you're at it, please create a user \"ircd\""
-			echo 'too, with a default group of "ircd".'
-		fi
-		exit 1
-	fi
-fi
-
-if pw usershow ircd 2> /dev/null ; then
-	echo "You already have a user \"ircd\", so I will use it."
-else
-        if pw usershow 72 2> /dev/null ; then
-                echo "You already have a uid \"72\".  Please create a user \"irc
-d\""
-                echo "with a default group of \"ircd\"."
-                exit 1
-        fi
-	echo "You need a user \"ircd\"."
-	if which -s pw && yesno "Would you like me to create it" y; then
-		pw useradd ircd -g ircd -u 72 -h - -d /nonexistent \
-			-s /nonexistent -c "IRC Daemon" || exit
-		echo "Done."
-	else
-		echo "Please create it, and try again."
-		exit 1
-	fi
-fi
-
+#
+# ${DO_NADA}
+#
 #-----------------------------------------------------------------------
 elif [ "x$2" = "xPOST-INSTALL" ]; then
 #-----------------------------------------------------------------------
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 14:30:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 14:30:30 UTC
Maintainer of irc/ircd-ratbox,

Please note that PR ports/157611 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157611

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 14:30:33 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 moggie 2011-06-16 22:44:35 UTC
This looks okay, thanks.


On 04/06/2011 14:30, Edwin Groothuis wrote:
> Maintainer of irc/ircd-ratbox,
>
> Please note that PR ports/157611 has just been submitted.
>
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
>
> The full text of the PR can be found at:
>      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157611
>
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:54:35 UTC
Responsible Changed
From-To: pgollucci->crees

Invalid autoassignment
Comment 6 Chris Rees freebsd_committer freebsd_triage 2011-06-22 18:02:44 UTC
Responsible Changed
From-To: crees->freebsd-ports-bugs

To pool to correct assign message
Comment 7 Chris Rees freebsd_committer freebsd_triage 2011-06-22 18:25:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

Invalid autoassignment to pgollucci
Comment 8 Chris Rees freebsd_committer freebsd_triage 2011-06-26 17:35:09 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 9 Chris Rees freebsd_committer freebsd_triage 2011-07-05 17:46:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 10 dfilter service freebsd_committer freebsd_triage 2011-07-05 17:46:36 UTC
crees       2011-07-05 16:46:23 UTC

  FreeBSD ports repository

  Modified files:
    irc/ircd-ratbox      Makefile 
    irc/ircd-ratbox/files pkg-install.in 
  Log:
  Use USERS and GROUPS
  
  PR:             ports/157611
  Approved by:    rene (mentor, implicit), Moggie (maintainer)
  
  Revision  Changes    Path
  1.18      +4 -2      ports/irc/ircd-ratbox/Makefile
  1.2       +3 -84     ports/irc/ircd-ratbox/files/pkg-install.in
_______________________________________________
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"