From 5a38b9fe740672f350bf762c62d83f4e9ea30bab Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 20:29:19 +0100 Subject: [PATCH] install tmpfiles and apache configurations for /run/wsgi as default socket dir [release 4.4.12-2mamba;Mon Aug 24 2015] --- apache-mod_wsgi.spec | 15 ++++++++++++++- wsgi-apache.conf | 1 + wsgi-tmpfile.conf | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 wsgi-apache.conf create mode 100644 wsgi-tmpfile.conf diff --git a/apache-mod_wsgi.spec b/apache-mod_wsgi.spec index d803be6..8bc7916 100644 --- a/apache-mod_wsgi.spec +++ b/apache-mod_wsgi.spec @@ -1,6 +1,6 @@ Name: apache-mod_wsgi Version: 4.4.12 -Release: 1mamba +Release: 2mamba Summary: an Apache module that implements a WSGI compliant interface for hosting Python based web applications Group: System/Libraries Vendor: openmamba @@ -8,6 +8,8 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://pypi.python.org/pypi/mod_wsgi Source: https://pypi.python.org/packages/source/m/mod_wsgi/mod_wsgi-%{version}.tar.gz +Source1: wsgi-tmpfile.conf +Source2: wsgi-apache.conf License: Apache License 2.0 ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -46,23 +48,34 @@ sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist %makeinstall +install -D -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/wsgi.conf +install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/httpd.d/wsgi.conf + %post if [ $1 -ge 1 ]; then + systemctl -q daemon-reload + %tmpfiles_create wsgi.conf %{_bindir}/apxs -e -a -n wsgi %{_libdir}/apache/mod_wsgi.so > /dev/null fi : %preun if [ $1 -eq 0 ]; then + systemctl -q daemon-reload %{_bindir}/apxs -e -A -n wsgi %{_libdir}/apache/mod_wsgi.so > /dev/null fi : %files -f %{name}.filelist %defattr(-,root,root) +%{_sysconfdir}/httpd/httpd.d/wsgi.conf %{_libdir}/apache/mod_wsgi.so +%{_tmpfilesdir}/wsgi.conf %doc LICENSE %changelog +* Mon Aug 24 2015 Silvan Calarco 4.4.12-2mamba +- install tmpfiles and apache configurations for /run/wsgi as default socket dir + * Sat Jun 13 2015 Silvan Calarco 4.4.12-1mamba - package created using the webbuild interface diff --git a/wsgi-apache.conf b/wsgi-apache.conf new file mode 100644 index 0000000..9a84fba --- /dev/null +++ b/wsgi-apache.conf @@ -0,0 +1 @@ +WSGISocketPrefix /run/wsgi/wsgi diff --git a/wsgi-tmpfile.conf b/wsgi-tmpfile.conf new file mode 100644 index 0000000..98d9bef --- /dev/null +++ b/wsgi-tmpfile.conf @@ -0,0 +1 @@ +d /run/wsgi 710 apache nobody