# - mod_auth_digest and mod_auth_basic R: apache(authn) ?
# - drop mod_case_filter* or find summary and description for them
# - build modules only once (not with each mpm)
-# - add to apache external packages apache_module_api dependency (like apache-mod_rpaf.spec)
# Conditional build:
%bcond_without ssl # build without SSL support
Summary(tr): Lider WWW tarayýcý
Name: apache
Version: 2.2.0
-Release: 1
+Release: 9
License: Apache Group License
Group: Networking/Daemons
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
Source23: %{name}-mpm.conf
Source24: %{name}-languages.conf
Source25: %{name}-mod_mime.conf
-Source26: %{name}-mod_alias.conf
Source27: %{name}-mod_authz_host.conf
Source28: %{name}-mod_cgid.conf
Source29: %{name}-mod_log_config.conf
Source30: %{name}-mod_mime_magic.conf
Source31: %{name}-mod_cache.conf
+Patch100: %{name}-branch.patch
Patch0: %{name}-configdir_skip_backups.patch
Patch1: %{name}-layout.patch
Patch2: %{name}-suexec.patch
Patch6: httpd-2.0.40-xfsz.patch
Patch7: %{name}-syslibs.patch
Patch8: httpd-2.0.45-encode.patch
+Patch9: %{name}-paths.patch
Patch10: httpd-2.0.46-dav401dest.patch
Patch12: httpd-2.0.46-sslmutex.patch
Patch14: httpd-2.0.48-corelimit.patch
BuildRequires: rpmbuild(macros) >= 1.228
BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
+# packages that were in apache-2.0.rpm, for compatibility
Requires: %{name}-errordocs = %{version}-%{release}
Requires: %{name}-mod_alias = %{version}-%{release}
-#Requires: %{name}-mod_asis = %{version}-%{release}
+Requires: %{name}-mod_asis = %{version}-%{release}
Requires: %{name}-mod_authz_host = %{version}-%{release}
-Requires: %{name}-mod_autoindex = %{version}-%{release}
-#Requires: %{name}-mod_cern_meta = %{version}-%{release}
+Requires: %{name}-mod_cern_meta = %{version}-%{release}
Requires: %{name}-mod_cgi = %{version}-%{release}
Requires: %{name}-mod_env = %{version}-%{release}
Requires: %{name}-mod_include = %{version}-%{release}
Requires: %{name}-base = %{version}-%{release}
Requires: %{name}-mod_authn_file = %{version}-%{release}
Requires: %{name}-mod_authz_groupfile = %{version}-%{release}
+Requires: %{name}-mod_auth_basic = %{version}-%{release}
Provides: apache(mod_auth) = %{version}-%{release}
%description mod_auth
URL: http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
Requires: %{name}-base = %{version}-%{release}
Provides: apache(mod_authz_host) = %{version}-%{release}
+# for apache < 2.2.0
+Provides: apache(mod_access) = %{version}-%{release}
%description mod_authz_host
The directives provided by mod_authz_host are used in <Directory>,
Group: Networking/Daemons
URL: http://httpd.apache.org/docs/2.2/en/mod/mod_cgi.html
Requires: %{name}-base = %{version}-%{release}
+Requires: %{name}-mod_alias = %{version}-%{release}
Provides: apache(mod_cgi) = %{version}-%{release}
%description mod_cgi
Group: Networking/Daemons
URL: http://httpd.apache.org/docs/2.2/en/mod/mod_cgid.html
Requires: %{name}-base = %{version}-%{release}
+Requires: %{name}-mod_alias = %{version}-%{release}
Provides: apache(mod_cgid) = %{version}-%{release}
%description mod_cgid
expressions you specify. These environment variables can be used by
other parts of the server to make decisions about actions to be taken.
-%description mod_setenvif
+%description mod_setenvif -l pl
Modu³ mod_setenvif pozwala na ustawianie zmiennych ¶rodowiskowych w
zale¿no¶ci od ró¿nych aspektów ¿±dania pasuj±cych do podanych wyra¿eñ
regularnych. Te zmienne ¶rodowiskowe mog± byæ u¿ywane przez inne
%prep
%setup -q -n httpd-%{version}
+#%patch100 -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%patch10 -p1
%patch12 -p1
%patch14 -p1
# using system apr, apr-util and pcre
rm -rf srclib/{apr,apr-util,pcre}
-# fixup perl path
-sed -i -e '1s@#!.*local/bin/perl@#!%{__perl}@' docs/cgi-examples/printenv
-
-# fix location of build dir in generated apxs
-sed -i -e '
-s:@exp_installbuilddir@:%{_libdir}/apache/build:g
-' support/apxs.in
-
# sanity check
MODULES_API=`awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' include/ap_mmn.h`
if [ "$MODULES_API" != "%_apache_modules_api" ]; then
for mpm in prefork worker %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} %{?with_event:event}; do
install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}"
../%configure \
- --prefix=%{_sysconfdir} \
- --exec-prefix=%{_libexecdir} \
- --with-installbuilddir=%{_libdir}/apache/build \
- --disable-v4-mapped \
--enable-layout=PLD \
+ --disable-v4-mapped \
--enable-modules=all \
--enable-mods-shared=all \
--enable-auth-anon \
# prefork is default one
%{__make} -C buildmpm-prefork install \
- DESTDIR=$RPM_BUILD_ROOT \
- installbuilddir=%{_libdir}/apache/build \
- prefix=%{_sysconfdir}/httpd \
- libexecdir=%{_libdir}/%{name} \
- iconsdir=%{_datadir}/icons \
- errordir=%{_datadir}/error \
- htdocsdir=%{_datadir}/html \
- manualdir=%{_datadir}/manual \
- cgidir=%{_cgibindir} \
- runtimedir=%{_var}/run \
- logdir=%{_var}/log/httpd \
- proxycachedir=%{_var}/cache/httpd
+ DESTDIR=$RPM_BUILD_ROOT
+# install other mpm-s
for mpm in %{?with_metuxmpm:metuxmpm} %{?with_peruser:peruser} worker %{?with_event:event}; do
install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
done
ln -s httpd.prefork $RPM_BUILD_ROOT%{_sbindir}/httpd
-ln -s %{_libdir}/apache $RPM_BUILD_ROOT%{_sysconfdir}/modules
+ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
ln -s %{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
ln -s conf.d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
install %{SOURCE7} $CFG/10_common.conf
install %{SOURCE25} $CFG/01_mod_mime.conf
-install %{SOURCE26} $CFG/01_mod_alias.conf
install %{SOURCE27} $CFG/01_mod_authz_host.conf
install %{SOURCE28} $CFG/01_mod_cgid.conf
install %{SOURCE29} $CFG/01_mod_log_config.conf
install %{SOURCE23} $CFG/10_mpm.conf
install %{SOURCE24} $CFG/20_languages.conf
+echo "LoadModule alias_module modules/mod_alias.so" > $CFG/00_mod_alias.conf
echo "LoadModule authn_file_module modules/mod_authn_file.so" > $CFG/00_mod_authn_file.conf
echo "LoadModule authn_dbm_module modules/mod_authn_dbm.so" > $CFG/00_mod_authn_dbm.conf
echo "LoadModule authn_anon_module modules/mod_authn_anon.so" > $CFG/00_mod_authn_anon.conf
fi
# always have httpd.conf symlink (until all packages from Ac use new dir)
+ install -d /etc/httpd
ln -s conf.d /etc/httpd/httpd.conf
fi
exit 0
fi
fi
-%triggerpostun base -- %{name}-base < 2.2.0-0.84
+%triggerpostun base -- %{name} < 2.2.0
# rename monitrc to be service name like other files
if [ -f /etc/monit/apache.monitrc.rpmsave ]; then
mv -f /etc/monit/httpd.monitrc{,.rpmnew}
# change HTTPD_CONF to point to new location. *only* if it's the
# default config setting
+cp -f /etc/sysconfig/httpd{,.rpmorig}
sed -i -e '/^HTTPD_CONF="\/etc\/httpd\/httpd.conf"/s,.*,HTTPD_CONF="/etc/httpd/apache.conf",' /etc/sysconfig/httpd
+# FIXME what other important things to notify about Apache 2.2
+%banner -e %{name} <<'EOF'
+NB! Apache main config has been changed to /etc/httpd/apache.conf
+
+There has been changed a lot, so many things could be broken.
+Please report bugs to http://bugs.pld-linux.org/.
+
+EOF
+
+%triggerpostun mod_ssl -- %{name}-mod_ssl < 1:2.2.0-3.1
+cp -f /etc/httpd/conf.d/40_mod_ssl.conf{,.rpmsave}
+sed -i -e '
+ s,/var/run/apache,/var/run/httpd,g
+ s,/var/cache/apache,/var/cache/httpd,g
+' /etc/httpd/conf.d/40_mod_ssl.conf
+
%posttrans base
# restore lock which we disabled in pretrans
mv -f /var/lock/subsys/httpd{.disabled,} 2>/dev/null
%files devel
%defattr(644,root,root,755)
%{_includedir}
+# FIXME: httpd.exp needed only on AIX
%{_libexecdir}/*.exp
-# is this symlink needed?
-#%{_sysconfdir}/build
%{_libexecdir}/build/[lprs]*.mk
%attr(755,root,root) %{_libexecdir}/build/*.sh