Compare commits

...

3 Commits

Author SHA256 Message Date
Ana Guerrero
bf47457a7c Accepting request 1195708 from devel:tools:compiler
- Add minor version to Python shebangs. (boo#1212476)
- Remove shebang and executable bit where not needed.

OBS-URL: https://build.opensuse.org/request/show/1195708
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm15?expand=0&rev=15
2024-08-25 10:09:55 +00:00
Aaron Puchert
3aef1106f1 - 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/llvm15?expand=0&rev=40
2024-08-23 01:13:33 +00:00
Aaron Puchert
2e423ce050 - Add %python3_fix_shebang_path to fix binaries dependency on
/usr/bin/python3 (bsc#1212476).

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm15?expand=0&rev=39
2024-08-19 21:04:44 +00:00
2 changed files with 20 additions and 6 deletions

View File

@ -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.
-------------------------------------------------------------------
Wed Apr 3 20:18:07 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>

View File

@ -1316,8 +1316,8 @@ cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <<EOF
%_llvm_with_lldb %{with lldb}
EOF
# Don't use env in shebangs, and prefer python3. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
for script in %{buildroot}%{_bindir}/opt-{diff,stats,viewer} \
# Don't use env in shebangs, and prefer python3.X. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
sed -i -E "1s|/usr/bin/env *|/usr/bin/|; 1s|/usr/bin/python3?\$|$(realpath /usr/bin/python3)|" \
%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}%{_libexecdir}/{{analyze,intercept}-{c++,cc},{c++,ccc}-analyzer} \
@ -1325,13 +1325,21 @@ for script in %{buildroot}%{_bindir}/opt-{diff,stats,viewer} \
%ifarch aarch64 x86_64
%{buildroot}%{_libdir}/clang/%{_relver}/bin/hwasan_symbolize \
%endif
%{buildroot}%{python3_sitelib}/optrecord.py; do
sed -i '1s|/usr/bin/env *|%{_bindir}/|;1s|/usr/bin/python$|%{_bindir}/python3|' $script
done
%{buildroot}%{_bindir}/opt-{diff,stats,viewer}
# Remove shebangs where not needed.
sed -i '1{ /^#!/d }' \
%if %{_plv} == %{_sonum}
%{buildroot}%{_datadir}/scan-view/{Reporter,startfile}.py \
%endif
%if %{with lldb_python}
%{buildroot}%{python3_sitearch}/lldb/utils/{in_call_stack,symbolication}.py \
%endif
%{buildroot}%{python3_sitelib}/optrecord.py
# Remove executable bit where not needed.
chmod -x \
%{buildroot}%{python3_sitelib}/optpmap.py \
%{buildroot}%{python3_sitelib}/opt{pmap,record}.py \
%{buildroot}%{_datadir}/opt-viewer/style.css \
%if %{_plv} == %{_sonum}
%{buildroot}%{_datadir}/bash-completion/completions/clang \