Split up the replacements subpackage
It is better to have a separate subpackage for each replaced tool.
This commit is contained in:
parent
a446d71c1f
commit
7bd35c594d
122
libkcapi.spec
122
libkcapi.spec
@ -3,8 +3,16 @@
|
|||||||
%global vminor 0
|
%global vminor 0
|
||||||
%global vpatch 3
|
%global vpatch 3
|
||||||
|
|
||||||
# Do we build the replacements package?
|
# Do we build the replacements packages?
|
||||||
%bcond_with replacements
|
%bcond_with replace_coreutils
|
||||||
|
%bcond_with replace_fipscheck
|
||||||
|
%bcond_with replace_hmaccalc
|
||||||
|
|
||||||
|
%if %{with replace_coreutils} || %{with replace_fipscheck} || %{with replace_hmaccalc}
|
||||||
|
%global need_hasher 1
|
||||||
|
%else
|
||||||
|
%global need_hasher 0
|
||||||
|
%endif
|
||||||
|
|
||||||
# This package needs at least Linux Kernel v4.10.0.
|
# This package needs at least Linux Kernel v4.10.0.
|
||||||
%global min_kernel_ver 4.10.0
|
%global min_kernel_ver 4.10.0
|
||||||
@ -37,30 +45,21 @@
|
|||||||
%global giturl https://github.com/smuellerDD/%{name}
|
%global giturl https://github.com/smuellerDD/%{name}
|
||||||
|
|
||||||
# Do we replace some coreutils?
|
# Do we replace some coreutils?
|
||||||
%if %{with replacements}
|
|
||||||
%bcond_with replace_coreutils
|
|
||||||
%if %{with replace_coreutils}
|
%if %{with replace_coreutils}
|
||||||
# TODO: Adapt this when replacing some coreutils initially.
|
# TODO: Adapt this when replacing some coreutils initially.
|
||||||
%global coreutils_evr 8.29-1
|
%global coreutils_evr 8.29-1%{?dist}
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Do we replace fipscheck?
|
# Do we replace fipscheck?
|
||||||
%if %{with replacements}
|
|
||||||
%bcond_with replace_fipscheck
|
|
||||||
%if %{with replace_fipscheck}
|
%if %{with replace_fipscheck}
|
||||||
# TODO: Adapt this when replacing fipscheck initially.
|
# TODO: Adapt this when replacing fipscheck initially.
|
||||||
%global fipscheck_evr 1.5.0-3
|
%global fipscheck_evr 1.5.0-3%{?dist}
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Do we replace hmaccalc?
|
# Do we replace hmaccalc?
|
||||||
%if %{with replacements}
|
|
||||||
%bcond_with replace_hmaccalc
|
|
||||||
%if %{with replace_hmaccalc}
|
%if %{with replace_hmaccalc}
|
||||||
# TODO: Adapt this when replacing hmaccalc initially.
|
# TODO: Adapt this when replacing hmaccalc initially.
|
||||||
%global hmaccalc_evr 0.9.14-8
|
%global hmaccalc_evr 0.9.14-10%{?dist}
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Add generation of HMAC checksums of the final stripped
|
# Add generation of HMAC checksums of the final stripped
|
||||||
@ -80,7 +79,7 @@
|
|||||||
|
|
||||||
Name: libkcapi
|
Name: libkcapi
|
||||||
Version: %{vmajor}.%{vminor}.%{vpatch}
|
Version: %{vmajor}.%{vminor}.%{vpatch}
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
Summary: User space interface to the Linux Kernel Crypto API
|
Summary: User space interface to the Linux Kernel Crypto API
|
||||||
|
|
||||||
License: BSD or GPLv2
|
License: BSD or GPLv2
|
||||||
@ -154,42 +153,58 @@ BuildArch: noarch
|
|||||||
User documentation for %{name}.
|
User documentation for %{name}.
|
||||||
|
|
||||||
|
|
||||||
%if %{with replacements}
|
%if %{need_hasher}
|
||||||
%package replacements
|
%package hasher
|
||||||
Summary: Drop-in replacements provided by the %{name} package
|
Summary: Common utility for replacement packages
|
||||||
Requires: %{name}%{?_isa} == %{version}-%{release}
|
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||||
|
|
||||||
|
%description hasher
|
||||||
|
Provides a common binary used by the drop-in %{name} replacements for hashing/HMAC tools.
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with replace_coreutils}
|
%if %{with replace_coreutils}
|
||||||
|
%package checksum
|
||||||
|
Summary: Drop-in replacement for *sum utils provided by the %{name} package
|
||||||
|
Requires: %{name}-hasher%{?_isa} == %{version}-%{release}
|
||||||
|
|
||||||
Requires: coreutils%{?_isa} >= %{coreutils_evr}
|
Requires: coreutils%{?_isa} >= %{coreutils_evr}
|
||||||
|
|
||||||
Conflicts: coreutils < %{coreutils_evr}
|
Conflicts: coreutils < %{coreutils_evr}
|
||||||
Conflicts: coreutils-single
|
Conflicts: coreutils-single
|
||||||
|
|
||||||
|
%description checksum
|
||||||
|
Provides drop-in replacements for sha*sum tools (from package coreutils) using %{name}.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with replace_fipscheck}
|
%if %{with replace_fipscheck}
|
||||||
|
%package fipscheck
|
||||||
|
Summary: Drop-in replacements for fipscheck/fipshmac provided by the %{name} package
|
||||||
|
Requires: %{name}-hasher%{?_isa} == %{version}-%{release}
|
||||||
|
|
||||||
Obsoletes: fipscheck <= %{fipscheck_evr}
|
Obsoletes: fipscheck <= %{fipscheck_evr}
|
||||||
|
|
||||||
Provides: fipscheck == %{fipscheck_evr}.1
|
Provides: fipscheck == %{fipscheck_evr}.1
|
||||||
Provides: fipscheck%{?_isa} == %{fipscheck_evr}.1
|
Provides: fipscheck%{?_isa} == %{fipscheck_evr}.1
|
||||||
|
|
||||||
|
%description fipscheck
|
||||||
|
Provides drop-in replacements for fipscheck and fipshmac tools (from package fipscheck)
|
||||||
|
using %{name}.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with replace_hmaccalc}
|
%if %{with replace_hmaccalc}
|
||||||
|
%package hmaccalc
|
||||||
|
Summary: Drop-in replacements for hmaccalc provided by the %{name} package
|
||||||
|
Requires: %{name}-hasher%{?_isa} == %{version}-%{release}
|
||||||
|
|
||||||
Obsoletes: hmaccalc <= %{hmaccalc_evr}
|
Obsoletes: hmaccalc <= %{hmaccalc_evr}
|
||||||
|
|
||||||
Provides: hmaccalc == %{hmaccalc_evr}.1
|
Provides: hmaccalc == %{hmaccalc_evr}.1
|
||||||
Provides: hmaccalc%{?_isa} == %{hmaccalc_evr}.1
|
Provides: hmaccalc%{?_isa} == %{hmaccalc_evr}.1
|
||||||
%endif
|
|
||||||
|
|
||||||
%description replacements
|
%description hmaccalc
|
||||||
Provides drop-in replacements for
|
Provides drop-in replacements for sha*hmac tools (from package hmaccalc) using %{name}.
|
||||||
%if %{with replace_fipscheck}
|
|
||||||
* fipscheck and fipshmac (fipscheck)
|
|
||||||
%endif
|
|
||||||
%if %{with replace_hmaccalc}
|
|
||||||
* sha*hmac (hmaccalc)
|
|
||||||
%endif
|
|
||||||
%if %{with replace_coreutils}
|
|
||||||
* sha*sum (coreutils)
|
|
||||||
%endif
|
|
||||||
tools using %{name}.
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -286,15 +301,24 @@ EOF
|
|||||||
README.md CHANGES TODO doc/%{name}.p{df,s}
|
README.md CHANGES TODO doc/%{name}.p{df,s}
|
||||||
%{__cp} -pr lib/doc/html %{buildroot}%{_pkgdocdir}
|
%{__cp} -pr lib/doc/html %{buildroot}%{_pkgdocdir}
|
||||||
|
|
||||||
%if !%{with replacements}
|
%if !%{need_hasher}
|
||||||
|
%{__rm} -f %{buildroot}%{_bindir}/kcapi-hasher
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with replace_coreutils}
|
||||||
%{__rm} -f \
|
%{__rm} -f \
|
||||||
%{buildroot}%{_bindir}/fips* \
|
|
||||||
%{buildroot}%{_bindir}/kcapi-hasher \
|
|
||||||
%{buildroot}%{_bindir}/md5sum \
|
%{buildroot}%{_bindir}/md5sum \
|
||||||
%{buildroot}%{_bindir}/sha*hmac \
|
|
||||||
%{buildroot}%{_bindir}/sha*sum
|
%{buildroot}%{_bindir}/sha*sum
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if !%{with replace_fipscheck}
|
||||||
|
%{__rm} -f %{buildroot}%{_bindir}/fips*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with replace_hmaccalc}
|
||||||
|
%{__rm} -f %{buildroot}%{_bindir}/sha*hmac
|
||||||
|
%endif
|
||||||
|
|
||||||
# We don't ship autocrap dumplings.
|
# We don't ship autocrap dumplings.
|
||||||
%{_bindir}/find %{buildroot} -type f -name '*.la' -print -delete
|
%{_bindir}/find %{buildroot} -type f -name '*.la' -print -delete
|
||||||
|
|
||||||
@ -366,35 +390,30 @@ popd
|
|||||||
%license %{_datadir}/licenses/%{name}*
|
%license %{_datadir}/licenses/%{name}*
|
||||||
|
|
||||||
|
|
||||||
%if %{with replacements}
|
%if %{need_hasher}
|
||||||
%files replacements
|
%files hasher
|
||||||
%{_bindir}/kcapi-hasher
|
%{_bindir}/kcapi-hasher
|
||||||
%{_bindir}/.kcapi-hasher.hmac
|
%{_bindir}/.kcapi-hasher.hmac
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with replace_coreutils}
|
%if %{with replace_coreutils}
|
||||||
|
%files checksum
|
||||||
%{_bindir}/md5sum
|
%{_bindir}/md5sum
|
||||||
%{_bindir}/.md5sum.hmac
|
%{_bindir}/.md5sum.hmac
|
||||||
%{_bindir}/sha*sum
|
%{_bindir}/sha*sum
|
||||||
%{_bindir}/.sha*sum.hmac
|
%{_bindir}/.sha*sum.hmac
|
||||||
%else
|
|
||||||
%exclude %{_bindir}/md5sum
|
|
||||||
%exclude %{_bindir}/.md5sum.hmac
|
|
||||||
%exclude %{_bindir}/sha*sum
|
|
||||||
%exclude %{_bindir}/.sha*sum.hmac
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with replace_fipscheck}
|
%if %{with replace_fipscheck}
|
||||||
|
%files fipscheck
|
||||||
%{_bindir}/fips*
|
%{_bindir}/fips*
|
||||||
%{_bindir}/.fips*.hmac
|
%{_bindir}/.fips*.hmac
|
||||||
%else
|
|
||||||
%exclude %{_bindir}/fips*
|
|
||||||
%exclude %{_bindir}/.fips*.hmac
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with replace_hmaccalc}
|
%if %{with replace_hmaccalc}
|
||||||
|
%files hmaccalc
|
||||||
%{_bindir}/sha*hmac
|
%{_bindir}/sha*hmac
|
||||||
%{_bindir}/.sha*hmac.hmac
|
%{_bindir}/.sha*hmac.hmac
|
||||||
%else
|
|
||||||
%exclude %{_bindir}/sha*hmac
|
|
||||||
%exclude %{_bindir}/.sha*hmac.hmac
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -403,7 +422,7 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%if %{with replacements}
|
%if %{need_hasher}
|
||||||
%exclude %{_bindir}/kcapi-hasher
|
%exclude %{_bindir}/kcapi-hasher
|
||||||
%exclude %{_bindir}/.kcapi-hasher.hmac
|
%exclude %{_bindir}/.kcapi-hasher.hmac
|
||||||
%endif
|
%endif
|
||||||
@ -413,6 +432,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 08 2018 Ondrej Mosnáček <omosnace@redhat.com> - 1.0.3-9
|
||||||
|
- Split up the replacements subpackage
|
||||||
|
|
||||||
* Mon Feb 26 2018 Björn Esser <besser82@fedoraproject.org> - 1.0.3-8
|
* Mon Feb 26 2018 Björn Esser <besser82@fedoraproject.org> - 1.0.3-8
|
||||||
- Increase optmem_max preset to 81920
|
- Increase optmem_max preset to 81920
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user