use uname -m instead of uname -r

This commit is contained in:
Pratham Patel 2023-12-01 07:54:25 +05:30
parent d5e479a85f
commit 88ed14bd37
No known key found for this signature in database

View File

@ -576,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 %{_sourcedir}/config-$(uname -r); do for i in %{_sourcedir}/config-$(uname -m); 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 %{_sourcedir}/config-$(uname -r); do for i in %{_sourcedir}/config-$(uname -m); 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 %{_sourcedir}/config-$(uname -r); do for i in %{_sourcedir}/config-$(uname -m); 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
@ -598,7 +598,7 @@ popd > /dev/null
pushd linux-%{KVERREL} > /dev/null pushd linux-%{KVERREL} > /dev/null
%ifarch x86_64 || aarch64 %ifarch x86_64 || aarch64
cp %{_sourcedir}/config-$(uname -r) .config cp %{_sourcedir}/config-$(uname -m) .config
%if %{signkernel} || %{signmodules} %if %{signkernel} || %{signmodules}
cp %{SOURCE23} certs/ cp %{SOURCE23} certs/