From 404b23b9395fafe5c40a1fd4d859c6cd17b4a646 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 14 Mar 2024 06:47:04 +0000 Subject: gentoo auto-resync : 14:03:2024 - 06:47:03 --- net-analyzer/fail2ban/Manifest | 3 +- net-analyzer/fail2ban/fail2ban-1.0.2-r3.ebuild | 137 +++++++++++++++++++++++++ net-analyzer/fail2ban/fail2ban-9999.ebuild | 21 +++- 3 files changed, 156 insertions(+), 5 deletions(-) create mode 100644 net-analyzer/fail2ban/fail2ban-1.0.2-r3.ebuild (limited to 'net-analyzer/fail2ban') diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest index 6e3875849b2a..36ac1a0a2bc9 100644 --- a/net-analyzer/fail2ban/Manifest +++ b/net-analyzer/fail2ban/Manifest @@ -3,5 +3,6 @@ AUX fail2ban-1.0.2-configreader-warning.patch 844 BLAKE2B 3dca580b50c7fa425765ee AUX fail2ban-1.0.2-umask-tests.patch 1329 BLAKE2B a7535b515e5d3be56d6e842b34e37cc6786338c1874827ff82c58251ecab63917b54d3c1de6fb4047112deade46195c168b5783922dec8895a13f7751f2c64a7 SHA512 bfffcaa54e74c34e87f4a1205573ac9fb8a66dbcc8534f9b42574be699e21ee92ce153204a7dfc63aedfe319a34d9ac3e656ff29cc054fcaf3b4709b0d56b24b DIST fail2ban-1.0.2.tar.gz 583295 BLAKE2B 84eb5e3487c4db734f4f0a36af142d520e1cc53c2960893ee2f05ff4e78133860be59ed9580fa0d972509a03c17e5d9458b8e3f6b470a4c3154f10911f94691e SHA512 688a84361b5794e1658f53d2d200ce752fe1e3320ddb1742c32c4b4b82a79ace16ae464e7ea3eeb94a0e862bcac73c2d3a0e61dd7b28e179a4c857f950d74dbb EBUILD fail2ban-1.0.2-r2.ebuild 3529 BLAKE2B 5565c25f7dae535e0b83299086ff2eb0fc256231df228565f48e41402c003e1abe62bb36d81ef1f401820f4f4e28cb46e64b922c7e87970c04ddd1b9ad3dfcfb SHA512 f0a3e100a9ec88a7f3d7737a85f6a90adf30f80854fe89e5d64af53ff129fa4938812ca4ebf657015e36e9a4cf1ed45513d7d8dfc4c3f84482e9a60f5221dbbf -EBUILD fail2ban-9999.ebuild 3400 BLAKE2B fccfbea630b445a3e35b54276e4c37185299dcd534cbe78408bad4bbe4bd5707877b3a0283cf138f2f53fdff671586a7b8113eb33e6e2e66f3e17e03eb75092d SHA512 c2de1dfa0d8c1f9d6c68cdd700b29296fabd8ca00f47d40b19d95d06974d9c85d9d6ded5f40dcafee8e9136cd67ea84f03b4af06da48ef5751d5b76baddd0593 +EBUILD fail2ban-1.0.2-r3.ebuild 3767 BLAKE2B 7901ab602fbb6f8a61d9763f232c9ab76f4b6281b8f2b9e34a584717bec00e0a197029683ad5f87ec514ea0c8a0caaf1bc518a818962d290b95b7fc5a7e8ce12 SHA512 f5ad4a1a54d42682fc89b90de1856a5195aae083e52879521aa7b5b62b77a81ccf7f576858efcf397b8b34db40fb8f32fa9b237c210524a75e9c2f96a0fa05d1 +EBUILD fail2ban-9999.ebuild 3635 BLAKE2B 44abe3fe9eadbbcca5d6f9303421ef9611cd0df7a01c86051537d3da513773ba7f6aac2328f1cfd3e62815d1e2b2e1bc7cce82d83e8ba54fe928acbe4fa6f147 SHA512 32820f347d0a4e1cb6ae368754e04e6930144fcad3f73bd05dca2c645b1164af7b5a7719eaa3bd6ec997b41c4d98e0fcf77d54f2724c8e52ba5e21e254b071fb MISC metadata.xml 357 BLAKE2B a5dee8c760b80bbfad6bca9a7adae797eda34b9db80716db8842c6813b4ed25ed4707290756dc869a7db4163de1ff6114c1995fcc2c485df1bcc6cad9c9a8f14 SHA512 9877a507bd3617c33351036317c5dc7855a1024d8f04f76a57edb93bd80e62b2b7c4f35784f447e94497305eab33246ae5913ba36ea001aa9068d1f91aeee9f0 diff --git a/net-analyzer/fail2ban/fail2ban-1.0.2-r3.ebuild b/net-analyzer/fail2ban/fail2ban-1.0.2-r3.ebuild new file mode 100644 index 000000000000..a6c77a9edf1b --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-1.0.2-r3.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{10..12} ) + +inherit bash-completion-r1 distutils-r1 systemd tmpfiles + +DESCRIPTION="Scans log files and bans IPs that show malicious signs" +HOMEPAGE="https://www.fail2ban.org/" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/fail2ban/fail2ban" + inherit git-r3 +else + SRC_URI="https://github.com/fail2ban/fail2ban/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="selinux systemd" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/pyasyncore[${PYTHON_USEDEP}] + dev-python/pyasynchat[${PYTHON_USEDEP}] + ' 3.12) + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( + $(python_gen_cond_dep ' + dev-python/python-systemd[${PYTHON_USEDEP}] + ') + ) +" + +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.11.2-adjust-apache-logs-paths.patch + "${FILESDIR}"/${PN}-1.0.2-umask-tests.patch + "${FILESDIR}"/${P}-configreader-warning.patch +) + +python_prepare_all() { + distutils-r1_python_prepare_all + + # Replace /var/run with /run, but not in the top source directory + find . -mindepth 2 -type f -exec \ + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die + + # Incompatible with Python 3.12 in 1.0.x, 9999 uses dev-python/aiosmtpd. + rm fail2ban/tests/action_d/test_smtp.py || die +} + +python_compile() { + ./fail2ban-2to3 || die + distutils-r1_python_compile +} + +python_test() { + # Skip testRepairDb for bug #907348 (didn't always fail..) + # https://github.com/fail2ban/fail2ban/issues/3586 + bin/fail2ban-testcases \ + --no-network \ + --no-gamin \ + --ignore databasetestcase.DatabaseTest.testRepairDb \ + --verbosity=4 || die "Tests failed with ${EPYTHON}" + + # Workaround for bug #790251 + rm -rf fail2ban.egg-info || die +} + +python_install_all() { + distutils-r1_python_install_all + + rm -rf "${ED}"/usr/share/doc/${PN} "${ED}"/run || die + + newconfd files/fail2ban-openrc.conf ${PN} + + # These two are placed in the ${BUILD_DIR} after being "built" + # in install_scripts(). + newinitd "${BUILD_DIR}/fail2ban-openrc.init" "${PN}" + systemd_dounit "${BUILD_DIR}/${PN}.service" + + dotmpfiles files/${PN}-tmpfiles.conf + + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} + + keepdir /var/lib/${PN} + + newbashcomp files/bash-completion ${PN}-client + bashcomp_alias ${PN}-client ${PN}-server ${PN}-regex +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + tmpfiles_process ${PN}-tmpfiles.conf + + if [[ ${previous_less_than_0_7} == 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2Ban!" + elog + elog "Fail2Ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + + if ! has_version dev-python/pyinotify ; then + elog "For most jail.conf configurations, it is recommended you install" + elog "dev-python/pyinotify to control how log file modifications are detected" + fi + + if ! has_version dev-lang/python[sqlite] ; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite. If you do not use the" + elog "persistent database feature, then you should set" + elog "dbfile = :memory: in fail2ban.conf accordingly." + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-9999.ebuild b/net-analyzer/fail2ban/fail2ban-9999.ebuild index d9a3b9fdb4da..f9f5b8721fff 100644 --- a/net-analyzer/fail2ban/fail2ban-9999.ebuild +++ b/net-analyzer/fail2ban/fail2ban-9999.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_SINGLE_IMPL=1 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit bash-completion-r1 distutils-r1 systemd tmpfiles @@ -16,14 +16,19 @@ if [[ ${PV} == *9999 ]] ; then inherit git-r3 else SRC_URI="https://github.com/fail2ban/fail2ban/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="~amd64" fi LICENSE="GPL-2" SLOT="0" -IUSE="selinux systemd" +IUSE="selinux systemd test" +RESTRICT="!test? ( test )" RDEPEND=" + $(python_gen_cond_dep ' + dev-python/pyasyncore[${PYTHON_USEDEP}] + dev-python/pyasynchat[${PYTHON_USEDEP}] + ' 3.12) virtual/logger virtual/mta selinux? ( sec-policy/selinux-fail2ban ) @@ -33,6 +38,13 @@ RDEPEND=" ') ) " +BDEPEND=" + test? ( + $(python_gen_cond_dep ' + dev-python/aiosmtpd[${PYTHON_USEDEP}] + ') + ) +" DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) @@ -51,6 +63,7 @@ python_prepare_all() { python_test() { # Skip testRepairDb for bug #907348 (didn't always fail..) + # https://github.com/fail2ban/fail2ban/issues/3586 bin/fail2ban-testcases \ --no-network \ --ignore databasetestcase.DatabaseTest.testRepairDb \ -- cgit v1.2.3