FIPS: move to .hmac files to the fipscheck subdirectory

Resolves: rhbz#1980758
This commit is contained in:
Jakub Martisko 2021-08-18 12:39:02 +02:00 committed by jamartis
parent f3d598433c
commit ae1ff3c532

View File

@ -6,7 +6,7 @@
Summary: A GNU arbitrary precision library Summary: A GNU arbitrary precision library
Name: gmp Name: gmp
Version: 6.2.0 Version: 6.2.0
Release: 8%{?dist} Release: 9%{?dist}
Epoch: 1 Epoch: 1
URL: http://gmplib.org/ URL: http://gmplib.org/
Source0: ftp://ftp.gmplib.org/pub/gmp-%{version}/gmp-%{version}.tar.bz2 Source0: ftp://ftp.gmplib.org/pub/gmp-%{version}/gmp-%{version}.tar.bz2
@ -104,7 +104,10 @@ export LD_LIBRARY_PATH=`pwd`/.libs
%{__os_install_post} \ %{__os_install_post} \
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.* \ fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.* \
file=`basename $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.*.hmac` && \ file=`basename $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.*.hmac` && \
mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/fipscheck && \
mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/fipscheck/$file && \
ln -s $file $RPM_BUILD_ROOT%{_libdir}/fipscheck/libgmp.so.10.hmac && \
cp $RPM_BUILD_ROOT%{_libdir}/fipscheck/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libgmp.so.10.hmac ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libgmp.so.10.hmac
%{nil} %{nil}
%endif %endif
@ -159,6 +162,7 @@ export LD_LIBRARY_PATH=`pwd`/.libs
%{_libdir}/libgmp.so.* %{_libdir}/libgmp.so.*
%if %{with fips} %if %{with fips}
%{_libdir}/.libgmp.so.*.hmac %{_libdir}/.libgmp.so.*.hmac
%{_libdir}/fipscheck/libgmp.so.*.hmac
%endif %endif
%files c++ %files c++
@ -177,6 +181,11 @@ export LD_LIBRARY_PATH=`pwd`/.libs
%{_libdir}/libgmpxx.a %{_libdir}/libgmpxx.a
%changelog %changelog
* Wed Aug 18 2021 Jakub Martisko <jamartis@redhat.com> - 1:6.2.0-9
- Move the .hmac files to the fipscheck subfolder
- Make symlinks from their original location (Fedora contains the .hmac files there) pointing to their new location
Resolves: rhbz#1980758
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:6.2.0-8 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:6.2.0-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688