diff --git a/SPECS/python-pip.spec b/SPECS/python-pip.spec index 317131b..11f0af1 100644 --- a/SPECS/python-pip.spec +++ b/SPECS/python-pip.spec @@ -9,17 +9,12 @@ %global python3_wheeldir %{_datadir}/python3-wheels %endif -# Note that with disabled python3, bashcomp2 will be disabled as well because -# bashcompdir will point to a different path than with python3 enabled. %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) -%if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d" -%global bashcomp2 1 -%endif Name: python-%{srcname} # When updating, update the bundled libraries versions bellow! Version: 9.0.3 -Release: 18%{?dist} +Release: 19%{?dist} Summary: A tool for installing and managing Python packages Group: Development/Libraries @@ -308,20 +303,8 @@ mkdir -p %{buildroot}%{bashcompdir} PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/pip3 completion --bash \ > %{buildroot}%{bashcompdir}/pip3 -pips2=pip -pips3=pip3 -for pip in %{buildroot}%{_bindir}/pip*; do - pip=$(basename $pip) - case $pip in - pip3?*) - pips3="$pips3 $pip" -%if 0%{?bashcomp2} - ln -s pip-%{python3_version} %{buildroot}%{bashcompdir}/$pip -%endif - ;; - esac -done -sed -i -e "s/^\\(complete.*\\) pip\$/\\1 $pips3/" \ + +sed -i -e "s/^\\(complete.*\\) pip\$/\\1 pip3 pip-3 pip3.6 pip-3.6/" \ -e s/_pip_completion/_pip3_completion/ \ %{buildroot}%{bashcompdir}/pip3 @@ -363,10 +346,7 @@ py.test-%{python3_version} -m 'not network' %{_bindir}/pip%{python3_version} %{_bindir}/pip-%{python3_version} %dir %{bashcompdir} -%{bashcompdir}/pip3* -%if 0%{?bashcomp2} -%dir %(dirname %{bashcompdir}) -%endif +%{bashcompdir}/pip* %if %{with doc} %files doc @@ -384,6 +364,10 @@ py.test-%{python3_version} -m 'not network' %endif %changelog +* Fri Jan 08 2021 Lumír Balhar - 9.0.3-19 +- Fix bash completion files and simplify spec +Resolves: rhbz#1904478 + * Wed Aug 19 2020 Tomas Orsava - 9.0.3-18 - Patch for pip install allow directory traversal, leading to arbitrary file write Resolves: rhbz#1868016