From b279e4d137b8c152a32dcf66dab93c5bd8199e9000b43a8192576774f410f142 Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Tue, 28 Nov 2023 08:34:20 +0000 Subject: [PATCH] Accepting request 1129104 from home:dgarcia:branches:security:SELinux - 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/1129104 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=108 --- libsemanage.changes | 6 ++++++ libsemanage.spec | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/libsemanage.changes b/libsemanage.changes index c3f1bff..f290936 100644 --- a/libsemanage.changes +++ b/libsemanage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 27 09:51:42 UTC 2023 - Daniel Garcia + +- Remove dependency on /usr/bin/python3, making scripts to depends on + the real python3 binary, not the link. bsc#1212476 + ------------------------------------------------------------------- Mon Aug 14 08:07:46 UTC 2023 - Johannes Segitz diff --git a/libsemanage.spec b/libsemanage.spec index bc69934..9066bbd 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -42,6 +42,7 @@ BuildRequires: libbz2-devel BuildRequires: libselinux-devel BuildRequires: libsepol-devel BuildRequires: pkgconfig +BuildRequires: python-rpm-macros %description libsemanage is the policy management library. Using libsepol and @@ -123,6 +124,12 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/selinux %make_install LIBDIR="%{_libdir}" LIBEXECDIR="%{_libexecdir}" SHLIBDIR="%{_libdir}" ln -sf %{_libdir}/libsemanage.so.%{soversion} %{buildroot}/%{_libdir}/libsemanage.so cp %{SOURCE4} %{buildroot}%{_sysconfdir}/selinux/semanage.conf + +# Fix shebang in scripts +for f in %{buildroot}%{_libexecdir}/selinux/* +do + [ -f $f ] && sed -i "1s@#!.*python.*@#!$(realpath %__python3)@" $f +done # Remove duplicate files %fdupes -s %{buildroot}%{_mandir}