RHEL-2612 - cups pulls an unneeded dependency on python3

Resolves: RHEL-2612
This commit is contained in:
Zdenek Dohnal 2023-09-12 13:17:10 +02:00
parent 1b2fb92120
commit 114ceaf37c

View File

@ -9,9 +9,9 @@
# we still need something for python2... # we still need something for python2...
%if 0%{?rhel} >= 8 || 0%{?fedora} %if 0%{?rhel} >= 8 || 0%{?fedora}
%bcond_without python3 %global __python %{__python3}
%else %else
%bcond_with python3 %global __python /usr/bin/python2
%endif %endif
#%%global prever rc1 #%%global prever rc1
@ -22,7 +22,7 @@ Summary: CUPS printing system
Name: cups Name: cups
Epoch: 1 Epoch: 1
Version: 2.2.6 Version: 2.2.6
Release: 53%{?dist} Release: 54%{?dist}
License: GPLv2+ and LGPLv2 with exceptions and AML License: GPLv2+ and LGPLv2 with exceptions and AML
Url: http://www.cups.org/ Url: http://www.cups.org/
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
@ -211,11 +211,7 @@ Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
# for upgrade-get-document script # for upgrade-get-document script
%if %{with python3} Requires(post): %{__python}
Requires(post): python3
%else
Requires(post): python
%endif
# We ship udev rules which use setfacl. # We ship udev rules which use setfacl.
Requires: systemd Requires: systemd
@ -621,11 +617,7 @@ s:.*\('%{_datadir}'/\)\([^/_]\+\)\(.*\.po$\):%lang(\2) \1\2\3:
# install get-document upgrade script # install get-document upgrade script
install -m 0755 %{SOURCE9} %{buildroot}%{_sbindir}/upgrade_get_document install -m 0755 %{SOURCE9} %{buildroot}%{_sbindir}/upgrade_get_document
%if %{with python3} sed -i 's,@PYTHON_SHEBANG@,#!%{__python},' %{buildroot}%{_sbindir}/upgrade_get_document
sed -i 's,@PYTHON_SHEBANG@,#!/usr/bin/python3,' %{buildroot}%{_sbindir}/upgrade_get_document
%else
sed -i 's,@PYTHON_SHEBANG@,#!/usr/bin/python,' %{buildroot}%{_sbindir}/upgrade_get_document
%endif
%post %post
%systemd_post %{name}.path %{name}.socket %{name}.service %systemd_post %{name}.path %{name}.socket %{name}.service
@ -899,6 +891,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz %{_mandir}/man5/ipptoolfile.5.gz
%changelog %changelog
* Tue Sep 12 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-54
- RHEL-2612 - cups pulls an unneeded dependency on python3
* Tue Aug 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-53 * Tue Aug 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.6-53
- CVE-2023-32360 cups: Information leak through Cups-Get-Document operation - CVE-2023-32360 cups: Information leak through Cups-Get-Document operation