ports/157597: [PATCH] Fix port: dns/unbound should use USERS

Chris Rees utisoft at gmail.com
Sat Jun 4 10:20:11 UTC 2011


>Number:         157597
>Category:       ports
>Synopsis:       [PATCH] Fix port: dns/unbound 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 10:20:07 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=

>How-To-Repeat:
	
>Fix:

	

	- Use USERS

	Submitted by: Chris Rees (utisoft at gmail.com)


--- dns-unbound.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/unbound/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile	25 May 2011 09:30:38 -0000	1.37
+++ Makefile	2 Jun 2011 15:32:45 -0000
@@ -19,6 +19,8 @@
 CONFIGURE_ARGS+=	--with-ssl=${OPENSSLBASE} --with-ldns-builtin
 USE_LDCONFIG=	yes
 
+USERS=		${PORTNAME}
+
 USE_RC_SUBR=	unbound
 
 MAN1=		unbound-host.1
@@ -29,8 +31,6 @@
 PORTDOCS=	CREDITS Changelog FEATURES LICENSE README README.svn \
 		README.tests TODO control_proto_spec.txt ietf67-design-02.odp \
 		ietf67-design-02.pdf requirements.txt
-PKGINSTALL=	${WRKDIR}/pkg-install
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
 SUB_FILES=	pkg-install pkg-deinstall
 PLIST_SUB+=	PYTHON=${PYTHON}
 
@@ -84,9 +84,6 @@
 	@${MKDIR} ${WRKSRC}/balancer
 	@${RM} ${WRKSRC}/util/configlexer.c
 
-pre-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 .if !defined(NOPORTDOCS)
Index: files/pkg-install.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/unbound/files/pkg-install.in,v
retrieving revision 1.3
diff -u -r1.3 pkg-install.in
--- files/pkg-install.in	17 Aug 2009 13:27:19 -0000	1.3
+++ files/pkg-install.in	2 Jun 2011 15:32:05 -0000
@@ -4,27 +4,10 @@
 #
 
 PW=/usr/sbin/pw
-UID=59
 USER="unbound"
 PREFIX="%%PREFIX%%"
 
 case $2 in
-
-PRE-INSTALL)
-	if ${PW} user show "${USER}" 2>/dev/null; then
-		echo "You already have a user \"${USER}\", so I will use it."
-	else
-		if ${PW} useradd ${USER} -u ${UID} -g daemon -h - \
-			-d "/nonexistent" -s /usr/sbin/nologin -c "unbound dns resolver"
-		then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			exit 1
-		fi
-	fi
-	;;
-
 POST-INSTALL)
 	chown "${USER}" $PREFIX/etc/unbound
 	;;
--- dns-unbound.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