Hello community, here is the log from the commit of package apache2 for openSUSE:Factory checked in at 2018-10-04 19:00:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/apache2 (Old) and /work/SRC/openSUSE:Factory/.apache2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache2" Thu Oct 4 19:00:13 2018 rev:149 rq:639405 version:2.4.35 Changes: -------- --- /work/SRC/openSUSE:Factory/apache2/apache2.changes 2018-10-01 09:06:59.323811752 +0200 +++ /work/SRC/openSUSE:Factory/.apache2.new/apache2.changes 2018-10-04 19:00:15.423281154 +0200 @@ -1,0 +2,16 @@ +Mon Oct 1 13:38:05 UTC 2018 - Petr Gajdos <[email protected]> + +- consider also patterns in APACHE_CONF_INCLUDE_DIRS as documentation + says (patch Juergen Gleiss) + +------------------------------------------------------------------- +Thu Sep 27 10:25:40 UTC 2018 - Petr Gajdos <[email protected]> + +- relink /usr/sbin/httpd after apache2-MPM uninstall [bsc#1107930c#1] +- simplify find_mpm function from script-helpers +- /usr/sbin/httpd is now created depending on preference hardcoded + in find_mpm (script-helpers), not depending on alphabetical + order of MPMs +- simplify spec file a bit + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apache2.spec ++++++ --- /var/tmp/diff_new_pack.He9Oyy/_old 2018-10-04 19:00:16.891279619 +0200 +++ /var/tmp/diff_new_pack.He9Oyy/_new 2018-10-04 19:00:16.903279606 +0200 @@ -25,11 +25,7 @@ %define apache_mmn %(test -s %{SOURCE0} && { echo -n apache_mmn_; bzcat %{SOURCE0} | awk '/^#define MODULE_MAGIC_NUMBER_MAJOR/ {printf "%d", $3}'; } || echo apache_mmn_notfound) %define suse_maintenance_mmn 0 %define default_mpm prefork -%define prefork 1 -%define worker 1 -%define event 1 -%define mpms_to_build %(test %{prefork} = 1 && printf prefork) %(test %{worker} = 1 && printf worker) %(test %{event} = 1 && printf event) -# dir names +%define mpms_to_build prefork worker event %define datadir /srv/www %define htdocsdir %{datadir}/htdocs %define manualdir %{_datadir}/%{name}/manual @@ -228,7 +224,6 @@ See %{_docdir}/apache2/, http://httpd.apache.org/, and http://httpd.apache.org/docs-2.4/upgrading.html. -%if %worker %package worker Summary: Apache 2 worker MPM (Multi-Processing Module) Group: Productivity/Networking/Web/Servers @@ -236,9 +231,7 @@ # the post scriptlet sources /usr/share/apache2/script-helpers Requires(post): %{name} = %{version} Provides: %{name}-MPM -%endif -%if %prefork %package prefork Summary: Apache 2 "prefork" MPM (Multi-Processing Module) Group: Productivity/Networking/Web/Servers @@ -247,9 +240,7 @@ Requires(post): %{name} = %{version} Provides: %{name}-MPM Provides: apache:%{_sbindir}/httpd -%endif -%if %event %package event Summary: Apache 2 event MPM (Multi-Processing Module) Group: Productivity/Networking/Web/Servers @@ -257,27 +248,21 @@ # the post scriptlet sources /usr/share/apache2/script-helpers Requires(post): %{name} = %{version} Provides: %{name}-MPM -%endif -%if %worker %description worker The worker MPM (multi-Processing Module) implementing a hybrid multi-threaded multi-process web server. This combination offers a performance boost and retains some of the stability of the multi-process model. -%endif -%if %{prefork} %description prefork "prefork" MPM (Multi-Processing Module) This MPM is basically the one that Apache 1.3.x used. It warrants the maximum stability because each server runs in its own process. If a process dies it will not affect other servers. -%endif -%if %{event} %description event The event MPM (multi-Processing Module) is experimental, so it may or may not work as expected. @@ -289,7 +274,6 @@ This MPM depends on APR's atomic compare-and-swap operations for thread synchronization. -%endif %package devel Summary: Apache 2 Header and Include Files @@ -894,7 +878,6 @@ /usr/share/apache2/load_configuration %endif -%if %{prefork} %files prefork %defattr(-,root,root) %{_sbindir}/httpd-prefork @@ -1021,9 +1004,7 @@ %{_libdir}/%{name}-prefork/mod_vhost_alias.so %{_libdir}/%{name}-prefork/mod_watchdog.so %{_libdir}/%{name}-prefork/mod_xml2enc.so -%endif -%if %{worker} %files worker %defattr(-,root,root) %{_sbindir}/httpd-worker @@ -1150,9 +1131,7 @@ %{_libdir}/%{name}-worker/mod_vhost_alias.so %{_libdir}/%{name}-worker/mod_watchdog.so %{_libdir}/%{name}-worker/mod_xml2enc.so -%endif -%if %{event} %files event %defattr(-,root,root) %{_sbindir}/httpd-event @@ -1279,7 +1258,6 @@ %{_libdir}/%{name}-event/mod_vhost_alias.so %{_libdir}/%{name}-event/mod_watchdog.so %{_libdir}/%{name}-event/mod_xml2enc.so -%endif %files devel -f filelist-devel %defattr(-,root,root) @@ -1347,94 +1325,69 @@ %{_sbindir}/rotatelogs %{_sbindir}/rotatelogs2 -%if %{prefork} -# + +%define install_httpd_link() \ +( \ + # it might happen that apache2 including \ + # %{_datadir}/apache2/script-helpers is not installed \ + # yet even if apache2-<MPM> has Requires(post): apache2 \ + # because of circular dependency between apache2 \ + # and apache2-MPM \ + if [ -f %{_datadir}/apache2/script-helpers ]; then \ + . %{_datadir}/apache2/script-helpers \ + find_mpm \ + # when this is run in %post(apache2), it may happen \ + # no MPM is installed so far \ + if [ -n "$HTTPD_MPM" ]; then \ + ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE \ + fi \ + fi \ +) %post prefork -# install /usr/sbin/httpd link -if [ -f %{_datadir}/apache2/script-helpers ]; then - # it might happen that apache2 including - # %{_datadir}/apache2/script-helpers is not installed - # yet even if apache2-<MPM> has Requires(post): apache2 - # because of circular dependency between apache2 - # and apache2-MPM - . %{_datadir}/apache2/script-helpers - find_mpm - ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE -fi +%install_httpd_link exit 0 -# %postun prefork if [ $1 -eq 1 ]; then %apache_request_restart fi +%install_httpd_link exit 0 -# %posttrans prefork %apache_restart_if_needed exit 0 -# -%endif -%if %{worker} %post worker -# install /usr/sbin/httpd link -if [ -f %{_datadir}/apache2/script-helpers ]; then - # it might happen that apache2 including - # %{_datadir}/apache2/script-helpers is not installed - # yet even if apache2-<MPM> has Requires(post): apache2 - # because of circular dependency between apache2 - # and apache2-MPM - . %{_datadir}/apache2/script-helpers - find_mpm - ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE -fi +%install_httpd_link exit 0 -# %postun worker if [ $1 -eq 1 ]; then %apache_request_restart fi +%install_httpd_link exit 0 -# %posttrans worker %apache_restart_if_needed exit 0 -# -%endif -%if %{event} %post event -# install /usr/sbin/httpd link -if [ -f %{_datadir}/apache2/script-helpers ]; then - # it might happen that apache2 including - # %{_datadir}/apache2/script-helpers is not installed - # yet even if apache2-<MPM> has Requires(post): apache2 - # because of circular dependency between apache2 - # and apache2-MPM - . %{_datadir}/apache2/script-helpers - find_mpm - ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE -fi +%install_httpd_link exit 0 -# %postun event if [ $1 -eq 1 ]; then %apache_request_restart fi +%install_httpd_link exit 0 -# %posttrans event %apache_restart_if_needed exit 0 -# -%endif %pre %if 0%{?suse_version} >= 1210 @@ -1484,14 +1437,6 @@ %else %{fillup_and_insserv apache2} %endif -# install /usr/bin/httpd link (the code here is -# needed when apache2 was installed after apache2-<MPM>) -. %{_datadir}/apache2/script-helpers -find_mpm -if [ -n "$HTTPD_MPM" ]; then - ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE -fi -# %if %{use_firewalld} %firewalld_reload %endif ++++++ apache2-script-helpers ++++++ --- /var/tmp/diff_new_pack.He9Oyy/_old 2018-10-04 19:00:17.299279192 +0200 +++ /var/tmp/diff_new_pack.He9Oyy/_new 2018-10-04 19:00:17.303279188 +0200 @@ -25,37 +25,33 @@ function find_mpm { - [ -n "$mpm_found" ] && return - - # load sysconfig variables if they weren't yet + # load sysconfig variables if they weren't yet; + # this has no effect when find_mpm is not called + # from start_apache2 load_sysconfig # try to read from sysconfig's APACHE_MPM - HTTPD_MPM=$APACHE_MPM + HTTPD_MPM="$APACHE_MPM" # if empty, then choose one from installed if [ -z "$HTTPD_MPM" ]; then - # guess + installed_mpms="" for i in $HTTPD_SBIN_BASE-*; do test -f $i || continue i=$(basename $i) i=${i#*-} - installed_mpms=(${installed_mpms[*]} $i) + installed_mpms="$installed_mpms $i" + done + # hardcoded preference here: + for mpm in event worker prefork; do + if [[ $installed_mpms =~ "$mpm" ]]; then + HTTPD_MPM=$mpm + break + fi done - if [ -z "${installed_mpms[*]}" ]; then - HTTPD_MPM="" - return - elif [ ${#installed_mpms[*]} = 1 ]; then - HTTPD_MPM=${installed_mpms[*]} - else - case ${installed_mpms[*]} in - *prefork*) HTTPD_MPM=prefork;; - *worker*) HTTPD_MPM=worker;; - *event*) HTTPD_MPM=event;; - esac - fi fi - export HTTPD_MPM mpm_found=true + # in case no + export HTTPD_MPM } # ++++++ start_apache2 ++++++ --- /var/tmp/diff_new_pack.He9Oyy/_old 2018-10-04 19:00:17.543278936 +0200 +++ /var/tmp/diff_new_pack.He9Oyy/_new 2018-10-04 19:00:17.543278936 +0200 @@ -104,7 +104,7 @@ # APACHE_CONF_INCLUDE_DIRS -> include.conf for dir in $APACHE_CONF_INCLUDE_DIRS; do test ${dir:0:1} = / || dir=/etc/apache2/$dir - if [ ! -e $dir ]; then + if ! ( [ -e $dir ] || [ -e ${dir%/*} ] ); then continue fi echo "Include $dir" >> ${sysconfd_dir}/include.conf
