From a17db7fa5890b2266da7fb6347aa1367be7840bd Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 11 Apr 2023 14:20:12 +0200 Subject: [PATCH] Simplify HMAC checksum calculation and avoid using CWD --- libgcrypt.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libgcrypt.spec b/libgcrypt.spec index 3679c3b..aae97fc 100644 --- a/libgcrypt.spec +++ b/libgcrypt.spec @@ -108,12 +108,12 @@ LIBGCRYPT_FORCE_FIPS_MODE=1 make check %{?__debug_package:%{__debug_install_post}} \ %{__arch_install_post} \ %{__os_install_post} \ - pushd src \ + 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} new \ - mv -f new %{libpath} \ - rm -f %{libpath}.hmac \ + objcopy --update-section .note.fdo.integrity=%{libpath}.hmac %{libpath} %{libpath}.new \ + mv -f %{libpath}.new %{libpath} \ + rm -f %{libpath}.hmac %{nil} %install