Drop Python 2 bindings completely
This commit is contained in:
parent
2e9952380c
commit
a11e8f0582
@ -5,7 +5,7 @@
|
||||
Summary: A password-checking library
|
||||
Name: cracklib
|
||||
Version: 2.9.6
|
||||
Release: 20%{?dist}
|
||||
Release: 21%{?dist}
|
||||
Source0: https://github.com/cracklib/cracklib/releases/download/cracklib-%{version}/cracklib-%{version}.tar.gz
|
||||
Source1: https://github.com/cracklib/cracklib/releases/download/cracklib-%{version}/cracklib-words-%{version}.gz
|
||||
|
||||
@ -33,9 +33,6 @@ BuildRequires: gcc
|
||||
BuildRequires: words, gettext
|
||||
BuildRequires: gettext-autopoint
|
||||
BuildRequires: zlib-devel
|
||||
%if 0%{?rhel} == 0
|
||||
BuildRequires: python2-devel
|
||||
%endif
|
||||
Conflicts: cracklib-dicts < 2.8
|
||||
# The cracklib-format script calls gzip, but without a specific path.
|
||||
Requires: gzip
|
||||
@ -66,21 +63,6 @@ Requires: %{name} = %{version}-%{release}
|
||||
The cracklib-devel package contains the header files and libraries needed
|
||||
for compiling applications which use cracklib.
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%package -n python2-cracklib
|
||||
Summary: Python bindings for applications which use cracklib
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-cracklib}
|
||||
# Remove before F30
|
||||
Provides: %{name}-python = %{version}-%{release}
|
||||
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-python < %{version}-%{release}
|
||||
|
||||
%description -n python2-cracklib
|
||||
The cracklib-python package contains a module which permits applications
|
||||
written in the Python programming language to use cracklib.
|
||||
%endif
|
||||
|
||||
%package dicts
|
||||
Summary: The standard CrackLib dictionaries
|
||||
BuildRequires: words >= 2-13
|
||||
@ -121,11 +103,7 @@ chmod +x util/cracklib-format
|
||||
# Use the dictionary from the build to test
|
||||
sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in
|
||||
%configure --with-pic \
|
||||
%if 0%{?rhel} == 0
|
||||
--with-python \
|
||||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
--with-default-dict=%{dictpath} --disable-static
|
||||
make -C po update-gmo
|
||||
make
|
||||
@ -171,35 +149,6 @@ fi
|
||||
|
||||
%check
|
||||
make test DESTDIR=$RPM_BUILD_ROOT
|
||||
%if 0%{?rhel} == 0
|
||||
# We want to check that the new library is able to open the new dictionaries,
|
||||
# using the new python module.
|
||||
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} %{__python2} 2>&1 << EOF
|
||||
import string, sys
|
||||
# Prepend buildroot-specific variations of the python path to the python path.
|
||||
syspath2=[]
|
||||
for element in sys.path:
|
||||
syspath2.append("$RPM_BUILD_ROOT/" + element)
|
||||
syspath2.reverse()
|
||||
for element in syspath2:
|
||||
sys.path.insert(0,element)
|
||||
# Now actually do the test. If we get a different result, or throw an
|
||||
# exception, the script will end with the error.
|
||||
import cracklib
|
||||
try:
|
||||
s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}")
|
||||
except ValueError, message:
|
||||
expected = "it is based on a dictionary word"
|
||||
if message != expected:
|
||||
print "Got unexpected result \"%s\"," % messgae,
|
||||
print "instead of expected value of \"%s\"." % expected
|
||||
sys.exit(1)
|
||||
print "Got expected result \"%s\"," % message
|
||||
sys.exit(0)
|
||||
finally:
|
||||
sys.exit(0)
|
||||
EOF
|
||||
%endif
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
@ -225,13 +174,10 @@ EOF
|
||||
%{_sbindir}/mkdict
|
||||
%{_sbindir}/packer
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%files -n python2-cracklib
|
||||
%{_libdir}/python*/site-packages/_cracklib*.so
|
||||
%{_libdir}/python*/site-packages/*.py*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 9 2019 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-21
|
||||
- Drop Python 2 bindings completely
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user