Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Feb 2012 23:48:32 GMT
From:      Jason Helfman <jgh@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        crees@FreeBSD.org
Subject:   ports/164698: [patch] www/apache22: remove custom user creation in favor of USERS framework
Message-ID:  <201202012348.q11NmWLD035237@freefall.freebsd.org>
Resent-Message-ID: <201202012350.q11No9QV035518@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 01 23:50:09 UTC 2012
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202012348.q11NmWLD035237>