Move fipscheck hmac checksums to %%{_libdir}/fipscheck

This commit is contained in:
Björn Esser 2020-04-24 10:50:47 +02:00
parent 452ffdf98e
commit 0a6250d331

View File

@ -120,32 +120,44 @@
--with-pkgconfigdir=%{_libdir}/pkgconfig --with-pkgconfigdir=%{_libdir}/pkgconfig
# Macros for shorthand.
%global _fipsdir %{_libdir}/fipscheck
# Add generation of HMAC checksums of the final stripped # Add generation of HMAC checksums of the final stripped
# binaries. %%define with lazy globbing is used here # binaries. %%define with lazy globbing is used here
# intentionally, because using %%global does not work. # intentionally, because using %%global does not work.
%define __spec_install_post \ %define __spec_install_post \
%{?__debug_package:%{__debug_install_post}} \ %{?__debug_package:%{__debug_install_post}} \
%{__arch_install_post} \ %{__arch_install_post} \
%{__os_install_post} \ %{__os_install_post} \
fipshmac %{buildroot}%{_libdir}/libcrypt.so.%{sov} \ libdir="%{buildroot}%{_libdir}" \
ln -s .libcrypt.so.%{sov}.hmac \\\ fipsdir="$libdir/fipscheck" \
%{buildroot}%{_libdir}/.libcrypt.so.%{soc}.hmac \ mkdir -p $fipsdir \
if [[ %{with staticlib} == 1 ]]; then \ fipshmac -d $fipsdir \\\
fipshmac %{buildroot}%{_libdir}/libcrypt.a \ $libdir/libcrypt.so.%{sov} \
ln -s .libcrypt.a.hmac \\\ ln -s libcrypt.so.%{sov}.hmac \\\
%{buildroot}%{_libdir}/.libxcrypt.a.hmac \ $fipsdir/libcrypt.so.%{soc}.hmac \
fi \ if [[ %{with staticlib} == 1 ]]; then \
if [[ %{with compat_pkg} == 1 ]]; then \ fipshmac -d $fipsdir \\\
fipshmac %{buildroot}%{_libdir}/libcrypt.so.%{csov} \ $libdir/libcrypt.a \
ln -s .libcrypt.so.%{csov}.hmac \\\ if [[ %{without new_api} == 1 ]]; then \
%{buildroot}%{_libdir}/.libcrypt.so.%{csoc}.hmac \ ln -s .libcrypt.a.hmac \\\
fi \ $fipsdir/libxcrypt.a.hmac \
fi \
fi \
if [[ %{with compat_pkg} == 1 ]]; then \
fipshmac -d $fipsdir \\\
$libdir/libcrypt.so.%{csov} \
ln -s libcrypt.so.%{csov}.hmac \\\
$fipsdir/libcrypt.so.%{csoc}.hmac \
fi \
%{nil} %{nil}
Name: libxcrypt Name: libxcrypt
Version: 4.4.16 Version: 4.4.16
Release: 1%{?dist} Release: 2%{?dist}
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
# For explicit license breakdown, see the # For explicit license breakdown, see the
@ -415,6 +427,7 @@ done
%files %files
%dir %{_fipsdir}
%doc %dir %{_pkgdocdir} %doc %dir %{_pkgdocdir}
%doc %{_pkgdocdir}/NEWS %doc %{_pkgdocdir}/NEWS
%doc %{_pkgdocdir}/README %doc %{_pkgdocdir}/README
@ -426,42 +439,69 @@ done
%endif %endif
%doc %{_pkgdocdir}/THANKS %doc %{_pkgdocdir}/THANKS
%license AUTHORS COPYING.LIB LICENSING %license AUTHORS COPYING.LIB LICENSING
%{_libdir}/.libcrypt.so.{%{soc},%{sov}}.hmac %{_fipsdir}/libcrypt.so.%{soc}.hmac
%{_libdir}/libcrypt.so.{%{soc},%{sov}} %{_fipsdir}/libcrypt.so.%{sov}.hmac
%{_mandir}/man5/crypt.5.* %{_libdir}/libcrypt.so.%{soc}
%{_libdir}/libcrypt.so.%{sov}
%{_mandir}/man5/crypt.5*
%if %{with compat_pkg} %if %{with compat_pkg}
%files compat %files compat
%dir %{_fipsdir}
%if %{with enosys_stubs} %if %{with enosys_stubs}
%doc %{_pkgdocdir}/README.posix %doc %{_pkgdocdir}/README.posix
%endif %endif
%{_libdir}/.libcrypt.so.{%{csoc},%{csov}}.hmac %{_fipsdir}/libcrypt.so.%{csoc}.hmac
%{_libdir}/libcrypt.so.{%{csoc},%{csov}} %{_fipsdir}/libcrypt.so.%{csov}.hmac
%{_libdir}/libcrypt.so.%{csoc}
%{_libdir}/libcrypt.so.%{csov}
%endif %endif
%files devel %files devel
%doc %{_pkgdocdir}/ChangeLog %doc %{_pkgdocdir}/ChangeLog
%doc %{_pkgdocdir}/TODO %doc %{_pkgdocdir}/TODO
%{_libdir}/lib{,x}crypt.so %{_libdir}/libcrypt.so
%{_includedir}/{,x}crypt.h %if %{without new_api}
%{_libdir}/pkgconfig/{libcrypt,%{name}}.pc %{_libdir}/libxcrypt.so
%{_mandir}/man3/crypt{,_r,_ra,_rn}.3.* %endif
%{_mandir}/man3/crypt_checksalt.3.* %{_includedir}/crypt.h
%{_mandir}/man3/crypt_gensalt{,_ra,_rn}.3.* %if %{without new_api}
%{_mandir}/man3/crypt_preferred_method.3.* %{_includedir}/xcrypt.h
%endif
%{_libdir}/pkgconfig/libcrypt.pc
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/crypt.3*
%{_mandir}/man3/crypt_r.3*
%{_mandir}/man3/crypt_ra.3*
%{_mandir}/man3/crypt_rn.3*
%{_mandir}/man3/crypt_checksalt.3*
%{_mandir}/man3/crypt_gensalt.3*
%{_mandir}/man3/crypt_gensalt_ra.3*
%{_mandir}/man3/crypt_gensalt_rn.3*
%{_mandir}/man3/crypt_preferred_method.3*
%if %{with staticlib} %if %{with staticlib}
%files static %files static
%dir %{_fipsdir}
%doc %{_pkgdocdir}/README.static %doc %{_pkgdocdir}/README.static
%{_libdir}/.lib{,x}crypt.a.hmac %{_fipsdir}/libcrypt.a.hmac
%{_libdir}/lib{,x}crypt.a %if %{without new_api}
%{_fipsdir}/libxcrypt.a.hmac
%endif
%{_libdir}/libcrypt.a
%if %{without new_api}
%{_libdir}/libxcrypt.a
%endif
%endif %endif
%changelog %changelog
* Fri Apr 24 2020 Björn Esser <besser82@fedoraproject.org> - 4.4.16-2
- Move fipscheck hmac checksums to %%{_libdir}/fipscheck
* Sat Apr 04 2020 Björn Esser <besser82@fedoraproject.org> - 4.4.16-1 * Sat Apr 04 2020 Björn Esser <besser82@fedoraproject.org> - 4.4.16-1
- New upstream release - New upstream release