[packages/apache-mod_wsgi] add trigger to upgrade config from old package name
glen
glen at pld-linux.org
Sat Oct 1 21:28:20 CEST 2016
commit 4e3e8b64bf7a62a82fb34cd9ed6cfe2aa5ad77b3
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Oct 1 22:27:45 2016 +0300
add trigger to upgrade config from old package name
use obsoletes instead conflict to ensure upgrade path
apache-mod_wsgi.spec | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/apache-mod_wsgi.spec b/apache-mod_wsgi.spec
index ad2ed29..8118551 100644
--- a/apache-mod_wsgi.spec
+++ b/apache-mod_wsgi.spec
@@ -13,7 +13,7 @@ Summary: WSGI interface for the Apache Web server
Summary(pl.UTF-8): Interfejs WSGI dla serwera WWW Apache
Name: apache-mod_%{mod_name}
Version: 4.5.7
-Release: 0.2
+Release: 0.5
License: Apache
Group: Networking/Daemons
Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}/mod_%{mod_name}-%{version}.tar.gz
@@ -59,7 +59,7 @@ Group: Networking/Daemons
Requires: apache(modules-api) = %{apache_modules_api}
Requires: apr >= 1:1.0.0
Requires: python-modules
-Conflicts: %{name} < 4.5.7-0.2
+Obsoletes: %{name} < 4.5.7-0.2
# http://helpful.knobs-dials.com/index.php/Mod_wsgi_notes#PyEval_AcquireThread:_non-NULL_old_thread_state
Conflicts: apache-mod_python
@@ -147,6 +147,14 @@ sed -e 's/mod_wsgi.so/mod_wsgi-py3.so/' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdi
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerpostun py2 -- %{name} < 4.5.7-0.2
+if [ -f %{_sysconfdir}/61_mod_wsgi.conf.rpmsave ]; then
+ mv %{_sysconfdir}/61_mod_wsgi-py2.conf{,rpmnew}
+ mv %{_sysconfdir}/61_mod_wsgi{.conf.rpmsave,-py2.conf}
+ %{__sed} -i -e 's/mod_wsgi.so/mod_wsgi-py2.so/' $RPM_BUILD_ROOT%{_sysconfdir}/61_mod_wsgi-py2.conf
+ %service -q httpd restart
+fi
+
%post py2
%service -q httpd restart
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_wsgi.git/commitdiff/4e3e8b64bf7a62a82fb34cd9ed6cfe2aa5ad77b3
More information about the pld-cvs-commit
mailing list