From 596eac75b50e29a86f645d3eae2ab8e0be1bdffa Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Thu, 25 Aug 2022 10:10:49 +0800 Subject: [PATCH] Remove rpath --- mod_wsgi.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mod_wsgi.spec b/mod_wsgi.spec index 1d94beb..2a19900 100644 --- a/mod_wsgi.spec +++ b/mod_wsgi.spec @@ -6,7 +6,7 @@ %global sphinxbin %{_bindir}/sphinx-build-3 Name: mod_wsgi Version: 4.9.1 -Release: 2 +Release: 3 Summary: A WSGI interface for Python web applications in Apache License: Apache-2.0 URL: https://modwsgi.readthedocs.io/ @@ -14,7 +14,7 @@ Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/refs/ta Source1: wsgi-python3.conf Patch1: mod_wsgi-4.5.20-exports.patch Patch2: CVE-2022-2255.patch -BuildRequires: httpd-devel gcc perl +BuildRequires: httpd-devel gcc perl chrpath %{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$} %{?filter_setup} %description @@ -65,6 +65,16 @@ install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi-python3 mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3} popd +chrpath -d %{buildroot}%{python3_sitearch}/mod_wsgi/server/mod_wsgi-py310.cpython-310-%{_arch}-linux-gnu.so +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/python3.10/config" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + %files -n python3-%{name} %license LICENSE %doc CREDITS.rst README.rst @@ -73,8 +83,12 @@ popd %{python3_sitearch}/mod_wsgi-*.egg-info %{python3_sitearch}/mod_wsgi %{_bindir}/mod_wsgi-express-3 +%config(noreplace) /etc/ld.so.conf.d/* %changelog +* Thu Aug 25 2022 wangkai - 4.9.1-3 +- Remove rpath + * Mon Aug 08 2022 zhuhai95 - 4.9.1-2 - Fix CVE-2022-2255 -- Gitee