Use more robust regular expressions

Resolves: bz#1969433
This commit is contained in:
Jan Grulich 2021-06-15 10:02:57 +02:00
parent 429a4d27a8
commit eb0fb98439
2 changed files with 10 additions and 4 deletions

View File

@ -52,10 +52,12 @@
-not -name 'Makefile' \\\ -not -name 'Makefile' \\\
-type f | while read LINE \ -type f | while read LINE \
do \ do \
if grep --quiet "#\\!\\ */usr/bin/env\\ python\\|#\\!/usr/bin/python$" "$LINE" \ if grep --quiet "#\\!\\ */usr/bin/env\\ python[23]\\{1\\}\\|#\\!\\ */usr/bin/env\\ python$\\|#\\!/usr/bin/python$" "$LINE" \
then \ then \
sed -i s@\\/usr\\/bin\\/python\\$@\\/usr\\/bin\\/python3@ "$LINE" \ sed -i s@\\/usr\\/bin\\/python\\$@\\/usr\\/bin\\/python3@ "$LINE" \
sed -i s@\\/usr\\/bin\\/env\\ python@\\/usr\\/bin\\/python3@ "$LINE" \ sed -i s@\\/usr\\/bin\\/env\\ python2\\$@\\/usr\\/bin\\/python2@ "$LINE" \
sed -i s@\\/usr\\/bin\\/env\\ python3\\$@\\/usr\\/bin\\/python3@ "$LINE" \
sed -i s@\\/usr\\/bin\\/env\\ python\\$@\\/usr\\/bin\\/python3@ "$LINE" \
fi \ fi \
cp -r --parents "$LINE" %{buildroot}%{_qt5_libdir}/qt5/ \ cp -r --parents "$LINE" %{buildroot}%{_qt5_libdir}/qt5/ \
done \ done \

View File

@ -6,7 +6,7 @@
Name: qt5 Name: qt5
Version: 5.15.2 Version: 5.15.2
Release: 7%{?dist} Release: 8%{?dist}
Summary: Qt5 meta package Summary: Qt5 meta package
License: GPLv3 License: GPLv3
URL: https://getfedora.org/ URL: https://getfedora.org/
@ -141,6 +141,10 @@ echo "- Qt5 devel meta package" > %{buildroot}%{_docdir}/qt5-devel/README
%changelog %changelog
* Tue Jun 15 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-8
- Use more robust regular expressions
Resolves: bz#1969433
* Fri Jun 11 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-7 * Fri Jun 11 2021 Jan Grulich <jgrulich@redhat.com> - 5.15.2-7
- Use more precise regular expression for python shebangs - Use more precise regular expression for python shebangs
Resolves: bz#1969433 Resolves: bz#1969433