|
|
|
@ -5,7 +5,8 @@
|
|
|
|
|
Summary: A password-checking library
|
|
|
|
|
Name: cracklib
|
|
|
|
|
Version: 2.9.6
|
|
|
|
|
Release: 27%{?dist}
|
|
|
|
|
Release: 15%{?dist}
|
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -25,14 +26,17 @@ Patch4: cracklib-2.9.6-packlib-reentrant.patch
|
|
|
|
|
Patch6: cracklib-2.9.6-simplistic.patch
|
|
|
|
|
Patch7: cracklib-2.9.6-translation-updates.patch
|
|
|
|
|
Patch8: cracklib-2.9.6-cve-2016-6318.patch
|
|
|
|
|
Patch9: cracklib-2.9.6-coverity.patch
|
|
|
|
|
Patch10: cracklib-2.9.6-lookup.patch
|
|
|
|
|
Patch9: cracklib-2.9.6-lookup.patch
|
|
|
|
|
URL: http://sourceforge.net/projects/cracklib/
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
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
|
|
|
|
@ -57,16 +61,33 @@ CrackLib, you will also want to install the cracklib-dicts package.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files needed for building applications which use cracklib
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
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
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
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
|
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
|
BuildRequires: words >= 2-13
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
Requires: cracklib = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description dicts
|
|
|
|
@ -90,8 +111,7 @@ install -p -m 644 %{SOURCE3} po/zh_CN.po
|
|
|
|
|
%patch6 -p1 -b .simplistic
|
|
|
|
|
%patch7 -p1 -b .translations
|
|
|
|
|
%patch8 -p1 -b .overflow
|
|
|
|
|
%patch9 -p1 -b .coverity
|
|
|
|
|
%patch10 -p1 -b .lookup
|
|
|
|
|
%patch9 -p1 -b .lookup
|
|
|
|
|
|
|
|
|
|
mkdir cracklib-dicts
|
|
|
|
|
for dict in %{SOURCE10} %{SOURCE1}
|
|
|
|
@ -104,14 +124,18 @@ 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
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
%make_install 'pythondir=${pyexecdir}'
|
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT 'pythondir=${pyexecdir}'
|
|
|
|
|
./util/cracklib-format cracklib-dicts/* | \
|
|
|
|
|
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
|
|
|
|
|
./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
|
|
|
|
@ -150,6 +174,35 @@ 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
|
|
|
|
|
|
|
|
|
@ -175,51 +228,19 @@ make test DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
%{_sbindir}/mkdict
|
|
|
|
|
%{_sbindir}/packer
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.6-27
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.6-26
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-25
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-24
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 2.9.6-23
|
|
|
|
|
- Use make macros
|
|
|
|
|
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
%files -n python2-cracklib
|
|
|
|
|
%{_libdir}/python*/site-packages/_cracklib*.so
|
|
|
|
|
%{_libdir}/python*/site-packages/*.py*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-22
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-19
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Nov 26 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-18
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Nov 26 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-15
|
|
|
|
|
- Fix regression in dictionary creation and lookup
|
|
|
|
|
|
|
|
|
|
* Wed Oct 10 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-17
|
|
|
|
|
- Fix minor bug found in the Coverity scan
|
|
|
|
|
|
|
|
|
|
* Tue Oct 9 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-16
|
|
|
|
|
* Tue Oct 9 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-14
|
|
|
|
|
- Updated translations
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-15
|
|
|
|
|
- The test must use the dictionary from the build
|
|
|
|
|
|
|
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-14
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Feb 21 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-13
|
|
|
|
|
- Drop Python 2 support in RHEL
|
|
|
|
|
|
|
|
|
|