Bug 157927 - Fix port: irc/undernet-ircu Direct use of pw in pkg-install
Summary: Fix port: irc/undernet-ircu Direct use of pw in pkg-install
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 20:40 UTC by Chris Rees
Modified: 2011-06-17 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees freebsd_committer freebsd_triage 2011-06-16 20:40:06 UTC
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=

Fix: - Use USERS and GROUPS




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

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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-16 20:40:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

Submitter has GNATS access (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-16 20:40:55 UTC
Maintainer of irc/undernet-ircu,

Please note that PR ports/157927 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/157927

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-16 20:40:57 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 weaseal 2011-06-16 21:19:40 UTC
Well doesn't that just make it all very simple!
Looks good!
Thanks for your patch,
Walt

On Thu, Jun 16, 2011 at 3:40 PM, Edwin Groothuis <edwin@freebsd.org> wrote:

> Maintainer of irc/undernet-ircu,
>
> Please note that PR ports/157927 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/157927
>
> --
> Edwin Groothuis via the GNATS Auto Assign Tool
> edwin@FreeBSD.org
>
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-17 17:27:59 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-06-17 21:19:04 UTC
crees       2011-06-17 20:18:55 UTC

  FreeBSD ports repository

  Modified files:
    irc/undernet-ircu    Makefile 
  Removed files:
    irc/undernet-ircu    pkg-install 
  Log:
  - Use USERS and GROUPS
  
  PR:             ports/157927
  Submitted by:   crees
  Approved by:    Maintainer, rene (mentor)
  
  Revision  Changes    Path
  1.9       +3 -3      ports/irc/undernet-ircu/Makefile
  1.2       +0 -40     ports/irc/undernet-ircu/pkg-install (dead)
_______________________________________________
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"
Comment 7 Chris Rees freebsd_committer freebsd_triage 2011-06-17 21:19:06 UTC
State Changed
From-To: open->closed

Committed.