Blame SPECS/libxcrypt.spec

1f04f2
# Shared object version of libcrypt.
1f04f2
%global soc 1
1f04f2
%global sol 1
1f04f2
%global sof 0
1f04f2
%global sov %{soc}.%{sol}.%{sof}
1f04f2
1f04f2
# Add generation of HMAC checksums of the final stripped
1f04f2
# binaries.  %%define with lazy globbing is used here
1f04f2
# intentionally, because using %%global does not work.
1f04f2
%define __spec_install_post                                 \
1f04f2
%{?__debug_package:%{__debug_install_post}}                 \
1f04f2
%{__arch_install_post}                                      \
1f04f2
%{__os_install_post}                                        \
1f04f2
%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{sov} \
1f04f2
%{__ln_s} .libcrypt.so.%{sov}.hmac                          \\\
1f04f2
  %{buildroot}/%{_lib}/.libcrypt.so.%{soc}.hmac             \
1f04f2
%{nil}
1f04f2
1f04f2
1f04f2
Name:           libxcrypt
1f04f2
Version:        4.1.1
8a412b
Release:        6%{?dist}
1f04f2
Summary:        Extended crypt library for DES, MD5, Blowfish and others
1f04f2
1f04f2
# For explicit license breakdown, see the
1f04f2
# LICENSING file in the source tarball.
1f04f2
License:        LGPLv2+ and BSD and Public Domain
1f04f2
URL:            https://github.com/besser82/%{name}
1f04f2
Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
1f04f2
Patch1: libxcrypt-rh1612157.patch
1f04f2
Patch2: libxcrypt-rh1613537.patch
8a412b
# fix for salt interoperability issue: https://github.com/besser82/libxcrypt/pull/106
8a412b
Patch3: libxcrypt-rh1899716.patch
1f04f2
1f04f2
BuildRequires:  fipscheck
1f04f2
BuildRequires:  libtool
1f04f2
1f04f2
Requires:       glibc%{_isa}          >= 2.26.9000-46
1f04f2
1f04f2
# We do not need to keep this forever.
1f04f2
%if 0%{?fedora} && 0%{?fedora} <= 31
1f04f2
# Inherited from former libcrypt package.
1f04f2
Obsoletes:      libcrypt-nss          <= 2.26.9000-33
1f04f2
1f04f2
# Obsolete former libcrypt properly.
1f04f2
Obsoletes:      libcrypt              <= 2.26.9000-46
1f04f2
1f04f2
# Provide virtual libcrypt as it has been done
1f04f2
# by former libcrypt{,-nss} packages from glibc.
1f04f2
Provides:       libcrypt              == 2.26.9000-46.1
1f04f2
Provides:       libcrypt%{?_isa}      == 2.26.9000-46.1
1f04f2
%endif
1f04f2
1f04f2
%description
1f04f2
libxcrypt is a modern library for one-way hashing of passwords.  It
1f04f2
supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password
1f04f2
hashes, and provides the traditional Unix 'crypt' and 'crypt_r'
1f04f2
interfaces, as well as a set of extended interfaces pioneered by
1f04f2
Openwall Linux, 'crypt_rn', 'crypt_ra', 'crypt_gensalt',
1f04f2
'crypt_gensalt_rn', and 'crypt_gensalt_ra'.
1f04f2
1f04f2
libxcrypt is intended to be used by login(1), passwd(1), and other
1f04f2
similar programs; that is, to hash a small number of passwords during
1f04f2
an interactive authentication dialogue with a human.  It is not
1f04f2
suitable for use in bulk password-cracking applications, or in any
1f04f2
other situation where speed is more important than careful handling of
1f04f2
sensitive data.  However, it *is* intended to be fast and lightweight
1f04f2
enough for use in servers that must field thousands of login attempts
1f04f2
per minute.
1f04f2
1f04f2
On Linux-based systems, by default libxcrypt will be binary backward
1f04f2
compatible with the libcrypt.so.1 shipped as part of the GNU C Library.
1f04f2
This means that all existing binary executables linked against glibc's
1f04f2
libcrypt should work unmodified with this library's libcrypt.so.1.  We
1f04f2
have taken pains to provide exactly the same "symbol versions" as were
1f04f2
used by glibc on various CPU architectures, and to account for the
1f04f2
variety of ways in which the Openwall extensions were patched into
1f04f2
glibc's libcrypt by some Linux distributions.  (For instance,
1f04f2
compatibility symlinks for SuSE's "libowcrypt" are provided.)
1f04f2
1f04f2
However, the converse is not true: programs linked against libxcrypt
1f04f2
will not work with glibc's libcrypt.  Also, programs that use certain
1f04f2
legacy APIs supplied by glibc's libcrypt ('encrypt', 'encrypt_r',
1f04f2
'setkey', 'setkey_r', and 'fcrypt') cannot be compiled against libxcrypt.
1f04f2
1f04f2
1f04f2
%package        devel
1f04f2
Summary:        Development files for %{name}
1f04f2
1f04f2
Requires:       %{name}%{?_isa}       == %{version}-%{release}
1f04f2
Requires:       glibc-devel%{?_isa}   >= 2.26.9000-46
1f04f2
Requires:       glibc-headers%{?_isa} >= 2.26.9000-46
1f04f2
Conflicts:	man-pages < 4.15-3
1f04f2
1f04f2
%description    devel
1f04f2
The %{name}-devel package contains libraries and header files for
1f04f2
developing applications that use %{name}.
1f04f2
1f04f2
1f04f2
%package        static
1f04f2
Summary:        Static library for -static linking with %{name}
1f04f2
1f04f2
Requires:       %{name}-devel%{?_isa} == %{version}-%{release}
1f04f2
Requires:       glibc-static%{?_isa}  >= 2.26.9000-46
1f04f2
1f04f2
%description    static
1f04f2
This package contains the libxcrypt static libraries for -static
1f04f2
linking.  You don't need this, unless you link statically, which
1f04f2
is highly discouraged.
1f04f2
1f04f2
1f04f2
%prep
1f04f2
%autosetup -p 1
1f04f2
%{_bindir}/autoreconf -fiv
1f04f2
1f04f2
1f04f2
%build
1f04f2
%configure                     \
1f04f2
  --libdir=/%{_lib}            \
1f04f2
  --disable-silent-rules       \
1f04f2
  --enable-shared              \
1f04f2
  --enable-static              \
1f04f2
  --disable-failure-tokens     \
1f04f2
  --enable-hashes=all          \
1f04f2
  --enable-obsolete-api=glibc  \
1f04f2
  --with-pkgconfigdir=%{_libdir}/pkgconfig
1f04f2
%make_build
1f04f2
1f04f2
1f04f2
%install
1f04f2
%make_install
1f04f2
1f04f2
# Get rid of libtool crap.
1f04f2
%{_bindir}/find %{buildroot} -name '*.la' -print -delete
1f04f2
1f04f2
# Install documentation to shared %%_pkgdocdir.
1f04f2
%{__install} -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \
1f04f2
  ChangeLog NEWS README THANKS TODO
1f04f2
1f04f2
1f04f2
%check
1f04f2
%make_build check || \
1f04f2
  {
1f04f2
    rc=$?;
1f04f2
    echo "-----BEGIN TESTLOG-----";
1f04f2
    %{__cat} test-suite.log;
1f04f2
    echo "-----END TESTLOG-----";
1f04f2
    exit $rc;
1f04f2
  }
1f04f2
1f04f2
1f04f2
%ldconfig_scriptlets
1f04f2
1f04f2
1f04f2
%files
1f04f2
%license AUTHORS COPYING.LIB LICENSING
1f04f2
%doc %dir %{_pkgdocdir}
1f04f2
%doc %{_pkgdocdir}/NEWS
1f04f2
%doc %{_pkgdocdir}/README
1f04f2
%doc %{_pkgdocdir}/THANKS
1f04f2
/%{_lib}/.libcrypt.so.%{soc}.hmac
1f04f2
/%{_lib}/.libcrypt.so.%{sov}.hmac
1f04f2
/%{_lib}/libcrypt.so.%{soc}
1f04f2
/%{_lib}/libcrypt.so.%{sov}
1f04f2
%{_mandir}/man5/crypt.5.*
1f04f2
1f04f2
1f04f2
%files          devel
1f04f2
%doc %{_pkgdocdir}/ChangeLog
1f04f2
%doc %{_pkgdocdir}/TODO
1f04f2
/%{_lib}/libcrypt.so
1f04f2
%{_includedir}/crypt.h
1f04f2
%{_libdir}/pkgconfig/libcrypt.pc
1f04f2
%{_libdir}/pkgconfig/%{name}.pc
1f04f2
%{_mandir}/man3/crypt.3.*
1f04f2
%{_mandir}/man3/crypt_r.3.*
1f04f2
%{_mandir}/man3/crypt_ra.3.*
1f04f2
%{_mandir}/man3/crypt_rn.3.*
1f04f2
%{_mandir}/man3/crypt_gensalt.3.*
1f04f2
1f04f2
%files          static
1f04f2
/%{_lib}/libcrypt.a
1f04f2
1f04f2
1f04f2
%changelog
8a412b
* Thu Apr 29 2021 Stanislav Zidek <szidek@redhat.com> - 4.1.1-6
8a412b
+ libxcrypt-4.1.1-6
8a412b
- Rebuilt with fixed binutils (#1954438)
8a412b
8a412b
* Wed Apr  7 2021 Stanislav Zidek <szidek@redhat.com> - 4.1.1-5
8a412b
- Fixed salt interoperability issue (#1899716)
8a412b
1f04f2
* Wed Aug  8 2018 Florian Weimer <fweimer@redhat.com> - 4.1.1-4
1f04f2
- Move development panpages to libxcrypt-devel (#1613824)
1f04f2
1f04f2
* Wed Aug  8 2018 Florian Weimer <fweimer@redhat.com> - 4.1.1-3
1f04f2
- Change crypt, crypt_r to return NULL on failure (#1613537)
1f04f2
1f04f2
* Wed Aug  8 2018 Florian Weimer <fweimer@redhat.com> - 4.1.1-2
1f04f2
- Add manpages aliases for crypt, crypt_r, crypt_ra (#1612157)
1f04f2
1f04f2
* Wed Aug 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-1
1f04f2
- New upstream release
1f04f2
1f04f2
* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.0-1
1f04f2
- New upstream release
1f04f2
1f04f2
* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-6
1f04f2
- Make testsuite fail on error again
1f04f2
- Update patch0 with more upstream fixes
1f04f2
1f04f2
* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-5
1f04f2
- Add patch to update to recent development branch
1f04f2
- Re-enable SUNMD5 support as it is BSD licensed now
1f04f2
- Build compatibility symbols for glibc only
1f04f2
- Skip failing testsuite once
1f04f2
1f04f2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
1f04f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1f04f2
1f04f2
* Fri Jun 29 2018 Florian Weimer <fweimer@redhat.com> - 4.0.1-3
1f04f2
- Remove CDDL from license list (#1592445)
1f04f2
1f04f2
* Fri Jun 29 2018 Florian Weimer <fweimer@redhat.com> - 4.0.1-2
1f04f2
- Remove SUNMD5 support (#1592445)
1f04f2
1f04f2
* Wed May 16 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-1
1f04f2
- New upstream release
1f04f2
1f04f2
* Sat Feb 17 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-5
1f04f2
- Switch to %%ldconfig_scriptlets
1f04f2
1f04f2
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-4
1f04f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1f04f2
1f04f2
* Thu Feb 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-3
1f04f2
- Add patch to fix unintialize value in badsalt test
1f04f2
1f04f2
* Wed Jan 31 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-2
1f04f2
- Add patch to fix bcrypt test with GCC8
1f04f2
1f04f2
* Sat Jan 27 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-1
1f04f2
- New upstream release
1f04f2
1f04f2
* Mon Jan 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.0.0-0.204.20180120git3436e7b
1f04f2
- Fix Obsoletes
1f04f2
1f04f2
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.203.20180120git3436e7b
1f04f2
- Update to new snapshot fixing cast-align
1f04f2
1f04f2
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.202.20180120gitde99d27
1f04f2
- Update to new snapshot (rhbz#1536752)
1f04f2
1f04f2
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.201.20171109git15447aa
1f04f2
- Use archful Obsoletes for libcrypt
1f04f2
- Add versioned Requires on glibc packages not shipping libcrypt
1f04f2
- Add comments about the packaging logic for replacing former libcrypt
1f04f2
1f04f2
* Fri Jan 12 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.200.20171109git15447aa
1f04f2
- Initial import (rhbz#1532794)
1f04f2
- Add Obsoletes/Provides for libcrypt
1f04f2
1f04f2
* Wed Jan 10 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.101.20171109git15447aa
1f04f2
- Fix style of %%git_{rel,ver}
1f04f2
1f04f2
* Tue Jan 09 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.100.git20171109.15447aa
1f04f2
- Initial rpm release (rhbz#1532794)
1f04f2
- Start revision at 0.100 to superseed builds from COPR