452516
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
452516
452516
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
452516
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
452516
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
452516
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
452516
%{!?_httpd_moddir:    %{expand: %%global _httpd_moddir    %%{_libdir}/httpd/modules}}
452516
452516
%bcond_with docs
452516
452516
%global with_python3 1
452516
452516
%global with_python2 0
452516
%global debug_package %{nil}
452516
452516
Name:           mod_wsgi
452516
Version:        4.7.1
6828a5
Release:        5%{?dist}
452516
Summary:        A WSGI interface for Python web applications in Apache
452516
License:        ASL 2.0
452516
URL:            https://modwsgi.readthedocs.io/
452516
Source0:        https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz
452516
Source1:        wsgi.conf
452516
Source2:        wsgi-python3.conf
452516
Patch1:         mod_wsgi-4.5.20-exports.patch
6828a5
Patch2:         mod_wsgi-4.9.1-request-limit.patch
452516
452516
# Exclude i686 arch. Due to a modularity issue it's being added to the
452516
# x86_64 compose of CRB, but we don't want to ship it at all.
452516
# See: https://projects.engineering.redhat.com/browse/RCM-72605
452516
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1779142
452516
ExcludeArch:    i686
452516
452516
BuildRequires:  make
452516
BuildRequires:  httpd-devel
452516
BuildRequires:  gcc
452516
452516
# Suppress auto-provides for module DSO
452516
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
452516
%{?filter_setup}
452516
452516
%global _description\
452516
The mod_wsgi adapter is an Apache module that provides a WSGI compliant\
452516
interface for hosting Python based web applications within Apache. The\
452516
adapter is written completely in C code against the Apache C runtime and\
452516
for hosting WSGI applications within Apache has a lower overhead than using\
452516
existing WSGI adapters for mod_python or CGI.\
452516
452516
452516
%description %_description
452516
452516
%if 0%{?with_python2} > 0
452516
%package -n python2-%{name}
452516
Summary: %summary
452516
Requires:       httpd-mmn = %{_httpd_mmn}
452516
BuildRequires:  python2-devel, python2-setuptools
452516
%{?python_provide:%python_provide python2-%{name}}
452516
# Remove before F30
452516
Provides: mod_wsgi = %{version}-%{release}
452516
Provides: mod_wsgi%{?_isa} = %{version}-%{release}
452516
Obsoletes: mod_wsgi < %{version}-%{release}
452516
452516
%description -n python2-%{name} %_description
452516
452516
%endif
452516
452516
%if 0%{?with_python3} > 0
452516
%package -n python%{python3_pkgversion}-%{name}
452516
Summary:        %summary
452516
Requires:       httpd-mmn = %{_httpd_mmn}
452516
BuildRequires:  python%{python3_pkgversion}-devel
452516
BuildRequires:  python%{python3_pkgversion}-rpm-macros
452516
%if %{with docs}
452516
BuildRequires:  python3-sphinx, python3-sphinx_rtd_theme
452516
%endif
452516
452516
Requires:       python%{python3_pkgversion}-setuptools
452516
452516
# httpd can only load one Python 3 version of mod_wsgi at the time, and
452516
# therefore we use a Conflicts tag to only allow one to be installed.  The
452516
# alternative would be to define a priority between them (e.g. python3- has
452516
# priority over python38-), however, it would be potentially confusing and
452516
# tricky to notice why the other version is not working.
452516
Conflicts: python3-mod_wsgi
452516
Conflicts: python38-mod_wsgi
452516
452516
%description -n python%{python3_pkgversion}-%{name} %_description
452516
452516
Only one Python 3 version of mod_wsgi can be loaded at the same time in httpd,
452516
therefore this package conflicts with the other versions available.
452516
452516
%endif
452516
452516
%prep
452516
%autosetup -p1 -n %{name}-%{version}
452516
452516
: Python2=%{with_python2} Python3=%{with_python3}
452516
452516
%build
452516
%if %{with_python3}
452516
%if %{with docs}
452516
make -C docs html SPHINXBUILD=%{_bindir}/sphinx-build-3
452516
%endif
452516
%endif
452516
452516
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
452516
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
452516
452516
%if 0%{?with_python3} > 0
452516
mkdir py3build/
452516
# this always produces an error (because of trying to copy py3build
452516
# into itself) but we don't mind, so || :
452516
cp -R * py3build/ || :
452516
pushd py3build
452516
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python%{python3_version}
452516
%{make_build}
452516
%py3_build
452516
popd
452516
%endif
452516
452516
%if 0%{?with_python2} > 0
452516
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python2
452516
%{make_build}
452516
%py2_build
452516
%endif
452516
452516
%install
452516
# first install python3 variant and rename the so file
452516
%if 0%{?with_python3} > 0
452516
pushd py3build
452516
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
452516
mv  $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so
452516
452516
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
452516
# httpd >= 2.4.x
452516
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3.conf
452516
452516
%py3_install
452516
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-%{python3_version}}
452516
popd
452516
452516
%endif
452516
452516
# second install python2 variant
452516
%if 0%{?with_python2} > 0
452516
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
452516
452516
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
452516
# httpd >= 2.4.x
452516
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi.conf
452516
452516
%py2_install
452516
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-2}
452516
ln -s %{_bindir}/mod_wsgi-express-2 $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express
452516
%endif
452516
452516
%if 0%{?with_python2} > 0
452516
%files -n python2-%{name}
452516
%license LICENSE
452516
%doc CREDITS.rst README.rst
452516
%config(noreplace) %{_httpd_modconfdir}/*wsgi.conf
452516
%{_httpd_moddir}/mod_wsgi.so
452516
%{python2_sitearch}/mod_wsgi-*.egg-info
452516
%{python2_sitearch}/mod_wsgi
452516
%{_bindir}/mod_wsgi-express-2
452516
%{_bindir}/mod_wsgi-express
452516
%endif
452516
452516
%if 0%{?with_python3} > 0
452516
%files -n python%{python3_pkgversion}-%{name}
452516
%license LICENSE
452516
%doc CREDITS.rst README.rst
452516
%config(noreplace) %{_httpd_modconfdir}/*wsgi-python3.conf
452516
%{_httpd_moddir}/mod_wsgi_python3.so
452516
%{python3_sitearch}/mod_wsgi-*.egg-info
452516
%{python3_sitearch}/mod_wsgi
452516
%{_bindir}/mod_wsgi-express-%{python3_version}
452516
%endif
452516
452516
%changelog
6828a5
* Thu Sep 08 2022 Lumír Balhar <lbalhar@redhat.com> - 4.7.1-5
6828a5
- Core dumped upon file upload >= 1GB
6828a5
Resolves: rhbz#2125172
6828a5
452516
* Fri Jan 15 2021 Tomas Orsava <torsava@redhat.com> - 4.7.1-4
452516
- Convert from Fedora to the python39 module in RHEL8
452516
- Resolves: rhbz#1877430
452516
452516
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.7.1-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
452516
452516
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.7.1-2
452516
- Rebuilt for Python 3.9
452516
452516
* Wed May 13 2020 Joe Orton <jorton@redhat.com> - 4.7.1-1
452516
- update to 4.7.1 (#1721376)
452516
452516
* Thu Feb 13 2020 Tom Stellard <tstellar@redhat.com> - 4.6.8-3
452516
- Use make_build macro instead of just make
452516
- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
452516
452516
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.8-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
452516
452516
* Mon Nov 11 2019 Joe Orton <jorton@redhat.com> - 4.6.8-1
452516
- update to 4.6.8 (#1721376)
452516
452516
* Mon Nov 11 2019 Joe Orton <jorton@redhat.com> - 4.6.6-6
452516
- try again to drop Python 2
452516
452516
* Tue Oct 29 2019 Joe Orton <jorton@redhat.com> - 4.6.6-5
452516
- drop python2 build
452516
452516
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.6-4
452516
- Rebuilt for Python 3.8.0rc1 (#1748018)
452516
452516
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.6-3
452516
- Rebuilt for Python 3.8
452516
452516
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.6-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
452516
452516
* Fri Jun 07 2019 Matthias Runge <mrunge@redhat.com> - 4.6.6-1
452516
- update to 4.6.6 (rhbz#1718151)
452516
452516
* Wed May 29 2019 Miro Hrončok <mhroncok@redhat.com> - 4.6.5-1
452516
- update to 4.6.5
452516
452516
* Tue Apr 16 2019 Joe Orton <jorton@redhat.com> - 4.6.4-4
452516
- only build docs with Python 3
452516
- fix build on Fedora>30 and RHEL 7
452516
452516
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.4-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
452516
452516
* Tue Jul 31 2018 Adam Williamson <awilliam@redhat.com> - 4.6.4-2
452516
- Run Python 3 build in a subdir, so module isn't linked against both
452516
  libpython 2 and libpython 3 (rhbz#1609491)
452516
452516
* Fri Jul 20 2018 Matthias Runge <mrunge@redhat.com> - 4.6.4-1
452516
- update to 4.6.4 (rhbz#1560329)
452516
452516
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.2-5
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
452516
452516
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.6.2-4
452516
- Rebuilt for Python 3.7
452516
452516
* Fri Apr 20 2018 Joe Orton <jorton@redhat.com> - 4.6.2-3
452516
- use sphinx-build-3 if python2 support is disabled
452516
452516
* Thu Mar 22 2018 Troy Dawson <tdawson@redhat.com> - 4.6.2-2
452516
- Update conditionals.
452516
- Make preperations for non-python2 builds
452516
452516
* Tue Mar 13 2018 Matthias Runge <mrunge@redhat.com> - 4.6.2-1
452516
- update to 4.6.2 (rhbz#1514768)
452516
- add gcc BR
452516
452516
* Wed Feb  7 2018 Joe Orton <jorton@redhat.com> - 4.5.20-4
452516
- restrict module DSO symbol exports
452516
452516
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.5.20-3
452516
- Update Python 2 dependency declarations to new packaging standards
452516
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
452516
452516
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.5.20-2
452516
- Python 2 binary package renamed to python2-mod_wsgi
452516
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
452516
452516
* Fri Oct 20 2017 Joe Orton <jorton@redhat.com> - 4.5.20-1
452516
- update to 4.5.20
452516
452516
* Wed Aug 09 2017 Dan Callaghan <dcallagh@redhat.com> - 4.5.15-5
452516
- include mod_wsgi Python package and mod_wsgi-express script
452516
452516
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.15-4
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
452516
452516
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.15-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
452516
452516
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.5.15-2
452516
- Rebuild due to bug in RPM (RHBZ #1468476)
452516
452516
* Fri Jun 23 2017 Joe Orton <jorton@redhat.com> - 4.5.15-1
452516
- update to 4.5.15 (#1431893)
452516
452516
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.13-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
452516
452516
* Tue Jan 10 2017 Jakub Dorňák <jakub.dornak@misli.cz> - 4.5.13-1
452516
- Update to 4.5.13
452516
452516
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.5.9-2
452516
- Rebuild for Python 3.6
452516
452516
* Mon Dec 05 2016 Matthias Runge <mrunge@redhat.com> - 4.5.9-1
452516
- upgrade to 4.5.9 (rhbz#1180445)
452516
452516
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.8-4
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
452516
452516
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.8-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
452516
452516
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.8-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
452516
452516
* Thu Feb 12 2015 Richard W.M. Jones <rjones@redhat.com> - 4.4.8-1
452516
- Upstream to 4.4.8.
452516
- This version includes the fix for the segfault described in RHBZ#1178851.
452516
452516
* Mon Jan  5 2015 Jakub Dorňák <jdornak@redhat.com> - 4.4.3-1
452516
- update to new upstream version 4.4.3 (#1176914)
452516
452516
* Wed Dec 17 2014 Jan Kaluza <jkaluza@redhat.com> - 4.4.1-1
452516
- update to new upstream version 4.4.1 (#1170994)
452516
452516
* Wed Nov 19 2014 Jan Kaluza <jkaluza@redhat.com> - 4.3.2-1
452516
- update to new upstream version 4.3.2 (#1104526)
452516
452516
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
452516
452516
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
452516
452516
* Thu May 29 2014 Luke Macken <lmacken@redhat.com> - 3.5-1
452516
- Update to 3.5 to fix CVE-2014-0240 (#1101863)
452516
- Remove all of the patches, which have been applied upstream
452516
- Update source URL for new the GitHub upstream
452516
452516
* Wed May 28 2014 Joe Orton <jorton@redhat.com> - 3.4-14
452516
- rebuild for Python 3.4
452516
452516
* Mon Apr 28 2014 Matthias Runge <mrunge@redhat.com> - 3.4.13
452516
- do not use conflicts between mod_wsgi packages (rhbz#1087943)
452516
452516
* Thu Jan 23 2014 Joe Orton <jorton@redhat.com> - 3.4-12
452516
- fix _httpd_mmn expansion in absence of httpd-devel
452516
452516
* Fri Jan 10 2014 Matthias Runge <mrunge@redhat.com> - 3.4-11
452516
- added python3 subpackage (thanks to Jakub Dorňák), rhbz#1035876
452516
452516
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-10
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
452516
452516
* Mon Jul  8 2013 Joe Orton <jorton@redhat.com> - 3.4-9
452516
- modernize spec file (thanks to rcollet)
452516
452516
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-8
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
452516
452516
* Tue Dec 11 2012 Jan Kaluza <jkaluza@redhat.com> - 3.4-7
452516
- compile with -fno-strict-aliasing to workaround Python
452516
  bug http://www.python.org/dev/peps/pep-3123/
452516
452516
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-6
452516
- use _httpd_moddir macro
452516
452516
* Thu Nov 22 2012 Joe Orton <jorton@redhat.com> - 3.4-5
452516
- spec file cleanups
452516
452516
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-4
452516
- enable PR_SET_DUMPABLE in daemon process to enable core dumps
452516
452516
* Wed Oct 17 2012 Joe Orton <jorton@redhat.com> - 3.4-3
452516
- use a NULL c->sbh pointer with httpd 2.4 (possible fix for #867276)
452516
- add logging for unexpected daemon process loss
452516
452516
* Wed Oct 17 2012 Matthias Runge <mrunge@redhat.com> - 3.4-2
452516
- also use RPM_LD_FLAGS for build bz. #867137
452516
452516
* Mon Oct 15 2012 Matthias Runge <mrunge@redhat.com> - 3.4-1
452516
- update to upstream release 3.4
452516
452516
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-7
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
452516
452516
* Wed Jun 13 2012 Joe Orton <jorton@redhat.com> - 3.3-6
452516
- add possible fix for daemon mode crash (#831701)
452516
452516
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-5
452516
- move wsgi.conf to conf.modules.d
452516
452516
* Mon Mar 26 2012 Joe Orton <jorton@redhat.com> - 3.3-4
452516
- rebuild for httpd 2.4
452516
452516
* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 3.3-3
452516
- prepare for httpd 2.4.x
452516
452516
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
452516
452516
* Tue Nov 01 2011 James Bowes <jbowes@redhat.com> 3.3-1
452516
- update to 3.3
452516
452516
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
452516
452516
* Tue Jul 27 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
452516
452516
* Tue Mar  9 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.2-1
452516
- update to 3.2
452516
452516
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-2
452516
- removed conflicts as it violates fedora packaging policy
452516
452516
* Sun Mar 07 2010 Josh Kayse <joshkayse@fedoraproject.org> - 3.1-1
452516
- update to 3.1
452516
- add explicit enable-shared
452516
- add conflicts mod_python < 3.3.1
452516
452516
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
452516
452516
* Thu Jul 02 2009 James Bowes <jbowes@redhat.com> 2.5-1
452516
- Update to 2.5
452516
452516
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
452516
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
452516
452516
* Sun Nov 30 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.3-2
452516
- Rebuild for Python 2.6
452516
452516
* Tue Oct 28 2008 Luke Macken <lmacken@redhat.com> 2.3-1
452516
- Update to 2.3
452516
452516
* Mon Sep 29 2008 James Bowes <jbowes@redhat.com> 2.1-2
452516
- Remove requires on httpd-devel
452516
452516
* Wed Jul 02 2008 James Bowes <jbowes@redhat.com> 2.1-1
452516
- Update to 2.1
452516
452516
* Mon Jun 16 2008 Ricky Zhou <ricky@fedoraproject.org> 1.3-4
452516
- Build against the shared python lib.
452516
452516
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3-3
452516
- Autorebuild for GCC 4.3
452516
452516
* Sun Jan 06 2008 James Bowes <jbowes@redhat.com> 1.3-2
452516
- Require httpd
452516
452516
* Sat Jan 05 2008 James Bowes <jbowes@redhat.com> 1.3-1
452516
- Update to 1.3
452516
452516
* Sun Sep 30 2007 James Bowes <jbowes@redhat.com> 1.0-1
452516
- Initial packaging for Fedora
452516