Apache2.0.51 für RedHat9 vServer

dOcX

Registered User
Mit freundlicher Unterstützung von society und den Sourcen von mbroemme habe ich heute nach einigen herumfriemeln das Apache 2.0.51 rpm für Redhat gebaut.
Das Spec-file und die Patches im original SRPM von Maik mußte auf den aktuellen Stand gebracht werden und ich mußte das

pcre-devel-3.9-10.i386.rpm

nachinstallieren.

Die Packete liegen nun unter:
http://mirror.serversupportforum.de/rpms/

Auszug Spec-file
Code:
%define contentdir /var/www
%define suexec_caller apache
%define mmn 20020628

Summary: Apache HTTP Server
Name: httpd
[B]Version: 2.0.51[/B]
Release: 2.intergenia
URL: http://httpd.apache.org/
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
Source1: index.html
Source3: httpd.logrotate
Source4: httpd.init
Source6: 1x1.gif
Source7: pic00.jpg
Source10: httpd.conf
Source11: ssl.conf
Source12: welcome.conf
Source14: mod_ssl-Makefile.crt
Source15: mod_ssl-Makefile.crl
# Documentation
Source30: migration.xml
Source31: migration.css
Source32: html.xsl
Source33: README.confd
# build/scripts patches
[B]#Patch1: httpd-2.0.40-apctl.patch[/B]
Patch2: httpd-2.0.36-apxs.patch
Patch3: httpd-2.0.36-sslink.patch
Patch4: httpd-2.0.45-parallel.patch
Patch5: httpd-2.0.45-deplibs.patch
Patch6: httpd-2.0.47-pie.patch
Patch7: httpd-2.0.45-syspcre.patch
# Bug fixes
Patch20: httpd-2.0.45-encode.patch
Patch22: httpd-2.0.45-davetag.patch
Patch24: httpd-2.0.47-sslcleanup.patch
Patch27: httpd-2.0.46-shmcb.patch
Patch32: httpd-2.0.46-sslmutex.patch
[B]Patch66: CAN-2004-0811.patch
Patch67: httpd-2.0.51-apachectl.dif[/B]
# features/functional changes
Patch42: httpd-2.0.40-xfsz.patch
Patch43: httpd-2.0.40-pod.patch
Patch44: httpd-2.0.40-noshmht.patch
# Intergenia/SWSoft fixes and hacks
Patch61: httpd-2.0.48-fpe5.intergenia.patch
Patch62: httpd-2.0.48-suexec.intergenia.patch
Patch63: httpd-2.0.40-runtimedir-swsoft.patch
Patch64: httpd-2.0.48-core.intergenia.patch
Patch65: httpd-2.0.48-fpe5-mmn.intergenia.patch
License: Apache Software License
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-root
BuildPrereq: db4-devel, expat-devel, findutils, perl, pkgconfig, xmlto >= 0.0.11
BuildPrereq: apr-devel >= 0.9.3-10, apr-util-devel
Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find
Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv
Prereq: sh-utils, textutils, /usr/sbin/useradd
Provides: webserver
Provides: httpd-mmn = %{mmn}
Obsoletes: apache, secureweb, mod_dav
Vendor: Intergenia AG
Packager: Maik Broemme <mbroemme@plusserver.de>

%description
Apache is a powerful, full-featured, efficient, and freely-available
Web server. Apache is also the most popular Web server on the
Internet.

%package devel
Group: Development/Libraries
Summary: Development tools for the Apache HTTP server.
Obsoletes: secureweb-devel, apache-devel
Requires: apr-devel, apr-util-devel, httpd = %{version}

%description devel
The httpd-devel package contains the APXS binary and other files
that you need to build Dynamic Shared Objects (DSOs) for Apache.

If you are installing the Apache HTTP server and you want to be
able to compile or develop additional modules for Apache, you need
to install this package.

%package manual
Group: Documentation
Summary: Documentation for the Apache HTTP server.
Obsoletes: secureweb-manual, apache-manual

%description manual
The httpd-manual package contains the complete manual and
reference guide for the Apache HTTP server. The information can
also be found at http://httpd.apache.org/docs-2.0/.

%package -n mod_ssl
Group: System Environment/Daemons
Summary: SSL/TLS module for the Apache HTTP server
Serial: 1
BuildPrereq: openssl-devel
Prereq: openssl, dev, /bin/cat
Requires: httpd, make, httpd-mmn = %{mmn}

%description -n mod_ssl
The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.

%prep
%setup -q
[B]#%patch1 -p0 -b .apctl[/B]
%patch2 -p1 -b .apxs
[B]#%patch3 -p0 -b .sslink[/B]
%patch4 -p0 -b .parallel
%patch5 -p1 -b .deplibs
%patch7 -p1 -b .syspcre

# Conditionally enable PIE support
if echo 'int main () { return 0; }' | gcc -pie -fpie -O2 -xc - -o pietest 2>/dev/null; then
%patch6 -p1 -b .pie
fi

# no -b to prevent droplets in install root
%patch20 -p1
%patch22 -p1 -b .davetag
%patch24 -p1 -b .sslcleanup
[B]#%patch27 -p1 -b .shmcb[/B]
%patch32 -p1 -b .sslmutex

%patch42 -p0 -b .xfsz
%patch43 -p0 -b .pod
%patch44 -p1 -b .noshmht

%patch61 -p1 -b .fpe5.intergenia
%patch62 -p1 -b .suexec.intergenia
%patch63 -p1 -b .runtimedir-swsoft
%patch64 -p1 -b .core.intergenia
%patch65 -p1 -b .fpe5-mmn.intergenia
[B]%patch66 -p1 -b .CAN-2004-0811
%patch67 -p1 -b .apachectl[/B]
# Safety check: prevent build if defined MMN does not equal upstream MMN.
vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -v '#'`
if test "x${vmmn}" != "x%{mmn}"; then
   : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}.
   : Update the mmn macro and rebuild.
   exit 1
fi

%build
# regenerate configure scripts
./buildconf

# Before configure; fix location of build dir in generated apxs
%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \
	support/apxs.in
# update location of migration guide in apachectl
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
	support/apachectl.in

# forcibly prevent use of bundled apr, apr-util
rm -rf srclib/{apr,apr-util}

# build the migration guide
xmlto --skip-validation -x $RPM_SOURCE_DIR/html.xsl html-nochunks $RPM_SOURCE_DIR/migration.xml
cp $RPM_SOURCE_DIR/migration.css . # make %%doc happy

CFLAGS="$RPM_OPT_FLAGS -DSSL_EXPERIMENTAL_ENGINE"
if pkg-config openssl ; then
	# configure -C barfs with trailing spaces in CFLAGS
	CFLAGS="$CFLAGS `pkg-config --cflags openssl | sed 's/ *$//'`"
	AP_LIBS="$AP_LIBS `pkg-config --libs openssl`"
else
	AP_LIBS="-lssl -lcrypto"
fi
export CFLAGS
export AP_LIBS

function mpmbuild()
{
mpm=$1; shift
mkdir $mpm; pushd $mpm
cat > config.cache <<EOF
ac_cv_func_pthread_mutexattr_setpshared=no
ac_cv_func_sem_open=no
EOF
../configure -C \
 	--prefix=%{_sysconfdir}/httpd \
 	--exec-prefix=%{_prefix} \
 	--bindir=%{_bindir} \
 	--sbindir=%{_sbindir} \
 	--mandir=%{_mandir} \
	--libdir=%{_libdir} \
	--sysconfdir=%{_sysconfdir}/httpd/conf \
	--includedir=%{_includedir}/httpd \
	--libexecdir=%{_libdir}/httpd/modules \
	--datadir=%{contentdir} \
        --with-installbuilddir=%{_libdir}/httpd/build \
	--with-mpm=$mpm \
        --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
	--enable-suexec --with-suexec \
	--with-suexec-caller=%{suexec_caller} \
	--with-suexec-docroot=%{contentdir} \
	--with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
	--with-suexec-bin=%{_sbindir}/suexec \
	--with-suexec-uidmin=635 --with-suexec-gidmin=100 \
	$*

make %{?_smp_mflags}
popd
}

# Only bother enabling optional modules for main build.
mpmbuild prefork --enable-mods-shared=all \
	--enable-ssl --with-ssl \
	--enable-deflate \
	--enable-proxy --enable-proxy-connect \
	--enable-proxy-http --enable-proxy-ftp \
        --disable-ext-filter \
        --enable-cache --enable-mem-cache \
        --enable-file-cache --enable-disk-cache \
        --enable-ldap --enable-auth-ldap \
        --enable-logio

# To prevent most modules being built statically into httpd.worker, 
# easiest way seems to be enable them shared.
mpmbuild worker --enable-mods-shared=all

# Verify that the same modules were built into the two httpd binaries
./prefork/httpd -l | grep -v prefork > prefork.mods
./worker/httpd -l | grep -v worker > worker.mods
if ! diff -u prefork.mods worker.mods; then
  : Different modules built into httpd binaries, will not proceed
  exit 1
fi
...

%changelog
* Sun Sep 26 2004 dOcX & society 
2.0.51-2.intergenia
- added CAN-2004-0811
- rebuilt

* Fri Jul  2 2004 Maik Broemme <mbroemme@plusserver.de> 2.0.50-1.intergenia
- rebuilt

* Thu May 27 2004 Maik Broemme <mbroemme@plusserver.de> 2.0.48-2.intergenia
- rebuilt for os template update

* Tue Dec  9 2003 Maik Broemme <mbroemme@plusserver.de> 2.0.48-1.5.intergenia
- added Server4You vSERVER default index page.
- removed sendfile() support for virtuozzo kernels.

* Tue Dec  9 2003 Maik Broemme <mbroemme@plusserver.de> 2.0.48-1.4.intergenia
- changed server/core.c to fit Server4You :)

* Tue Dec  9 2003 Maik Broemme <mbroemme@plusserver.de> 2.0.48-1.3.intergenia
- added SWSoft suexec features.
- added SWSoft frontpage 5 extension.
...
 
bei RedHat9 geht es ohne Probleme

Da ich gerade gesten Backup gemacht habe war ich mal mutig:

rpm -i --force httpd-2.0.51-2.intergenia.i386.rpm

da gibts nur ne kleine Warnung....
warning: /var/www/error/HTTP_UNAUTHORIZED.html.var saved as /var/www/error/HTTP_UNAUTHORIZED.html.var.rpmsave

rpm -i --force httpd-devel-2.0.51-2.intergenia.i386.rpm
rpm -i --force httpd-manual-2.0.51-2.intergenia.i386.rpm
rpm -i --force mod_ssl-2.0.51-2.intergenia.i386.rpm

und bitte danach den Idianer neustarten:

und schon funktioniert es!!!
 
Kannst gleich weitermachen ;)

Apache 2.0.52 verfügbar
Die Apache-Foundation hat Version 2.0.52 des Apache-Web-Servers zur Verfügung gestellt, die im Wesentlichen Fehler beseitigt. Insbesondere ist die Behandlung der Satisfy-Direktiven korrigiert. Durch die Mischung von Kontexten ist es unter Umständen möglich, unautorisierten Zugriff auf Verzeichnisse zu erhalten, für die eigentlich eine Authentifizierung nötig ist. Der Fehler ist nur in 2.0.51 enthalten, für die schon vergangene Woche Patches zu Verfügung standen.
 
Last edited by a moderator:
Danke noch mal docx...

Es ist 0:21 Uhr an diesem wunderschönen Montagmorgen ;)
Ich habs gerade auch mal auf meinem Vserver gewagt. Das Update hat funktioniert von 2.0.48 auf 2.0.51...Danke!
 
Back
Top