Create HMAC checksum for FIPS integrity self tests

Resolves: rhbz#1677600
This commit is contained in:
Anderson Toshiyuki Sasaki 2019-02-15 13:11:18 +01:00
parent 52f9b63dd2
commit fc058c7974

View File

@ -6,7 +6,7 @@
Summary: A GNU arbitrary precision library
Name: gmp
Version: 6.1.2
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 1
URL: http://gmplib.org/
Source0: ftp://ftp.gmplib.org/pub/gmp-%{version}/gmp-%{version}.tar.bz2
@ -21,6 +21,11 @@ BuildRequires: gcc-c++
BuildRequires: git
#autoreconf on arm needs:
BuildRequires: perl-Carp
# Generate the .hmac checksum unless --without fips is used
%bcond_without fips
%if %{with fips}
BuildRequires: fipscheck
%endif
%description
The gmp package contains GNU MP, a library for arbitrary precision
@ -91,6 +96,18 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags}
%if %{with fips}
%define __spec_install_post \
%{?__debug_package:%{__debug_install_post}} \
%{__arch_install_post} \
%{__os_install_post} \
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.* \
file=`basename $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.*.hmac` && \
mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libgmp.so.10.hmac
%{nil}
%endif
%install
export LD_LIBRARY_PATH=`pwd`/.libs
make install DESTDIR=$RPM_BUILD_ROOT
@ -139,6 +156,9 @@ make %{?_smp_mflags} check
%license COPYING COPYING.LESSERv3 COPYINGv2 COPYINGv3
%doc NEWS README
%{_libdir}/libgmp.so.*
%if %{with fips}
%{_libdir}/.libgmp.so.*.hmac
%endif
%files c++
%{_libdir}/libgmpxx.so.*
@ -154,6 +174,9 @@ make %{?_smp_mflags} check
%{_libdir}/libgmpxx.a
%changelog
* Fri Feb 15 2019 Anderson Toshiyuki Sasaki <ansasaki@redhat.com> - 1:6.1.2-10
- Create HMAC checksum for FIPS integrity self tests
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild