Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2001 01:31:32 -0700 (PDT)
From:      Hye-Shik Chang <perky@fallin.lv>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/31450: Fix port: www/apache2 (sync with www/apache13)
Message-ID:  <200110230831.f9N8VWF97538@freefall.freebsd.org>

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

>Number:         31450
>Category:       ports
>Synopsis:       Fix port: www/apache2 (sync with www/apache13)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 23 01:40:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hye-Shik Chang
>Release:        FreeBSD 4.4
>Organization:
Yonsei University
>Environment:
FreeBSD kornet.hanirc.org 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Sep 24 14:46:54 KST 2001     root@kornet.hanirc.org:/home/src/sys/compile/HANIRC  i386
>Description:
. switch to www/www (sync with apache13)
. change my e-mail addr.

>How-To-Repeat:

>Fix:
diff -ruN apache2.orig/Makefile apache2/Makefile
--- apache2.orig/Makefile	Wed Apr 18 02:26:54 2001
+++ apache2/Makefile	Tue Oct 23 17:19:39 2001
@@ -1,13 +1,13 @@
 # New ports collection makefile for:	apache2
 # Date created:				7 April 2001
-# Whom:					Hye-Shik Chang <perky@python.or.kr>
+# Whom:					Hye-Shik Chang <perky@fallin.lv>
 #
 # $FreeBSD: ports/www/apache2/Makefile,v 1.96 2001/04/17 17:26:54 will Exp $
 #
 
 PORTNAME=	apache
 PORTVERSION=	2.0.16
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www ipv6
 MASTER_SITES=	http://httpd.apache.org/dist/httpd/ \
 		http://www.cybernic.com/mirror/dist/httpd/ \
@@ -21,7 +21,7 @@
 		ftp://ftp.cuckoo.com/pub/mirrors/apache/httpd/
 DISTNAME=	httpd-${PORTVERSION:S/./_/g}-beta
 
-MAINTAINER?=	perky@python.or.kr
+MAINTAINER?=	perky@fallin.lv
 
 WRKSRC=		${WRKDIR}/httpd-${PORTVERSION:S/./_/g}
 FIND?=		find
@@ -64,6 +64,9 @@
 
 post-patch:
 	@${FIND} ${WRKSRC} -name "*.orig"|${XARGS} ${RM} -f
+
+pre-install:
+	PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} PRE-INSTALL
 
 post-install:
 	@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
diff -ruN apache2.orig/files/patch-docs:conf:httpd-std.conf apache2/files/patch-docs:conf:httpd-std.conf
--- apache2.orig/files/patch-docs:conf:httpd-std.conf	Fri Apr 13 13:43:48 2001
+++ apache2/files/patch-docs:conf:httpd-std.conf	Tue Oct 23 17:16:36 2001
@@ -1,5 +1,5 @@
 --- docs/conf/httpd-std.conf.orig	Mon Mar 26 01:54:48 2001
-+++ docs/conf/httpd-std.conf	Sun Apr  8 04:26:54 2001
++++ docs/conf/httpd-std.conf	Tue Oct 23 17:12:59 2001
 @@ -64,7 +64,7 @@
  # PidFile: The file in which the server should record its process
  # identification number when it starts.
@@ -47,12 +47,14 @@
  
  ### Section 2: 'Main' server configuration
  #
-@@ -221,7 +243,7 @@
+@@ -220,8 +242,8 @@
+ #  when the value of (unsigned)Group is above 60000; 
  #  don't use Group #-1 on these systems!
  #
- User nobody
+-User nobody
 -Group #-1
-+Group nogroup
++User www
++Group www
  
  #
  # ServerAdmin: Your address, where problems with the server should be
diff -ruN apache2.orig/pkg-deinstall apache2/pkg-deinstall
--- apache2.orig/pkg-deinstall	Thu Jan  1 09:00:00 1970
+++ apache2/pkg-deinstall	Tue Oct 23 17:05:38 2001
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $FreeBSD: ports/www/apache13/pkg-deinstall,v 1.1 2001/10/21 17:33:37 ache Exp $
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+    exit 0
+fi
+
+USER=www
+
+if pw usershow "${USER}" 2>/dev/null 1>&2; then
+	if pw userdel ${USER}; then
+		echo "Delete user/group \"${USER}\"."
+	else
+		echo "Deleting user/group \"${USER}\" failed..."
+		exit 1
+	fi
+fi
+
+exit 0
diff -ruN apache2.orig/pkg-install apache2/pkg-install
--- apache2.orig/pkg-install	Thu Jan  1 09:00:00 1970
+++ apache2/pkg-install	Tue Oct 23 17:05:38 2001
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $FreeBSD: ports/www/apache13/pkg-install,v 1.1 2001/10/21 17:33:37 ache Exp $
+#
+
+if [ "$2" != "PRE-INSTALL" ]; then
+    exit 0
+fi
+
+USER=www
+GROUP=${USER}
+UID=80
+GID=${UID}
+
+if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+	if pw groupadd ${GROUP} -g ${GID}; then
+		echo "Added group \"${GROUP}\"."
+	else
+		echo "Adding group \"${GROUP}\" failed..."
+		exit 1
+	fi
+fi
+
+if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+	if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+		-s "/sbin/nologin" -d "/nonexistent" \
+		-c "World Wide Web Owner"; \
+	then
+		echo "Added user \"${USER}\"."
+	else
+		echo "Adding user \"${USER}\" failed..."
+		exit 1
+	fi
+fi
+exit 0


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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