Bug 157578 - [PATCH] Fix port: dns/dnrd should use USERS
Summary: [PATCH] Fix port: dns/dnrd should use USERS
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-04 09:40 UTC by Chris Rees
Modified: 2011-06-27 19:00 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 2011-06-04 09:40:09 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 depends on ports/157528 for the UIDs patch




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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/dnrd/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile	21 Aug 2008 06:16:53 -0000	1.30
+++ Makefile	2 Jun 2011 15:16:50 -0000
@@ -28,14 +28,12 @@
 		DEBUG "Enable debugging" off \
 		RANDOM "Enable random source port" off
 
-DNRD_USER?=	dnrd
-DNRD_GROUP?=	dnrd
+USERS=		dnrd
+GROUPS=		dnrd
 DNRD_DIR?=	${ETCDIR}
 
 SUB_FILES=	pkg-install
-SUB_LIST+=	DNRD_USER=${DNRD_USER} \
-		DNRD_GROUP=${DNRD_GROUP} \
-		DNRD_DIR=${DNRD_DIR}
+SUB_LIST+=	DNRD_DIR=${DNRD_DIR}
 
 .include <bsd.port.pre.mk>
 
@@ -55,10 +53,6 @@
 CONFIGURE_ARGS+=	--enable-random-src
 .endif
 
-pre-install:
-	@${ECHO} "==>  Creating custom user to run dnrd..."
-	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 do-install:
 	@${ECHO} "==>  Creating dnrd directory"
 	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
Index: pkg-install
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/dnrd/pkg-install,v
retrieving revision 1.1
diff -u -r1.1 pkg-install
--- pkg-install	6 Sep 2005 12:10:46 -0000	1.1
+++ pkg-install	2 Jun 2011 15:14:30 -0000
@@ -1,34 +1,9 @@
 #!/bin/sh
 
 
-USER=${DNRDUSER:-dnrd}
-GROUP=${USER}
 SYSCONF_DIR=${SYSCONF_DIR:-${PKG_PREFIX}/etc/dnrd}
 
 case $2 in
-	PRE-INSTALL)
-		if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
-			if pw groupadd ${GROUP}; then
-				echo "Added group \"${GROUP}\"."
-			else
-				echo "Adding group \"${GROUP}\" failed..."
-				exit 1
-			fi
-		fi
-
-		if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
-			if pw useradd ${USER} -g ${GROUP} -h - \
-				-s "/sbin/nologin" -d "/var/empty" \
-				-c "DNRD daemon"; \
-			then
-				echo "Added user \"${USER}\"."
-			else
-				echo "Adding user \"${USER}\" failed..."
-				exit 1
-			fi
-		fi
-		;;
-
 	POST-INSTALL)
 		if [ ! -d ${SYSCONF_DIR} ]; then
 			mkdir -p ${SYSCONF_DIR}
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 09:40:32 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 09:40:35 UTC
Maintainer of dns/dnrd,

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

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

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Natanael Copa 2011-06-06 07:27:58 UTC
On Sat, Jun 4, 2011 at 10:40 AM, Edwin Groothuis <edwin@freebsd.org> wrote:
> Maintainer of dns/dnrd,
>
> Please note that PR ports/157578 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.

I approve the patch. Thanks!

-- 
Natanael Copa
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:50:38 UTC
Responsible Changed
From-To: pgollucci->crees
Comment 6 Chris Rees freebsd_committer freebsd_triage 2011-06-25 13:49:06 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-06-27 18:54:31 UTC
crees       2011-06-27 17:54:21 UTC

  FreeBSD ports repository

  Modified files:
    dns/dnrd             Makefile pkg-install 
  Log:
  - Use USERS and GROUPS
  
  PR:             ports/157578
  Submitted by:   Chris Rees (utisoft@gmail.com)
  Approved by:    tabthorpe (co-mentor)
  
  Revision  Changes    Path
  1.31      +3 -9      ports/dns/dnrd/Makefile
  1.2       +0 -25     ports/dns/dnrd/pkg-install
_______________________________________________
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 8 Chris Rees freebsd_committer freebsd_triage 2011-06-27 18:54:36 UTC
State Changed
From-To: open->closed

Committed. Thanks!