switch from overriding rhel config to using fedora config

This commit is contained in:
Pratham Patel 2023-12-01 06:45:29 +05:30
parent 75e8c29774
commit ea0c4797e8
No known key found for this signature in database
2 changed files with 9653 additions and 1404 deletions

File diff suppressed because it is too large Load Diff

View File

@ -141,8 +141,6 @@
%define defconfig arch/%{asmarch}/configs/defconfig %define defconfig arch/%{asmarch}/configs/defconfig
%endif %endif
%define elconfig arch/%{asmarch}/configs/el.config
%if %{with_vdso_install} %if %{with_vdso_install}
%define use_vdso 1 %define use_vdso 1
%define _use_vdso 1 %define _use_vdso 1
@ -559,13 +557,12 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -n -p \
mv COPYING COPYING-%{version}-%{release} mv COPYING COPYING-%{version}-%{release}
cp %{_sourcedir}/config-$(uname -m) %{elconfig} cp %{_sourcedir}/config-$(uname -m) .config
# Set the EXTRAVERSION string in the top level Makefile. # Set the EXTRAVERSION string in the top level Makefile.
sed -i "s@^EXTRAVERSION.*@EXTRAVERSION = -%{release}.%{_target_cpu}@" Makefile sed -i "s@^EXTRAVERSION.*@EXTRAVERSION = -%{release}.%{_target_cpu}@" Makefile
%ifarch x86_64 || aarch64 %ifarch x86_64 || aarch64
./scripts/kconfig/merge_config.sh %{defconfig} %{elconfig}
%{__make} ARCH=%{bldarch} listnewconfig | grep -E '^CONFIG_' > newoptions-el9-%{_target_cpu}.txt || true %{__make} ARCH=%{bldarch} listnewconfig | grep -E '^CONFIG_' > newoptions-el9-%{_target_cpu}.txt || true
if [ -s newoptions-el9-%{_target_cpu}.txt ]; then if [ -s newoptions-el9-%{_target_cpu}.txt ]; then
cat newoptions-el9-%{_target_cpu}.txt cat newoptions-el9-%{_target_cpu}.txt
@ -579,17 +576,17 @@ rm -vf .config*
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
cat rheldup3.pem rhelkpatch1.pem > certs/rhel.pem cat rheldup3.pem rhelkpatch1.pem > certs/rhel.pem
for i in %{elconfig}; do for i in %{_sourcedir}/config-$(uname -r); do
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i
done done
%else %else
for i in %{elconfig}; do for i in %{_sourcedir}/config-$(uname -r); do
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS=""@' $i sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS=""@' $i
done done
%endif %endif
# Adjust the FIPS module name for RHEL9. # Adjust the FIPS module name for RHEL9.
for i in %{elconfig}; do for i in %{_sourcedir}/config-$(uname -r); do
sed -i 's@CONFIG_CRYPTO_FIPS_NAME=.*@CONFIG_CRYPTO_FIPS_NAME="Red Hat Enterprise Linux 9 - Kernel Cryptographic API"@' $i sed -i 's@CONFIG_CRYPTO_FIPS_NAME=.*@CONFIG_CRYPTO_FIPS_NAME="Red Hat Enterprise Linux 9 - Kernel Cryptographic API"@' $i
done done
@ -601,14 +598,14 @@ popd > /dev/null
pushd linux-%{KVERREL} > /dev/null pushd linux-%{KVERREL} > /dev/null
%ifarch x86_64 || aarch64 %ifarch x86_64 || aarch64
./scripts/kconfig/merge_config.sh %{defconfig} %{elconfig} cp %{_sourcedir}/config-$(uname -r) .config
%if %{signkernel} || %{signmodules} %if %{signkernel} || %{signmodules}
cp %{SOURCE23} certs/ cp %{SOURCE23} certs/
%endif %endif
%if %{with_std} %if %{with_std}
%{make} %{?_smp_mflags} ARCH=%{bldarch} %{make_target} %{make} %{?_smp_mflags} ARCH=%{bldarch} olddefconfig %{make_target}
%{make} %{?_smp_mflags} ARCH=%{bldarch} modules || exit 1 %{make} %{?_smp_mflags} ARCH=%{bldarch} modules || exit 1