2018-01-12 19:49:45 +00:00
|
|
|
# Shared object version of libcrypt.
|
|
|
|
%global soc 1
|
|
|
|
%global sol 1
|
|
|
|
%global sof 0
|
|
|
|
%global sov %{soc}.%{sol}.%{sof}
|
|
|
|
|
|
|
|
# Add generation of HMAC checksums of the final stripped
|
|
|
|
# binaries. %%define with lazy globbing is used here
|
|
|
|
# intentionally, because using %%global does not work.
|
|
|
|
%define __spec_install_post \
|
|
|
|
%{?__debug_package:%{__debug_install_post}} \
|
|
|
|
%{__arch_install_post} \
|
|
|
|
%{__os_install_post} \
|
|
|
|
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{sov} \
|
|
|
|
%{__ln_s} .libcrypt.so.%{sov}.hmac \\\
|
|
|
|
%{buildroot}/%{_lib}/.libcrypt.so.%{soc}.hmac \
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
|
Name: libxcrypt
|
|
|
|
Version: 4.0.0
|
2018-01-31 00:24:17 +00:00
|
|
|
Release: 2%{?dist}
|
2018-01-12 19:49:45 +00:00
|
|
|
Summary: Extended crypt library for DES, MD5, Blowfish and others
|
|
|
|
|
|
|
|
# For explicit license breakdown, see the
|
|
|
|
# LICENSING file in the source tarball.
|
|
|
|
License: LGPLv2+ and BSD and CDDL and Public Domain
|
|
|
|
URL: https://github.com/besser82/%{name}
|
2018-01-27 15:46:57 +00:00
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2018-01-12 19:49:45 +00:00
|
|
|
|
2018-01-31 00:24:17 +00:00
|
|
|
Patch0: %{url}/commit/db1a30dea83a74a0314fddffc35e165b1ebb3158.patch#/%{name}-4.0.0_gcc8_fix_test.patch
|
|
|
|
|
2018-01-12 19:49:45 +00:00
|
|
|
BuildRequires: fipscheck
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
2018-01-20 11:22:19 +00:00
|
|
|
Requires: glibc%{_isa} >= 2.26.9000-46
|
2018-01-19 21:34:00 +00:00
|
|
|
|
2018-01-20 11:22:19 +00:00
|
|
|
# We do not need to keep this forever.
|
|
|
|
%if 0%{?fedora} && 0%{?fedora} <= 31
|
|
|
|
# Inherited from former libcrypt package.
|
2018-01-22 16:43:21 +00:00
|
|
|
Obsoletes: libcrypt-nss <= 2.26.9000-33
|
2018-01-19 21:34:00 +00:00
|
|
|
|
2018-01-20 11:22:19 +00:00
|
|
|
# Obsolete former libcrypt properly.
|
2018-01-22 16:43:21 +00:00
|
|
|
Obsoletes: libcrypt <= 2.26.9000-46
|
2018-01-20 11:22:19 +00:00
|
|
|
|
|
|
|
# Provide virtual libcrypt as it has been done
|
|
|
|
# by former libcrypt{,-nss} packages from glibc.
|
2018-01-19 21:34:00 +00:00
|
|
|
Provides: libcrypt == 2.26.9000-46.1
|
|
|
|
Provides: libcrypt%{?_isa} == 2.26.9000-46.1
|
|
|
|
%endif
|
|
|
|
|
2018-01-12 19:49:45 +00:00
|
|
|
%description
|
|
|
|
libxcrypt is a modern library for one-way hashing of passwords. It
|
|
|
|
supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password
|
|
|
|
hashes, and provides the traditional Unix 'crypt' and 'crypt_r'
|
|
|
|
interfaces, as well as a set of extended interfaces pioneered by
|
|
|
|
Openwall Linux, 'crypt_rn', 'crypt_ra', 'crypt_gensalt',
|
|
|
|
'crypt_gensalt_rn', and 'crypt_gensalt_ra'.
|
|
|
|
|
|
|
|
libxcrypt is intended to be used by login(1), passwd(1), and other
|
|
|
|
similar programs; that is, to hash a small number of passwords during
|
|
|
|
an interactive authentication dialogue with a human. It is not
|
|
|
|
suitable for use in bulk password-cracking applications, or in any
|
|
|
|
other situation where speed is more important than careful handling of
|
|
|
|
sensitive data. However, it *is* intended to be fast and lightweight
|
|
|
|
enough for use in servers that must field thousands of login attempts
|
|
|
|
per minute.
|
|
|
|
|
|
|
|
On Linux-based systems, by default libxcrypt will be binary backward
|
|
|
|
compatible with the libcrypt.so.1 shipped as part of the GNU C Library.
|
|
|
|
This means that all existing binary executables linked against glibc's
|
|
|
|
libcrypt should work unmodified with this library's libcrypt.so.1. We
|
|
|
|
have taken pains to provide exactly the same "symbol versions" as were
|
|
|
|
used by glibc on various CPU architectures, and to account for the
|
|
|
|
variety of ways in which the Openwall extensions were patched into
|
|
|
|
glibc's libcrypt by some Linux distributions. (For instance,
|
|
|
|
compatibility symlinks for SuSE's "libowcrypt" are provided.)
|
|
|
|
|
|
|
|
However, the converse is not true: programs linked against libxcrypt
|
|
|
|
will not work with glibc's libcrypt. Also, programs that use certain
|
|
|
|
legacy APIs supplied by glibc's libcrypt ('encrypt', 'encrypt_r',
|
|
|
|
'setkey', 'setkey_r', and 'fcrypt') cannot be compiled against libxcrypt.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
|
|
|
Requires: %{name}%{?_isa} == %{version}-%{release}
|
2018-01-20 11:22:19 +00:00
|
|
|
Requires: glibc-devel%{?_isa} >= 2.26.9000-46
|
|
|
|
Requires: glibc-headers%{?_isa} >= 2.26.9000-46
|
2018-01-12 19:49:45 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
%package static
|
|
|
|
Summary: Static library for -static linking with %{name}
|
|
|
|
|
|
|
|
Requires: %{name}-devel%{?_isa} == %{version}-%{release}
|
2018-01-20 11:22:19 +00:00
|
|
|
Requires: glibc-static%{?_isa} >= 2.26.9000-46
|
2018-01-12 19:49:45 +00:00
|
|
|
|
|
|
|
%description static
|
|
|
|
This package contains the libxcrypt static libraries for -static
|
|
|
|
linking. You don't need this, unless you link statically, which
|
|
|
|
is highly discouraged.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2018-01-27 16:14:06 +00:00
|
|
|
%autosetup -p 1
|
2018-01-12 19:49:45 +00:00
|
|
|
%{_bindir}/autoreconf -fiv
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure \
|
|
|
|
--libdir=/%{_lib} \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--enable-obsolete-api \
|
|
|
|
--enable-weak-hashes \
|
|
|
|
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
# Get rid of libtool crap.
|
|
|
|
%{_bindir}/find %{buildroot} -name '*.la' -print -delete
|
|
|
|
|
|
|
|
# We do not need libowcrypt.*, since it is a SUSE
|
|
|
|
# compat thing. Software needing it to be build can
|
|
|
|
# be patched easily to just link against '-lcrypt'.
|
|
|
|
%{_bindir}/find %{buildroot} -name 'libow*' -print -delete
|
|
|
|
|
|
|
|
# Install documentation to shared %%_pkgdocdir.
|
|
|
|
%{__install} -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \
|
|
|
|
ChangeLog NEWS README THANKS TODO
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%make_build check || \
|
|
|
|
{
|
|
|
|
rc=$?;
|
|
|
|
echo "-----BEGIN TESTLOG-----";
|
|
|
|
%{__cat} test-suite.log;
|
|
|
|
echo "-----END TESTLOG-----";
|
|
|
|
exit $rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license AUTHORS COPYING.LIB LICENSING
|
|
|
|
%doc %dir %{_pkgdocdir}
|
|
|
|
%doc %{_pkgdocdir}/NEWS
|
|
|
|
%doc %{_pkgdocdir}/README
|
|
|
|
%doc %{_pkgdocdir}/THANKS
|
|
|
|
/%{_lib}/.libcrypt.so.%{soc}.hmac
|
|
|
|
/%{_lib}/.libcrypt.so.%{sov}.hmac
|
|
|
|
/%{_lib}/libcrypt.so.%{soc}
|
|
|
|
/%{_lib}/libcrypt.so.%{sov}
|
|
|
|
%{_mandir}/man3/crypt_rn.3.*
|
|
|
|
%{_mandir}/man3/crypt_gensalt.3.*
|
|
|
|
%{_mandir}/man5/crypt.5.*
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%doc %{_pkgdocdir}/ChangeLog
|
|
|
|
%doc %{_pkgdocdir}/TODO
|
|
|
|
/%{_lib}/libcrypt.so
|
|
|
|
%{_includedir}/crypt.h
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
|
|
%files static
|
|
|
|
/%{_lib}/libcrypt.a
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2018-01-31 00:24:17 +00:00
|
|
|
* Wed Jan 31 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-2
|
|
|
|
- Add patch to fix bcrypt test with GCC8
|
|
|
|
|
2018-01-27 15:46:57 +00:00
|
|
|
* Sat Jan 27 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-1
|
|
|
|
- New upstream release
|
|
|
|
|
2018-01-22 16:43:21 +00:00
|
|
|
* Mon Jan 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.0.0-0.204.20180120git3436e7b
|
|
|
|
- Fix Obsoletes
|
|
|
|
|
2018-01-20 20:41:55 +00:00
|
|
|
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.203.20180120git3436e7b
|
|
|
|
- Update to new snapshot fixing cast-align
|
|
|
|
|
2018-01-20 20:21:31 +00:00
|
|
|
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.202.20180120gitde99d27
|
|
|
|
- Update to new snapshot (rhbz#1536752)
|
|
|
|
|
2018-01-20 11:22:19 +00:00
|
|
|
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.201.20171109git15447aa
|
|
|
|
- Use archful Obsoletes for libcrypt
|
|
|
|
- Add versioned Requires on glibc packages not shipping libcrypt
|
|
|
|
- Add comments about the packaging logic for replacing former libcrypt
|
|
|
|
|
2018-01-12 19:49:45 +00:00
|
|
|
* Fri Jan 12 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.200.20171109git15447aa
|
|
|
|
- Initial import (rhbz#1532794)
|
2018-01-19 21:34:00 +00:00
|
|
|
- Add Obsoletes/Provides for libcrypt
|
2018-01-12 19:49:45 +00:00
|
|
|
|
|
|
|
* Wed Jan 10 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.101.20171109git15447aa
|
|
|
|
- Fix style of %%git_{rel,ver}
|
|
|
|
|
|
|
|
* Tue Jan 09 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.100.git20171109.15447aa
|
|
|
|
- Initial rpm release (rhbz#1532794)
|
|
|
|
- Start revision at 0.100 to superseed builds from COPR
|