Date: Sat, 04 May 2002 00:18:04 +0200 From: Jens Rehsack <rehsack@liwing.de> To: ache@freebsd.org Cc: ports@FreeBSD.org Subject: FreeBSD Port: apache-1.3.24_2 Message-ID: <3CD30C9C.BBFA5DC5@liwing.de>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------5AF8B96AE81B2625CF83E3BA Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, because of very high problems using the apache port in the way I'd like it, and the problem of frequent updates, I decided to make the job once correctly. I modified the Makefile a little bit to support suExec a little bit better and add an option to remove the www/mod_perl-Warning about incompatible compiler options (-D_LARGEFILE_SOURCE ...) Also I modified the start script a little bit, but this is for my use in the moment only. It helps to run apache never as root, because we do not have the resources for testing jails at the moment. I hope I could help a little bit, kind regards Jens -- L i W W W i Jens Rehsack L W W W L i W W W W i nnn gggg LiWing IT-Services L i W W W W i n n g g LLLL i W W i n n g g Friesenstraße 2 gggg 06112 Halle g g g Tel.: +49 - 3 45 - 5 17 05 91 ggg e-Mail: <rehsack@liwing.de> Fax: +49 - 3 45 - 5 17 05 92 http://www.liwing.de/ --------------5AF8B96AE81B2625CF83E3BA Content-Type: application/x-sh; name="apache.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="apache.sh" #!/bin/sh case "$1" in start) touch /var/log/httpd-access.log chmod 600 /var/log/httpd-access.log chown www:www /var/log/httpd-access.log touch /var/log/httpd-error.log chmod 600 /var/log/httpd-error.log chown www:www /var/log/httpd-error.log touch /var/run/httpd.pid chmod 600 /var/run/httpd.pid chown www:www /var/run/httpd.pid [ -x /usr/local/sbin/apachectl ] && { su -m www -c \ '/usr/local/sbin/apachectl start > /dev/null' echo -n ' apache' } ;; stop) [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0 --------------5AF8B96AE81B2625CF83E3BA Content-Type: text/plain; charset=us-ascii; name="apache.sh.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="apache.sh.diff" 5c5,18 < [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /dev/null && echo -n ' apache' --- > touch /var/log/httpd-access.log > chmod 600 /var/log/httpd-access.log > chown www:www /var/log/httpd-access.log > touch /var/log/httpd-error.log > chmod 600 /var/log/httpd-error.log > chown www:www /var/log/httpd-error.log > touch /var/run/httpd.pid > chmod 600 /var/run/httpd.pid > chown www:www /var/run/httpd.pid > [ -x /usr/local/sbin/apachectl ] && { > su -m www -c \ > '/usr/local/sbin/apachectl start > /dev/null' > echo -n ' apache' > } 8c21 < [ -r /var/run/httpd.pid ] && %%PREFIX%%/sbin/apachectl stop > /dev/null && echo -n ' apache' --- > [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache' --------------5AF8B96AE81B2625CF83E3BA Content-Type: text/plain; charset=us-ascii; name="Makefile.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile.diff" 33a34,60 > DATADIR?= ${PREFIX}/www > DOCUMENT_ROOT?= ${DATADIR}/htdocs > SUEXEC_ROOT?= ${DATADIR} > SYSCONF_DIR?= ${PREFIX}/etc/apache > > .if defined(WITH_SUEXEC) && ${WITH_SUEXEC} == YES > SUEXEC_UID_MIN?=100 > SUEXEC_GID_MIN?=100 > > SUEXEC_CONF= --enable-suexec \ > --suexec-docroot=${SUEXEC_ROOT} \ > --suexec-caller=www \ > --suexec-uidmin=${SUEXEC_UID_MIN} \ > --suexec-gidmin=${SUEXEC_GID_MIN} > > .if defined(SUEXEC_UMASK) > SUEXEC_CONF+= --suexec-umask=${SUEXEC_UMASK} > .endif > > .if defined(SUEXEC_SAFEPATH) > SUEXEC_CONF+= --suexec-safepath=${SUEXEC_SAFEPATH} > .endif > > .else > SUEXEC_CONF= --suexec-docroot=${SUEXEC_ROOT} > .endif > 42d68 < --suexec-docroot=${PREFIX}/www/data \ 48c74,77 < --enable-shared=max --- > --enable-shared=max \ > --datadir=${DATADIR} \ > --htdocsdir=${DOCUMENT_ROOT} \ > ${SUEXEC_CONF} 50c79,80 < OPTIM= -DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \ --- > > OPTIM= -DDOCUMENT_LOCATION=\\"${DOCUMENT_ROOT}\\" \ 59a90,105 > .endif > > # required by www/mod_perl > .if defined(LARGEFILE_SOURCE) > CFLAGS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > .endif > > .if defined(LISTEN_PORT) > CONFIGURE_ARGS+= \ > --with-port=${PORT} > .endif > > .if defined(SYSCONF_DIR) > CONFIGURE_ARGS+= \ > --sysconfdir=${SYSCONF_DIR} > #OPTIM+= -DSERVER_CONFIG_FILE=\\"${SYSCONF_DIR}/httpd.conf\\" --------------5AF8B96AE81B2625CF83E3BA Content-Type: text/plain; charset=us-ascii; name="Makefile.new" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile.new" # New ports collection makefile for: apache HTTPD # Date created: Fri Aug 25 16:42:36 CDT 1995 # Whom: ache@freebsd.org # # $FreeBSD: ports/www/apache13/Makefile,v 1.111 2002/04/24 13:41:36 ache Exp $ # PORTNAME= apache PORTVERSION= 1.3.24 PORTREVISION= 2 CATEGORIES= www MASTER_SITES= http://www.apache.org/dist/httpd/ \ ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/httpd/ \ ftp://ftp.rge.com/pub/infosystems/apache/dist/httpd/ \ ftp://apache.compuex.com/pub/apache/dist/httpd/ \ ftp://apache.arctic.org/pub/apache/dist/httpd/ \ ftp://ftp.epix.net/pub/apache/dist/httpd/ \ ftp://ftp.ameth.org/pub/mirrors/ftp.apache.org/apache/dist/httpd/ \ ftp://ftp.connectnet.com/pub/www/apache/httpd/ \ ftp://apache.technomancer.com/mirrors/apache/dist/httpd/ \ ftp://ftp.raver.net/pub/ftp.apache.org/httpd/ \ ftp://www3.service.digital.com/apache/dist/httpd/ \ ftp://galileo.galilei.com/pub/apache/httpd/ \ ftp://ftp.mtnranch.net/pub/apache/dist/httpd/ \ ftp://ftp.iodynamics.com/pub/mirror/apache/dist/httpd/ \ ftp://apache.nextpath.com/pub/apache/dist/httpd/ DISTNAME= apache_${PORTVERSION} #PATCH_SITES= ${MASTER_SITES} #PATCHFILES= apache_${PORTVERSION}-fix.diff MAINTAINER= ache@freebsd.org DATADIR?= ${PREFIX}/www DOCUMENT_ROOT?= ${DATADIR}/htdocs SUEXEC_ROOT?= ${DATADIR} SYSCONF_DIR?= ${PREFIX}/etc/apache .if defined(WITH_SUEXEC) && ${WITH_SUEXEC} == YES SUEXEC_UID_MIN?=100 SUEXEC_GID_MIN?=100 SUEXEC_CONF= --enable-suexec \ --suexec-docroot=${SUEXEC_ROOT} \ --suexec-caller=www \ --suexec-uidmin=${SUEXEC_UID_MIN} \ --suexec-gidmin=${SUEXEC_GID_MIN} .if defined(SUEXEC_UMASK) SUEXEC_CONF+= --suexec-umask=${SUEXEC_UMASK} .endif .if defined(SUEXEC_SAFEPATH) SUEXEC_CONF+= --suexec-safepath=${SUEXEC_SAFEPATH} .endif .else SUEXEC_CONF= --suexec-docroot=${SUEXEC_ROOT} .endif HAS_CONFIGURE= yes # += for child ports CONFIGURE_ARGS+= \ --prefix=${PREFIX} \ --server-uid=www \ --server-gid=www \ --with-perl=${PERL} \ --with-layout=FreeBSD \ --without-confadjust \ --enable-module=most \ --enable-module=auth_db \ --enable-module=mmap_static \ --disable-module=auth_dbm \ --enable-shared=max \ --datadir=${DATADIR} \ --htdocsdir=${DOCUMENT_ROOT} \ ${SUEXEC_CONF} OPTIM= -DDOCUMENT_LOCATION=\\"${DOCUMENT_ROOT}\\" \ -DDEFAULT_PATH=\\"/bin:/usr/bin:${PREFIX}/bin\\" # # Set APACHE_HARD_SERVER_LIMIT env. variable to desired value # .if defined(APACHE_HARD_SERVER_LIMIT) OPTIM+= -DHARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT} .else OPTIM+= -DHARD_SERVER_LIMIT=512 .endif # required by www/mod_perl .if defined(LARGEFILE_SOURCE) CFLAGS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 .endif .if defined(LISTEN_PORT) CONFIGURE_ARGS+= \ --with-port=${PORT} .endif .if defined(SYSCONF_DIR) CONFIGURE_ARGS+= \ --sysconfdir=${SYSCONF_DIR} #OPTIM+= -DSERVER_CONFIG_FILE=\\"${SYSCONF_DIR}/httpd.conf\\" .endif # # Set WITH_APACHE_PERF_TUNING env. variable to YES to get maximum performance # .if defined(WITH_APACHE_PERF_TUNING) && ${WITH_APACHE_PERF_TUNING} == YES OPTIM+= -DBUFFERED_LOGS CFLAGS+= -O6 -fomit-frame-pointer .endif CONFIGURE_ENV= OPTIM='${OPTIM}' LD_SHLIB='${CC}' MAN1= dbmmanage.1 htdigest.1 htpasswd.1 MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \ > ${WRKSRC}/apache.sh pre-install: PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL post-install: @if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \ ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \ fi @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> --------------5AF8B96AE81B2625CF83E3BA-- 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?3CD30C9C.BBFA5DC5>