From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 1 23:50:10 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 050F61065673 for ; Wed, 1 Feb 2012 23:50:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D65058FC18 for ; Wed, 1 Feb 2012 23:50:09 +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 q11No9GF035519 for ; Wed, 1 Feb 2012 23:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q11No9QV035518; Wed, 1 Feb 2012 23:50:09 GMT (envelope-from gnats) Resent-Date: Wed, 1 Feb 2012 23:50:09 GMT Resent-Message-Id: <201202012350.q11No9QV035518@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jason Helfman 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: crees@FreeBSD.org Subject: ports/164698: [patch] www/apache22: remove custom user creation in favor of USERS framework X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jason Helfman List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2012 23:50:10 -0000 >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: