From jgh@FreeBSD.org  Wed Feb  1 23:48:32 2012
Return-Path: <jgh@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC16A106564A;
	Wed,  1 Feb 2012 23:48:32 +0000 (UTC)
	(envelope-from jgh@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id A09588FC0C;
	Wed,  1 Feb 2012 23:48:32 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q11NmW5O035239;
	Wed, 1 Feb 2012 23:48:32 GMT
	(envelope-from jgh@freefall.freebsd.org)
Received: (from jgh@localhost)
	by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q11NmWLD035237;
	Wed, 1 Feb 2012 23:48:32 GMT
	(envelope-from jgh)
Message-Id: <201202012348.q11NmWLD035237@freefall.freebsd.org>
Date: Wed, 1 Feb 2012 23:48:32 GMT
From: Jason Helfman <jgh@FreeBSD.org>
Reply-To: Jason Helfman <jgh@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: crees@freebsd.org
Subject: [patch] www/apache22: remove custom user creation in favor of USERS framework
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         164698
>Category:       ports
>Synopsis:       [patch] www/apache22: remove custom user creation in favor of USERS framework
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pgollucci
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 01 23:50:09 UTC 2012
>Closed-Date:    Wed Feb 08 04:35:53 UTC 2012
>Last-Modified:  Wed Feb  8 04:40:12 UTC 2012
>Originator:     Jason Helfman
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #5 r227907: Wed Nov 23 21:55:50 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386


	
>Description:
apache uses custom user creation in pre-install for installation of www user
this can be dropped and we can use the USERS framework in the portstree

here are buildlogs:
https://redports.org/buildarchive/20120201231812-36649/

>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/apache22/Makefile,v
retrieving revision 1.295
diff -u -r1.295 Makefile
--- Makefile	1 Feb 2012 18:56:08 -0000	1.295
+++ Makefile	1 Feb 2012 23:43:13 -0000
@@ -9,6 +9,7 @@
 
 PORTNAME=	apache
 PORTVERSION=	2.2.22
+PORTREVISION=	1
 #PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	${MASTER_SITE_APACHE_HTTPD}
@@ -43,6 +44,9 @@
 USE_RC_SUBR=		apache22 htcacheclean
 LIBTOOLFILES=	configure.in
 
+USERS=	www
+GROUPS=	www
+
 MPM_ITK_VERSION?=	20110321-01
 
 # for slave ports
@@ -191,9 +195,6 @@
 	@${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}," -e  "s,%%WWWGRP%%,${WWWGRP}," ${WRKSRC}/docs/conf/httpd.conf
 	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std
 
-pre-install:
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 	@${MKDIR} ${PREFIX}/etc/apache22/envvars.d
 	@${MKDIR} ${PREFIX}/etc/apache22/Includes
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	2 Aug 2009 19:35:56 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/www/apache22/pkg-install,v 1.6 2009/08/02 19:35:56 mezz Exp $
-#
-
-if [ "$2" != "PRE-INSTALL" ]; then
-	exit 0
-fi
-
-WWWUSER=www
-WWWGROUP=${WWWUSER}
-WWWUID=80
-WWWGID=${WWWUID}
-
-if ! pw groupshow "${WWWGROUP}" 2>/dev/null 1>&2; then
-	if pw groupadd ${WWWGROUP} -g ${WWWGID}; then
-		echo "Added group \"${WWWGROUP}\"."
-	else
-		echo "Adding group \"${WWWGROUP}\" failed..."
-		exit 1
-	fi
-fi
-
-if ! pw usershow "${WWWUSER}" 2>/dev/null 1>&2; then
-	if pw useradd ${WWWUSER} -u ${WWWUID} -g ${WWWGROUP} -h - \
-		-s "/sbin/nologin" -d "/nonexistent" \
-		-c "World Wide Web Owner"; \
-	then
-		echo "Added user \"${WWWUSER}\"."
-	else
-		echo "Adding user \"${WWWUSER}\" failed..."
-		exit 1
-	fi
-fi
-
-exit 0
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->apache 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Feb 1 23:50:25 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164698 
Responsible-Changed-From-To: apache->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Tue Feb 7 19:21:29 UTC 2012 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164698 
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Wed Feb 8 04:35:52 UTC 2012 
State-Changed-Why:  
Committed, Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164698 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/164698: commit references a PR
Date: Wed,  8 Feb 2012 04:35:51 +0000 (UTC)

 pgollucci    2012-02-08 04:35:31 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/apache22         Makefile Makefile.options pkg-install 
     www/apache22/files   patch-modules__proxy__mod_proxy_connect.c 
   Log:
   - Convert to USERS/GROUPS [1]
   - Resync proxy connect patch [2]
   - Bump PORTREVISION since the proxy patch is unconditionally applied
     which means we can remove that OPTION too
   
   PR:             ports/164698 [1], ports/164711 [2]
   Submitted by:   jgh@ [1], freebsd@nagilum.org [2]
   With Hat:       apache@
   Sponsored by:   RideCharge Inc. / TaxiMagic
   
   Revision  Changes    Path
   1.296     +4 -4      ports/www/apache22/Makefile
   1.9       +0 -1      ports/www/apache22/Makefile.options
   1.2       +72 -72    ports/www/apache22/files/patch-modules__proxy__mod_proxy_connect.c
   1.7       +0 -35     ports/www/apache22/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"
 
>Unformatted:
