Ai
7 Star 0 Fork 11

src-openEuler/mod_wsgi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mod_wsgi.spec 3.38 KB
一键复制 编辑 原始数据 按行查看 历史
zhuhai95 提交于 2022-08-03 10:44 +08:00 . fix cve-2022-2255
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
%global sphinxbin %{_bindir}/sphinx-build-3
Name: mod_wsgi
Version: 4.6.4
Release: 3
Summary: A WSGI interface for Python web applications in Apache
License: ASL 2.0
URL: https://github.com/GrahamDumpleton/mod_wsgi
Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz
Patch1: mod_wsgi-4.5.20-exports.patch
Patch2: CVE-2022-2255.patch
BuildRequires: httpd-devel gcc
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}
%{?filter_setup}
%description
The mod_wsgi adapter is an Apache module that provides a WSGI compliant
interface for hosting Python based web applications within Apache. The
adapter is written completely in C code against the Apache C runtime and
for hosting WSGI applications within Apache has a lower overhead than using
existing WSGI adapters for mod_python or CGI.
%package -n python3-%{name}
Summary: %summary
Requires: httpd-mmn = %{_httpd_mmn}
BuildRequires: python3-devel, python3-sphinx
Provides: mod_wsgi = %{version}-%{release}
Provides: mod_wsgi%{?_isa} = %{version}-%{release}
Obsoletes: mod_wsgi < %{version}-%{release}
%description -n python3-%{name}
The mod_wsgi adapter is an Apache module that provides a WSGI compliant
interface for hosting Python based web applications within Apache. The
adapter is written completely in C code against the Apache C runtime and
for hosting WSGI applications within Apache has a lower overhead than using
existing WSGI adapters for mod_python or CGI.
%prep
%setup -qn %{name}-%{version}
%patch1 -p1 -b .exports
%patch2 -p1
%build
make -C docs html SPHINXBUILD=%{sphinxbin}
export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
mkdir py3build/
cp -R * py3build/ || :
pushd py3build
%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3
make %{?_smp_mflags}
%py3_build
popd
%install
pushd py3build
make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir}
mv $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so
install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
%py3_install
mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3}
popd
cat <<EOT >>%{buildroot}%{_httpd_modconfdir}/10-wsgi-python3.conf
<IfModule !wsgi_module>
LoadModule wsgi_module modules/mod_wsgi_python3.so
</IfModule>
EOT
%files -n python3-%{name}
%license LICENSE
%doc CREDITS.rst README.rst
%{_httpd_moddir}/mod_wsgi_python3.so
%{python3_sitearch}/mod_wsgi-*.egg-info
%{python3_sitearch}/mod_wsgi
%{_bindir}/mod_wsgi-express-3
%config(noreplace) %{_httpd_modconfdir}/*.conf
%changelog
* Tue Aug 02 2022 zhuhai95 <zhuhai@ncti-gba.cn> - 4.6.4-3
- fix CVE-2022-2255
* Wed Oct 13 2021 xu_ping <xuping33@huawei.com> - 4.6.4-2
- add 10-wsgi-python3.conf to httpd
* Thu Nov 19 2020 huanghaitao <huanghaitao8@huawei.com> - 4.6.4-1
- package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/mod_wsgi.git
git@gitee.com:src-openeuler/mod_wsgi.git
src-openeuler
mod_wsgi
mod_wsgi
openEuler-20.03-LTS-SP4

搜索帮助