support python3.12 and fix import distutils fail
This commit is contained in:
parent
b2b4d453ac
commit
9f13e73259
|
@ -1,3 +1,10 @@
|
|||
cracklib2 (2.9.6-ok3) nile; urgency=medium
|
||||
|
||||
* support python3.12.
|
||||
* fix No module named distutils.
|
||||
|
||||
-- liwenjun <liwenjun@kylinos.cn> Wed, 14 Aug 2024 15:13:50 +0800
|
||||
|
||||
cracklib2 (2.9.6-ok2) yangtze; urgency=medium
|
||||
|
||||
* Fix python install error.
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
From: Rewnosor <liwenjun@kylinos.cn>
|
||||
Date: Wed, 14 Aug 2024 15:16:35 +0800
|
||||
Subject: support python3.12 and fix import distutils fail
|
||||
|
||||
---
|
||||
python/test_cracklib.py | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/python/test_cracklib.py b/python/test_cracklib.py
|
||||
index 6c56885..ffa13b9 100644
|
||||
--- a/python/test_cracklib.py
|
||||
+++ b/python/test_cracklib.py
|
||||
@@ -76,41 +76,41 @@ class TestModuleFunctions(unittest.TestCase):
|
||||
def test_simple_lower(self):
|
||||
for passwd in ['t' * i for i in range(
|
||||
cracklib.MIN_LENGTH - cracklib.LOW_CREDIT)]:
|
||||
- self.assertEquals(
|
||||
+ self.assertEqual(
|
||||
1, cracklib.simple(passwd),
|
||||
'password {0} should be detected as too simple'.format(
|
||||
passwd))
|
||||
- self.assertEquals(0, cracklib.simple(
|
||||
+ self.assertEqual(0, cracklib.simple(
|
||||
't' * (cracklib.MIN_LENGTH - cracklib.LOW_CREDIT)))
|
||||
|
||||
def test_simple_upper(self):
|
||||
for passwd in ['T' * i for i in range(
|
||||
cracklib.MIN_LENGTH - cracklib.UP_CREDIT)]:
|
||||
- self.assertEquals(
|
||||
+ self.assertEqual(
|
||||
1, cracklib.simple(passwd),
|
||||
'password {0} should be detected as too simple'.format(
|
||||
passwd))
|
||||
- self.assertEquals(0, cracklib.simple(
|
||||
+ self.assertEqual(0, cracklib.simple(
|
||||
'T' * (cracklib.MIN_LENGTH - cracklib.UP_CREDIT)))
|
||||
|
||||
def test_simple_digit(self):
|
||||
for passwd in ['1' * i for i in range(
|
||||
cracklib.MIN_LENGTH - cracklib.DIG_CREDIT)]:
|
||||
- self.assertEquals(
|
||||
+ self.assertEqual(
|
||||
1, cracklib.simple(passwd),
|
||||
'password {0} should be detected as too simple'.format(
|
||||
passwd))
|
||||
- self.assertEquals(0, cracklib.simple(
|
||||
+ self.assertEqual(0, cracklib.simple(
|
||||
'1' * (cracklib.MIN_LENGTH - cracklib.DIG_CREDIT)))
|
||||
|
||||
def test_simple_other(self):
|
||||
for passwd in ['#' * i for i in range(
|
||||
cracklib.MIN_LENGTH - cracklib.OTH_CREDIT)]:
|
||||
- self.assertEquals(
|
||||
+ self.assertEqual(
|
||||
1, cracklib.simple(passwd),
|
||||
'password {0} should be detected as too simple'.format(
|
||||
passwd))
|
||||
- self.assertEquals(0, cracklib.simple(
|
||||
+ self.assertEqual(0, cracklib.simple(
|
||||
'#' * (cracklib.MIN_LENGTH - cracklib.OTH_CREDIT)))
|
||||
|
||||
def test_simple_combinations(self):
|
||||
@@ -119,11 +119,11 @@ class TestModuleFunctions(unittest.TestCase):
|
||||
cracklib.MIN_LENGTH -
|
||||
cracklib.LOW_CREDIT -
|
||||
cracklib.OTH_CREDIT)]:
|
||||
- self.assertEquals(
|
||||
+ self.assertEqual(
|
||||
1, cracklib.simple(passwd),
|
||||
'password {0} should be detected as too simple'.format(
|
||||
passwd))
|
||||
- self.assertEquals(0, cracklib.simple(
|
||||
+ self.assertEqual(0, cracklib.simple(
|
||||
testset[:(cracklib.MIN_LENGTH - cracklib.LOW_CREDIT -
|
||||
cracklib.OTH_CREDIT)]))
|
||||
|
|
@ -3,3 +3,4 @@ libcrack2-error-safer-check-variant.patch
|
|||
improve_test_737040.patch
|
||||
CVE-2016-6318.patch
|
||||
overflow-processing-long-words.patch
|
||||
0006-support-python3.12-and-fix-import-distutils-fail.patch
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
include /usr/share/dpkg/buildflags.mk
|
||||
|
|
Loading…
Reference in New Issue