From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DAF36158086 for ; Sun, 24 Oct 2021 03:39:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23F81E07F1; Sun, 24 Oct 2021 03:39:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72F4FE07F1 for ; Sun, 24 Oct 2021 03:39:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63D9834364F for ; Sun, 24 Oct 2021 03:39:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C6373E3 for ; Sun, 24 Oct 2021 03:39:07 +0000 (UTC) From: "Sam James" 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" Message-ID: <1635046738.5e75f94661d665527b763aa8a5a85e4c7f45a130.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/fail2ban/, net-analyzer/fail2ban/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild net-analyzer/fail2ban/files/fail2ban-0.11.2-fix-2to3-usage.patch X-VCS-Directories: net-analyzer/fail2ban/files/ net-analyzer/fail2ban/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 5e75f94661d665527b763aa8a5a85e4c7f45a130 X-VCS-Branch: master Date: Sun, 24 Oct 2021 03:39:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c6cfb6f8-88d6-4b07-ae6f-88c82807a463 X-Archives-Hash: 5c489663d406f95fecb98635fefda26c commit: 5e75f94661d665527b763aa8a5a85e4c7f45a130 Author: Sam James gentoo org> AuthorDate: Sun Oct 24 03:37:21 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sun Oct 24 03:38:58 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e75f946 net-analyzer/fail2ban: fix install with newer setuptools (2to3 usage) Closes: https://bugs.gentoo.org/818733 Signed-off-by: Sam James gentoo.org> net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild | 1 + .../files/fail2ban-0.11.2-fix-2to3-usage.patch | 109 +++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild b/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild index d2a4540b0ea..3e667a2f573 100644 --- a/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild +++ b/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild @@ -40,6 +40,7 @@ DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) PATCHES=( "${FILESDIR}"/${P}-fix-tests-for-2021.patch "${FILESDIR}"/${PN}-0.11.2-adjust-apache-logs-paths.patch + "${FILESDIR}"/${PN}-0.11.2-fix-2to3-usage.patch ) python_prepare_all() { diff --git a/net-analyzer/fail2ban/files/fail2ban-0.11.2-fix-2to3-usage.patch b/net-analyzer/fail2ban/files/fail2ban-0.11.2-fix-2to3-usage.patch new file mode 100644 index 00000000000..9098d096e8a --- /dev/null +++ b/net-analyzer/fail2ban/files/fail2ban-0.11.2-fix-2to3-usage.patch @@ -0,0 +1,109 @@ +https://github.com/fail2ban/fail2ban/commit/7f22c4873aed3b5ffce0953f079f3c1977297c9a +https://github.com/fail2ban/fail2ban/commit/5ac303df8a171f748330d4c645ccbf1c2c7f3497 +https://github.com/fail2ban/fail2ban/commit/d6b884f3b72b8a42b21da863836569ef6836c2ea +https://github.com/fail2ban/fail2ban/issues/3098 +https://bugs.gentoo.org/818733 + +From: "Sergey G. Brester" +Date: Sun, 19 Sep 2021 18:36:02 +0200 +Subject: [PATCH] remove 2to3 in setup (should be called outside before setup) + +--- a/setup.py ++++ b/setup.py +@@ -39,14 +39,6 @@ + if setuptools is None: + from distutils.command.install import install + from distutils.command.install_scripts import install_scripts +-try: +- # python 3.x +- from distutils.command.build_py import build_py_2to3 +- from distutils.command.build_scripts import build_scripts_2to3 +- _2to3 = True +-except ImportError: +- # python 2.x +- _2to3 = False + + import os + from os.path import isfile, join, isdir, realpath + +From: sebres +Date: Sun, 19 Sep 2021 18:49:18 +0200 +Subject: [PATCH] fix gh-3098: build fails with error in fail2ban setup + command: use_2to3 is invalid (setuptools 58+) + +--- a/setup.py ++++ b/setup.py +@@ -48,7 +48,7 @@ + from glob import glob + + from fail2ban.setup import updatePyExec +- ++from fail2ban.version import version + + source_dir = os.path.realpath(os.path.dirname( + # __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.): +@@ -112,22 +112,12 @@ def update_scripts(self, dry_run=False): + # Wrapper to specify fail2ban own options: + class install_command_f2b(install): + user_options = install.user_options + [ +- ('disable-2to3', None, 'Specify to deactivate 2to3, e.g. if the install runs from fail2ban test-cases.'), + ('without-tests', None, 'without tests files installation'), + ] + def initialize_options(self): +- self.disable_2to3 = None + self.without_tests = not with_tests + install.initialize_options(self) + def finalize_options(self): +- global _2to3 +- ## in the test cases 2to3 should be already done (fail2ban-2to3): +- if self.disable_2to3: +- _2to3 = False +- if _2to3: +- cmdclass = self.distribution.cmdclass +- cmdclass['build_py'] = build_py_2to3 +- cmdclass['build_scripts'] = build_scripts_2to3 + if self.without_tests: + self.distribution.scripts.remove('bin/fail2ban-testcases') + +@@ -178,7 +168,6 @@ def run(self): + if setuptools: + setup_extra = { + 'test_suite': "fail2ban.tests.utils.gatherTests", +- 'use_2to3': True, + } + else: + setup_extra = {} +@@ -202,9 +191,6 @@ def run(self): + ('/usr/share/doc/fail2ban', doc_files) + ) + +-# Get version number, avoiding importing fail2ban. +-# This is due to tests not functioning for python3 as 2to3 takes place later +-exec(open(join("fail2ban", "version.py")).read()) + + setup( + name = "fail2ban", +From: sebres +Date: Sun, 19 Sep 2021 18:52:34 +0200 +Subject: [PATCH] amend to fix gh-3098: no option `--disable-2to3` anymore + +--- a/fail2ban/tests/misctestcase.py ++++ b/fail2ban/tests/misctestcase.py +@@ -111,7 +111,7 @@ def testSetupInstallDryRun(self): + supdbgout = ' >/dev/null 2>&1' if unittest.F2B.log_level >= logging.DEBUG else '' # HEAVYDEBUG + try: + # try dry-run: +- os.system("%s %s --dry-run install --disable-2to3 --root=%s%s" ++ os.system("%s %s --dry-run install --root=%s%s" + % (sys.executable, self.setup , tmp, supdbgout)) + # check nothing was created: + self.assertTrue(not os.listdir(tmp)) +@@ -127,7 +127,7 @@ def testSetupInstallRoot(self): + # suppress stdout (and stderr) if not heavydebug + supdbgout = ' >/dev/null' if unittest.F2B.log_level >= logging.DEBUG else '' # HEAVYDEBUG + try: +- self.assertEqual(os.system("%s %s install --disable-2to3 --root=%s%s" ++ self.assertEqual(os.system("%s %s install --root=%s%s" + % (sys.executable, self.setup, tmp, supdbgout)), 0) + + def strippath(l):