forked from pool/apache2
Accepting request 314699 from home:pgajdos
- allow to run multiple instances of Apache on one system [fate#317786] (internal) * distributed httpd.conf no longer includes sysconfig.d, nor this directory is shipped. httpd.conf includes loadmodule.conf and global.conf which are former sysconfig.d/loadmodule.conf and sysconfig.d/global.conf for default /etc/sysconfig/apache2 global.conf and loadmodule.conf are not included when sysconfig variables could have been read by start_apache2 startup script (run with systemd services). Therefore, when starting server via /usr/sbin/httpd, sysconfig variables are not taken into account. * some not-maintained scripts are moved from /usr/share/apache2 to /usr/share/apache2/deprecated-scripts * all modules comment in sysconfig file is not generated anymore * added README-instances.txt * removed Sources: load_configuration find_mpm get_module_list get_includes find_httpd_includes apache-find-directives * added Sources: deprecated-scripts.tar.xz apache2-README-instances.txt apache2-loadmodule.conf apache2-global.conf apache2-find-directives apache2@.service OBS-URL: https://build.opensuse.org/request/show/314699 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=452
This commit is contained in:
111
apache2.spec
111
apache2.spec
@@ -66,17 +66,13 @@ Source18: robots.txt
|
||||
Source20: favicon.ico
|
||||
Source22: apache2-README
|
||||
Source23: apache2-README.QUICKSTART
|
||||
Source24: apache2-README.default-vhost
|
||||
Source25: gensslcert
|
||||
Source26: apache2-README-access_compat.txt
|
||||
Source27: %{name}.logrotate
|
||||
Source28: permissions.%{name}
|
||||
Source29: apache-ssl-stuff.tar.bz2
|
||||
Source40: load_configuration
|
||||
Source41: find_mpm
|
||||
Source42: get_module_list
|
||||
Source43: get_includes
|
||||
Source44: find_httpd_includes
|
||||
Source30: deprecated-scripts.tar.xz
|
||||
Source31: apache2-README-instances.txt
|
||||
# sysconf_addword is part of aaa_base.rpm starting with openSUSE 11.0
|
||||
# we bring our own copy for the cases where it is not available
|
||||
Source45: sysconf_addword
|
||||
@@ -100,16 +96,18 @@ Source111: apache2-server-tuning.conf
|
||||
Source113: apache2-ssl-global.conf
|
||||
Source114: apache2-mod_usertrack.conf
|
||||
Source115: apache2-mod_reqtimeout.conf
|
||||
Source116: apache2-loadmodule.conf
|
||||
Source117: apache2-global.conf
|
||||
Source130: apache2-vhost.template
|
||||
Source131: apache2-vhost-ssl.template
|
||||
Source132: apache2-default-vhost.conf
|
||||
Source133: apache2-default-vhost-ssl.conf
|
||||
Source140: apache2-check_forensic
|
||||
Source141: apache-22-24-upgrade
|
||||
Source142: start_apache2
|
||||
Source143: apache2-systemd-ask-pass
|
||||
Source144: apache2.service
|
||||
Source145: apache-find-directives
|
||||
Source145: apache2-find-directives
|
||||
Source146: apache2@.service
|
||||
Source147: apache2-script-helpers
|
||||
Patch2: httpd-2.1.3alpha-layout.dif
|
||||
Patch23: httpd-2.4.10-apachectl.patch
|
||||
#Patch65: httpd-2.0.49-log_server_status.dif
|
||||
@@ -189,7 +187,7 @@ Summary: Apache 2 worker MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Requires: %{name} = %{version}
|
||||
Provides: %{name}-MPM
|
||||
# the post scriptlet executes /usr/share/apache2/get_module_list
|
||||
# the post scriptlet sources /usr/share/apache2/script-helpers
|
||||
Requires(post): %{name} = %{version}
|
||||
%endif
|
||||
|
||||
@@ -200,7 +198,7 @@ Group: Productivity/Networking/Web/Servers
|
||||
Requires: %{name} = %{version}
|
||||
Provides: %{name}-MPM
|
||||
Provides: apache:%{_sbindir}/httpd
|
||||
# the post scriptlet executes /usr/share/apache2/get_module_list
|
||||
# the post scriptlet sources /usr/share/apache2/script-helpers
|
||||
Requires(post): %{name} = %{version}
|
||||
%endif
|
||||
|
||||
@@ -210,7 +208,7 @@ Summary: Apache 2 event MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Requires: %{name} = %{version}
|
||||
Provides: %{name}-MPM
|
||||
# the post scriptlet executes /usr/share/apache2/get_module_list
|
||||
# the post scriptlet sources /usr/share/apache2/script-helpers
|
||||
Requires(post): %{name} = %{version}
|
||||
%endif
|
||||
|
||||
@@ -294,7 +292,7 @@ Utilities provided by the Apache 2 Web Server project which are useful
|
||||
to administrators of web servers in general.
|
||||
|
||||
%prep
|
||||
%setup -q -n httpd-%{version}
|
||||
%setup -q -n httpd-%{version} -a30
|
||||
%patch2 -p1
|
||||
%patch23 -p1
|
||||
#%patch65 -p1
|
||||
@@ -317,8 +315,8 @@ a=$(basename %{SOURCE22})
|
||||
cp %{SOURCE22} ./${a##%{name}-}
|
||||
b=$(basename %{SOURCE23})
|
||||
cp %{SOURCE23} ./${b##%{name}-}
|
||||
c=$(basename %{SOURCE24})
|
||||
cp %{SOURCE24} ./${c##%{name}-}
|
||||
c=$(basename %{SOURCE31})
|
||||
cp %{SOURCE31} ./${c##%{name}-}
|
||||
d=$(basename %{SOURCE26})
|
||||
cp %{SOURCE26} ./${d##%{name}-}
|
||||
|
||||
@@ -518,7 +516,7 @@ install -m 755 support/logresolve.pl %{buildroot}/%{_sbindir}/
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
install -m 644 $RPM_SOURCE_DIR/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -m 755 $RPM_SOURCE_DIR/apache2-check_forensic %{buildroot}/%{_bindir}/check_forensic
|
||||
install -m 755 $RPM_SOURCE_DIR/apache-find-directives %{buildroot}/%{_bindir}/
|
||||
install -m 755 $RPM_SOURCE_DIR/apache2-find-directives %{buildroot}/%{_bindir}/
|
||||
#
|
||||
# xml stuff
|
||||
install -d %{buildroot}%{_datadir}/omc/svcinfo.d/
|
||||
@@ -529,25 +527,21 @@ install -m 755 %{SOURCE25} %{buildroot}/%{_bindir}/
|
||||
tar xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir}
|
||||
#
|
||||
# init script and friends
|
||||
install -m 700 $RPM_SOURCE_DIR/start_apache2 %{buildroot}%{_sbindir}/
|
||||
install -m 644 $RPM_SOURCE_DIR/apache2-script-helpers %{buildroot}/%{_datadir}/%{name}/script-helpers
|
||||
install -m 744 $RPM_SOURCE_DIR/start_apache2 %{buildroot}%{_sbindir}/
|
||||
%if 0%{?suse_version} >= 1210
|
||||
mkdir -p %{buildroot}%{_unitdir}/
|
||||
install -m 700 $RPM_SOURCE_DIR/apache2-systemd-ask-pass %{buildroot}%{_sbindir}/
|
||||
install -m 644 $RPM_SOURCE_DIR/apache2.service %{buildroot}%{_unitdir}/
|
||||
install -m 644 $RPM_SOURCE_DIR/apache2@.service %{buildroot}%{_unitdir}/
|
||||
ln -sf service %{buildroot}/%{_sbindir}/rcapache2
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 744 $RPM_SOURCE_DIR/rc.%{name} %{buildroot}%{_initddir}/%{name}
|
||||
ln -sf ../..%{_initddir}/%{name} %{buildroot}/%{_sbindir}/rcapache2
|
||||
%endif
|
||||
install -m 755 $RPM_SOURCE_DIR/load_configuration %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 755 $RPM_SOURCE_DIR/find_mpm %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 755 $RPM_SOURCE_DIR/get_includes %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 755 $RPM_SOURCE_DIR/find_httpd_includes %{buildroot}/%{_datadir}/%{name}/
|
||||
cp -r deprecated-scripts %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 755 $RPM_SOURCE_DIR/apache-22-24-upgrade %{buildroot}/%{_datadir}/%{name}/
|
||||
sed 's+%{_prefix}/lib+%{_libdir}+' $RPM_SOURCE_DIR/get_module_list \
|
||||
> %{buildroot}/%{_datadir}/%{name}/get_module_list
|
||||
chmod 755 %{buildroot}/%{_datadir}/%{name}/get_module_list
|
||||
install -m 755 $RPM_SOURCE_DIR/sysconf_addword %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 755 $RPM_SOURCE_DIR/a2enflag %{buildroot}/%{_sbindir}
|
||||
ln -s a2enflag %{buildroot}/%{_sbindir}/a2disflag
|
||||
@@ -555,28 +549,21 @@ install -m 755 $RPM_SOURCE_DIR/a2enmod %{buildroot}/%{_sbindir}
|
||||
ln -s a2enmod %{buildroot}/%{_sbindir}/a2dismod
|
||||
#
|
||||
# directories for files from other packages and other configuration
|
||||
for i in vhosts.d sysconfig.d; do
|
||||
mkdir -p %{buildroot}/%{sysconfdir}/$i
|
||||
done
|
||||
mkdir -p %{buildroot}/%{sysconfdir}/vhosts.d
|
||||
#
|
||||
# make list of all modules, and install sysconfig template
|
||||
for i in $(find %{buildroot}/%{libexecdir}-%{default_mpm} -name "*.so" | sort); do
|
||||
modname=${i#*mod_}; modname=${modname%.so}
|
||||
modname=${modname##*lib}
|
||||
all_modules="$all_modules $modname"
|
||||
done
|
||||
all_modules=$(echo $all_modules | fmt | sed 's/\(.*\)/# \1\\/')
|
||||
sed "s+@@all_modules@@+$all_modules +" $RPM_SOURCE_DIR/sysconfig.%{name} \
|
||||
> %{buildroot}/%{_var}/adm/fillup-templates/sysconfig.%{name}
|
||||
# install sysconfig template
|
||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.%{name} \
|
||||
%{buildroot}/%{_var}/adm/fillup-templates/sysconfig.%{name}
|
||||
#
|
||||
# install configuration files:
|
||||
mkdir -p %{buildroot}/%{runtimedir}
|
||||
touch %{buildroot}/%{sysconfdir}/sysconfig.d/include.conf
|
||||
mkdir -p %{buildroot}/%{sysconfdir}/conf.d
|
||||
for i in default-server.conf \
|
||||
errors.conf \
|
||||
global.conf \
|
||||
httpd.conf \
|
||||
listen.conf \
|
||||
loadmodule.conf \
|
||||
mod_autoindex-defaults.conf \
|
||||
mod_info.conf \
|
||||
mod_log_config.conf \
|
||||
@@ -608,11 +595,6 @@ done
|
||||
install -m 644 %{SOURCE130} %{buildroot}/%{sysconfdir}/vhosts.d/vhost.template
|
||||
install -m 644 %{SOURCE131} %{buildroot}/%{sysconfdir}/vhosts.d/vhost-ssl.template
|
||||
install -m 644 %{SOURCE104} %{buildroot}/%{sysconfdir}/conf.d/manual.conf
|
||||
# install default vhost
|
||||
dvh=$(basename %{SOURCE132})
|
||||
install -m 644 %{SOURCE132} %{buildroot}/%{sysconfdir}/${dvh##%{name}-}
|
||||
dvhs=$(basename %{SOURCE133})
|
||||
install -m 644 %{SOURCE133} %{buildroot}/%{sysconfdir}/${dvhs##%{name}-}
|
||||
# for mod_auth_ldap
|
||||
install -m 644 docs/conf/charset.conv %{buildroot}/%{sysconfdir}/
|
||||
|
||||
@@ -727,7 +709,11 @@ rm -r %{buildroot}/%{sysconfdir}/extra # it is already in the documentation di
|
||||
# and validate httpd.conf file
|
||||
#
|
||||
pushd %{buildroot}/%{sysconfdir}
|
||||
for i in *.conf; do cp $i $i.test; done
|
||||
for i in *.conf; do
|
||||
# loadmodule.conf.test will be created later
|
||||
[ "$i" == loadmodule.conf ] && continue
|
||||
cp $i $i.test;
|
||||
done
|
||||
sed -e 's+%{_libdir}+'%{buildroot}'%{_libdir}+' \
|
||||
-e 's+%{_localstatedir}/run+'%{buildroot}'%{_localstatedir}/run+' \
|
||||
-e 's+%{sysconfdir}+'%{buildroot}'%{sysconfdir}+' \
|
||||
@@ -737,24 +723,24 @@ sed -e 's+%{_libdir}+'%{buildroot}'%{_libdir}+' \
|
||||
httpd.conf > httpd.conf.test
|
||||
sed -e 's+%{sysconfdir}+'%{buildroot}'%{sysconfdir}+' \
|
||||
default-server.conf > default-server.conf.test
|
||||
touch sysconfig.d/global.conf.test
|
||||
touch sysconfig.d/include.conf.test
|
||||
sed -i 's+%{_localstatedir}/log+'%{buildroot}'%{_localstatedir}/log+' \
|
||||
global.conf.test
|
||||
|
||||
popd
|
||||
pushd %{buildroot}
|
||||
for i in $(export LC_ALL=C; find .%{libexecdir}-%{default_mpm} -name "*.so" | sort); do
|
||||
mod_id=${i#*mod_}; mod_id=${mod_id%.so}_module
|
||||
mod_path=
|
||||
echo LoadModule $mod_id %{buildroot}/${i#.} >> .%{sysconfdir}/sysconfig.d/loadmodule.conf.test
|
||||
echo LoadModule $mod_id %{buildroot}/${i#.} >> .%{sysconfdir}/loadmodule.conf.test
|
||||
done
|
||||
# auth_ldap_module needs to be loaded after ldap_module
|
||||
echo -e "/authnz_ldap\n+\n-m/ldap\nwq" | ed -s ./%{sysconfdir}/sysconfig.d/loadmodule.conf.test
|
||||
echo -e "/authnz_ldap\n+\n-m/ldap\nwq" | ed -s ./%{sysconfdir}/loadmodule.conf.test
|
||||
popd
|
||||
|
||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
||||
%{buildroot}/%{_sbindir}/httpd-%{default_mpm} \
|
||||
-e debug -t -f %{buildroot}/%{sysconfdir}/httpd.conf.test || exit 1
|
||||
rm %{buildroot}/%{sysconfdir}/*.test
|
||||
rm %{buildroot}/%{sysconfdir}/sysconfig.d/*
|
||||
mv %{buildroot}/%{sysconfdir}/original .
|
||||
|
||||
%files -f filelist
|
||||
@@ -771,8 +757,6 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
%doc robots.txt
|
||||
%doc printenv
|
||||
%doc test-cgi
|
||||
#%doc httpd-std.conf-*
|
||||
#%doc ssl-std.conf
|
||||
%doc httpd.conf.default
|
||||
%doc original
|
||||
%attr(750,root,root) %dir %{logfiledir}
|
||||
@@ -792,11 +776,11 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
%{sysconfdir}/ssl.*/README*
|
||||
%dir %{sysconfdir}/conf.d
|
||||
%dir %{sysconfdir}/vhosts.d
|
||||
%dir %{sysconfdir}/sysconfig.d
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%{_datadir}/omc/svcinfo.d/apache2.xml
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%{_unitdir}/apache2.service
|
||||
%{_unitdir}/apache2@.service
|
||||
%{_sbindir}/apache2-systemd-ask-pass
|
||||
%else
|
||||
%{_initddir}/%{name}
|
||||
@@ -823,11 +807,8 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
%dir %{installbuilddir}
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/apache-22-24-upgrade
|
||||
%{_datadir}/%{name}/get_module_list
|
||||
%{_datadir}/%{name}/get_includes
|
||||
%{_datadir}/%{name}/find_httpd_includes
|
||||
%{_datadir}/%{name}/find_mpm
|
||||
%{_datadir}/%{name}/load_configuration
|
||||
%{_datadir}/%{name}/deprecated-scripts
|
||||
%{_datadir}/%{name}/script-helpers
|
||||
%{_datadir}/%{name}/sysconf_addword
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
|
||||
@@ -1240,7 +1221,7 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
%{_bindir}/check_forensic2
|
||||
%{_bindir}/dbmmanage
|
||||
%{_bindir}/dbmmanage2
|
||||
%{_bindir}/apache-find-directives
|
||||
%{_bindir}/apache2-find-directives
|
||||
%{_bindir}/gensslcert
|
||||
%{_bindir}/htdbm
|
||||
%{_bindir}/htdbm2
|
||||
@@ -1264,19 +1245,28 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
|
||||
%if %{prefork}
|
||||
%post prefork
|
||||
%{_datadir}/%{name}/get_module_list >/dev/null 2>&1
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%if %{worker}
|
||||
%post worker
|
||||
%{_datadir}/%{name}/get_module_list >/dev/null 2>&1
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%if %{event}
|
||||
%post event
|
||||
%{_datadir}/%{name}/get_module_list >/dev/null 2>&1
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
@@ -1354,7 +1344,6 @@ if [ $1 -gt 1 ] ; then
|
||||
fi
|
||||
|
||||
rm -rf $tmpdir
|
||||
%{_datadir}/%{name}/get_module_list >/dev/null 2>&1
|
||||
exit 0
|
||||
|
||||
%posttrans
|
||||
|
Reference in New Issue
Block a user