From 2b2edd8c8f5d0eefc59d31016a15bb4bfa3cf60e60c03b656b566776298f228b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Sat, 15 Jun 2024 08:31:49 +0000 Subject: [PATCH 1/2] Accepting request 1180969 from home:mcepl:branches:Virtualization:containers - Fix shebang of the script to use the explicit version of Python (bsc#1212476). OBS-URL: https://build.opensuse.org/request/show/1180969 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/obs-service-replace_using_package_version?expand=0&rev=22 --- obs-service-replace_using_package_version.changes | 6 ++++++ obs-service-replace_using_package_version.spec | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/obs-service-replace_using_package_version.changes b/obs-service-replace_using_package_version.changes index d1f1622..0441438 100644 --- a/obs-service-replace_using_package_version.changes +++ b/obs-service-replace_using_package_version.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 14 18:33:15 UTC 2024 - Matej Cepl + +- Fix shebang of the script to use the explicit version of Python + (bsc#1212476). + ------------------------------------------------------------------- Wed Dec 13 20:47:44 UTC 2023 - containers@suse.com diff --git a/obs-service-replace_using_package_version.spec b/obs-service-replace_using_package_version.spec index 0f2cacf..f9d2795 100644 --- a/obs-service-replace_using_package_version.spec +++ b/obs-service-replace_using_package_version.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package obs-service-replace_using_package_version # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -51,6 +51,9 @@ sed -i "s|#!/usr/bin/env python3|#!/usr/bin/python3|g" %{service}.py install -D -m 755 %{service}.py %{buildroot}%{_prefix}/lib/obs/service/%{service} install -D -m 644 %{service}.service %{buildroot}%{_prefix}/lib/obs/service/%{service}.service +# Doing %%python3_fix_shebang_path old fashioned way for the backward compatibility +sed -i "1s@#\\!.*python\S*@#\\!$(realpath %__python3)@" \ + %{buildroot}%{_prefix}/lib/obs/service/%{service} %files %defattr(-,root,root) From 3a7271576835bda857f3218800f4923744154db06e3ff48d2779c38f29ee9ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Mon, 17 Jun 2024 10:07:44 +0000 Subject: [PATCH 2/2] add missing buildrequire for the __python3 macro OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/obs-service-replace_using_package_version?expand=0&rev=23 --- obs-service-replace_using_package_version.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obs-service-replace_using_package_version.spec b/obs-service-replace_using_package_version.spec index f9d2795..f859e9a 100644 --- a/obs-service-replace_using_package_version.spec +++ b/obs-service-replace_using_package_version.spec @@ -29,6 +29,8 @@ Source0: %{service}.py Source1: %{service}.service Source2: LICENSE BuildRequires: sed +# for the __python3 macro +BuildRequires: python-rpm-macros Requires: python3-docopt Requires: python3-rpm BuildRoot: %{_tmppath}/%{name}-%{version}-build