f0d6ab
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
f0d6ab
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
f0d6ab
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
f0d6ab
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
f0d6ab
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
f0d6ab
%{!?_httpd_moddir:    %{expand: %%global _httpd_moddir    %%{_libdir}/httpd/modules}}
f0d6ab
f0d6ab
Name:           mod_wsgi
f0d6ab
Version:        3.4
f0d6ab
Release:        18%{?dist}
f0d6ab
Summary:        A WSGI interface for Python web applications in Apache
f0d6ab
Group:          System Environment/Libraries
f0d6ab
License:        ASL 2.0
f0d6ab
URL:            http://www.modwsgi.org
f0d6ab
Source0:        https://github.com/GrahamDumpleton/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
f0d6ab
Source1:        wsgi.conf
f0d6ab
Patch0:         mod_wsgi-3.4-connsbh.patch
f0d6ab
Patch1:         mod_wsgi-3.4-procexit.patch
f0d6ab
Patch2:         mod_wsgi-3.4-coredump.patch
f0d6ab
Patch3:         mod_wsgi-3.4-CVE-2014-0240.patch
f0d6ab
Patch4:         mod_wsgi-3.4-deadlock.patch
f0d6ab
Patch5:         mod_wsgi-3.4-restart-segfault.patch
f0d6ab
Patch6:         mod_wsgi-3.4-head-to-get.patch
f0d6ab
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f0d6ab
BuildRequires:  httpd-devel, python-devel, autoconf
f0d6ab
Requires: httpd-mmn = %{_httpd_mmn}
f0d6ab
f0d6ab
# Suppress auto-provides for module DSO
f0d6ab
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
f0d6ab
%{?filter_setup}
f0d6ab
f0d6ab
%description
f0d6ab
The mod_wsgi adapter is an Apache module that provides a WSGI compliant
f0d6ab
interface for hosting Python based web applications within Apache. The
f0d6ab
adapter is written completely in C code against the Apache C runtime and
f0d6ab
for hosting WSGI applications within Apache has a lower overhead than using
f0d6ab
existing WSGI adapters for mod_python or CGI.
f0d6ab
f0d6ab
f0d6ab
%prep
f0d6ab
%setup -q
f0d6ab
%patch0 -p1 -b .connsbh
f0d6ab
%patch1 -p1 -b .procexit
f0d6ab
%patch2 -p1 -b .coredump
f0d6ab
%patch3 -p1 -b .cve20140240
f0d6ab
%patch4 -p1 -b .deadlock
f0d6ab
%patch5 -p1 -b .restartseg
f0d6ab
%patch6 -p1 -b .headtoget
f0d6ab
f0d6ab
%build
f0d6ab
# Regenerate configure for -coredump patch change to configure.in
f0d6ab
autoconf
f0d6ab
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
f0d6ab
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
f0d6ab
%configure --enable-shared --with-apxs=%{_httpd_apxs}
f0d6ab
make %{?_smp_mflags}
f0d6ab
f0d6ab
f0d6ab
%install
f0d6ab
rm -rf $RPM_BUILD_ROOT
f0d6ab
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
f0d6ab
f0d6ab
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
f0d6ab
%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}"
f0d6ab
# httpd <= 2.2.x
f0d6ab
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/wsgi.conf
f0d6ab
%else
f0d6ab
# httpd >= 2.4.x
f0d6ab
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi.conf
f0d6ab
%endif
f0d6ab
f0d6ab
%clean
f0d6ab
rm -rf $RPM_BUILD_ROOT
f0d6ab
f0d6ab
%files
f0d6ab
%defattr(-,root,root,-)
f0d6ab
%doc LICENCE README
f0d6ab
%config(noreplace) %{_httpd_modconfdir}/*.conf
f0d6ab
%{_httpd_moddir}/mod_wsgi.so
f0d6ab
f0d6ab
f0d6ab
%changelog
f0d6ab
* Wed Aug 15 2018 Luboš Uhliarik <luhliari@redhat.com> - 3.4-18
f0d6ab
- mod_wsgi forces HEAD to GET (#1466799)
f0d6ab
f0d6ab
* Mon Jun 18 2018 Luboš Uhliarik <luhliari@redhat.com> - 3.4-17
f0d6ab
- upstream URL reference in the rpm header is unreachable/dead (#1583920)
f0d6ab
f0d6ab
* Mon Jun 18 2018 Luboš Uhliarik <luhliari@redhat.com> - 3.4-14
f0d6ab
- mod_wsgi segfault if loaded during a restart (#1445540)
f0d6ab
f0d6ab
* Thu Dec 14 2017 Joe Orton <jorton@redhat.com> - 3.4-13
f0d6ab
- reduce chance of deadlock at process shutdown (#1493429)
f0d6ab
f0d6ab
* Tue Aug 19 2014 Jan Kaluza <jkaluza@redhat.com> - 3.4-12
f0d6ab
- fix possible privilege escalation in setuid() (CVE-2014-0240)
f0d6ab
f0d6ab
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.4-11
f0d6ab
- Mass rebuild 2014-01-24
f0d6ab
f0d6ab
* Mon Jan 13 2014 Joe Orton <jorton@redhat.com> - 3.4-10
f0d6ab
- rebuild for #1029360
f0d6ab
f0d6ab
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.4-9
f0d6ab
- Mass rebuild 2013-12-27
f0d6ab
f0d6ab
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-8
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f0d6ab
f0d6ab
* Tue Dec 11 2012 Jan Kaluza <jkaluza@redhat.com> - 3.4-7
f0d6ab
- compile with -fno-strict-aliasing to workaround Python
f0d6ab
  bug http://www.python.org/dev/peps/pep-3123/
f0d6ab
f0d6ab
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-6
f0d6ab
- use _httpd_moddir macro
f0d6ab
f0d6ab
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-5
f0d6ab
- spec file cleanups
f0d6ab
f0d6ab
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-4
f0d6ab
- enable PR_SET_DUMPABLE in daemon process to enable core dumps
f0d6ab
f0d6ab
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-3
f0d6ab
- use a NULL c->sbh pointer with httpd 2.4 (possible fix for #867276)
f0d6ab
- add logging for unexpected daemon process loss
f0d6ab
f0d6ab
* Wed Oct 17 2012 Matthias Runge <mrunge@redhat.com> - 3.4-2
f0d6ab
- also use RPM_LD_FLAGS for build bz. #867137
f0d6ab
f0d6ab
* Mon Oct 15 2012 Matthias Runge <mrunge@redhat.com> - 3.4-1
f0d6ab
- update to upstream release 3.4
f0d6ab
f0d6ab
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-7
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f0d6ab
f0d6ab
* Wed Jun 13 2012 Joe Orton <jorton@redhat.com> - 3.3-6
f0d6ab
- add possible fix for daemon mode crash (#831701)
f0d6ab
f0d6ab
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-5
f0d6ab
- move wsgi.conf to conf.modules.d
f0d6ab
f0d6ab
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-4
f0d6ab
- rebuild for httpd 2.4
f0d6ab
f0d6ab
* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 3.3-3
f0d6ab
- prepare for httpd 2.4.x
f0d6ab
f0d6ab
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-2
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f0d6ab
f0d6ab
* Tue Nov 01 2011 James Bowes <jbowes@redhat.com> 3.3-1
f0d6ab
- update to 3.3
f0d6ab
f0d6ab
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-3
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f0d6ab
f0d6ab
* Tue Jul 27 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-2
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
f0d6ab
f0d6ab
* Tue Mar  9 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.2-1
f0d6ab
- update to 3.2
f0d6ab
f0d6ab
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-2
f0d6ab
- removed conflicts as it violates fedora packaging policy
f0d6ab
f0d6ab
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-1
f0d6ab
- update to 3.1
f0d6ab
- add explicit enable-shared
f0d6ab
- add conflicts mod_python < 3.3.1
f0d6ab
f0d6ab
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f0d6ab
f0d6ab
* Thu Jul 02 2009 James Bowes <jbowes@redhat.com> 2.5-1
f0d6ab
- Update to 2.5
f0d6ab
f0d6ab
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
f0d6ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f0d6ab
f0d6ab
* Sun Nov 30 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.3-2
f0d6ab
- Rebuild for Python 2.6
f0d6ab
f0d6ab
* Tue Oct 28 2008 Luke Macken <lmacken@redhat.com> 2.3-1
f0d6ab
- Update to 2.3
f0d6ab
f0d6ab
* Mon Sep 29 2008 James Bowes <jbowes@redhat.com> 2.1-2
f0d6ab
- Remove requires on httpd-devel
f0d6ab
f0d6ab
* Wed Jul 02 2008 James Bowes <jbowes@redhat.com> 2.1-1
f0d6ab
- Update to 2.1
f0d6ab
f0d6ab
* Mon Jun 16 2008 Ricky Zhou <ricky@fedoraproject.org> 1.3-4
f0d6ab
- Build against the shared python lib.
f0d6ab
f0d6ab
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3-3
f0d6ab
- Autorebuild for GCC 4.3
f0d6ab
f0d6ab
* Sun Jan 06 2008 James Bowes <jbowes@redhat.com> 1.3-2
f0d6ab
- Require httpd
f0d6ab
f0d6ab
* Sat Jan 05 2008 James Bowes <jbowes@redhat.com> 1.3-1
f0d6ab
- Update to 1.3
f0d6ab
f0d6ab
* Sun Sep 30 2007 James Bowes <jbowes@redhat.com> 1.0-1
f0d6ab
- Initial packaging for Fedora
f0d6ab