diff --git a/Makefile.selinux b/Makefile.selinux index bc159a5..0a8dae6 100644 --- a/Makefile.selinux +++ b/Makefile.selinux @@ -6,7 +6,7 @@ all: ${TARGETS:=.pp.bz2} %.pp.bz2: %.pp @echo Compressing $^ -\ $@ - bzip2 -9 $^ + bzip2 -9 -f $^ %.pp: %.te make -f ${SHARE}/selinux/devel/Makefile $@ diff --git a/hyperscale-drop-bpftool-version-requirement-to-4.18.0.patch b/hyperscale-drop-bpftool-version-requirement-to-4.18.0.patch deleted file mode 100644 index 492a3bf..0000000 --- a/hyperscale-drop-bpftool-version-requirement-to-4.18.0.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8d1b5fe8ee53ffd5885bee6131606d79dbbdde91 Mon Sep 17 00:00:00 2001 -From: Daan De Meyer -Date: Tue, 3 Jan 2023 13:29:27 +0100 -Subject: [PATCH] Drop bpftool version requirement to 4.18.0 - -The CentOS Stream 8 bpftool package has the skeleton and object -generation features introduced in bpftool 5.6.0 and 5.13.0 -respectively backported to 4.18.0. The meson script doesn't know -this, so we downgrade the required bpftool version to 4.18.0 to -allow builds to pass on CentOS Stream 8. ---- - meson.build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index 35704947e3..6dff92bafb 100644 ---- a/meson.build -+++ b/meson.build -@@ -1060,7 +1060,7 @@ endif - libbpf = dependency('libbpf', required : bpf_framework_required, version : libbpf_version_requirement) - conf.set10('HAVE_LIBBPF', libbpf.found()) - --bpftool_strip_version_requirement = '>= 5.13.0' -+bpftool_strip_version_requirement = '>= 4.18.0' - if bpf_compiler == 'gcc' - bpftool_strip_version_requirement = '>= 7.0.0' - endif -@@ -1121,7 +1121,7 @@ else - bpftool = find_program('bpftool', - '/usr/sbin/bpftool', - required : bpf_framework_required, -- version : '>= 5.6.0') -+ version : '>= 4.18.0') - endif - - # We use `llvm-strip` as a fallback if `bpftool gen object` strip support is not available. --- -2.41.0 - diff --git a/systemd.spec b/systemd.spec index a8a98fc..b61dcf7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -105,7 +105,6 @@ Patch0001: https://github.com/systemd/systemd/pull/26494.patch # Adjust upstream config to use our shared stack Patch0491: fedora-use-system-auth-in-pam-systemd-user.patch -Patch0901: hyperscale-drop-bpftool-version-requirement-to-4.18.0.patch %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 @@ -599,8 +598,15 @@ sed -r -i '/^enable systemd-boot-update.service/d' presets/90-systemd.preset sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user -mkdir selinux -cp %SOURCE100 %SOURCE101 %SOURCE102 %SOURCE103 selinux +# Lower the bpftool version requirement to 4.18.0 which has all the required +# functionality backported in C8S/C9S. +sed -r -i.old -e 's/>= 5.13.0/>= 4.18.0/g' -e 's/>= 5.6.0/>= 4.18.0/g' meson.build +# Make sure we don't update the timestamp of meson.build to avoid rebuilds. +touch -r meson.build.old meson.build +rm meson.build.old + +mkdir -p /tmp/selinux +cp %SOURCE100 %SOURCE101 %SOURCE102 %SOURCE103 /tmp/selinux %if %{undefined rhel} || 0%{?rhel} > 8 %generate_buildrequires @@ -775,7 +781,7 @@ if ! diff -u %{SOURCE1} ${new_triggers}; then sleep 5 fi -cd selinux +cd /tmp/selinux %{__make} -f Makefile.selinux SHARE="%{_datadir}" TARGETS="systemd_hs" %install @@ -923,9 +929,9 @@ python3 %{SOURCE2} %buildroot "%{?rhel}" < - 253.5-1.1 +- Replace bpftool version requirement patch with sed so it works across systemd + releases +- Do selinux build in /tmp/selinux to avoid polluting source directory +- Make sure we override existing output files when calling bzip2. + * Tue Jul 18 2023 Daan De Meyer - 253.5-1.1 - Use the %{?rhel} macro for checks instead of explicitly checking against %{?el8}.