a8a fixes

This commit is contained in:
Andrew Lukoshko 2022-11-03 13:51:49 +01:00
parent 3c053a969c
commit ecfeaf969f
2 changed files with 32 additions and 4 deletions

View File

@ -0,0 +1,23 @@
diff -Naur linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/memfd/memfd_test.c linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/memfd/memfd_test.c
--- linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/memfd/memfd_test.c 2022-10-14 13:02:21.000000000 +0000
+++ linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/memfd/memfd_test.c 2022-11-03 12:45:19.583010255 +0000
@@ -6,7 +6,7 @@
#include <inttypes.h>
#include <limits.h>
#include <linux/falloc.h>
-#include <fcntl.h>
+#include <linux/fcntl.h>
#include <linux/memfd.h>
#include <sched.h>
#include <stdio.h>
diff -Naur linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/vm/userfaultfd.c linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/vm/userfaultfd.c
--- linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/vm/userfaultfd.c 2022-10-14 13:02:21.000000000 +0000
+++ linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/vm/userfaultfd.c 2022-11-03 12:46:20.128372395 +0000
@@ -46,6 +46,7 @@
#include <signal.h>
#include <poll.h>
#include <string.h>
+#include <linux/mman.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/ioctl.h>

View File

@ -568,7 +568,7 @@ BuildRequires: gcc-plugin-devel
# glibc-static is required for a consistent build environment (specifically
# CONFIG_CC_CAN_LINK_STATIC=y).
BuildRequires: glibc-static
BuildRequires: kernel-rpm-macros >= 185-9
BuildRequires: kernel-rpm-macros >= 125
%ifnarch %{nobuildarches} noarch
BuildRequires: bpftool
%endif
@ -805,6 +805,8 @@ Source4002: gating.yaml
Patch1: patch-%{rpmversion}-redhat.patch
%endif
Patch2: linux-5.14.0-headers-fix.patch
# empty final patch to facilitate testing of kernel patches
Patch999999: linux-kernel-test.patch
@ -1344,6 +1346,7 @@ cp -a %{SOURCE1} .
ApplyOptionalPatch patch-%{rpmversion}-redhat.patch
%endif
ApplyOptionalPatch linux-5.14.0-headers-fix.patch
ApplyOptionalPatch linux-kernel-test.patch
# END OF PATCH APPLICATIONS
@ -2154,9 +2157,10 @@ chmod +x tools/perf/check-headers.sh
%endif
%global tools_make \
%{make} CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?make_opts}
%{make} CFLAGS="${RPM_OPT_FLAGS}" -D_GNU_SOURCE -isystem ${USR_INC}" LDFLAGS="%{__global_ldflags}" %{?make_opts}
%if %{with_tools}
export USR_INC=$(pwd)/usr/include
%ifarch %{cpupowerarchs}
# cpupower
# make sure version-gen.sh is executable.
@ -2199,7 +2203,7 @@ if [ -f $DevelDir/vmlinux.h ]; then
fi
%global bpftool_make \
%{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT %{?make_opts} VMLINUX_H="${RPM_VMLINUX_H}" V=1
%{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS} -isystem ${USR_INC}"" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT %{?make_opts} VMLINUX_H="${RPM_VMLINUX_H}" V=1
%if %{with_bpftool}
pushd tools/bpf/bpftool
%{bpftool_make}
@ -2227,7 +2231,7 @@ export BPFTOOL=$(pwd)/tools/bpf/bpftool/bpftool
pushd tools/testing/selftests
# We need to install here because we need to call make with ARCH set which
# doesn't seem possible to do in the install section.
%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf livepatch net net/forwarding net/mptcp netfilter tc-testing memfd" SKIP_TARGETS="" FORCE_TARGETS=1 INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install
%{make} %{?_smp_mflags} EXTRA_CFLAGS="-isystem ${USR_INC}" ARCH=$Arch V=1 TARGETS="bpf livepatch net net/forwarding net/mptcp netfilter tc-testing memfd" SKIP_TARGETS="" FORCE_TARGETS=1 INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install
# 'make install' for bpf is broken and upstream refuses to fix it.
# Install the needed files manually.
@ -2423,6 +2427,7 @@ rm -rf %{buildroot}%{_libdir}/traceevent
%endif
%if %{with_tools}
export USR_INC=$(pwd)/usr/include
%ifarch %{cpupowerarchs}
%{make} -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
rm -f %{buildroot}%{_libdir}/*.{a,la}