From a484e26a16a04da7d69af2b21f309e0be45c3584 Mon Sep 17 00:00:00 2001 From: Peridot Bot <rockyautomation@rockylinux.org> Date: Wed, 17 Apr 2024 15:36:32 +0000 Subject: [PATCH] import passt-0%5E20231204.gb86afe3-1.el9 --- .passt.checksum | 2 +- .passt.metadata | 2 +- SPECS/passt.spec | 38 +++++++++++++++++++++++--------------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.passt.checksum b/.passt.checksum index 15bb345..8598be5 100644 --- a/.passt.checksum +++ b/.passt.checksum @@ -1 +1 @@ -5b805f6a835993eca790e2a566e16a7b8716a215aaa59285bdf28cd309d92722 +9a420fce64dd5d55bd6b30ef4c781c8caaeda7f2148d14b318c356dab767bb94 diff --git a/.passt.metadata b/.passt.metadata index a88a0a4..1732389 100644 --- a/.passt.metadata +++ b/.passt.metadata @@ -1 +1 @@ -ffea54a8b23b01a4fe7f1c79a02c6c020de5910cef14caef09b208e8903637ab SOURCES/passt-0af928eaa020c1062fdc91598dfdc533966e2afe.tar.xz +b8748957d3ea8a09145438087e2527cc687e188c6df6010cab80b4b58cd6601d SOURCES/passt-b86afe3559c0bd3d24bc6fed7c60466cf141224c.tar.xz diff --git a/SPECS/passt.spec b/SPECS/passt.spec index 46fdad5..b6b9eb8 100644 --- a/SPECS/passt.spec +++ b/SPECS/passt.spec @@ -7,12 +7,12 @@ # Copyright (c) 2022 Red Hat GmbH # Author: Stefano Brivio <sbrivio@redhat.com> -%global git_hash 0af928eaa020c1062fdc91598dfdc533966e2afe +%global git_hash b86afe3559c0bd3d24bc6fed7c60466cf141224c %global selinuxtype targeted Name: passt -Version: 0^20230818.g0af928e -Release: 4%{?dist} +Version: 0^20231204.gb86afe3 +Release: 1%{?dist} Summary: User-mode networking daemons for virtual machines and namespaces License: GPLv2+ and BSD Group: System Environment/Daemons @@ -53,25 +53,30 @@ This package adds SELinux enforcement to passt(1) and pasta(1). %build %set_build_flags -%make_build VERSION="%{version}-%{release}.%{_arch}" +# The Makefile creates symbolic links for pasta, but we need actual copies for +# SELinux file contexts to work as intended. Same with pasta.avx2 if present. +# Build twice, changing the version string, to avoid duplicate Build-IDs. +%make_build VERSION="%{version}-%{release}.%{_arch}-pasta" +mv -f passt pasta +%ifarch x86_64 +mv -f passt.avx2 pasta.avx2 +%make_build passt passt.avx2 VERSION="%{version}-%{release}.%{_arch}" +%else +%make_build passt VERSION="%{version}-%{release}.%{_arch}" +%endif %install +# Already built (not as symbolic links), see above +touch pasta +%ifarch x86_64 +touch pasta.avx2 +%endif %make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name} -# The Makefile creates symbolic links for pasta, but we need hard links for -# SELinux file contexts to work as intended. Same with pasta.avx2 if present. -# -# RHEL 9 note: switch from hard links to copies -- given that the behaviour -# differs depending on filesystems and how cpio builds archives. This leads to -# "Duplicate build-ids" warnings for rpmbuild at the moment, we need to find a -# better solution upstream. -rm %{buildroot}%{_bindir}/pasta -cp %{buildroot}%{_bindir}/passt %{buildroot}%{_bindir}/pasta %ifarch x86_64 -rm %{buildroot}%{_bindir}/pasta.avx2 -cp %{buildroot}%{_bindir}/passt.avx2 %{buildroot}%{_bindir}/pasta.avx2 ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1 ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1 +install -p -m 755 %{buildroot}%{_bindir}/passt.avx2 %{buildroot}%{_bindir}/pasta.avx2 %endif pushd contrib/selinux @@ -121,6 +126,9 @@ fi %{_datadir}/selinux/packages/%{selinuxtype}/pasta.pp %changelog +* Fri Dec 15 2023 Stefano Brivio <sbrivio@redhat.com> - 0^20231204.gb86afe3-1 +- Resolves: RHEL-19590 + * Tue Aug 22 2023 Stefano Brivio <sbrivio@redhat.com> - 0^20230818.g0af928e-4 - Switch to copies instead of links for pasta: previous workaround unreliable - Resolves: RHELPLAN-155811 -- GitLab