ports/58739: [maintainer patch] www/apache2: Fix (hopefully) all known bugs

Clement Laforet sheepkiller at cultdeadsheep.org
Thu Oct 30 20:50:23 UTC 2003


>Number:         58739
>Category:       ports
>Synopsis:       [maintainer patch] www/apache2: Fix (hopefully) all known bugs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 30 12:50:20 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Clement Laforet
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
cotds.org
>Environment:
System: FreeBSD lucifer.cultdeadsheep.org 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Sep 22 08:20:10 CEST 2003 clement at lucifer.cultdeadsheep.org:/usr/obj/usr/src/sys/LUCIFER i386


	
>Description:
	Changelog:
		- fix LDAP deps (typo) [1]
		- fix nasty typo in DBM code (Missing + in LIB_DEPENDS=)
		- Remove NO_{ERROR;WWWDATE;CGI;ICONS;WWW} and utilize WITHOUT_WWW and WITH_CUSTOM_WWW [2]
		- HTTP_PORT => WITH_HTTP_PORT && IPV6_ONLY => WITH_IPV6_ONLY [3]
		- Add support for FreeBSD libc db [4]
		- more typo and few things...
		- Bump PORTREVISION

		Notified by:  Oliver Eikemeier <eikemeier at fillmore-labs.com> [1]
		Discussed with: Oliver Eikemeier <eikemeier at fillmore-labs.com> [2] [3]
		Requested by: Fritz Heinrichmeyer <fritz.heinrichmeyer at fernuni-hagen.de> [4]

		Changes were painful, it should be "bug free" now...
		I hope you enjoy it :-)

>How-To-Repeat:
	# make WITH_LDAP -V LIB_DEPENDS
	# make WITH_BERKELEYD=4 -V LIB_DEPENDS
>Fix:

	

--- apache2.diff begins here ---
Index: apache2/Makefile
===================================================================
RCS file: /WORK/REPO/ports/www/apache2/Makefile,v
retrieving revision 1.155
diff -u -r1.155 Makefile
--- apache2/Makefile	30 Oct 2003 09:37:13 -0000	1.155
+++ apache2/Makefile	30 Oct 2003 19:47:29 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	apache
 PORTVERSION=	2.0.48
+PORTREVISION=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	${MASTER_SITE_APACHE_HTTPD} \
 		http://sheepkiller.nerim.net/ports/${PORTNAME}/:powerlogo
@@ -33,23 +34,23 @@
 ##      WITH_MPM:                 prefork (default)
 ##                                worker
 ##                                perchild
-##      HTTP_PORT:                default: 80
+##      WITH_HTTP_PORT:           default: 80
 ##      WITH_LDAP:                Enable LDAP support (mod_auth_ldap)
 ##      WITHOUT_PROXY:            Disable proxy support
 ##          WITH_CUSTOM_PROXY:    Let you choose which proxy modules you wish
 ##      WITHOUT_AUTH:             Disable auth modules
 ##          WITH_CUSTOM_AUTH:     Let you choose which auth modules you wish
 ##      WITHOUT_DAV:              Disable DAV support
-##      IPV6_V6ONLY:              Disable IPv4 support
+##      WITH_IPV6_V6ONLY:         Disable IPv4 support
 ##      WITHOUT_SSL:              Disable SSL support
 ##      WITH_THREADS:             Enable threads support !! USE IT WITH CARE !!
 ##           WITH_CUSTOM_THREADS: Let you choose which threaded modules you want
 ##      WITH_EXPERIMENTAL:        Enable Experimental modules
 ##      WITH_DBM:                 Choose your DBM: bdb (Berkeley DB), gdbm or ndbm (default)
-##          WITH_BERKELEYDB:      Choose your BerkeleyDB version: db2, db3 or db4 (default)
+##          WITH_BERKELEYDB:      Choose your BerkeleyDB version: db2, db3 or db4 or FreeBSD (1.85)(default)
 ##      WITH_STATIC_SUPPORT:      Build statically linked support binaries
 ##      WITH_STATIC_APACHE:       Build a static version of httpd (implies WITH_STATIC_MODULES)
-##      WITH_ALL_STATIC_APACHE:   All modules statically linked.
+##      WITH_ALL_STATIC_MODULES:  All modules will be statically linked.
 ##      WITH_STATIC_MODULES:      List of modules to build modules statics (usefull for slave ports)
 ##                                (They must be already enabled (i.e. WITH_MODULES or with default configuration
 ##                                use 'make show-modules', to check if they are enabled)
@@ -60,12 +61,8 @@
 ##
 ##
 ##   Port-related:
-##      NOPORTDOCS:               Do not install documentation
-##      NO_CGI:                   Do not instal www/cgi-bin*
-##      NO_ERROR:                   Do not instal www/error
-##      NO_WWWDATA:               Do not instal www/data*
-##      NO_ICONS:                 Do not instal www/icons*
-##      NO_WWW:                   Implies NO_CGI, NO_WWWDATA, NO_ICONS and NO_ERROR
+##      WITHOUT_WWW:              Implies NO_CGI, NO_WWWDATA, NO_ICONS and NO_ERROR
+##           WITH_CUSTOM_WWW:     Let you choose your ${LOCALBASE}/www components: [cgi|errordocs|icons|wwwdata]
 ##
 ## Available make targets:
 ##      show-options:             prints this message
@@ -79,7 +76,7 @@
 ##
 
 WITH_MPM?=	prefork # or worker, perchild
-HTTP_PORT?=	80
+HTTP_PORT?=	${WITH_HTTP_PORT}
 
 GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
@@ -108,7 +105,7 @@
 MAN1=		dbmmanage.1 htdigest.1 htpasswd.1
 MAN8=		ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 suexec.8
 
-.if !defined(IPV6_V6ONLY)
+.if !defined(WITH_IPV6_V6ONLY)
 CONFIGURE_ARGS+=	--enable-v4-mapped
 .endif
 
@@ -117,45 +114,32 @@
 .endif
 
 .if defined(WITH_LDAP)
-USE_LDAP=	YES
+USE_OPENLDAP=	YES
 CONFIGURE_ARGS+=	--with-ldap \
 			--with-ldap-lib="${LOCALBASE}/lib" \
 			--with-ldap-include="${LOCALBASE}/include"
 .endif
 
-.if defined(NO_WWW)
+.if defined(WITHOUT_WWW)
 NO_CGI=		YES
 NO_WWWDATA=	YES
 NO_ICONS=	YES
 NO_ERROR=	YES
 .endif
 
-.if defined(NO_CGI)
-MAKE_ENV+=	NO_CGI=yes
-PLIST_SUB+=	CGI="@comment "
-.else
-PLIST_SUB+=	CGI=""
-.endif
-
-.if defined(NO_ICONS)
-MAKE_ENV+=	NO_ICONS=yes
-PLIST_SUB+=	ICONS="@comment "
-.else
-PLIST_SUB+=	ICONS=""
-.endif
-
-.if defined(NO_WWWDATA)
-MAKE_ENV+=	NO_WWWDATA=yes
-PLIST_SUB+=	WWWDATA="@comment "
-.else
-PLIST_SUB+=	WWWDATA=""
-.endif
-
-.if defined(NO_ERROR)
-MAKE_ENV+=	NO_ERROR=yes
-PLIST_SUB+=	ERROR="@comment "
-.else
-PLIST_SUB+=	ERROR=""
+.if defined(WITH_CUSTOM_WWW)
+.    if ${WITH_CUSTOM_WWW:Mcgi} == ""
+NO_CGI=		YES
+.    endif
+.    if ${WITH_CUSTOM_WWW:Mwwwdata} == ""
+NO_WWWDATA=		YES
+.    endif
+.    if ${WITH_CUSTOM_WWW:Merrordocs} == ""
+NO_ERROR=		YES
+.    endif
+.    if ${WITH_CUSTOM_WWW:Micons} == ""
+NO_ICONS=		YES
+.    endif
 .endif
 
 .if defined(WITH_STATIC_SUPPORT)
@@ -169,7 +153,7 @@
 CONFIGURE_ARGS+=	--with-mpm=${WITH_MPM:L} ${CONFIGURE_TARGET}
 
 show-options:
-	@${EGREP} '^##' ${.CURDIR}/Makefile | ${SED} 's/##//'
+	@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
 
 show-modules:
 	@for module in $(AVAILABLE_MODULES) ; do \
Index: apache2/Makefile.modules
===================================================================
RCS file: /WORK/REPO/ports/www/apache2/Makefile.modules,v
retrieving revision 1.1
diff -u -r1.1 Makefile.modules
--- apache2/Makefile.modules	29 Oct 2003 22:46:45 -0000	1.1
+++ apache2/Makefile.modules	30 Oct 2003 19:58:44 -0000
@@ -35,11 +35,44 @@
 PLIST_SUB+=	PREFORK="@comment " WORKER="@comment "
 .endif
 
+# Documentation section
+.if defined(NO_CGI)
+MAKE_ENV+=	NO_CGI=yes
+PLIST_SUB+=	CGI="@comment "
+.else
+PLIST_SUB+=	CGI=""
+.endif
+
+.if defined(NO_ICONS)
+MAKE_ENV+=	NO_ICONS=yes
+PLIST_SUB+=	ICONS="@comment "
+.else
+PLIST_SUB+=	ICONS=""
+.endif
+
+.if defined(NO_WWWDATA)
+MAKE_ENV+=	NO_WWWDATA=yes
+PLIST_SUB+=	WWWDATA="@comment "
+.else
+PLIST_SUB+=	WWWDATA=""
+.endif
+
+.if defined(NO_ERROR)
+MAKE_ENV+=	NO_ERROR=yes
+PLIST_SUB+=	ERROR="@comment "
+.else
+PLIST_SUB+=	ERROR=""
+.endif
+
+
 # xDBM section
 #
 .if !defined(WITH_DBM) && defined(WITH_BERKELEYDB)
 WITH_DBM=db
 .endif
+.if defined(WITH_DBM) && !defined(WITH_BERKELEYDB)
+WITH_BERKELEYDB=	FreeBSD
+.endif
 
 .if defined(WITH_DBM)
 .   if ${WITH_DBM:L} == "sdbm"
@@ -47,21 +80,20 @@
 .   elif ${WITH_DBM:L} == "gdbm"
 LIB_DEPENDS+=		gdbm.3:${PORTSDIR}/databases/gdbm
 CONFIGURE_ARGS+=	--with-gdbm=${LOCALBASE}
-.   elif ${WITH_DBM:L} == "db" || defined(WITH_BERKELEYDB)
-.       if !defined(WITH_BERKELEYDB)
-LIB_DEPENDS=		db4:${PORTSDIR}/databases/db4
-CONFIGURE_ARGS+=	--with-dbm=db4 \
-			--with-berkeley-db=${LOCALBASE}
+.   elif ${WITH_DBM:L} == "db" 
+.       if ${WITH_BERKELEYDB} == "FreeBSD"
+CONFIGURE_ARGS+=	--with-dbm=db185 \
+			--with-berkeley-db=/usr
 .       elif ${WITH_BERKELEYDB} == "db2"
-LIB_DEPENDS=		db2:${PORTSDIR}/databases/db2
+LIB_DEPENDS+=		db2:${PORTSDIR}/databases/db2
 CONFIGURE_ARGS+=	--with-dbm=db2 \
 			--with-berkeley-db=${LOCALBASE}
 .       elif ${WITH_BERKELEYDB} == "db3"
-LIB_DEPENDS=		db2:${PORTSDIR}/databases/db3
+LIB_DEPENDS+=		db3:${PORTSDIR}/databases/db3
 CONFIGURE_ARGS+=	--with-dbm=db3 \
 			--with-berkeley-db=${LOCALBASE}
 .       elif ${WITH_BERKELEYDB} == "db4"
-LIB_DEPENDS=		db4:${PORTSDIR}/databases/db4
+LIB_DEPENDS+=		db4:${PORTSDIR}/databases/db4
 CONFIGURE_ARGS+=	--with-dbm=db4 \
 			--with-berkeley-db=${LOCALBASE}
 .       else
@@ -78,13 +110,13 @@
 # How does it works ?
 # << TO BE WRITTEN >>
 # All supported modules
-AUTH_MODULES=		auth auth_anon auth_dbm auth_digest
+AUTH_MODULES=		access auth auth_anon auth_dbm auth_digest
 DAV_MODULES=		dav dav_fs
 EXPERIMENTAL_MODULES=	bucketeer case_filter case_filter_in ext_filter charset_lite \
 			optional_hook_export optional_hook_import \
 			optional_fn_import optional_fn_export
 LDAP_MODULES=		ldap auth_ldap
-MISC_MODULES=		access actions alias asis autoindex cache cern_meta \
+MISC_MODULES=		actions alias asis autoindex cache cern_meta \
 			cgi cgid charset_lite  deflate dir disk_cache env expires \
 			file_cache headers imap include info log_config logio mime \
 			mime_magic negotiation rewrite setenvif speling status \
Index: apache2/pkg-plist
===================================================================
RCS file: /WORK/REPO/ports/www/apache2/pkg-plist,v
retrieving revision 1.57
diff -u -r1.57 pkg-plist
--- apache2/pkg-plist	29 Oct 2003 22:46:45 -0000	1.57
+++ apache2/pkg-plist	30 Oct 2003 18:27:24 -0000
@@ -1554,4 +1554,4 @@
 @dirrm libexec/apache2
 @dirrm lib/apache2
 @dirrm include/apache2
- at dirrm etc/apache2
+ at unexec rmdir %D/etc 2> /dev/null || echo "===> If you plan to do not reinstall apache2, you can safely remove %D/etc/apache2"
Index: apache2/files/patch-srclib:apr-util:configure
===================================================================
RCS file: apache2/files/patch-srclib:apr-util:configure
diff -N apache2/files/patch-srclib:apr-util:configure
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ apache2/files/patch-srclib:apr-util:configure	30 Oct 2003 18:00:49 -0000
@@ -0,0 +1,13 @@
+--- srclib/apr-util/configure.orig	Thu Oct 30 18:52:48 2003
++++ srclib/apr-util/configure	Thu Oct 30 18:53:31 2003
+@@ -11281,8 +11281,8 @@
+     fi
+   fi
+   bdb_places="$places"
+-  bdb_default_search_headers="db_185.h"
+-  bdb_default_search_lib_names="db"
++  bdb_default_search_headers="db.h"
++  bdb_default_search_lib_names="c"
+ 
+ 
+   apu_have_db=0
--- apache2.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list