check_mk_agent plugins don't specify their python shebang properly as required by https://www.python.org/dev/peps/pep-0394/: #!/usr/bin/python so on system that have Python3 set as their default Python interpreter the plugins silently fail to run during check_mk, or not silently when called directly, e.g. plugins/apache_status: File "/usr/lib/check_mk_agent/plugins/apache_status", line 146 except urllib2.URLError, e: ^ SyntaxError: invalid syntax This should be brought to attention upstream, I've sent an email to their feedback address as they don't seem to have some community user friendly way to report bugs. For now something along the line could be added to the ebuild: src_prepare() { # Errors when running under Python 3 sed \ -e 's:/usr/bin/python:/usr/bin/python2:' \ -i "${S}"/plugins/{apache_status,isc_dhcpd,mk_inotify,mk_mongodb} \ || die default }
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a679b467c1c5f7502194ab0cad5f04afb9989bd commit 7a679b467c1c5f7502194ab0cad5f04afb9989bd Author: Arthur Zamarin <arthurzam@gentoo.org> AuthorDate: 2024-07-12 11:28:50 +0000 Commit: Arthur Zamarin <arthurzam@gentoo.org> CommitDate: 2024-07-12 11:28:50 +0000 net-analyzer/check_mk_agent: treeclean Bug: https://bugs.gentoo.org/933843 Bug: https://bugs.gentoo.org/695068 Bug: https://bugs.gentoo.org/677432 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> net-analyzer/check_mk_agent/Manifest | 1 - .../check_mk_agent/check_mk_agent-1.4.0_p31.ebuild | 74 ---------------------- net-analyzer/check_mk_agent/metadata.xml | 23 ------- profiles/package.mask | 5 -- 4 files changed, 103 deletions(-)