diff --git a/cracklib-2.10.2.tar.xz b/cracklib-2.10.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..8e594fc24dfabfbc809d22efa35b955db276b03a Binary files /dev/null and b/cracklib-2.10.2.tar.xz differ diff --git a/cracklib-2.9.11.tar.gz b/cracklib-2.9.11.tar.gz deleted file mode 100644 index 99ab397bafde71dfefd6bc84ecc9404ee29c6bf1..0000000000000000000000000000000000000000 Binary files a/cracklib-2.9.11.tar.gz and /dev/null differ diff --git a/cracklib-words-2.9.11.gz b/cracklib-words-2.10.2.gz similarity index 99% rename from cracklib-words-2.9.11.gz rename to cracklib-words-2.10.2.gz index 4be0a0114d798000ebda58efd94ac3f9bfa9b6f4..515f08352f5c42f174b6cd0e01d34d0601d78d3e 100644 Binary files a/cracklib-words-2.9.11.gz and b/cracklib-words-2.10.2.gz differ diff --git a/cracklib.spec b/cracklib.spec index 5fc4882c76b3f2048df08199814a169dc7cc77f0..7dd02e7804e911f9614c6e77164c9966a9aedbe1 100644 --- a/cracklib.spec +++ b/cracklib.spec @@ -2,28 +2,22 @@ %define dictpath %{dictdir}/pw_dict Name: cracklib -Version: 2.9.11 +Version: 2.10.2 Release: 1 Summary: A password-checking library -License: LGPLv2+ -URL: http://sourceforge.net/projects/cracklib/ -Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.gz +License: LGPL-2.1-or-later +URL: https://github.com/cracklib/cracklib +Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.xz Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz -Patch0: fix-problem-of-error-message-about-simplistic-passwo.patch -Patch1: fix-error-length-about-simplistic-password.patch - -BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel +BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel, chrpath BuildRequires: python3-devel Conflicts: cracklib-dicts < 2.8 Requires: gzip Provides: cracklib-dicts = %{version}-%{release} -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: cracklib-dicts < %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} %description CrackLib tests passwords to determine whether they match certain @@ -47,6 +41,7 @@ for compiling applications which use cracklib. %package -n python3-cracklib Summary: Python 3 bindings for applications which use cracklib Requires: %{name} = %{version}-%{release} +Obsoletes: %{name}-python < %{version}-%{release} %description -n python3-cracklib The python3-cracklib package contains a module which permits applications @@ -63,24 +58,16 @@ done chmod +x util/cracklib-format %build -sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in -py3include=`python3-config --includes | awk -F' ' '{print $1;}'` -export PYTHON=%{__python3} -export CFLAGS="%{optflags} $py3include" -abiflags=`python3-config --abiflags` -py_version="%{python3_version}$abiflags" %configure \ - am_cv_python_version="$py_version" \ --disable-static \ --with-pic \ --with-python \ --with-default-dict=%{dictpath} -make -C po update-gmo -make +%make_build %install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT 'pythondir=${pyexecdir}' +%make_install +%delete_la ./util/cracklib-format cracklib-dicts/* | \ ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath} @@ -103,20 +90,15 @@ ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi fi -rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/_cracklib*.*a -rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la %find_lang %{name} %check -make test - -%ldconfig_scriptlets +%make_build test %files -f %{name}.lang -%defattr(-,root,root) -%doc README-LICENSE AUTHORS -%license COPYING.LIB +%doc AUTHORS +%license COPYING.LIB README-LICENSE %{_sbindir}/*cracklib* %{_sbindir}/mkdict %{_sbindir}/packer @@ -132,16 +114,20 @@ make test %{_libdir}/libcrack.so %files help -%doc README README-WORDS NEWS +%doc README README-WORDS NEWS README-DAWG AUTHORS %{_mandir}/man3/* %{_mandir}/man8/* %files -n python3-cracklib -%{_libdir}/python3*/site-packages/_cracklib*.so -%{_libdir}/python3*/site-packages/*.py* -%{_libdir}/python3*/site-packages/__pycache__/* +%{python3_sitearch}/_cracklib*.so +%{python3_sitelib}/*.py +%{python3_sitelib}/__pycache__ %changelog +* Mon Aug 05 2024 Funda Wang - 2.10.2-1 +- update to 2.10.2 +- force words as gz compressed + * Fri Jul 14 2023 yixiangzhike - 2.9.11-1 - update to 2.9.11 diff --git a/fix-error-length-about-simplistic-password.patch b/fix-error-length-about-simplistic-password.patch deleted file mode 100644 index fc97889a5964afd7a332d828520e50326e079e43..0000000000000000000000000000000000000000 --- a/fix-error-length-about-simplistic-password.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7d4b42752a11b12088baad881a6e2cac3da638e7 Mon Sep 17 00:00:00 2001 -From: yixiangzhike -Date: Sat, 13 Aug 2022 13:04:17 +0800 -Subject: [PATCH] fix error length about simplistic password - ---- - util/cracklib-format | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/util/cracklib-format b/util/cracklib-format -index 360d109..2c1f61f 100755 ---- a/util/cracklib-format -+++ b/util/cracklib-format -@@ -6,7 +6,7 @@ - LC_ALL=C - export LC_ALL - gzip -cdf "$@" | -- grep -a -E -v '^.{30,}$' | -+ grep -a -E -v '^.{32,}$' | - tr '[:upper:]' '[:lower:]' | - sed s/[[:space:]]//g | - sort -u --- -2.33.0 - diff --git a/fix-problem-of-error-message-about-simplistic-passwo.patch b/fix-problem-of-error-message-about-simplistic-passwo.patch deleted file mode 100644 index e6730e15086f5200c7e84bcd2c4dfbcaa84902da..0000000000000000000000000000000000000000 --- a/fix-problem-of-error-message-about-simplistic-passwo.patch +++ /dev/null @@ -1,135 +0,0 @@ -From e97dc89876ffd790aed93cc18c13c16bd2263f68 Mon Sep 17 00:00:00 2001 -From: openEuler Buildteam -Date: Sat, 18 Jan 2020 14:08:23 +0800 -Subject: [PATCH] fix problem of error message about simplistic password - -Signed-off-by: openEuler Buildteam ---- - lib/fascist.c | 33 ++++++++++++++++++++++++++++----- - util/cracklib-format | 19 ++++++---- - 2 files changed, 34 insertions(+), 18 deletions(-) - -diff --git a/lib/fascist.c b/lib/fascist.c -index c5a018c..a1a8564 100644 ---- a/lib/fascist.c -+++ b/lib/fascist.c -@@ -55,7 +55,6 @@ static char *r_destructors[] = { - - "/?p@?p", /* purging out punctuation/symbols/junk */ - "/?s@?s", -- "/?X@?X", - - /* attempt reverse engineering of password strings */ - -@@ -452,6 +451,12 @@ GTry(rawtext, password) - continue; - } - -+ if (len - strlen(mp) >= 3) -+ { -+ /* purged too much */ -+ continue; -+ } -+ - #ifdef DEBUG - printf("%-16s = %-16s (destruct %s)\n", mp, rawtext, r_destructors[i]); - #endif -@@ -478,6 +483,12 @@ GTry(rawtext, password) - continue; - } - -+ if (len - strlen(mp) >= 3) -+ { -+ /* purged too much */ -+ continue; -+ } -+ - #ifdef DEBUG - printf("%-16s = %-16s (construct %s)\n", mp, password, r_constructors[i]); - #endif -@@ -705,6 +716,7 @@ FascistLookUser(PWDICT *pwp, char *instring, - char *password; - char rpassword[STRINGSIZE]; - uint32_t notfound; -+ int len; - - notfound = PW_WORDS(pwp); - /* already truncated if from FascistCheck() */ -@@ -754,6 +766,7 @@ FascistLookUser(PWDICT *pwp, char *instring, - return _("it is all whitespace"); - } - -+ len = strlen(password); - i = 0; - ptr = password; - while (ptr[0] && ptr[1]) -@@ -765,10 +778,7 @@ FascistLookUser(PWDICT *pwp, char *instring, - ptr++; - } - -- /* Change by Ben Karsin from ITS at University of Hawaii at Manoa. Static MAXSTEP -- would generate many false positives for long passwords. */ -- maxrepeat = 3+(0.09*strlen(password)); -- if (i > maxrepeat) -+ if (len - i < MINLEN) - { - return _("it is too simplistic/systematic"); - } -@@ -801,6 +811,12 @@ FascistLookUser(PWDICT *pwp, char *instring, - continue; - } - -+ if (len - strlen(a) >= 3) -+ { -+ /* purged too much */ -+ continue; -+ } -+ - #ifdef DEBUG - printf("%-16s (dict)\n", a); - #endif -@@ -821,6 +837,13 @@ FascistLookUser(PWDICT *pwp, char *instring, - { - continue; - } -+ -+ if (len - strlen(a) >= 3) -+ { -+ /* purged too much */ -+ continue; -+ } -+ - #ifdef DEBUG - printf("%-16s (reversed dict)\n", a); - #endif -diff --git a/util/cracklib-format b/util/cracklib-format -index c133d75..360d109 100755 ---- a/util/cracklib-format -+++ b/util/cracklib-format -@@ -3,17 +3,10 @@ - # This preprocesses a set of word lists into a suitable form for input - # into cracklib-packer - # --# Truncates lines longer than 1022 characters long as cracklib-packer --# does not handle them correctly. --# --# The last part of the pipeline uses 'grep -v' to remove any blank --# lines (possibly introduced by earlier parts of the pipeline) as --# cracklib-packer will generate "skipping line" warnings otherwise. --# -+LC_ALL=C -+export LC_ALL - gzip -cdf "$@" | -- grep -a -v '^#' | -- tr '[A-Z]' '[a-z]' | -- tr -cd '\012[a-z][0-9]' | -- cut -c 1-1022 | -- grep -v '^$' | -- env LC_ALL=C sort -u -+ grep -a -E -v '^.{30,}$' | -+ tr '[:upper:]' '[:lower:]' | -+ sed s/[[:space:]]//g | -+ sort -u --- -1.8.3.1 -