Fix and simplify the conditionals for the compat package
This commit is contained in:
parent
dd49144394
commit
904ed6a794
@ -6,10 +6,10 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Build the compat package?
|
# Build the compat package?
|
||||||
%if 0%{?fedora} >= 999 || 0%{?rhel} >= 99
|
%if !(0%{?fedora} >= 999 || 0%{?rhel} >= 99 || %{without new_api})
|
||||||
%bcond_with compat_pkg
|
|
||||||
%else
|
|
||||||
%bcond_without compat_pkg
|
%bcond_without compat_pkg
|
||||||
|
%else
|
||||||
|
%bcond_with compat_pkg
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Run memcheck?
|
# Run memcheck?
|
||||||
@ -27,12 +27,6 @@
|
|||||||
%global sol 0
|
%global sol 0
|
||||||
%global sof 0
|
%global sof 0
|
||||||
%global sov %{soc}.%{sol}.%{sof}
|
%global sov %{soc}.%{sol}.%{sof}
|
||||||
%if %{with compat_pkg}
|
|
||||||
%global csoc 1
|
|
||||||
%global csol 1
|
|
||||||
%global csof 0
|
|
||||||
%global csov %{csoc}.%{csol}.%{csof}
|
|
||||||
%endif
|
|
||||||
%else
|
%else
|
||||||
%global soc 1
|
%global soc 1
|
||||||
%global sol 1
|
%global sol 1
|
||||||
@ -40,21 +34,29 @@
|
|||||||
%global sov %{soc}.%{sol}.%{sof}
|
%global sov %{soc}.%{sol}.%{sof}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with compat_pkg}
|
||||||
|
%global csoc 1
|
||||||
|
%global csol 1
|
||||||
|
%global csof 0
|
||||||
|
%global csov %{csoc}.%{csol}.%{csof}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Hash methods and API supported by libcrypt.
|
# Hash methods and API supported by libcrypt.
|
||||||
# NEVER EVER touch this, if you do NOT know what you are doing!
|
# NEVER EVER touch this, if you do NOT know what you are doing!
|
||||||
%if %{with new_api}
|
%if %{with new_api}
|
||||||
%global hash_methods fedora,glibc,strong
|
%global hash_methods fedora,glibc,strong
|
||||||
%global obsolete_api no
|
%global obsolete_api no
|
||||||
%if %{with compat_pkg}
|
|
||||||
%global compat_methods glibc
|
|
||||||
%global compat_api glibc
|
|
||||||
%endif
|
|
||||||
%else
|
%else
|
||||||
%global hash_methods all
|
%global hash_methods all
|
||||||
%global obsolete_api glibc
|
%global obsolete_api glibc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with compat_pkg}
|
||||||
|
%global compat_methods glibc
|
||||||
|
%global compat_api glibc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Needed for the distribution README file.
|
# Needed for the distribution README file.
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
@ -100,7 +102,7 @@
|
|||||||
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{sov} \
|
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{sov} \
|
||||||
%{__ln_s} .libcrypt.so.%{sov}.hmac \\\
|
%{__ln_s} .libcrypt.so.%{sov}.hmac \\\
|
||||||
%{buildroot}/%{_lib}/.libcrypt.so.%{soc}.hmac \
|
%{buildroot}/%{_lib}/.libcrypt.so.%{soc}.hmac \
|
||||||
if [[ %{with new_api} == 1 && %{with compat_pkg} == 1 ]]; then \
|
if [[ %{with compat_pkg} == 1 ]]; then \
|
||||||
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{csov} \
|
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{csov} \
|
||||||
%{__ln_s} .libcrypt.so.%{csov}.hmac \\\
|
%{__ln_s} .libcrypt.so.%{csov}.hmac \\\
|
||||||
%{buildroot}/%{_lib}/.libcrypt.so.%{csoc}.hmac \
|
%{buildroot}/%{_lib}/.libcrypt.so.%{csoc}.hmac \
|
||||||
@ -110,7 +112,7 @@ fi \
|
|||||||
|
|
||||||
Name: libxcrypt
|
Name: libxcrypt
|
||||||
Version: 4.4.3
|
Version: 4.4.3
|
||||||
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
|
||||||
@ -152,6 +154,10 @@ Provides: %{name}-common == %{version}-%{release}
|
|||||||
Requires: glibc%{?_isa} >= 2.26.9000-46
|
Requires: glibc%{?_isa} >= 2.26.9000-46
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with new_api} && %{without compat_pkg}
|
||||||
|
Obsoletes: %{name}-compat <= %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 30
|
%if 0%{?fedora} >= 30
|
||||||
Recommends: mkpasswd
|
Recommends: mkpasswd
|
||||||
%endif
|
%endif
|
||||||
@ -183,7 +189,7 @@ that have been provided by glibc's libcrypt.so.1.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
%package compat
|
%package compat
|
||||||
Summary: Compatibility library providing legacy API functions
|
Summary: Compatibility library providing legacy API functions
|
||||||
|
|
||||||
@ -263,7 +269,7 @@ pushd %{_vpath_builddir}
|
|||||||
%make_build
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
# Build the compatibility library.
|
# Build the compatibility library.
|
||||||
pushd %{_vpath_builddir}-compat
|
pushd %{_vpath_builddir}-compat
|
||||||
%configure \
|
%configure \
|
||||||
@ -276,7 +282,7 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
# Install the compatibility library.
|
# Install the compatibility library.
|
||||||
%make_install -C %{_vpath_builddir}-compat
|
%make_install -C %{_vpath_builddir}-compat
|
||||||
|
|
||||||
@ -305,7 +311,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
for dir in %{_vpath_builddir} %{_vpath_builddir}-compat; do
|
for dir in %{_vpath_builddir} %{_vpath_builddir}-compat; do
|
||||||
%else
|
%else
|
||||||
for dir in %{_vpath_builddir}; do
|
for dir in %{_vpath_builddir}; do
|
||||||
@ -332,7 +338,7 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
%ldconfig_scriptlets compat
|
%ldconfig_scriptlets compat
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -348,7 +354,7 @@ done
|
|||||||
%{_mandir}/man5/crypt.5.*
|
%{_mandir}/man5/crypt.5.*
|
||||||
|
|
||||||
|
|
||||||
%if %{with new_api} && %{with compat_pkg}
|
%if %{with compat_pkg}
|
||||||
%files compat
|
%files compat
|
||||||
/%{_lib}/.libcrypt.so.{%{csoc},%{csov}}.hmac
|
/%{_lib}/.libcrypt.so.{%{csoc},%{csov}}.hmac
|
||||||
/%{_lib}/libcrypt.so.{%{csoc},%{csov}}
|
/%{_lib}/libcrypt.so.{%{csoc},%{csov}}
|
||||||
@ -373,6 +379,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 24 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.3-2
|
||||||
|
- Fix and simplify the conditionals for the compat package
|
||||||
|
|
||||||
* Thu Jan 24 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.3-1
|
* Thu Jan 24 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.3-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user