diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-05-10 00:01:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-05-10 00:01:14 +0100 |
commit | 17e5f1ea4a2e1c5664f96480ca46348d008e8711 (patch) | |
tree | 7166d1b58a582290a4ad23ff5882cca911b8035c /sys-libs/cracklib | |
parent | a0ce545d52f231499bf9f3644493113d8af58ec9 (diff) |
gentoo auto-resync : 10:05:2024 - 00:01:13
Diffstat (limited to 'sys-libs/cracklib')
-rw-r--r-- | sys-libs/cracklib/Manifest | 3 | ||||
-rw-r--r-- | sys-libs/cracklib/cracklib-2.9.11.ebuild | 10 | ||||
-rw-r--r-- | sys-libs/cracklib/files/cracklib-2.9.11-py3.12-tests.patch | 80 |
3 files changed, 89 insertions, 4 deletions
diff --git a/sys-libs/cracklib/Manifest b/sys-libs/cracklib/Manifest index 54e90d032926..1104bbd3b7d4 100644 --- a/sys-libs/cracklib/Manifest +++ b/sys-libs/cracklib/Manifest @@ -1,3 +1,4 @@ +AUX cracklib-2.9.11-py3.12-tests.patch 3388 BLAKE2B af1ad743eea771cbd3465aa0c5cc3ba9832bf3f3aab0c6fc229f65c14f4e1b056d2655e0af4d02ff0edc033e79f7f7a884fec4bc4e579dd13fb7cad0bf4bf91d SHA512 c8b0e532af7c518d5c87ecc161ae2fa9380f2b5ab61b658a839d1629f7441f8079ca00979332825e195fc5ae7c194bf03a9dac3852a1f5de94dff2c97eb989b6 DIST cracklib-2.9.11.tar.xz 461116 BLAKE2B 46b499e465c1c268b772781a9c8ce573a5167ae2e0ac919b403acdb9a14c35140dfb53909eef6e41600e26c2f87d905b3d6d05380c66f053d091765b58a264f4 SHA512 c32e509f757344a1f0b7032ad3b6dc47a8759852a94e511c92073d85bce55f45d48c389d9eb34c993e1d61ad5c1542150672f3e8bc147148ebbb04d3319a2409 -EBUILD cracklib-2.9.11.ebuild 2965 BLAKE2B 45d4ce00f9865292088adc3545c2510da4c5fa8d4aea3a9fbe3a03a8a1cdb1ee8d05b0146800dd504d6c6129d40d805d5d1015bcc51d6e87fba20c372103644f SHA512 15b3125d572877c095412a1c73842296c7e5244adc1bdc5fe35dff7e7764f865510b8971f14db9ce46bee02fffca4ccc37332ded7acef71967ec84638c6aee12 +EBUILD cracklib-2.9.11.ebuild 3033 BLAKE2B 14aa0a6000c604e0e16ffe828d80bc539452dba55982c09ca17e1dee33675acfa151562a6ef0eb66f1df3bef23014a68dbd088e92a3eb31cda13359d8d915fa6 SHA512 6a26776f7c509d9110ed6cb6e3222863efae7808ea22b8c78aec7e7a137fc8e78d2350349d7b649d4f1b1a3ce119993ceef2bd63a43806f71dedbd3da91df582 MISC metadata.xml 385 BLAKE2B f81e1ac44f5a4c3f647473385363eed564accca3b62ecde3cb35fab14112af1ceb2a25dc2816fc096aee9c3ed15006252f32491583861689ed70d49218684360 SHA512 6d9908f12c310ef22feeae2216236f9b632dc5204916fbb5693cc53bb58e592dc44f49c45d2c8bc22addd69cc5e4e63df463a23299d09a637f4f0f7379e7b796 diff --git a/sys-libs/cracklib/cracklib-2.9.11.ebuild b/sys-libs/cracklib/cracklib-2.9.11.ebuild index 8be12c0d3441..185419828d79 100644 --- a/sys-libs/cracklib/cracklib-2.9.11.ebuild +++ b/sys-libs/cracklib/cracklib-2.9.11.ebuild @@ -1,13 +1,13 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Note: ideally bump with sys-apps/cracklib-words - +DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 libtool multilib-minimal usr-ldscript MY_P=${P/_} @@ -35,6 +35,10 @@ BDEPEND=" python? ( ${DISTUTILS_DEPS} ) " +PATCHES=( + "${FILESDIR}"/${P}-py3.12-tests.patch +) + distutils_enable_tests unittest pkg_setup() { diff --git a/sys-libs/cracklib/files/cracklib-2.9.11-py3.12-tests.patch b/sys-libs/cracklib/files/cracklib-2.9.11-py3.12-tests.patch new file mode 100644 index 000000000000..f0e1cd29a005 --- /dev/null +++ b/sys-libs/cracklib/files/cracklib-2.9.11-py3.12-tests.patch @@ -0,0 +1,80 @@ +https://github.com/cracklib/cracklib/commit/a77a392272df3677f71c68e81fcdad1bc722732e + +From a77a392272df3677f71c68e81fcdad1bc722732e Mon Sep 17 00:00:00 2001 +From: Olivier Gayot <olivier.gayot@canonical.com> +Date: Thu, 30 Nov 2023 18:36:17 +0100 +Subject: [PATCH] Fix test-suite so it can run with Python 3.12 + +The test suite still used the obsolete assertEquals() function which was +a deprecated alias for assertEqual() (without the s) and got dropped +from Python 3.12. + +Use the replacement instead so the test-suite can run with Python 3.12. + +Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com> +--- a/python/test_cracklib.py ++++ b/python/test_cracklib.py +@@ -69,52 +69,52 @@ def test_simple(self): + 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): + testset = '#a' * (cracklib.MIN_LENGTH // 2) + for passwd in [testset[:i] for i in range( + 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)])) + + |