From cfa2543a59bdebd8d869ae1cf314679ea76a05d89e3772ed123900a13f21cf56 Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Fri, 6 Oct 2023 10:59:08 +0000 Subject: [PATCH] Accepting request 1115821 from home:dgarcia:branches:security:tls - Remove dependency on /usr/bin/python3, making scripts to depends on the real python3 binary, not the link. bsc#1212476 OBS-URL: https://build.opensuse.org/request/show/1115821 OBS-URL: https://build.opensuse.org/package/show/security:tls/crypto-policies?expand=0&rev=25 --- crypto-policies.changes | 6 ++++++ crypto-policies.spec | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/crypto-policies.changes b/crypto-policies.changes index 6deb932..3fac4be 100644 --- a/crypto-policies.changes +++ b/crypto-policies.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 5 12:35:57 UTC 2023 - Daniel Garcia + +- Remove dependency on /usr/bin/python3, making scripts to depends on + the real python3 binary, not the link. bsc#1212476 + ------------------------------------------------------------------- Wed Sep 27 10:54:17 UTC 2023 - Pedro Monreal diff --git a/crypto-policies.spec b/crypto-policies.spec index 831b37f..04930a8 100644 --- a/crypto-policies.spec +++ b/crypto-policies.spec @@ -72,6 +72,7 @@ BuildRequires: libxslt BuildRequires: mozilla-nss-tools BuildRequires: openssl BuildRequires: perl +BuildRequires: python-rpm-macros BuildRequires: python3-coverage BuildRequires: python3-devel >= 3.6 BuildRequires: python3-flake8 @@ -176,6 +177,12 @@ for f in %{buildroot}%{_datarootdir}/crypto-policies/DEFAULT/* ; do ln -sf %{_datarootdir}/crypto-policies/DEFAULT/$(basename $f) %{buildroot}%{_sysconfdir}/crypto-policies/back-ends/$(basename $f .txt).config done +# Fix shebang in scripts +for f in %{buildroot}%{_datadir}/crypto-policies/python/* +do + [ -f $f ] && sed -i "1s@#!.*python.*@#!$(realpath %__python3)@" $f +done + %py3_compile %{buildroot}%{_datadir}/crypto-policies/python # Install README.SUSE to %%doc