forked from rpms/kernel
Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Andrew Lukoshko | 1a3a6137b8 | |
Andrew Lukoshko | 81154610fa | |
Andrew Lukoshko | 8caf109977 | |
Andrew Lukoshko | 4bebe1f6ca | |
Andrew Lukoshko | 57de125efe | |
Andrew Lukoshko | 56a5976923 | |
Andrew Lukoshko | ecfeaf969f |
|
@ -0,0 +1,34 @@
|
|||
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>
|
||||
diff -Naur linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/bpf/Makefile linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/bpf/Makefile
|
||||
--- linux-5.14.0-70.30.1.el9_0/tools/testing/selftests/bpf/Makefile 2022-10-14 13:02:21.000000000 +0000
|
||||
+++ linux-5.14.0-70.30.1.el9_0.alma/tools/testing/selftests/bpf/Makefile 2022-11-07 20:12:15.536377539 +0000
|
||||
@@ -279,6 +279,7 @@
|
||||
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG))
|
||||
BPF_CFLAGS = -g -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \
|
||||
-I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \
|
||||
+ -I$(abspath $(TOOLSDIR)/../usr/include) \
|
||||
-I$(abspath $(OUTPUT)/../usr/include)
|
||||
|
||||
CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \
|
|
@ -5,9 +5,9 @@ prompt = no
|
|||
x509_extensions = myexts
|
||||
|
||||
[ req_distinguished_name ]
|
||||
O = The CentOS Project
|
||||
CN = CentOS Stream kernel signing key
|
||||
emailAddress = security@centos.org
|
||||
O = AlmaLinux
|
||||
CN = AlmaLinux kernel signing key
|
||||
emailAddress = security@almalinux.org
|
||||
|
||||
[ myexts ]
|
||||
basicConstraints=critical,CA:FALSE
|
||||
|
|
|
@ -566,7 +566,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
|
||||
|
@ -583,7 +583,7 @@ BuildRequires: sparse
|
|||
BuildRequires: zlib-devel binutils-devel newt-devel perl(ExtUtils::Embed) bison flex xz-devel
|
||||
BuildRequires: audit-libs-devel
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: libbpf-devel >= 0.6.0-1
|
||||
BuildRequires: libbpf-devel
|
||||
BuildRequires: libbabeltrace-devel
|
||||
BuildRequires: libtraceevent-devel
|
||||
%ifnarch %{arm} s390x
|
||||
|
@ -808,6 +808,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
|
||||
|
||||
|
@ -1349,6 +1351,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
|
||||
|
@ -1441,7 +1444,7 @@ done
|
|||
# Adjust FIPS module name for RHEL
|
||||
%if 0%{?rhel}
|
||||
for i in *.config; do
|
||||
sed -i 's/CONFIG_CRYPTO_FIPS_NAME=.*/CONFIG_CRYPTO_FIPS_NAME="Red Hat Enterprise Linux %{rhel} - Kernel Cryptographic API"/' $i
|
||||
sed -i 's/CONFIG_CRYPTO_FIPS_NAME=.*/CONFIG_CRYPTO_FIPS_NAME="AlmaLinux %{rhel} - Kernel Cryptographic API"/' $i
|
||||
done
|
||||
%endif
|
||||
|
||||
|
@ -1460,18 +1463,6 @@ done
|
|||
cp %{SOURCE82} .
|
||||
RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target}
|
||||
|
||||
# We may want to override files from the primary target in case of building
|
||||
# against a flavour of it (eg. centos not rhel), thus override it here if
|
||||
# necessary
|
||||
if [ "%{primary_target}" == "rhel" ]; then
|
||||
%if 0%{?centos}
|
||||
echo "Updating scripts/sources to centos version"
|
||||
RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh centos
|
||||
%else
|
||||
echo "Not updating scripts/sources to centos version"
|
||||
%endif
|
||||
fi
|
||||
|
||||
# end of kernel config
|
||||
%endif
|
||||
|
||||
|
@ -2179,9 +2170,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.
|
||||
|
@ -2227,7 +2219,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}
|
||||
|
@ -2255,7 +2247,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 vm 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 vm 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.
|
||||
|
@ -2451,6 +2443,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}
|
||||
|
|
Loading…
Reference in New Issue