diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-04 19:18:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-04 19:18:10 +0100 |
commit | 07b0c0005f55e652101816d9f4cfe73403bf0906 (patch) | |
tree | b29108de370177e8ce7c0d0d60e1e4319851d99b /app-admin/clustershell | |
parent | 78754950ffa3aaba0f48b1ca1d505caa4a3dfbfa (diff) |
gentoo auto-resync : 04:10:2022 - 19:18:10
Diffstat (limited to 'app-admin/clustershell')
6 files changed, 251 insertions, 46 deletions
diff --git a/app-admin/clustershell/Manifest b/app-admin/clustershell/Manifest index 2e481416090c..61e53ee96441 100644 --- a/app-admin/clustershell/Manifest +++ b/app-admin/clustershell/Manifest @@ -1,3 +1,6 @@ -DIST clustershell-1.8.3.tar.gz 363975 BLAKE2B 3a7bb9103398e96f57f53d0d5d5edc6895ce02b6983e8fed34d65cad83a6d4e86f40b9576f41631e499a99adc8be5f4f422005b8ddc7ac8325fe11abd2c99477 SHA512 5108773e2958d1dae0aa6966d764e9af9d41024f65271005b202468f2bd1a3b63acc977729324fe1305d400dc8b06b0c4672e8d8ded207fa77cef69fb0005108 -EBUILD clustershell-1.8.3-r1.ebuild 895 BLAKE2B ae1f20439662cfdeaad2e8ab78c062b564e8451f71b7894aaa4e0bea34b95831aaeac0d66486e74ec14fe81ed62b5c2d18fd53f899c0e9f951490dab75a0bf39 SHA512 a068b7bb9af0c78bc46a67956aded72096c90945cc756e445ecdc3fcd2577377738717a5508fec81bfb971747dba16caa5a7adc8c72b17d301fd8ca747ac022a +AUX clustershell-1.8.4-current-thread.patch 3427 BLAKE2B 4adcc9c27f29b99e3bdd20dd9eb6671125ff5def441552a0e851031c8acebe0211168e9b1543306ddc45be645d9f2d5b3931250d6b5cf0a09b3f6afa97cc0a8c SHA512 beba976d831d6f5a4332e8bca73541d8763b4ca69971407dcfdafae424516f0d81c34f5f908930ac3f7d318070b1b2a2e75d21d3782c73e545b83bed4906927d +AUX clustershell-1.8.4-setrlimit-division.patch 763 BLAKE2B 7a527b9d7a6f37e49c1f33ec916f443f77c87a89c502edcae404d169543ca5304c4ce3165e938420ee712ada984e3128f8b34b4c20ffceb9dc623a3535014d7b SHA512 2dafe233a53ac9b83b068c865b0e1368bdfbc4f5a346fecc173460af5c6304f6b2f66fa190e14372d79414aad520336280f039b68b4754ddf3730b1959005f8a +AUX clustershell-1.8.4-skip-tests.patch 2577 BLAKE2B e79cfdf3def54ac620b3cd10955e0dd35426524fb5cab61fd9c32d47e557a481ee4b2ccedb9baeb768c20cbd909ce186962ebb966041f0e5acce3775ea616eaf SHA512 accfb107369d7d838a33023dbe94a749323b91cdd807779e44e6b8b6b9357e162bfc852aa99bad769674842d4ff2344385b3ef45504ba105d31727b5d4e02b8e +DIST clustershell-1.8.4.gh.tar.gz 367622 BLAKE2B 1487697a49d37902f9763094da1a156f5e7cc2ab0487814207bb9da03b1109f1ce55034fc92e72262d4b9920d5c52b9f6de84ce1ff04b06d042b0a6d005f1049 SHA512 582393e56d94e62e126d91f8af074a7b57d0e781a5c929cfc374e61324c412c32fcf9a8e063a78cb805c2ff34641887a1adfc7ef9f377b881077f719dbc2adc3 +EBUILD clustershell-1.8.4.ebuild 1353 BLAKE2B 90edec254bbd6fbc53c865af57e7ad035d32b4bc8ef8f9994bd41ae5d2f134959625c0e7b04ea3dcd0ef021f66effd45fb40a9537f2cbbb265022aa788219e4a SHA512 d6debb69259a9c020cf2557ab84b2809debca86f78ee2d17ccb99587eb420270cf3d1a59d732f34ac8e4c6c01b1ba0a5ce953a907c0b694380eeba5680d59d4c MISC metadata.xml 347 BLAKE2B 259f356be3bd36db0e537e9295748b546fb38fdafc00f314ba16695eee00e2d8530901ba5192bb70d094346f80d6fbd50f52101edc29edd3d1f1dbaab41cab4f SHA512 1824f7ffd8d00a87ca1af3d10f9536d878392e3b058da128e8df884bf4ffeceee4927fc5e87cb9bc58802507268eeec1651cf50a70a549b2a1b386e5f7066031 diff --git a/app-admin/clustershell/clustershell-1.8.3-r1.ebuild b/app-admin/clustershell/clustershell-1.8.3-r1.ebuild deleted file mode 100644 index 1bd9e3fc1a8d..000000000000 --- a/app-admin/clustershell/clustershell-1.8.3-r1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8,9} ) -PYTHON_REQ_USE="xml(+)" - -inherit distutils-r1 - -DESCRIPTION="Python framework for efficient cluster administration" -HOMEPAGE="https://cea-hpc.github.com/clustershell/" -SRC_URI="https://github.com/cea-hpc/clustershell/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="LGPL-2.1+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc test" - -BDEPEND=" - test? ( dev-python/nose[${PYTHON_USEDEP}] )" - -RDEPEND=" - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-libs/openssl:0=" - -RESTRICT="test" # currently fail - -python_install() { - distutils-r1_python_install - python_optimize -} - -python_test() { - cd tests || die - nosetests -sv --all-modules || die -} - -pkg_postinst() { - einfo - einfo "Some default system-wide config files have been installed into" - einfo "/etc/${PN}" - einfo -} diff --git a/app-admin/clustershell/clustershell-1.8.4.ebuild b/app-admin/clustershell/clustershell-1.8.4.ebuild new file mode 100644 index 000000000000..9ad14aaab935 --- /dev/null +++ b/app-admin/clustershell/clustershell-1.8.4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 + +DESCRIPTION="Python framework for efficient cluster administration" +HOMEPAGE="https://github.com/cea-hpc/clustershell/" +SRC_URI=" + https://github.com/cea-hpc/clustershell/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + test? ( + app-shells/pdsh + net-misc/openssh + sys-devel/bc + ) +" + +RDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]" + +PATCHES=( + # python3.10 related fixes taken from upstream + "${FILESDIR}/${P}-setrlimit-division.patch" + "${FILESDIR}/${P}-current-thread.patch" + + "${FILESDIR}/${P}-skip-tests.patch" +) + +distutils_enable_tests unittest + +src_prepare() { + default + + # remove test sets that require working ssh connection + rm tests/{CLIClush,TaskDistant*,TreeWorker}Test.py || die +} + +python_test() { + cd tests || die + # Automatic discovery does not work + "${EPYTHON}" -m unittest_or_fail -v *.py || die "Tests failed with ${EPYTHON}" +} + +src_install() { + distutils-r1_src_install + + doman doc/man/man*/* + + mv "${ED}/usr/etc" "${ED}/etc" || die +} + +pkg_postinst() { + einfo "Some default system-wide config files have been installed into" + einfo "/etc/${PN}" +} diff --git a/app-admin/clustershell/files/clustershell-1.8.4-current-thread.patch b/app-admin/clustershell/files/clustershell-1.8.4-current-thread.patch new file mode 100644 index 000000000000..bf9c7edb6a90 --- /dev/null +++ b/app-admin/clustershell/files/clustershell-1.8.4-current-thread.patch @@ -0,0 +1,95 @@ +Backported from upstream commit 314767d65c39 ("Fix for python-3.10") [1]. + +[1] https://github.com/cea-hpc/clustershell/commit/314767d65c397fadc5ce0ae205a35d7bb47a68a8 + +diff --git a/lib/ClusterShell/Task.py b/lib/ClusterShell/Task.py +index b9142e6..8c9e1b9 100644 +--- a/lib/ClusterShell/Task.py ++++ b/lib/ClusterShell/Task.py +@@ -254,7 +254,7 @@ class Task(object): + self._cond.acquire() + try: + self.suspend_count = min(self.suspend_count, 0) +- self._cond.notifyAll() ++ self._cond.notify_all() + finally: + self._cond.release() + +@@ -347,7 +347,7 @@ class Task(object): + def _is_task_self(self): + """Private method used by the library to check if the task is + task_self(), but do not create any task_self() instance.""" +- return self.thread == threading.currentThread() ++ return self.thread == threading.current_thread() + + def default_excepthook(self, exc_type, exc_value, tb): + """Default excepthook for a newly Task. When an exception is +@@ -765,7 +765,7 @@ class Task(object): + + def _resume(self): + """Resume task - called from self thread.""" +- assert self.thread == threading.currentThread() ++ assert self.thread == threading.current_thread() + try: + try: + self._reset() +@@ -780,7 +780,7 @@ class Task(object): + # task becomes joinable + self._join_cond.acquire() + self._suspend_cond.atomic_inc() +- self._join_cond.notifyAll() ++ self._join_cond.notify_all() + self._join_cond.release() + + def resume(self, timeout=None): +@@ -954,14 +954,14 @@ class Task(object): + # termination (late join()s) + # must be called after _terminated is set to True + self._join_cond.acquire() +- self._join_cond.notifyAll() ++ self._join_cond.notify_all() + self._join_cond.release() + + # destroy task if needed + if kill: + Task._task_lock.acquire() + try: +- del Task._tasks[threading.currentThread()] ++ del Task._tasks[threading.current_thread()] + finally: + Task._task_lock.release() + +@@ -1376,7 +1376,7 @@ def task_self(defaults=None): + provided as a convenience is available in the top-level ClusterShell.Task + package namespace. + """ +- return Task(thread=threading.currentThread(), defaults=defaults) ++ return Task(thread=threading.current_thread(), defaults=defaults) + + def task_wait(): + """ +@@ -1385,7 +1385,7 @@ def task_wait(): + convenience and is available in the top-level ClusterShell.Task package + namespace. + """ +- Task.wait(threading.currentThread()) ++ Task.wait(threading.current_thread()) + + def task_terminate(): + """ +diff --git a/tests/TaskPortTest.py b/tests/TaskPortTest.py +index 697f144..4014a89 100644 +--- a/tests/TaskPortTest.py ++++ b/tests/TaskPortTest.py +@@ -28,7 +28,7 @@ class TaskPortTest(unittest.TestCase): + def ev_msg(self, port, msg): + # receive msg + assert msg == "toto" +- assert port.task.thread == threading.currentThread() ++ assert port.task.thread == threading.current_thread() + TaskPortTest.got_msg = True + port.task.abort() + +-- +2.35.1 + diff --git a/app-admin/clustershell/files/clustershell-1.8.4-setrlimit-division.patch b/app-admin/clustershell/files/clustershell-1.8.4-setrlimit-division.patch new file mode 100644 index 000000000000..9ecd807591a8 --- /dev/null +++ b/app-admin/clustershell/files/clustershell-1.8.4-setrlimit-division.patch @@ -0,0 +1,21 @@ +Python3.10 related fix taken from upstream [1,2]. + +[1] https://github.com/cea-hpc/clustershell/pull/487 +[2] https://github.com/cea-hpc/clustershell/commit/5ac85daf74056ec7e60778efec94c746a150142c + +diff --git a/tests/CLIConfigTest.py b/tests/CLIConfigTest.py +index 2853398..db6cec5 100644 +--- a/tests/CLIConfigTest.py ++++ b/tests/CLIConfigTest.py +@@ -229,7 +229,7 @@ class CLIClushConfigTest(unittest.TestCase): + display = Display(options, config) + + # force a lower soft limit +- resource.setrlimit(resource.RLIMIT_NOFILE, (hard2/2, hard)) ++ resource.setrlimit(resource.RLIMIT_NOFILE, (hard2//2, hard)) + # max_fdlimit should increase soft limit again + set_fdlimit(config.fd_max, display) + # verify +-- +2.35.1 + diff --git a/app-admin/clustershell/files/clustershell-1.8.4-skip-tests.patch b/app-admin/clustershell/files/clustershell-1.8.4-skip-tests.patch new file mode 100644 index 000000000000..4374ae4b525c --- /dev/null +++ b/app-admin/clustershell/files/clustershell-1.8.4-skip-tests.patch @@ -0,0 +1,63 @@ +This is a Gentoo specific patch for skipping tests that do not work due +to various reasons: +1. hostname may be set to localhost +2. test fails which are most probably caused by weird test interaction. + The issue is reported to upstream in [1]. + +[1] https://github.com/cea-hpc/clustershell/issues/488 + +diff --git a/tests/TaskEventTest.py b/tests/TaskEventTest.py +index f8a4048..900008b 100644 +--- a/tests/TaskEventTest.py ++++ b/tests/TaskEventTest.py +@@ -475,6 +475,7 @@ class TaskEventTest(unittest.TestCase): + self.assertEqual(eh.cnt_pickup, 3) + self.assertEqual(eh.cnt_hup, 3) + ++ @unittest.skip("because of an issue https://github.com/cea-hpc/clustershell/issues/488") + def test_ev_pickup_fanout_legacy(self): + """test ev_pickup event with fanout (legacy)""" + task = task_self() +@@ -498,6 +499,7 @@ class TaskEventTest(unittest.TestCase): + finally: + task.set_info("fanout", fanout) + ++ @unittest.skip("because of an issue https://github.com/cea-hpc/clustershell/issues/488") + def test_ev_pickup_fanout(self): + """test ev_pickup event with fanout""" + task = task_self() +diff --git a/tests/TreeWorkerTest.py b/tests/TreeWorkerTest.py +index d5c221a..969d3c9 100644 +--- a/tests/TreeWorkerTest.py ++++ b/tests/TreeWorkerTest.py +@@ -99,6 +99,7 @@ class TEventHandler(TEventHandlerBase): + self.ev_timedout_cnt += 1 + + ++@unittest.skipIf(HOSTNAME == 'localhost', "does not work with hostname set to 'localhost'") + class TreeWorkerTest(unittest.TestCase): + """ + TreeWorkerTest: test TreeWorker +diff --git a/tests/WorkerExecTest.py b/tests/WorkerExecTest.py +index 6f99f10..0894f99 100644 +--- a/tests/WorkerExecTest.py ++++ b/tests/WorkerExecTest.py +@@ -45,6 +45,7 @@ class ExecTest(unittest.TestCase): + self.assertEqual(task_self().max_retcode(), 1) + self.assertEqual(task_self().node_buffer('localhost'), b'') + ++ @unittest.skipIf(HOSTNAME == 'localhost', "does not work with hostname set to 'localhost'") + def test_timeout(self): + """test ExecWorker with a timeout""" + nodes = "localhost,%s" % HOSTNAME +@@ -67,6 +68,7 @@ class ExecTest(unittest.TestCase): + self.assertRaises(WorkerError, self.execw, + nodes="localhost", handler=None, command="echo %") + ++ @unittest.skipIf(HOSTNAME == 'localhost', "does not work with hostname set to 'localhost'") + def test_rank_placeholder(self): + """test ExecWorker with several nodes and %n (rank)""" + nodes = "localhost,%s" % HOSTNAME +-- +2.35.1 + |