diff --git a/libgcrypt.spec b/libgcrypt.spec index f69b4fd..dc2c827 100644 --- a/libgcrypt.spec +++ b/libgcrypt.spec @@ -4,7 +4,7 @@ Name: libgcrypt Version: 1.10.2 -Release: 1 +Release: 2 Summary: A general-purpose cryptography library License: LGPLv2+ URL: https://www.gnupg.org/ @@ -47,15 +47,19 @@ sed -i -e '/^sys_lib_dlsearch_path_spec/s,/lib /usr/lib,/usr/lib /lib64 /usr/lib %make_build %check -src/hmac256 %{hmackey} src/.libs/%{gcrysoname} | cut -f1 -d ' ' >src/.libs/.%{gcrysoname}.hmac - make check +%define libpath $RPM_BUILD_ROOT%{gcrylibdir}/%{gcrysoname}.?.? %define __spec_install_post \ %{?__debug_package:%{__debug_install_post}} \ %{__arch_install_post} \ %{__os_install_post} \ - src/hmac256 %{hmackey} $RPM_BUILD_ROOT%{gcrylibdir}/%{gcrysoname} | cut -f1 -d ' ' >$RPM_BUILD_ROOT%{gcrylibdir}/.%{gcrysoname}.hmac \ + cd src \ + sed -i -e 's|FILE=.*|FILE=\\\$1|' gen-note-integrity.sh \ + READELF=readelf AWK=awk ECHO_N="-n" bash gen-note-integrity.sh %{libpath} > %{libpath}.hmac \ + objcopy --update-section .note.fdo.integrity=%{libpath}.hmac %{libpath} %{libpath}.new \ + mv -f %{libpath}.new %{libpath} \ + rm -f %{libpath}.hmac %{nil} %install @@ -102,7 +106,6 @@ install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/gcrypt/random.conf %dir /etc/gcrypt %config(noreplace) /etc/gcrypt/random.conf %{gcrylibdir}/*.so.* -%{gcrylibdir}/.*.so.*.hmac %exclude %{_infodir}/dir %files devel @@ -119,6 +122,12 @@ install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/gcrypt/random.conf %{_infodir}/gcrypt.info* %changelog +* Thu Sep 12 2024 hugel - 1.10.2-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix the self-check error in FIPS mode + * Mon Jul 24 2023 zhengxiaoxiao - 1.10.2-1 - Type:requirements - ID:NA