diff --git a/_service b/_service index 91952de..2d33b50 100644 --- a/_service +++ b/_service @@ -1,5 +1,5 @@ - + https://github.com/openSUSE/obs-service-replace_using_package_version.git git replace_using_package_version @@ -11,6 +11,6 @@ _none_ enable containers@suse.com - master + @PARENT_TAG@ diff --git a/_servicedata b/_servicedata index 49f34a3..fe4f67e 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/openSUSE/obs-service-replace_using_package_version.git - eb96e8582f54b9e2c5c5259e379ced1e79cd642d \ No newline at end of file + 72fe58b8a7d29342985f4304dcf1c0c4d0b1c18c \ No newline at end of file diff --git a/obs-service-replace_using_package_version.changes b/obs-service-replace_using_package_version.changes index 3cbc0d2..0441438 100644 --- a/obs-service-replace_using_package_version.changes +++ b/obs-service-replace_using_package_version.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +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 + +- Update to version 1702495728.72fe58b: + * Bump version: 0.0.8 → 0.0.9 + * Bump actions/setup-python from 4.8.0 to 5.0.0 + * Bump actions/setup-python from 4.7.1 to 4.8.0 + * Workaround integration test failures due to PEP 668 marker + * Bump actions/setup-python from 4.6.1 to 4.7.1 + * Bump actions/checkout from 3 to 4 + * Report the package name that is missing (#56) + * Bump pytest-container from 0.1.1 to 0.2.0 + * Drop mock dependency, stdlib has it + * Bump actions/setup-python from 4.6.0 to 4.6.1 + * Bump actions/setup-python from 4.5.0 to 4.6.0 + * Bump version: 0.0.7 → 0.0.8 + ------------------------------------------------------------------- Tue Apr 11 10:19:11 UTC 2023 - containers@suse.com diff --git a/obs-service-replace_using_package_version.spec b/obs-service-replace_using_package_version.spec index 233d64c..f859e9a 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 @@ -19,7 +19,7 @@ %define service replace_using_package_version Name: obs-service-%{service} -Version: 0.0.7 +Version: 0.0.9 Release: 0 Summary: An OBS service: Replaces a regex with the version value of a package License: GPL-3.0-or-later @@ -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 @@ -51,6 +53,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) diff --git a/replace_using_package_version.py b/replace_using_package_version.py index c93280a..4a8a68d 100644 --- a/replace_using_package_version.py +++ b/replace_using_package_version.py @@ -171,7 +171,7 @@ def find_package_version(package, rpm_dir): version = find_package_version_in_obsinfo('.', package) if version is None: - raise Exception('Package version not found') + raise Exception(f'Package {package} version not found') return str(version)