- Add minor version to Python shebangs. (boo#1212476)
- Remove shebang and executable bit where not needed. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm18?expand=0&rev=20
This commit is contained in:
parent
7b38b2dadb
commit
e8d8e6eaa8
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 20 21:20:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Add minor version to Python shebangs. (boo#1212476)
|
||||||
|
- Remove shebang and executable bit where not needed.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jun 30 17:44:44 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
Sun Jun 30 17:44:44 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
@ -12,12 +18,6 @@ Sun Jun 30 17:44:44 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
|||||||
goto labels in macro definitions.
|
goto labels in macro definitions.
|
||||||
- Rebase llvm-do-not-install-static-libraries.patch.
|
- Rebase llvm-do-not-install-static-libraries.patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Thu Jun 20 12:31:57 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
|
||||||
|
|
||||||
- Fix shebang of the script to use the explicit version of Python
|
|
||||||
(bsc#1212476).
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 21 21:06:41 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
Tue May 21 21:06:41 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
30
llvm18.spec
30
llvm18.spec
@ -1360,8 +1360,8 @@ cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <<EOF
|
|||||||
%_llvm_with_lldb %{with lldb}
|
%_llvm_with_lldb %{with lldb}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Don't use env in shebangs, and prefer python3. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
|
# Don't use env in shebangs, and prefer python3.X. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
|
||||||
for script in %{buildroot}%{_bindir}/opt-{diff,stats,viewer} \
|
sed -i "1s|/usr/bin/env *|%{_bindir}/|;1s|/usr/bin/python\$|$(realpath /usr/bin/python3)|" \
|
||||||
%if %{_plv} == %{_sonum}
|
%if %{_plv} == %{_sonum}
|
||||||
%{buildroot}%{_bindir}/{{analyze,intercept}-build,clang-{format,tidy}-diff,git-clang-format,hmaptool,run-{clang-tidy,find-all-symbols},scan-{build,build-py,view}} \
|
%{buildroot}%{_bindir}/{{analyze,intercept}-build,clang-{format,tidy}-diff,git-clang-format,hmaptool,run-{clang-tidy,find-all-symbols},scan-{build,build-py,view}} \
|
||||||
%{buildroot}%{_libexecdir}/{{analyze,intercept}-{c++,cc},{c++,ccc}-analyzer} \
|
%{buildroot}%{_libexecdir}/{{analyze,intercept}-{c++,cc},{c++,ccc}-analyzer} \
|
||||||
@ -1369,13 +1369,16 @@ for script in %{buildroot}%{_bindir}/opt-{diff,stats,viewer} \
|
|||||||
%ifarch aarch64 x86_64
|
%ifarch aarch64 x86_64
|
||||||
%{buildroot}%{_libdir}/clang/%{_sonum}/bin/hwasan_symbolize \
|
%{buildroot}%{_libdir}/clang/%{_sonum}/bin/hwasan_symbolize \
|
||||||
%endif
|
%endif
|
||||||
%{buildroot}%{python3_sitelib}/optrecord.py; do
|
%{buildroot}%{_bindir}/opt-{diff,stats,viewer}
|
||||||
sed -i '1s|/usr/bin/env *|%{_bindir}/|;1s|/usr/bin/python$|%{_bindir}/python3|' $script
|
|
||||||
done
|
# Remove shebangs where not needed.
|
||||||
|
sed -i '1{ /^#!/d }' \
|
||||||
|
%{buildroot}%{python3_sitelib}/optrecord.py
|
||||||
|
%{buildroot}%{_datadir}/scan-view/{Reporter,startfile}.py
|
||||||
|
|
||||||
# Remove executable bit where not needed.
|
# Remove executable bit where not needed.
|
||||||
chmod -x \
|
chmod -x \
|
||||||
%{buildroot}%{python3_sitelib}/optpmap.py \
|
%{buildroot}%{python3_sitelib}/opt{pmap,record}.py \
|
||||||
%{buildroot}%{_datadir}/opt-viewer/style.css \
|
%{buildroot}%{_datadir}/opt-viewer/style.css \
|
||||||
%if %{_plv} == %{_sonum}
|
%if %{_plv} == %{_sonum}
|
||||||
%{buildroot}%{_datadir}/bash-completion/completions/clang \
|
%{buildroot}%{_datadir}/bash-completion/completions/clang \
|
||||||
@ -1384,21 +1387,6 @@ chmod -x \
|
|||||||
find %{buildroot}%{_libdir}/{libear,libscanbuild} -type f -executable -exec chmod -x {} +
|
find %{buildroot}%{_libdir}/{libear,libscanbuild} -type f -executable -exec chmod -x {} +
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fix shebang of Python scripts
|
|
||||||
%{python3_fix_shebang_path %{buildroot}%{python3_sitearch}/lldb/utils/*.py \
|
|
||||||
%{buildroot}%{python3_sitelib}/optrecord.py \
|
|
||||||
%{buildroot}%{_bindir}/opt-diff \
|
|
||||||
%{buildroot}%{_bindir}/opt-stats \
|
|
||||||
%{buildroot}%{_bindir}/opt-viewer \
|
|
||||||
%{buildroot}%{_libdir}/clang/%{_sonum}/bin/hwasan_symbolize \
|
|
||||||
%{buildroot}%{_datadir}/scan-view/*.py \
|
|
||||||
%{buildroot}%{_libexecdir}/*
|
|
||||||
%{buildroot}%{_bindir}/*
|
|
||||||
}
|
|
||||||
|
|
||||||
# Control
|
|
||||||
grep -r "^#!.*python" %{buildroot}/ | grep -v "$(realpath %{_bindir}/python3)"
|
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{_docdir}/llvm
|
%fdupes -s %{buildroot}%{_docdir}/llvm
|
||||||
%fdupes -s %{buildroot}%{_docdir}/llvm-clang
|
%fdupes -s %{buildroot}%{_docdir}/llvm-clang
|
||||||
%fdupes %{_includedir}/%{name}/Host/
|
%fdupes %{_includedir}/%{name}/Host/
|
||||||
|
Loading…
Reference in New Issue
Block a user