libxcrypt: initial build as rx-libxcrypt
This commit is contained in:
parent
492c50f483
commit
e081132438
180
rx-libxcrypt/libxcrypt.spec
Normal file
180
rx-libxcrypt/libxcrypt.spec
Normal file
@ -0,0 +1,180 @@
|
||||
# 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} \
|
||||
%{_sysbindir}/fipshmac %{buildroot}/%{_libdir}/libcrypt.so.%{sov} \
|
||||
%{__ln_s} .libcrypt.so.%{sov}.hmac \\\
|
||||
%{buildroot}/%{_libdir}/.libcrypt.so.%{soc}.hmac \
|
||||
%{nil}
|
||||
|
||||
%global _sysbindir %_bindir
|
||||
|
||||
%global realname libxcrypt
|
||||
%global _prefix /opt/rx
|
||||
%global _datadir %{_prefix}/share
|
||||
%global _mandir %{_datadir}/man
|
||||
|
||||
|
||||
Name: rx-libxcrypt
|
||||
Version: 4.4.17
|
||||
Release: 1%{?dist}
|
||||
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 Public Domain
|
||||
URL: https://github.com/besser82/libxcrypt
|
||||
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: fipscheck
|
||||
BuildRequires: libtool
|
||||
|
||||
Requires: glibc%{_isa}
|
||||
|
||||
%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}
|
||||
Requires: glibc-devel%{?_isa}
|
||||
Requires: glibc-headers%{?_isa}
|
||||
Conflicts: man-pages < 4.15-3
|
||||
|
||||
%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}
|
||||
Requires: glibc-static%{?_isa}
|
||||
|
||||
%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
|
||||
%autosetup -p 1 -n %{realname}-%{version}
|
||||
autoreconf -fiv
|
||||
|
||||
|
||||
%build
|
||||
export CFLAGS="-Wno-error=sign-conversion -Wno-error=missing-attributes $CFLAGS"
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-failure-tokens \
|
||||
--enable-hashes=all \
|
||||
--enable-obsolete-api=glibc \
|
||||
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# Get rid of libtool crap.
|
||||
find %{buildroot} -name '*.la' -print -delete
|
||||
|
||||
# Install documentation to shared %%_pkgdocdir.
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||
install -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \
|
||||
ChangeLog NEWS README THANKS TODO AUTHORS COPYING.LIB LICENSING
|
||||
|
||||
|
||||
%check
|
||||
%make_build check || \
|
||||
{
|
||||
rc=$?;
|
||||
echo "-----BEGIN TESTLOG-----";
|
||||
%{__cat} test-suite.log;
|
||||
echo "-----END TESTLOG-----";
|
||||
exit $rc;
|
||||
}
|
||||
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%dir %{_pkgdocdir}
|
||||
%{_pkgdocdir}/NEWS
|
||||
%{_pkgdocdir}/README
|
||||
%{_pkgdocdir}/THANKS
|
||||
%{_pkgdocdir}/AUTHORS
|
||||
%{_pkgdocdir}/COPYING.LIB
|
||||
%{_pkgdocdir}/LICENSING
|
||||
%{_libdir}/.libcrypt.so.%{soc}.hmac
|
||||
%{_libdir}/.libcrypt.so.%{sov}.hmac
|
||||
%{_libdir}/libcrypt.so.%{soc}
|
||||
%{_libdir}/libcrypt.so.%{sov}
|
||||
%{_mandir}/man5/crypt.5*
|
||||
|
||||
|
||||
%files devel
|
||||
%{_pkgdocdir}/ChangeLog
|
||||
%{_pkgdocdir}/TODO
|
||||
%{_libdir}/libcrypt.so
|
||||
%{_libdir}/libxcrypt.so
|
||||
%{_includedir}/*crypt.h
|
||||
%{_libdir}/pkgconfig/libcrypt.pc
|
||||
%{_libdir}/pkgconfig/%{realname}.pc
|
||||
%{_mandir}/man3/crypt.3*
|
||||
%{_mandir}/man3/crypt_r.3*
|
||||
%{_mandir}/man3/crypt_ra.3*
|
||||
%{_mandir}/man3/crypt_rn.3*
|
||||
%{_mandir}/man3/crypt_gensalt.3*
|
||||
%{_mandir}/man3/crypt_checksalt.3*
|
||||
%{_mandir}/man3/crypt_gensalt_ra.3*
|
||||
%{_mandir}/man3/crypt_gensalt_rn.3*
|
||||
%{_mandir}/man3/crypt_preferred_method.3*
|
||||
|
||||
%files static
|
||||
%{_libdir}/libcrypt.a
|
||||
%{_libdir}/libxcrypt.a
|
Loading…
x
Reference in New Issue
Block a user