Bug 157587

Summary: Fix port: dns/powerdns-recursor 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 10:30:14 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)

	Please note that pkg-install and pkg-deinstall have been removed.



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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/powerdns-recursor/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile	30 Sep 2010 05:05:16 -0000	1.22
+++ Makefile	2 Jun 2011 15:27:13 -0000
@@ -41,6 +41,8 @@
 
 .if defined(WITH_SETUID)
 EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-setuid
+USERS=		pdns_recursor
+GROUPS=		pdns
 .endif
 
 .if defined(WITH_LUA)
@@ -71,12 +73,6 @@
 	@${REINPLACE_CMD} -e 's;"/etc/powerdns/";"${PREFIX}/etc/pdns/";' \
 		${WRKSRC}/config.h
 
-.if defined(WITH_SETUID)
-pre-install:
-		@${ECHO} "==>  Creating custom user to run pdns_recursor..."
-		@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-.endif
-
 post-install:
 .if !exists(${PREFIX}/etc/pdns/recursor.conf)
 	${INSTALL_DATA} ${PREFIX}/etc/pdns/recursor.conf-dist \
Index: pkg-deinstall
===================================================================
RCS file: pkg-deinstall
diff -N pkg-deinstall
--- pkg-deinstall	6 Aug 2008 20:48:41 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-DEINSTALL" ]; then
-    exit 0
-fi
-
-PDNSUSER=${PDNSUSER:-pdns_recursor}
-PDNSUID=${PDNSUID:-120}
-PDNSGROUP=${PDNSGROUP:-pdns}
-PDNSGID=${PDNSGID:-120}
-
-if pw groupshow "$PDNSGROUP" 2>/dev/null 1>&2; then
-	echo "To delete the PowerDNS group permanently, use 'pw groupdel ${PDNSGROUP}'"
-fi
-
-if pw usershow "$PDNSUSER" 2>/dev/null 1>&2; then
-	echo "To delete the PowerDNS user permanently, use 'pw userdel ${PDNSUSER}'"
-fi
-exit 0
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	18 Jan 2007 18:57:25 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "PRE-INSTALL" ]; then
-    exit 0
-fi
-
-PDNSUSER=${PDNSUSER:-pdns_recursor}
-PDNSUID=${PDNSUID:-120}
-PDNSGROUP=${PDNSGROUP:-pdns}
-PDNSGID=${PDNSGID:-120}
-
-if ! pw groupshow "$PDNSGROUP" 2>/dev/null 1>&2; then
-	if pw groupadd $PDNSGROUP -g $PDNSGID; then
-		echo "=> Added group \"$PDNSGROUP\"."
-	else
-		echo "=> Adding group \"$PDNSGROUP\" failed..."
-		exit 1
-	fi
-fi
-
-if ! pw usershow "$PDNSUSER" 2>/dev/null 1>&2; then
-	if pw useradd $PDNSUSER -u $PDNSUID -g $PDNSGROUP -h - \
-		-s "/sbin/nologin" -d "/nonexistent" \
-		-c "pdns_recursor pseudo-user"; \
-	then
-		echo "=> Added user \"$PDNSUSER\"."
-	else
-		echo "=> Adding user \"$PDNSUSER\" failed..."
-		exit 1
-	fi
-fi
-exit 0
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:31:43 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 10:31:49 UTC
Maintainer of dns/powerdns-recursor,

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

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

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 sten 2011-06-18 20:54:47 UTC
On Sat, 4 Jun 2011, Edwin Groothuis wrote:

> Maintainer of dns/powerdns-recursor,
>
> Please note that PR ports/157587 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/157587


Looks good, nice to see this kinda stuff integrated
in the ports system.

-- 
Sten Spans

"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:53:06 UTC
Responsible Changed
From-To: pgollucci->crees

Invalid autoassignment
Comment 6 Chris Rees freebsd_committer freebsd_triage 2011-06-22 18:01:33 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:24:28 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:34:50 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 9 dfilter service freebsd_committer freebsd_triage 2011-07-03 16:12:45 UTC
crees       2011-07-03 15:12:31 UTC

  FreeBSD ports repository

  Modified files:
    dns/powerdns-recursor Makefile 
  Removed files:
    dns/powerdns-recursor pkg-deinstall pkg-install 
  Log:
  - Use USERS and GROUPS
  
  PR:             ports/157587
  Submitted by:   Chris Rees <utisoft@gmail.com>
  Approved by:    rene (mentor)
  
  Revision  Changes    Path
  1.23      +2 -6      ports/dns/powerdns-recursor/Makefile
  1.2       +0 -19     ports/dns/powerdns-recursor/pkg-deinstall (dead)
  1.2       +0 -32     ports/dns/powerdns-recursor/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 10 Chris Rees freebsd_committer freebsd_triage 2011-07-03 16:14:01 UTC
State Changed
From-To: open->closed

Committed. Thanks!