Some spec-file optimizations
This commit is contained in:
parent
d692c1ed47
commit
1999735bf0
@ -38,7 +38,7 @@
|
||||
%if %{with new_api}
|
||||
%global hash_methods glibc,strong
|
||||
%global obsolete_api no
|
||||
%global compat_methods glibc
|
||||
%global compat_methods all
|
||||
%global compat_api glibc
|
||||
%else
|
||||
%global hash_methods all
|
||||
@ -47,16 +47,16 @@
|
||||
|
||||
|
||||
# Needed for out-of-tree builds.
|
||||
%global _configure ../configure
|
||||
%global _configure ../"configure"
|
||||
|
||||
|
||||
# Common configure options.
|
||||
%global common_configure_options \\\
|
||||
--libdir=/%{_lib} \\\
|
||||
--disable-failure-tokens \\\
|
||||
--disable-silent-rules \\\
|
||||
--enable-shared \\\
|
||||
--enable-static \\\
|
||||
--disable-failure-tokens \\\
|
||||
%if %{with memcheck} \
|
||||
--enable-valgrind \\\
|
||||
%else \
|
||||
@ -96,14 +96,14 @@ License: LGPLv2+ and BSD and Public Domain
|
||||
URL: https://github.com/besser82/%{name}
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Patch 0001 - 3000: Backported patches from upstream.
|
||||
Patch0001: %{url}/commit/5e9199f293473a0c14f836b3df8ecf6aeed1e315.patch#/%{name}-4.3.3-alg_sha512_make_PAD_const.patch
|
||||
Patch0002: %{url}/commit/65485d7891cfe50db941ab14e864bb485a54d71c.patch#/%{name}-4.3.3-skip_bcrypt_test_if_not_enabled.patch
|
||||
# Patch 0000 - 2999: Backported patches from upstream.
|
||||
Patch0000: %{url}/commit/5e9199f293473a0c14f836b3df8ecf6aeed1e315.patch#/%{name}-4.3.3-alg_sha512_make_PAD_const.patch
|
||||
Patch0001: %{url}/commit/65485d7891cfe50db941ab14e864bb485a54d71c.patch#/%{name}-4.3.3-skip_bcrypt_test_if_not_enabled.patch
|
||||
|
||||
# Patch 3001 - 6000: Backported patches from pull requests.
|
||||
# Patch 3000 - 5999: Backported patches from pull requests.
|
||||
|
||||
# Patch 6001 - 9999: Downstream patches.
|
||||
Patch6001: %{name}-4.3.3-gensalt_r_as_macro.patch
|
||||
# Patch 6000 - 9999: Downstream patches.
|
||||
Patch6000: %{name}-4.3.3-gensalt_r_as_macro.patch
|
||||
|
||||
BuildRequires: fipscheck
|
||||
BuildRequires: libtool
|
||||
@ -112,24 +112,25 @@ BuildRequires: valgrind
|
||||
%endif
|
||||
|
||||
# We do not need to keep this forever.
|
||||
%if %{without new_api} && (0%{?fedora} && 0%{?fedora} <= 31) || (0%{?rhel} && 0%{?rhel} <= 10)
|
||||
%if (0%{?fedora} && 0%{?fedora} <= 31) || (0%{?rhel} && 0%{?rhel} <= 10)
|
||||
# Inherited from former libcrypt package.
|
||||
Obsoletes: libcrypt-nss <= 2.26.9000-33
|
||||
Obsoletes: libcrypt-nss <= 2.26.9000-33
|
||||
Provides: libcrypt-nss == 2.26.9000-34
|
||||
|
||||
# Obsolete former libcrypt properly.
|
||||
Obsoletes: libcrypt <= 2.26.9000-46
|
||||
|
||||
# Provide virtual libcrypt as it has been done
|
||||
# by former libcrypt{,-nss} packages from glibc.
|
||||
Provides: libcrypt == 2.26.9000-47
|
||||
Provides: libcrypt%{?_isa} == 2.26.9000-47
|
||||
%endif
|
||||
# Obsolete former libcrypt properly and provide a virtual libcrypt
|
||||
# package as it has been done by the former packages, which were
|
||||
# built by glibc before.
|
||||
Obsoletes: libcrypt <= 2.26.9000-46
|
||||
Provides: libcrypt == 2.26.9000-47
|
||||
Provides: libcrypt%{?_isa} == 2.26.9000-47
|
||||
|
||||
# Obsolete former libxcrypt-common properly.
|
||||
Obsoletes: %{name}-common <= 4.3.3-3
|
||||
Provides: %{name}-common == %{version}-%{release}
|
||||
Obsoletes: %{name}-common <= 4.3.3-3
|
||||
Provides: %{name}-common == %{version}-%{release}
|
||||
|
||||
Requires: glibc%{_isa} >= 2.26.9000-46
|
||||
# We need a version of glibc, that doesn't build libcrypt anymore.
|
||||
Requires: glibc%{_isa} >= 2.26.9000-46
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
@ -159,21 +160,7 @@ that have been provided by glibc's libcrypt.so.1.
|
||||
%package compat
|
||||
Summary: Compatibility library providing legacy API functions
|
||||
|
||||
# We do not need to keep this forever.
|
||||
%if (0%{?fedora} && 0%{?fedora} <= 31) || (0%{?rhel} && 0%{?rhel} <= 10)
|
||||
# Inherited from former libcrypt package.
|
||||
Obsoletes: libcrypt-nss <= 2.26.9000-33
|
||||
|
||||
# Obsolete former libcrypt properly.
|
||||
Obsoletes: libcrypt <= 2.26.9000-46
|
||||
|
||||
# Provide virtual libcrypt as it has been done
|
||||
# by former libcrypt{,-nss} packages from glibc.
|
||||
Provides: libcrypt == 2.26.9000-47
|
||||
Provides: libcrypt%{?_isa} == 2.26.9000-47
|
||||
%endif
|
||||
|
||||
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||
Requires: %{name}%{_isa} == %{version}-%{release}
|
||||
|
||||
%description compat
|
||||
This package contains the library providing the compatibility API for
|
||||
@ -181,18 +168,17 @@ applications that are still using the unsafe and deprecated encrypt,
|
||||
encrypt_r, setkey, setkey_r, and fcrypt functions.
|
||||
|
||||
All existing binary executables linked against glibc's libcrypt should
|
||||
work unmodified with this version of the libxcrypt.
|
||||
work unmodified with this library.
|
||||
%endif
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
|
||||
Conflicts: man-pages < 4.15-3
|
||||
Conflicts: man-pages < 4.15-3
|
||||
|
||||
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||
Requires: glibc-devel%{?_isa} >= 2.26.9000-46
|
||||
Requires: glibc-headers%{?_isa} >= 2.26.9000-46
|
||||
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||
Requires: glibc-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for
|
||||
@ -202,8 +188,8 @@ developing applications that use %{name}.
|
||||
%package static
|
||||
Summary: Static library for -static linking with %{name}
|
||||
|
||||
Requires: %{name}-devel%{?_isa} == %{version}-%{release}
|
||||
Requires: glibc-static%{?_isa} >= 2.26.9000-46
|
||||
Requires: %{name}-devel%{?_isa} == %{version}-%{release}
|
||||
Requires: glibc-static%{?_isa}
|
||||
|
||||
%description static
|
||||
This package contains the libxcrypt static library for -static
|
||||
@ -241,11 +227,11 @@ popd
|
||||
%install
|
||||
%if %{with new_api}
|
||||
%make_install -C %{_vpath_builddir}-compat
|
||||
%{__rm} -fr %{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_includedir} \
|
||||
%{buildroot}%{_libdir}/libcrypt.{a,so} \
|
||||
%{buildroot}%{_libdir}/pkgconfig \
|
||||
%{buildroot}%{_mandir} \
|
||||
%{__rm} -fr %{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_includedir} \
|
||||
%{buildroot}/%{_lib}/libcrypt.{a,so} \
|
||||
%{buildroot}%{_libdir}/pkgconfig \
|
||||
%{buildroot}%{_mandir} \
|
||||
%{buildroot}%{_sbindir}
|
||||
%endif
|
||||
%make_install -C %{_vpath_builddir}
|
||||
@ -335,6 +321,7 @@ done
|
||||
- Add two upstream patches with minor fixes
|
||||
- Add HMAC checksum file for the static library
|
||||
- Drop the common sub-package
|
||||
- Some spec-file optimizations
|
||||
|
||||
* Tue Nov 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-2
|
||||
- Add a patch to define crypt_gensalt_r as macro, so applications
|
||||
|
Loading…
Reference in New Issue
Block a user