From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1629243-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 95141158064 for <garchives@archives.gentoo.org>; Thu, 9 May 2024 11:33:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9CDE1E2A89; Thu, 9 May 2024 11:33:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D598E2A89 for <gentoo-commits@lists.gentoo.org>; Thu, 9 May 2024 11:33:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E2B113430A4 for <gentoo-commits@lists.gentoo.org>; Thu, 9 May 2024 11:33:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 312691A76 for <gentoo-commits@lists.gentoo.org>; Thu, 9 May 2024 11:33:15 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1715254358.4ef3f3e85bd7e2e8de70e76eb09c4c21f207eb16.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/cracklib/, sys-libs/cracklib/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/cracklib/cracklib-2.9.11.ebuild sys-libs/cracklib/files/cracklib-2.9.11-py3.12-tests.patch X-VCS-Directories: sys-libs/cracklib/files/ sys-libs/cracklib/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4ef3f3e85bd7e2e8de70e76eb09c4c21f207eb16 X-VCS-Branch: master Date: Thu, 9 May 2024 11:33:15 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9384434b-1eeb-478a-a952-0c54045e9c25 X-Archives-Hash: ca8bf03ca0c29af1e3f7162d79a86186 commit: 4ef3f3e85bd7e2e8de70e76eb09c4c21f207eb16 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu May 9 11:30:20 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu May 9 11:32:38 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ef3f3e8 sys-libs/cracklib: enable py3.12, set DISTUTILS_EXT=1 Closes: https://bugs.gentoo.org/929852 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-libs/cracklib/cracklib-2.9.11.ebuild | 10 ++- .../files/cracklib-2.9.11-py3.12-tests.patch | 80 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 3 deletions(-) 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)])) + +