From 522378d91b822f0f1c9adb5a83743840a33ec9021276540e6fff5e8fbdec1bc2 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Thu, 16 Jul 2015 10:47:20 +0000 Subject: [PATCH] Accepting request 317068 from home:pgajdos:apache2 - change Provides: from suse_maintenance_mmn = # to suse_maintenance_mmn_# - apache2 Suggests:, not Recommends: apache2-prefork; that means for example, that `zypper in apache2-worker` will not pull apache2-prefork also - installing /usr/sbin/httpd link: * do not try to install it in '%post ' when apache2 (which includes /usr/share/apache2/script-helpers) is not installed yet (fixes installation on 11sp3) * install it in '%post' if apache2 is installed after apache2- to be sure it is there OBS-URL: https://build.opensuse.org/request/show/317068 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=454 --- apache2-README-instances.txt | 3 +- apache2.changes | 19 ++++++++++++ apache2.spec | 60 +++++++++++++++++++++++++++--------- 3 files changed, 67 insertions(+), 15 deletions(-) diff --git a/apache2-README-instances.txt b/apache2-README-instances.txt index 3b7fe7b..d4cea87 100644 --- a/apache2-README-instances.txt +++ b/apache2-README-instances.txt @@ -38,4 +38,5 @@ NOTES: will add access_compat and status modules to APACHE_MODULES variable of /etc/sysconfig/apache2@myweb.org and then starts myweb.org instance. - +* /usr/sbin/httpd link is created according to setup of default + instance (/etc/sysconfig/apache2:APACHE_MPM) diff --git a/apache2.changes b/apache2.changes index 06aec16..73fced2 100644 --- a/apache2.changes +++ b/apache2.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Jul 16 08:46:22 UTC 2015 - pgajdos@suse.com + +- change Provides: from suse_maintenance_mmn = # to + suse_maintenance_mmn_# + +------------------------------------------------------------------- +Wed Jul 15 14:47:33 UTC 2015 - pgajdos@suse.com + +- apache2 Suggests:, not Recommends: apache2-prefork; that means + for example, that `zypper in apache2-worker` will not pull + apache2-prefork also +- installing /usr/sbin/httpd link: + * do not try to install it in '%post ' when apache2 (which + includes /usr/share/apache2/script-helpers) is not installed + yet (fixes installation on 11sp3) + * install it in '%post' if apache2 is installed after + apache2- to be sure it is there + ------------------------------------------------------------------- Tue Jul 14 07:32:00 UTC 2015 - pgajdos@suse.com diff --git a/apache2.spec b/apache2.spec index c0d8e2b..f0ab769 100644 --- a/apache2.spec +++ b/apache2.spec @@ -140,6 +140,7 @@ BuildRequires: xz BuildRequires: zlib-devel Requires: %{_sysconfdir}/mime.types Requires: %{name}-MPM +Suggests: apache2-%{default_mpm} Requires: logrotate Requires(post): %insserv_prereq %fillup_prereq permissions pwdutils Requires(post): %{name}-utils @@ -147,9 +148,8 @@ Requires(post): fileutils Requires(post): grep Requires(post): sed Requires(post): textutils -Recommends: apache2-%{default_mpm} Provides: %{apache_mmn} -Provides: suse_maintenance_mmn = %{suse_maintenance_mmn} +Provides: suse_maintenance_mmn_%{suse_maintenance_mmn} Provides: http_daemon Provides: httpd Provides: suse_help_viewer @@ -1244,28 +1244,52 @@ mv %{buildroot}/%{sysconfdir}/original . %if %{prefork} %post prefork -# install /usr/sbin/httpd -. /usr/share/apache2/script-helpers -find_mpm -ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +# install /usr/sbin/httpd link +if [ -f /usr/share/apache2/script-helpers ]; then + # it might happen that apache2 including + # /usr/share/apache2/script-helpers is not installed + # yet even if apache2- has Requires(post): apache2 + # because of circular dependency between apache2 + # and apache2-MPM + . /usr/share/apache2/script-helpers + find_mpm + ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +fi +# exit 0 %endif %if %{worker} %post worker -# install /usr/sbin/httpd -. /usr/share/apache2/script-helpers -find_mpm -ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +# install /usr/sbin/httpd link +if [ -f /usr/share/apache2/script-helpers ]; then + # it might happen that apache2 including + # /usr/share/apache2/script-helpers is not installed + # yet even if apache2- has Requires(post): apache2 + # because of circular dependency between apache2 + # and apache2-MPM + . /usr/share/apache2/script-helpers + find_mpm + ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +fi +# exit 0 %endif %if %{event} %post event -# install /usr/sbin/httpd -. /usr/share/apache2/script-helpers -find_mpm -ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +# install /usr/sbin/httpd link +if [ -f /usr/share/apache2/script-helpers ]; then + # it might happen that apache2 including + # /usr/share/apache2/script-helpers is not installed + # yet even if apache2- has Requires(post): apache2 + # because of circular dependency between apache2 + # and apache2-MPM + . /usr/share/apache2/script-helpers + find_mpm + ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +fi +# exit 0 %endif @@ -1347,6 +1371,14 @@ if [ $1 -gt 1 ] ; then fi rm -rf $tmpdir +# install /usr/bin/httpd link (the code here is +# needed when apache2 was installed after apache2-) +. /usr/share/apache2/script-helpers +find_mpm +if [ -n "$HTTPD_MPM" ]; then + ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE +fi +# exit 0 %posttrans