Hello community,

here is the log from the commit of package apache2 for openSUSE:Factory checked 
in at 2015-11-24 22:29:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apache2 (Old)
 and      /work/SRC/openSUSE:Factory/.apache2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apache2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/apache2/apache2.changes  2015-11-08 
14:35:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.apache2.new/apache2.changes     2015-11-24 
22:30:01.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Nov  6 10:06:19 UTC 2015 - [email protected]
+
+- restart apache once after the rpm or zypper transaction 
+  [bnc#893659]
+- drop some old compat code from %post
+
+-------------------------------------------------------------------

New:
----
  apache2.target

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apache2.spec ++++++
--- /var/tmp/diff_new_pack.ropazp/_old  2015-11-24 22:30:03.000000000 +0100
+++ /var/tmp/diff_new_pack.ropazp/_new  2015-11-24 22:30:03.000000000 +0100
@@ -19,9 +19,9 @@
 %define apache_mmn     %(test -s %{SOURCE0} && { echo -n apache_mmn_; bzcat 
%{SOURCE0} | awk '/^#define MODULE_MAGIC_NUMBER_MAJOR/ {printf "%d", $3}'; })
 %define suse_maintenance_mmn  0
 %define        default_mpm     prefork
-%{!?prefork:%define prefork 1}
-%{!?worker:%define worker 1}
-%{!?event:%define event 1}
+%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 datadir                /srv/www
@@ -49,6 +49,7 @@
 %define runtimedir     %{_localstatedir}/run
 %define mods_static unixd
 %endif
+
 Name:           apache2
 Version:        2.4.17
 Release:        0
@@ -110,6 +111,7 @@
 Source145:      apache2-find-directives
 Source146:      [email protected]
 Source147:      apache2-script-helpers
+Source148:      apache2.target
 Patch2:         httpd-2.1.3alpha-layout.dif
 Patch23:        httpd-apachectl.patch
 Patch66:        httpd-2.0.54-envvars.dif
@@ -124,6 +126,7 @@
 Patch114:      httpd-2.4.12-lua-5.2.patch
 Patch1000:      
https://raw.githubusercontent.com/icing/mod_h2/master/sandbox/httpd/patches/2.4.17-protocols.patch
 BuildRequires:  automake
+BuildRequires:  apache-rpm-macros-control
 BuildRequires:  db-devel
 BuildRequires:  ed
 BuildRequires:  libapr-util1-devel
@@ -255,6 +258,7 @@
 Requires:       gcc
 Requires:       libapr-util1-devel
 Requires:       libapr1-devel
+Requires:       apache-rpm-macros-control
 
 %description devel
 This package contains header files and include files that are needed
@@ -534,6 +538,7 @@
 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/[email protected] %{buildroot}%{_unitdir}/
+install -m 644 $RPM_SOURCE_DIR/apache2.target %{buildroot}%{_unitdir}/
 ln -sf service %{buildroot}/%{_sbindir}/rcapache2
 %else
 mkdir -p %{buildroot}%{_sysconfdir}/init.d
@@ -790,6 +795,7 @@
 %if 0%{?suse_version} >= 1210
 %{_unitdir}/apache2.service
 %{_unitdir}/[email protected]
+%{_unitdir}/apache2.target
 %{_sbindir}/apache2-systemd-ask-pass
 %else
 %{_initddir}/%{name}
@@ -1262,6 +1268,7 @@
 %{_sbindir}/suexec2
 
 %if %{prefork}
+#
 %post prefork
 # install /usr/sbin/httpd link
 if [ -f /usr/share/apache2/script-helpers ]; then
@@ -1274,8 +1281,18 @@
   find_mpm
   ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
 fi
+exit 0
+#
+%postun prefork
+if [ $1 -eq 1 ]; then
+  %apache_request_restart
+fi
+exit 0
 #
+%posttrans prefork
+%apache_restart_if_needed
 exit 0
+#
 %endif
 
 %if %{worker}
@@ -1291,8 +1308,18 @@
   find_mpm
   ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
 fi
+exit 0
+#
+%postun worker
+if [ $1 -eq 1 ]; then
+  %apache_request_restart
+fi
+exit 0
 #
+%posttrans worker
+%apache_restart_if_needed
 exit 0
+#
 %endif
 
 %if %{event}
@@ -1308,20 +1335,28 @@
   find_mpm
   ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
 fi
+exit 0
+#
+%postun event
+if [ $1 -eq 1 ]; then
+  %apache_request_restart
+fi
+exit 0
 #
+%posttrans event
+%apache_restart_if_needed
 exit 0
+#
 %endif
 
 %pre
 %if 0%{?suse_version} >= 1210
 %service_add_pre apache2.service
-%service_add_pre [email protected]
 %endif
 
 %preun
 %if 0%{?suse_version} >= 1210
-%service_del_preun apache2.service
-%service_del_preun [email protected]
+%service_del_preun apache2.target
 %endif
 for i in %{_sbindir}/httpd \
         %{installbuilddir}/config_vars.mk
@@ -1332,8 +1367,11 @@
 
 %postun
 %if 0%{?suse_version} >= 1210
-%service_del_postun apache2.service
-%service_del_postun [email protected]
+DISABLE_RESTART_ON_UPDATE='yes'
+%service_del_postun apache2.target
+if [ $1 -eq 1 ]; then
+  %apache_request_restart
+fi
 %else
 %insserv_cleanup
 %endif
@@ -1350,46 +1388,12 @@
        usermod -g %{httpdgroup} %{httpduser} 2>/dev/null ||:
        usermod -s /bin/false %{httpduser} 2>/dev/null ||:
 fi
-tmpdir=$(mktemp -d etc/%{name}/%{name}-post.XXXXXX); test $? = 0 || { echo >&2 
Could not create tmpdir. Exiting; exit 1; }
-tmpfile=$tmpdir/tmpfile
-if test -s etc/sysconfig/%{name} && grep -q "^LOADMODULES" 
etc/sysconfig/%{name}; then
-       sed "s/LOADMODULES/APACHE_MODULES/" etc/sysconfig/%{name} >| $tmpfile \
-               && cp $tmpfile etc/sysconfig/%{name}
-fi
 %{fillup_only apache2}
 %if 0%{?suse_version} >= 1210
 %service_add_post apache2.service
-%service_add_post [email protected]
 %else
 %{fillup_and_insserv apache2}
 %endif
-if [ $1 -gt 1 ] ; then
-       # update from package with the old near-monolithic conf file?
-       if [ -s ./%{sysconfdir}/httpd.conf.default -a -s 
./%{sysconfdir}/httpd.conf.rpmnew ]; then
-               diff -u .%{sysconfdir}/httpd.conf.default 
.%{sysconfdir}/httpd.conf \
-                 > $tmpdir/httpd.conf.dif ||:
-               cp -p $tmpdir/httpd.conf.dif ./%{sysconfdir}/httpd.conf 
var/adm/backup/
-               archive_conf=$(old var/adm/backup/httpd.conf     2>/dev/null); 
archive_conf=${archive_conf##*/}
-                archive_dif=$(old var/adm/backup/httpd.conf.dif 2>/dev/null);  
archive_dif=${archive_dif##*/}
-       fi
-       #
-       sed "
-               # generated files were renamed from suse_* to sysconfig.d/*
-               s|\(^Include 
%{_sysconfdir}/apache2\)/suse_\(\(include\|loadmodule\|global\).conf\)|\1/sysconfig.d/\2|
-
-               # the access_log configuration is now configurable
-               s|^CustomLog %{_localstatedir}/log/apache2/access_log.*|# &|
-
-               # group of wwwrun has changed
-               s|^Group nogroup|Group www|
-
-       " < ./%{sysconfdir}/httpd.conf > $tmpfile
-       chmod --reference=./%{sysconfdir}/httpd.conf $tmpfile
-       chown --reference=./%{sysconfdir}/httpd.conf $tmpfile
-       cmp -s $tmpfile ./%{sysconfdir}/httpd.conf || cp -p $tmpfile 
./%{sysconfdir}/httpd.conf
-fi
-
-rm -rf $tmpdir
 # install /usr/bin/httpd link (the code here is
 # needed when apache2 was installed after apache2-<MPM>)
 . /usr/share/apache2/script-helpers
@@ -1402,8 +1406,8 @@
 
 %posttrans
 %{_datadir}/%{name}/apache-22-24-upgrade
-
 %verifyscript
 %verify_permissions -e %{_sbindir}/suexec
+%apache_restart_if_needed
 
 %changelog


++++++ apache2.service ++++++
--- /var/tmp/diff_new_pack.ropazp/_old  2015-11-24 22:30:03.000000000 +0100
+++ /var/tmp/diff_new_pack.ropazp/_new  2015-11-24 22:30:03.000000000 +0100
@@ -2,6 +2,7 @@
 Description=The Apache Webserver
 After=network.target nss-lookup.target time-sync.target
 [email protected] plymouth-quit.service xdm.service
+PartOf=apache2.target
 
 [Service]
 Type=notify

++++++ apache2.target ++++++
[Unit]
Description=Apache target allowing to control multi setup


++++++ [email protected] ++++++
--- /var/tmp/diff_new_pack.ropazp/_old  2015-11-24 22:30:04.000000000 +0100
+++ /var/tmp/diff_new_pack.ropazp/_new  2015-11-24 22:30:04.000000000 +0100
@@ -2,6 +2,7 @@
 Description=The Apache Webserver %I
 After=network.target nss-lookup.target time-sync.target
 [email protected] plymouth-quit.service xdm.service
+PartOf=apache2.target
 
 [Service]
 Type=notify



Reply via email to