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