From 090ce8e8d1ac89d807e5f9cc7ac3734c9649376f Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Thu, 1 Aug 2024 10:44:18 +0200 Subject: [PATCH] [dist] fix shebang substitution in spec for py2 --- dist/obs-service-tar_scm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/obs-service-tar_scm.spec b/dist/obs-service-tar_scm.spec index 623349e7..b706c9a6 100644 --- a/dist/obs-service-tar_scm.spec +++ b/dist/obs-service-tar_scm.spec @@ -261,10 +261,11 @@ source artefacts (.dsc, .origin.tar.gz and .debian.tar.gz if non-native). %install %if %{without obs_scm_testsuite} make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}" PYTHON="%{python_path}" WITH_GBP="%{enable_gbp}" +%if %{with python3} # Doing %%python3_fix_shebang_path old fashioned way for the backward compatibility sed -i "1s@#\\!.*python\S*@#\\!$(realpath %__python3)@" \ %{buildroot}%{_prefix}/lib/obs/service/tar_scm - +%endif %else # moved conditional to the top as it helps to have it all in one place and only rely on the bcond_with here.