cvsdist 3cbd43b
%define contentdir /var/www
cvsdist 3cbd43b
%define suexec_caller apache
cvsdist 6af796e
%define mmn 20020628
cvsdist 3cbd43b
cvsdist f8e1fe3
%ifarch ia64
cvsdist f8e1fe3
# disable debuginfo on IA64
cvsdist f8e1fe3
%define debug_package %{nil}
cvsdist f8e1fe3
%endif
cvsdist f8e1fe3
cvsdist 3cbd43b
Summary: Apache HTTP Server
cvsdist 3cbd43b
Name: httpd
cvsdist c704917
Version: 2.0.40
cvsdist 281bcfb
Release: 21.9
cvsdist 3cbd43b
URL: http://httpd.apache.org/
cvsdist c704917
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
cvsdist 3cbd43b
Source1: index.html
cvsdist 3cbd43b
Source3: httpd.logrotate
cvsdist 3cbd43b
Source4: httpd.init
cvsdist 3cbd43b
Source6: powered_by.gif
cvsdist 3cbd43b
Source10: httpd.conf
cvsdist 3cbd43b
Source11: ssl.conf
cvsdist 8e188fb
Source14: mod_ssl-Makefile.crt
cvsdist f8e1fe3
Source15: mod_ssl-Makefile.crl
cvsdist f8e1fe3
# Documentation
cvsdist f8e1fe3
Source30: migration.xml
cvsdist f8e1fe3
Source31: migration.css
cvsdist f8e1fe3
Source32: html.xsl
cvsdist f8e1fe3
Source33: README.confd
cvsdist 3cbd43b
# build/scripts patches
cvsdist c704917
Patch1: httpd-2.0.40-apctl.patch
cvsdist 3cbd43b
Patch2: httpd-2.0.36-apxs.patch
cvsdist 3cbd43b
Patch3: httpd-2.0.36-sslink.patch
cvsdist e3cd9fe
# Bug fixes
cvsdist e3cd9fe
Patch20: httpd-2.0.40-davsegv.patch
cvsdist f8e1fe3
Patch21: httpd-2.0.40-glibc23.patch
cvsdist 739d054
Patch22: httpd-2.0.40-nphcgi.patch
cvsdist 739d054
Patch23: httpd-2.0.40-leaks.patch
cvsdist 739d054
Patch24: httpd-2.0.40-proxy.patch
cvsdist 739d054
Patch25: httpd-2.0.40-range.patch
cvsdist 739d054
Patch26: httpd-2.0.40-pipelog.patch
cvsdist 739d054
Patch27: httpd-2.0.40-rwmap.patch
cvsdist 739d054
Patch28: httpd-2.0.40-stream.patch
cvsdist 739d054
Patch29: httpd-2.0.40-subreq.patch
cvsdist 739d054
Patch30: httpd-2.0.40-sslexcl.patch
cvsdist 739d054
Patch31: httpd-2.0.40-include.patch
cvsdist 38aff7e
Patch32: httpd-2.0.46-graceful.patch
cvsdist 38aff7e
Patch33: httpd-2.0.40-rand.patch
cvsdist 3cbd43b
# features/functional changes
cvsdist 3cbd43b
Patch40: httpd-2.0.36-cnfdir.patch
cvsdist 3cbd43b
Patch41: httpd-2.0.36-redhat.patch
cvsdist d5ddf48
Patch42: httpd-2.0.40-xfsz.patch
cvsdist b8eb6a9
Patch43: httpd-2.0.40-pod.patch
cvsdist f8e1fe3
Patch44: httpd-2.0.40-noshmht.patch
cvsdist 739d054
Patch45: httpd-2.0.40-prctl.patch
cvsdist e3cd9fe
# Security fixes
cvsdist e3cd9fe
Patch60: httpd-2.0.40-CAN-2002-0840.patch
cvsdist e3cd9fe
Patch61: httpd-2.0.40-CAN-2002-0843.patch
cvsdist f8e1fe3
Patch62: httpd-2.0.40-CAN-2003-0020.patch
cvsdist 739d054
Patch63: httpd-2.0.40-CAN-2003-0083.patch
cvsdist 739d054
Patch64: httpd-2.0.40-CAN-2003-0132.patch
cvsdist 739d054
Patch65: httpd-2.0.40-fdleak.patch
cvsdist 739d054
Patch66: httpd-2.0.40-CAN-2003-0245.patch
cvsdist 739d054
Patch67: httpd-2.0.40-CAN-2003-0189.patch
cvsdist 739d054
Patch68: httpd-2.0.40-CAN-2003-0192.patch
cvsdist 739d054
Patch69: httpd-2.0.40-CAN-2003-0253.patch
cvsdist 739d054
Patch70: httpd-2.0.40-CAN-2003-0254.patch
cvsdist 739d054
Patch71: httpd-2.0.40-VU379828.patch
cvsdist 38aff7e
Patch72: httpd-2.0.40-CAN-2003-0542.patch
cvsdist 38aff7e
Patch73: httpd-2.0.40-CAN-2003-0789.patch
cvsdist 3cbd43b
License: Apache Software License
cvsdist 3cbd43b
Group: System Environment/Daemons
cvsdist 3cbd43b
BuildRoot: %{_tmppath}/%{name}-root
cvsdist f8e1fe3
BuildPrereq: db4-devel, expat-devel, findutils, perl, pkgconfig, xmlto >= 0.0.11
cvsdist 3cbd43b
Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find
cvsdist 3cbd43b
Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv
cvsdist 3cbd43b
Prereq: sh-utils, textutils, /usr/sbin/useradd
cvsdist 3cbd43b
Provides: webserver
cvsdist 6af796e
Provides: httpd-mmn = %{mmn}
cvsdist 3cbd43b
Conflicts: thttpd
cvsdist 3cbd43b
Obsoletes: apache, secureweb, mod_dav
cvsdist 3cbd43b
cvsdist 3cbd43b
%description
cvsdist 3cbd43b
Apache is a powerful, full-featured, efficient, and freely-available
cvsdist 3cbd43b
Web server. Apache is also the most popular Web server on the
cvsdist 3cbd43b
Internet.
cvsdist 3cbd43b
cvsdist 3cbd43b
%package devel
cvsdist 3cbd43b
Group: Development/Libraries
cvsdist 3cbd43b
Summary: Development tools for the Apache HTTP server.
cvsdist 3cbd43b
Obsoletes: secureweb-devel, apache-devel
cvsdist 3cbd43b
Requires: libtool, httpd = %{version}
cvsdist 3cbd43b
cvsdist 3cbd43b
%description devel
cvsdist 3cbd43b
The httpd-devel package contains the APXS binary and other files
cvsdist 3cbd43b
that you need to build Dynamic Shared Objects (DSOs) for Apache.
cvsdist 3cbd43b
cvsdist 3cbd43b
If you are installing the Apache HTTP server and you want to be
cvsdist 3cbd43b
able to compile or develop additional modules for Apache, you need
cvsdist 3cbd43b
to install this package.
cvsdist 3cbd43b
cvsdist 3cbd43b
%package manual
cvsdist 3cbd43b
Group: Documentation
cvsdist 3cbd43b
Summary: Documentation for the Apache HTTP server.
cvsdist 3cbd43b
Obsoletes: secureweb-manual, apache-manual
cvsdist 3cbd43b
cvsdist 3cbd43b
%description manual
cvsdist 3cbd43b
The httpd-manual package contains the complete manual and
cvsdist 3cbd43b
reference guide for the Apache HTTP server. The information can
cvsdist 3cbd43b
also be found at http://httpd.apache.org/docs/.
cvsdist 3cbd43b
cvsdist 3cbd43b
%package -n mod_ssl
cvsdist 3cbd43b
Group: System Environment/Daemons
cvsdist 3cbd43b
Summary: SSL/TLS module for the Apache HTTP server
cvsdist 3cbd43b
Serial: 1
cvsdist 3cbd43b
BuildPrereq: openssl-devel
cvsdist 3cbd43b
Prereq: openssl, dev, /bin/cat
cvsdist 6af796e
Requires: httpd, make, httpd-mmn = %{mmn}
cvsdist 3cbd43b
cvsdist 3cbd43b
%description -n mod_ssl
cvsdist 3cbd43b
The mod_ssl module provides strong cryptography for the Apache Web
cvsdist 3cbd43b
server via the Secure Sockets Layer (SSL) and Transport Layer
cvsdist 3cbd43b
Security (TLS) protocols.
cvsdist 3cbd43b
cvsdist 3cbd43b
%prep
cvsdist 3cbd43b
%setup -q
cvsdist 739d054
%patch1 -p1 -b .apctl
cvsdist 739d054
%patch2 -p1 -b .apxs
cvsdist 3cbd43b
%patch3 -p0 -b .sslink
cvsdist 3cbd43b
cvsdist e3cd9fe
%patch20 -p1 -b .davsegv
cvsdist f8e1fe3
%patch21 -p1 -b .glibc23
cvsdist 739d054
%patch22 -p1 -b .nphcgi
cvsdist 739d054
%patch23 -p0 -b .leaks
cvsdist 739d054
%patch24 -p1 -b .proxy
cvsdist 739d054
%patch25 -p1 -b .range
cvsdist 739d054
%patch26 -p1 -b .pipelog
cvsdist 739d054
%patch27 -p1 -b .rwmap
cvsdist 739d054
%patch28 -p1 -b .stream
cvsdist 739d054
%patch29 -p1 -b .subreq
cvsdist 739d054
%patch30 -p1 -b .sslexcl
cvsdist 739d054
%patch31 -p1 -b .include
cvsdist 38aff7e
%patch32 -p1 -b .graceful
cvsdist 38aff7e
%patch33 -p1 -b .rand
cvsdist e3cd9fe
cvsdist 3cbd43b
%patch40 -p0 -b .cnfdir
cvsdist 3cbd43b
%patch41 -p0 -b .redhat
cvsdist d5ddf48
%patch42 -p0 -b .xfsz
cvsdist b8eb6a9
%patch43 -p0 -b .pod
cvsdist f8e1fe3
%patch44 -p0 -b .noshmht
cvsdist 739d054
%patch45 -p1 -b .prctl
cvsdist 3cbd43b
cvsdist f8e1fe3
# no -b to prevent droplets in install root.
cvsdist f8e1fe3
%patch60 -p1
cvsdist e3cd9fe
%patch61 -p1 -b .can0843
cvsdist f8e1fe3
%patch62 -p1 -b .can0020
cvsdist 739d054
%patch63 -p1 -b .can0083
cvsdist 739d054
%patch64 -p1 -b .can0132
cvsdist 739d054
%patch65 -p1 -b .fdleak
cvsdist 739d054
%patch66 -p1 -b .can0245
cvsdist 739d054
%patch67 -p1 -b .can0189
cvsdist 739d054
%patch68 -p1 -b .can0192
cvsdist 739d054
%patch69 -p1 -b .can0253
cvsdist 739d054
%patch70 -p1 -b .can0254
cvsdist 739d054
%patch71 -p1 -b .vu379828
cvsdist 38aff7e
%patch72 -p1 -b .can0542
cvsdist 38aff7e
%patch73 -p1 -b .can0789
cvsdist f8e1fe3
cvsdist f8e1fe3
# Safety check: prevent build if defined MMN does not equal upstream MMN.
cvsdist f8e1fe3
vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -v '#'`
cvsdist f8e1fe3
if test "x${vmmn}" != "x%{mmn}"; then
cvsdist f8e1fe3
   : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}.
cvsdist f8e1fe3
   : Update the mmn macro and rebuild.
cvsdist f8e1fe3
   exit 1
cvsdist f8e1fe3
fi
cvsdist f8e1fe3
cvsdist 739d054
%build
cvsdist f8e1fe3
# update location of migration guide in apachectl
cvsdist f8e1fe3
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
cvsdist f8e1fe3
	support/apachectl.in
cvsdist 3cbd43b
cvsdist 3cbd43b
# regenerate configure scripts
cvsdist 3cbd43b
./buildconf
cvsdist 3cbd43b
cvsdist f8e1fe3
# Before configure; fix location of build dir in generated apxs
cvsdist f8e1fe3
%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \
cvsdist f8e1fe3
	support/apxs.in
cvsdist b8b92c1
cvsdist f8e1fe3
# build the migration guide
cvsdist f8e1fe3
xmlto --skip-validation -x $RPM_SOURCE_DIR/html.xsl html-nochunks $RPM_SOURCE_DIR/migration.xml
cvsdist f8e1fe3
cp $RPM_SOURCE_DIR/migration.css . # make %%doc happy
cvsdist f8e1fe3
cvsdist 281bcfb
CFLAGS="$RPM_OPT_FLAGS"
cvsdist f8e1fe3
if pkg-config openssl ; then
cvsdist f8e1fe3
	# configure -C barfs with trailing spaces in CFLAGS
cvsdist 38aff7e
	CFLAGS="$CFLAGS `pkg-config --cflags openssl | sed 's/ *$//'`"
cvsdist f8e1fe3
	AP_LIBS="$AP_LIBS `pkg-config --libs openssl`"
cvsdist f8e1fe3
else
cvsdist f8e1fe3
	AP_LIBS="-lssl -lcrypto"
cvsdist f8e1fe3
fi
cvsdist 38aff7e
export CFLAGS AP_LIBS
cvsdist f8e1fe3
cvsdist f8e1fe3
function mpmbuild()
cvsdist f8e1fe3
{
cvsdist f8e1fe3
mpm=$1; shift
cvsdist f8e1fe3
mkdir $mpm; pushd $mpm
cvsdist f8e1fe3
cat > config.cache <
cvsdist f8e1fe3
ac_cv_func_pthread_mutexattr_setpshared=no
cvsdist f8e1fe3
ac_cv_func_sem_open=no
cvsdist f8e1fe3
EOF
cvsdist f8e1fe3
../configure -C \
cvsdist 3cbd43b
 	--prefix=%{_sysconfdir}/httpd \
cvsdist 3cbd43b
 	--exec-prefix=%{_prefix} \
cvsdist 3cbd43b
 	--bindir=%{_bindir} \
cvsdist 3cbd43b
 	--sbindir=%{_sbindir} \
cvsdist 3cbd43b
 	--mandir=%{_mandir} \
cvsdist f8e1fe3
	--libdir=%{_libdir} \
cvsdist 3cbd43b
	--sysconfdir=%{_sysconfdir}/httpd/conf \
cvsdist 3cbd43b
	--includedir=%{_includedir}/httpd \
cvsdist 3cbd43b
	--libexecdir=%{_libdir}/httpd/modules \
cvsdist 3cbd43b
	--datadir=%{contentdir} \
cvsdist f8e1fe3
	--with-mpm=$mpm \
cvsdist 3cbd43b
	--enable-suexec --with-suexec \
cvsdist 3cbd43b
	--with-suexec-caller=%{suexec_caller} \
cvsdist 3cbd43b
	--with-suexec-docroot=%{contentdir} \
cvsdist 3cbd43b
	--with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
cvsdist 3cbd43b
	--with-suexec-bin=%{_sbindir}/suexec \
cvsdist 3cbd43b
	--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
cvsdist 38aff7e
        --with-devrandom=/dev/urandom \
cvsdist f8e1fe3
	$*
cvsdist f8e1fe3
cvsdist f8e1fe3
make %{?_smp_mflags}
cvsdist f8e1fe3
popd
cvsdist f8e1fe3
}
cvsdist f8e1fe3
cvsdist f8e1fe3
# Only bother enabling optional modules for main build.
cvsdist f8e1fe3
mpmbuild prefork --enable-mods-shared=all \
cvsdist 3cbd43b
	--enable-ssl --with-ssl \
cvsdist f8e1fe3
	--enable-deflate --enable-cgid \
cvsdist 3cbd43b
	--enable-proxy --enable-proxy-connect \
cvsdist f13b38c
	--enable-proxy-http --enable-proxy-ftp
cvsdist f8e1fe3
cvsdist f8e1fe3
# To prevent most modules being built statically into httpd.worker, 
cvsdist f8e1fe3
# easiest way seems to be enable them shared.
cvsdist f8e1fe3
mpmbuild worker --enable-mods-shared=all
cvsdist f8e1fe3
cvsdist f8e1fe3
# Verify that the same modules were built into the two httpd binaries
cvsdist f8e1fe3
./prefork/httpd -l | grep -v prefork > prefork.mods
cvsdist f8e1fe3
./worker/httpd -l | grep -v worker > worker.mods
cvsdist f8e1fe3
if ! diff -u prefork.mods worker.mods; then
cvsdist f8e1fe3
  : Different modules built into httpd binaries, will not proceed
cvsdist f8e1fe3
  exit 1
cvsdist f8e1fe3
fi
cvsdist 3cbd43b
cvsdist 3cbd43b
%install
cvsdist 3cbd43b
rm -rf $RPM_BUILD_ROOT
cvsdist 3cbd43b
cvsdist 3cbd43b
# Classify ab and logresolve as section 1 commands, as they are in /usr/bin
cvsdist 3cbd43b
mv docs/man/ab.8 docs/man/ab.1
cvsdist 3cbd43b
sed -e "1s/logresolve 8/logresolve 1/" \
cvsdist 3cbd43b
  < docs/man/logresolve.8 > docs/man/logresolve.1
cvsdist 3cbd43b
rm docs/man/logresolve.8
cvsdist 3cbd43b
cvsdist f8e1fe3
pushd prefork
cvsdist 3cbd43b
make DESTDIR=$RPM_BUILD_ROOT install
cvsdist f8e1fe3
popd
cvsdist f8e1fe3
# install worker binary
cvsdist f8e1fe3
install -m 755 worker/.libs/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.worker
cvsdist 3cbd43b
cvsdist 3cbd43b
# install conf file/directory
cvsdist 3cbd43b
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
cvsdist 3cbd43b
install -m 644 $RPM_SOURCE_DIR/README.confd \
cvsdist 3cbd43b
   $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/README
cvsdist 3cbd43b
install -m 644 $RPM_SOURCE_DIR/ssl.conf \
cvsdist 3cbd43b
   $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ssl.conf
cvsdist 3cbd43b
cvsdist 3cbd43b
rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/*.conf
cvsdist 3cbd43b
install -m 644 $RPM_SOURCE_DIR/httpd.conf \
cvsdist 3cbd43b
   $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/httpd.conf
cvsdist 3cbd43b
cvsdist 3cbd43b
# mod_ssl bits
cvsdist 3cbd43b
for suffix in crl crt csr key prm; do
cvsdist 3cbd43b
   mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${suffix}
cvsdist 3cbd43b
done
cvsdist 3cbd43b
cvsdist 8e188fb
# Makefiles for certificate management
cvsdist 8e188fb
for ext in crt crl; do 
cvsdist 8e188fb
  install -m 644 $RPM_SOURCE_DIR/mod_ssl-Makefile.${ext} \
cvsdist 8e188fb
	$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${ext}/Makefile.${ext}
cvsdist 8e188fb
done
cvsdist 8e188fb
ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/httpd/conf
cvsdist 8e188fb
cvsdist 3cbd43b
# for holding mod_dav lock database
cvsdist 3cbd43b
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav
cvsdist 3cbd43b
cvsdist f13b38c
# create a prototype session cache
cvsdist f13b38c
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl
cvsdist f13b38c
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem}
cvsdist f13b38c
cvsdist 3cbd43b
# move utilities to /usr/bin
cvsdist 3cbd43b
mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \
cvsdist 3cbd43b
   $RPM_BUILD_ROOT%{_bindir}
cvsdist 3cbd43b
cvsdist 3cbd43b
# make libtool a symlink
cvsdist 3cbd43b
mv $RPM_BUILD_ROOT%{contentdir}/build $RPM_BUILD_ROOT%{_libdir}/httpd/build
cvsdist 3cbd43b
rm $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool
cvsdist 3cbd43b
ln -s ../../../..%{_bindir}/libtool $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool
cvsdist 0fdee38
cvsdist 0fdee38
# fix up config_vars file: relocate the build directory into libdir;
cvsdist 0fdee38
# reference correct libtool; remove references to RPM build root.
cvsdist 0fdee38
sed -e "s|%{contentdir}/build|%{_libdir}/httpd/build|g" \
cvsdist 0fdee38
    -e "/AP_LIBS/d" -e "/abs_srcdir/d" \
cvsdist 0fdee38
    -e "/^LIBTOOL/s|/[^ ]*/libtool|%{_bindir}/libtool|" \
cvsdist 739d054
    -e "s|^EXTRA_INCLUDES.*$|EXTRA_INCLUDES = -I\$(includedir) -I%{_includedir}/openssl|g" \
cvsdist f8e1fe3
  < prefork/build/config_vars.mk \
cvsdist 3cbd43b
  > $RPM_BUILD_ROOT%{_libdir}/httpd/build/config_vars.mk
cvsdist 739d054
install -m 644 build/special.mk \
cvsdist 739d054
    $RPM_BUILD_ROOT%{_libdir}/httpd/build/special.mk
cvsdist 3cbd43b
cvsdist 6af796e
# Make the MMN accessible to module packages
cvsdist 6af796e
echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn
cvsdist 6af796e
cvsdist 3cbd43b
# docroot
cvsdist 3cbd43b
mkdir $RPM_BUILD_ROOT%{contentdir}/html
cvsdist 3cbd43b
install -m 644 $RPM_SOURCE_DIR/index.html \
cvsdist 3cbd43b
	$RPM_BUILD_ROOT%{contentdir}/error/noindex.html
cvsdist 3cbd43b
rm -r $RPM_BUILD_ROOT%{contentdir}/manual/style
cvsdist 3cbd43b
rm $RPM_BUILD_ROOT%{contentdir}/manual/*/*.xml
cvsdist 3cbd43b
cvsdist 3cbd43b
install -m 644 $RPM_SOURCE_DIR/powered_by.gif \
cvsdist 3cbd43b
	$RPM_BUILD_ROOT%{contentdir}/icons
cvsdist 3cbd43b
cvsdist 3cbd43b
# logs
cvsdist 3cbd43b
rmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs
cvsdist 3cbd43b
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd
cvsdist 3cbd43b
cvsdist 3cbd43b
# symlinks for /etc/httpd
cvsdist 3cbd43b
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
cvsdist 3cbd43b
ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/run
cvsdist 3cbd43b
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
cvsdist 3cbd43b
ln -s ../..%{_libdir}/httpd/build $RPM_BUILD_ROOT/etc/httpd/build
cvsdist 3cbd43b
cvsdist 3cbd43b
# install SYSV init stuff
cvsdist 3cbd43b
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
cvsdist 3cbd43b
install -m755 $RPM_SOURCE_DIR/httpd.init \
cvsdist 3cbd43b
	$RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
cvsdist 3cbd43b
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
cvsdist 3cbd43b
	$RPM_BUILD_ROOT/etc/rc.d/init.d/httpd	
cvsdist 3cbd43b
cvsdist 3cbd43b
# install log rotation stuff
cvsdist 3cbd43b
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
cvsdist 3cbd43b
install -m644 $RPM_SOURCE_DIR/httpd.logrotate \
cvsdist 3cbd43b
	$RPM_BUILD_ROOT/etc/logrotate.d/httpd
cvsdist 3cbd43b
cvsdist 3cbd43b
# fix man page paths
cvsdist 3cbd43b
sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2/conf/magic|/etc/httpd/conf/magic|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2/logs/error_log|/var/log/httpd/error_log|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2/logs/access_log|/var/log/httpd/access_log|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2/logs/httpd.pid|/var/run/httpd.pid|" \
cvsdist 3cbd43b
    -e "s|/usr/local/apache2|/etc/httpd|" < docs/man/httpd.8 \
cvsdist 3cbd43b
  > $RPM_BUILD_ROOT%{_mandir}/man8/httpd.8
cvsdist 3cbd43b
cvsdist f8e1fe3
# Remove unpackaged files
cvsdist f8e1fe3
rm -f $RPM_BUILD_ROOT%{_libdir}/libapr{,util}.{a,la} \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{_libdir}/APRVARS $RPM_BUILD_ROOT%{_libdir}/*.exp \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT/etc/httpd/conf/mime.types \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.exp \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{_bindir}/ap?-config \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{_sbindir}/{checkgid,dbmmanage,envvars*} \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{contentdir}/htdocs/* \
cvsdist f8e1fe3
      $RPM_BUILD_ROOT%{contentdir}/cgi-bin/* 
cvsdist f8e1fe3
cvsdist 3cbd43b
%pre
cvsdist 3cbd43b
# Add the "apache" user
cvsdist 3cbd43b
/usr/sbin/useradd -c "Apache" -u 48 \
cvsdist 3cbd43b
	-s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :
cvsdist 3cbd43b
cvsdist f0ad17e
%triggerpostun -- apache < 2.0
cvsdist f0ad17e
/sbin/chkconfig --add httpd
cvsdist f0ad17e
cvsdist 3cbd43b
%post
cvsdist 3cbd43b
# Register the httpd service
cvsdist 3cbd43b
/sbin/chkconfig --add httpd
cvsdist 3cbd43b
cvsdist 3cbd43b
%preun
cvsdist 3cbd43b
if [ $1 = 0 ]; then
cvsdist 3cbd43b
	/sbin/service httpd stop > /dev/null 2>&1
cvsdist 3cbd43b
	/sbin/chkconfig --del httpd
cvsdist 3cbd43b
fi
cvsdist 3cbd43b
cvsdist 3cbd43b
%post -n mod_ssl
cvsdist 3cbd43b
/sbin/ldconfig ### is this needed?
cvsdist 3cbd43b
umask 077
cvsdist 3cbd43b
cvsdist 3cbd43b
if [ ! -f %{_sysconfdir}/httpd/conf/ssl.key/server.key ] ; then
cvsdist 3cbd43b
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/ssl.key/server.key 2> /dev/null
cvsdist 3cbd43b
fi
cvsdist 3cbd43b
cvsdist 3cbd43b
FQDN=`hostname`
cvsdist 3cbd43b
if [ "x${FQDN}" = "x" ]; then
cvsdist 3cbd43b
   FQDN=localhost.localdomain
cvsdist 3cbd43b
fi
cvsdist 3cbd43b
cvsdist 3cbd43b
if [ ! -f %{_sysconfdir}/httpd/conf/ssl.crt/server.crt ] ; then
cvsdist 3cbd43b
cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/ssl.crt/server.crt 2>/dev/null
cvsdist 3cbd43b
--
cvsdist 3cbd43b
SomeState
cvsdist 3cbd43b
SomeCity
cvsdist 3cbd43b
SomeOrganization
cvsdist 3cbd43b
SomeOrganizationalUnit
cvsdist 3cbd43b
${FQDN}
cvsdist 3cbd43b
root@${FQDN}
cvsdist 3cbd43b
EOF
cvsdist 3cbd43b
fi
cvsdist 3cbd43b
cvsdist 3cbd43b
%clean
cvsdist 3cbd43b
rm -rf $RPM_BUILD_ROOT
cvsdist 3cbd43b
cvsdist 3cbd43b
%files
cvsdist 3cbd43b
%defattr(-,root,root)
cvsdist 3cbd43b
cvsdist 3cbd43b
%doc ABOUT_APACHE README CHANGES ROADMAP LICENSE
cvsdist 3cbd43b
%doc migration.html migration.css
cvsdist 3cbd43b
cvsdist 3cbd43b
%dir %{_sysconfdir}/httpd
cvsdist 3cbd43b
%{_sysconfdir}/httpd/modules
cvsdist 3cbd43b
%{_sysconfdir}/httpd/logs
cvsdist 3cbd43b
%{_sysconfdir}/httpd/run
cvsdist 3cbd43b
%dir %{_sysconfdir}/httpd/conf
cvsdist 3cbd43b
%config(noreplace) %{_sysconfdir}/httpd/conf/*.conf
cvsdist 3cbd43b
%config(noreplace) %{_sysconfdir}/httpd/conf/magic
cvsdist 3cbd43b
cvsdist 3cbd43b
%config %{_sysconfdir}/logrotate.d/httpd
cvsdist 3cbd43b
%config %{_sysconfdir}/rc.d/init.d/httpd
cvsdist 3cbd43b
cvsdist 3cbd43b
%dir %{_sysconfdir}/httpd/conf.d
cvsdist 3cbd43b
%{_sysconfdir}/httpd/conf.d/README
cvsdist 3cbd43b
cvsdist 3cbd43b
%{_bindir}/ab
cvsdist 3cbd43b
%{_bindir}/ht*
cvsdist 3cbd43b
%{_bindir}/logresolve
cvsdist 3cbd43b
%{_sbindir}/httpd
cvsdist f8e1fe3
%{_sbindir}/httpd.worker
cvsdist 3cbd43b
%{_sbindir}/apachectl
cvsdist 3cbd43b
%{_sbindir}/rotatelogs
cvsdist 3cbd43b
%attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec
cvsdist 3cbd43b
cvsdist 3cbd43b
%{_libdir}/libapr.so.*
cvsdist 3cbd43b
%{_libdir}/libaprutil.so.*
cvsdist 3cbd43b
cvsdist 3cbd43b
%dir %{_libdir}/httpd
cvsdist 3cbd43b
%dir %{_libdir}/httpd/modules
cvsdist 3cbd43b
# everything but mod_ssl.so:
cvsdist 3cbd43b
%{_libdir}/httpd/modules/mod_[a-r]*.so
cvsdist 3cbd43b
%{_libdir}/httpd/modules/mod_s[petu]*.so
cvsdist 3cbd43b
%{_libdir}/httpd/modules/mod_[t-z]*.so
cvsdist 3cbd43b
cvsdist 3cbd43b
%dir %{contentdir}
cvsdist 3cbd43b
%dir %{contentdir}/cgi-bin
cvsdist 3cbd43b
%dir %{contentdir}/html
cvsdist 3cbd43b
%dir %{contentdir}/icons
cvsdist d5ddf48
%dir %{contentdir}/error
cvsdist d5ddf48
%dir %{contentdir}/error/include
cvsdist 3cbd43b
%{contentdir}/icons/*
cvsdist d5ddf48
%{contentdir}/error/README
cvsdist d5ddf48
%{contentdir}/error/noindex.html
cvsdist d5ddf48
%config(noreplace) %{contentdir}/error/*.var
cvsdist d5ddf48
%config(noreplace) %{contentdir}/error/include/*.html
cvsdist 3cbd43b
cvsdist 3cbd43b
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
cvsdist 3cbd43b
cvsdist 3cbd43b
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
cvsdist 3cbd43b
cvsdist 3cbd43b
%{_mandir}/man1/*
cvsdist 3cbd43b
cvsdist 3cbd43b
%{_mandir}/man8/apachectl*
cvsdist 3cbd43b
%{_mandir}/man8/httpd*
cvsdist 3cbd43b
%{_mandir}/man8/rotatelogs*
cvsdist 3cbd43b
%{_mandir}/man8/suexec*
cvsdist 3cbd43b
cvsdist 3cbd43b
%files manual
cvsdist 3cbd43b
%defattr(-,root,root)
cvsdist 3cbd43b
%{contentdir}/manual
cvsdist 3cbd43b
cvsdist 3cbd43b
%files -n mod_ssl
cvsdist 3cbd43b
%defattr(-,root,root)
cvsdist 3cbd43b
%{_libdir}/httpd/modules/mod_ssl.so
cvsdist 3cbd43b
%config(noreplace) %{_sysconfdir}/httpd/conf.d/ssl.conf
cvsdist 8e188fb
%attr(0700,root,root) %dir %{_sysconfdir}/httpd/conf/ssl.*
cvsdist 8e188fb
%config %{_sysconfdir}/httpd/conf/Makefile
cvsdist 8e188fb
%config %{_sysconfdir}/httpd/conf/ssl.*/*
cvsdist f13b38c
%attr(0700,apache,root) %dir %{_localstatedir}/cache/mod_ssl
cvsdist f13b38c
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir
cvsdist f13b38c
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag
cvsdist f13b38c
%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem
cvsdist 3cbd43b
cvsdist 3cbd43b
%files devel
cvsdist 3cbd43b
%defattr(-,root,root)
cvsdist 3cbd43b
%{_libdir}/libapr.so
cvsdist 3cbd43b
%{_libdir}/libaprutil.so
cvsdist 3cbd43b
%{_includedir}/httpd
cvsdist 3cbd43b
%{_sysconfdir}/httpd/build
cvsdist 3cbd43b
%{_sbindir}/apxs
cvsdist 3cbd43b
%{_mandir}/man8/apxs.8*
cvsdist 3cbd43b
%dir %{_libdir}/httpd/build
cvsdist 3cbd43b
%{_libdir}/httpd/build/*.mk
cvsdist 0fdee38
%{_libdir}/httpd/build/instdso.sh
cvsdist 3cbd43b
%{_libdir}/httpd/build/libtool
cvsdist 3cbd43b
cvsdist 3cbd43b
%changelog
cvsdist 281bcfb
* Tue Oct 28 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.9
cvsdist 38aff7e
- add security fixes for CVE CAN-2003-0542, CAN-2003-0789
cvsdist 38aff7e
- return test page for "/+" in default httpd.conf
cvsdist 281bcfb
- add bug fixes for #103049, #105725, #106454
cvsdist 38aff7e
- further fixes for CGI regressions in -21.5 (#103744)
cvsdist 38aff7e
cvsdist 38aff7e
* Thu Sep 11 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.6
cvsdist 38aff7e
- fix for streaming CGIs (#103744)
cvsdist 38aff7e
cvsdist 739d054
* Thu Jul 31 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.5
cvsdist 739d054
- fix EXTRA_INCLUDES for #92313
cvsdist 739d054
- add mod_include fixes from upstream
cvsdist 739d054
cvsdist 739d054
* Wed Jul  9 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.4
cvsdist 739d054
- add security fixes for CVE CAN-2003-0192, CAN-2003-0253, 
cvsdist 739d054
  CAN-2003-0254, CERT VU#379828
cvsdist 739d054
- add bug fixes for #78019, #82985, #85022, #97111, #98545, #98653
cvsdist 739d054
- install special.mk, fix apxs -q LIBTOOL (#92313)
cvsdist 739d054
cvsdist 739d054
* Tue May 20 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.3
cvsdist 739d054
- add security fix for CAN-2003-0189
cvsdist 739d054
cvsdist 739d054
* Mon May 12 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.2
cvsdist 739d054
- add security fix for CAN-2003-0245
cvsdist 739d054
- add bug fixes for #88575, #89086, #89170, #89179
cvsdist 739d054
cvsdist 739d054
* Tue Apr  1 2003 Joe Orton <jorton@redhat.com> 2.0.40-21.1
cvsdist 739d054
- add security fixes for CAN-2003-0020, CAN-2003-0132, CAN-2003-0083
cvsdist 739d054
- add security fix for file descriptor leaks, #82142
cvsdist 739d054
- add bug fix for #82587
cvsdist 739d054
cvsdist f8e1fe3
* Mon Feb 24 2003 Joe Orton <jorton@redhat.com> 2.0.40-21
cvsdist f8e1fe3
- add security fix for CAN-2003-0020; replace non-printable characters
cvsdist f8e1fe3
  with '!' when printing to error log.
cvsdist f8e1fe3
- disable debuginfo on IA64.
cvsdist f8e1fe3
cvsdist f8e1fe3
* Tue Feb 11 2003 Joe Orton <jorton@redhat.com> 2.0.40-20
cvsdist f8e1fe3
- disable POSIX semaphores to support 2.4.18 kernel (#83324)
cvsdist f8e1fe3
cvsdist f8e1fe3
* Wed Jan 29 2003 Joe Orton <jorton@redhat.com> 2.0.40-19
cvsdist f8e1fe3
- require xmlto 0.0.11 or later
cvsdist f8e1fe3
- fix apr_strerror on glibc2.3
cvsdist f8e1fe3
cvsdist f8e1fe3
* Wed Jan 22 2003 Tim Powers <timp@redhat.com> 2.0.40-18
cvsdist f8e1fe3
- rebuilt
cvsdist f8e1fe3
cvsdist f8e1fe3
* Thu Jan 16 2003 Joe Orton <jorton@redhat.com> 2.0.40-17
cvsdist f8e1fe3
- add mod_cgid and httpd binary built with worker MPM (#75496)
cvsdist f8e1fe3
- allow choice of httpd binary in init script
cvsdist f8e1fe3
- pick appropriate CGI module based on loaded MPM in httpd.conf
cvsdist f8e1fe3
- source /etc/sysconfig/httpd in apachectl to get httpd choice
cvsdist f8e1fe3
- make "apachectl status" fail gracefully when links isn't found (#78159)
cvsdist f8e1fe3
cvsdist f8e1fe3
* Mon Jan 13 2003 Joe Orton <jorton@redhat.com> 2.0.40-16
cvsdist f8e1fe3
- rebuild for OpenSSL 0.9.7
cvsdist f8e1fe3
cvsdist f8e1fe3
* Fri Jan  3 2003 Joe Orton <jorton@redhat.com> 2.0.40-15
cvsdist f8e1fe3
- fix possible infinite recursion in config dir processing (#77206)
cvsdist f8e1fe3
- fix memory leaks in request body processing (#79282)
cvsdist f8e1fe3
cvsdist f8e1fe3
* Thu Dec 12 2002 Joe Orton <jorton@redhat.com> 2.0.40-14
cvsdist f8e1fe3
- remove unstable shmht session cache from mod_ssl
cvsdist f8e1fe3
- get SSL libs from pkg-config if available (Nalin Dahyabhai)
cvsdist f8e1fe3
- stop "apxs -a -i" from inserting AddModule into httpd.conf (#78676)
cvsdist f8e1fe3
cvsdist f8e1fe3
* Wed Nov  6 2002 Joe Orton <jorton@redhat.com> 2.0.40-13
cvsdist f8e1fe3
- fix location of installbuilddir in apxs when libdir!=/usr/lib
cvsdist f8e1fe3
cvsdist f8e1fe3
* Wed Nov  6 2002 Joe Orton <jorton@redhat.com> 2.0.40-12
cvsdist f8e1fe3
- pass libdir to configure; clean up config_vars.mk
cvsdist f8e1fe3
- package instdso.sh, fixing apxs -i (#73428)
cvsdist f8e1fe3
- prevent build if upstream MMN differs from mmn macro
cvsdist f8e1fe3
- remove installed but unpackaged files
cvsdist 0fdee38
cvsdist e3cd9fe
* Wed Oct  9 2002 Joe Orton <jorton@redhat.com> 2.0.40-11
cvsdist e3cd9fe
- correct SERVER_NAME encoding in i18n error pages (thanks to Andre Malo)
cvsdist e3cd9fe
cvsdist e3cd9fe
* Wed Oct  9 2002 Joe Orton <jorton@redhat.com> 2.0.40-10
cvsdist e3cd9fe
- fix patch for CAN-2002-0840 to also cover i18n error pages
cvsdist e3cd9fe
cvsdist e3cd9fe
* Wed Oct  2 2002 Joe Orton <jorton@redhat.com> 2.0.40-9
cvsdist e3cd9fe
- security fixes for CAN-2002-0840 and CAN-2002-0843
cvsdist e3cd9fe
- fix for possible mod_dav segfault for certain requests
cvsdist e3cd9fe
cvsdist e3cd9fe
* Tue Sep 24 2002 Gary Benson <gbenson@redhat.com>
cvsdist e3cd9fe
- updates to the migration guide
cvsdist e3cd9fe
cvsdist db63bd3
* Wed Sep  4 2002 Nalin Dahyabhai <nalin@redhat.com> 2.0.40-8
cvsdist db63bd3
- link httpd with libssl to avoid library loading/unloading weirdness
cvsdist db63bd3
cvsdist 8e188fb
* Tue Sep  3 2002 Joe Orton <jorton@redhat.com> 2.0.40-7
cvsdist 8e188fb
- add LoadModule lines for proxy modules in httpd.conf (#73349)
cvsdist 8e188fb
- fix permissions of conf/ssl.*/ directories; add Makefiles for
cvsdist db63bd3
  certificate management (#73352)
cvsdist 8e188fb
cvsdist 6af796e
* Mon Sep  2 2002 Joe Orton <jorton@redhat.com> 2.0.40-6
cvsdist 6af796e
- provide "httpd-mmn" to manage module ABI compatibility
cvsdist 6af796e
cvsdist f13b38c
* Sun Sep  1 2002 Joe Orton <jorton@redhat.com> 2.0.40-5
cvsdist f13b38c
- fix SSL session cache (#69699)
cvsdist f13b38c
- revert addition of LDAP support to apr-util
cvsdist f13b38c
cvsdist b8eb6a9
* Mon Aug 26 2002 Joe Orton <jorton@redhat.com> 2.0.40-4
cvsdist b8eb6a9
- set SIGXFSZ disposition to "ignored" (#69520)
cvsdist b8eb6a9
- make dummy connections to the first listener in config (#72692)
cvsdist b8eb6a9
cvsdist d5ddf48
* Mon Aug 26 2002 Joe Orton <jorton@redhat.com> 2.0.40-3
cvsdist d5ddf48
- allow "apachectl configtest" on a 1.3 httpd.conf
cvsdist d5ddf48
- add mod_deflate
cvsdist d5ddf48
- enable LDAP support in apr-util
cvsdist d5ddf48
- don't package everything in /var/www/error as config(noreplace)
cvsdist d5ddf48
cvsdist f0ad17e
* Wed Aug 21 2002 Bill Nottingham <notting@redhat.com> 2.0.40-2
cvsdist f0ad17e
- add trigger (#68657)
cvsdist f0ad17e
cvsdist c704917
* Mon Aug 12 2002 Joe Orton <jorton@redhat.com> 2.0.40-1
cvsdist c704917
- update to 2.0.40
cvsdist c704917
cvsdist c704917
* Wed Jul 24 2002 Joe Orton <jorton@redhat.com> 2.0.36-8
cvsdist c704917
- improve comment on use of UserDir in default config (#66886)
cvsdist c704917
cvsdist 3cbd43b
* Wed Jul 10 2002 Joe Orton <jorton@redhat.com> 2.0.36-7
cvsdist 3cbd43b
- use /sbin/nologin as shell for apache user (#68371)
cvsdist 3cbd43b
- add patch from CVS to fix possible infinite loop when processing
cvsdist 3cbd43b
  internal redirects
cvsdist 3cbd43b
cvsdist 3cbd43b
* Wed Jun 26 2002 Gary Benson <gbenson@redhat.com> 2.0.36-6
cvsdist 3cbd43b
- modify init script to detect 1.3.x httpd.conf's and direct users
cvsdist 3cbd43b
  to the migration guide
cvsdist 3cbd43b
cvsdist 3cbd43b
* Tue Jun 25 2002 Gary Benson <gbenson@redhat.com> 2.0.36-5
cvsdist 3cbd43b
- patch apachectl to detect 1.3.x httpd.conf's and direct users
cvsdist 3cbd43b
  to the migration guide
cvsdist 3cbd43b
- ship the migration guide
cvsdist 3cbd43b
cvsdist 3cbd43b
* Fri Jun 21 2002 Joe Orton <jorton@redhat.com>
cvsdist 3cbd43b
- move /etc/httpd2 back to /etc/httpd
cvsdist 3cbd43b
- add noindex.html page and poweredby logo; tweak default config
cvsdist 3cbd43b
  to load noindex.html if no default "/" page is present.
cvsdist 3cbd43b
- add patch to prevent mutex errors on graceful restart
cvsdist 3cbd43b
cvsdist 3cbd43b
* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 2.0.36-4
cvsdist 3cbd43b
- automated rebuild
cvsdist 3cbd43b
cvsdist 3cbd43b
* Wed Jun 12 2002 Joe Orton <jorton@redhat.com> 2.0.36-3
cvsdist 3cbd43b
- add patch to fix SSL mutex handling
cvsdist 3cbd43b
cvsdist 3cbd43b
* Wed Jun 12 2002 Joe Orton <jorton@redhat.com> 2.0.36-2
cvsdist 3cbd43b
- improved config directory patch
cvsdist 3cbd43b
cvsdist 3cbd43b
* Mon May 20 2002 Joe Orton <jorton@redhat.com>
cvsdist 3cbd43b
- initial build; based heavily on apache.spec and mod_ssl.spec
cvsdist 3cbd43b
- fixes: #65214, #58490, #57376, #61265, #65518, #58177, #57245