introduce the diffed "defconfig" and modify the specfile as such

This commit is contained in:
Pratham Patel 2023-11-09 21:41:28 +05:30
parent 0114c87beb
commit 55549f6891
No known key found for this signature in database
3 changed files with 13 additions and 13683 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -139,6 +139,7 @@
%define hdrarch x86_64
%define make_target bzImage
%define kernel_image arch/x86/boot/bzImage
%define defconfig arch/%{bldarch}/configs/%{bldarch}_defconfig
%endif
%ifarch aarch64
@ -147,8 +148,11 @@
%define hdrarch arm64
%define make_target Image.gz
%define kernel_image arch/arm64/boot/Image.gz
%define defconfig arch/%{bldarch}/configs/defconfig
%endif
%define elconfig arch/%{bldarch}/configs/elrepo.config
%if %{with_vdso_install}
%define use_vdso 1
%define _use_vdso 1
@ -570,14 +574,16 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -n -p \
mv COPYING COPYING-%{version}-%{release}
cp -a %{SOURCE2} .
cp -a %{SOURCE4} .
# cp %{_sourcedir}/config-$(uname -r) .config
# make savedefconfig
# grep -vf %{defconfig} ./defconfig > config-$(uname -r)
cp %{_sourcedir}/config-$(uname -r) %{elconfig}
./scripts/kconfig/merge_config.sh %{defconfig} %{elconfig}
# Set the EXTRAVERSION string in the top level Makefile.
sed -i "s@^EXTRAVERSION.*@EXTRAVERSION = -%{release}.%{_target_cpu}@" Makefile
%ifarch x86_64 || aarch64
cp config-%{_target_cpu} .config
%{__make} -s ARCH=%{bldarch} listnewconfig | grep -E '^CONFIG_' > newoptions-el9-%{_target_cpu}.txt || true
if [ -s newoptions-el9-%{_target_cpu}.txt ]; then
cat newoptions-el9-%{_target_cpu}.txt
@ -591,17 +597,17 @@ rm -f newoptions-el9-%{_target_cpu}.txt
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
cat rheldup3.pem rhelkpatch1.pem > certs/rhel.pem
for i in config-*; do
for i in %{elconfig}; do
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i
done
%else
for i in config-*; do
for i in %{elconfig}; do
sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS="*"@CONFIG_SYSTEM_TRUSTED_KEYS=""@' $i
done
%endif
# Adjust the FIPS module name for RHEL9.
for i in config-*; do
for i in %{elconfig}; do
sed -i 's@CONFIG_CRYPTO_FIPS_NAME=.*@CONFIG_CRYPTO_FIPS_NAME="Red Hat Enterprise Linux 9 - Kernel Cryptographic API"@' $i
done
@ -613,9 +619,8 @@ popd > /dev/null
pushd linux-%{KVERREL} > /dev/null
%ifarch x86_64 || aarch64
cp config-%{_target_cpu} .config
%{__make} -s ARCH=%{bldarch} oldconfig
./scripts/kconfig/merge_config.sh %{defconfig} %{elconfig}
%if %{signkernel} || %{signmodules}
cp %{SOURCE23} certs/