summaryrefslogtreecommitdiff
path: root/net-analyzer/fail2ban
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:35:26 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:35:26 -0500
commitf716a9fe6455d39eef01e718aae68dae61c19704 (patch)
tree0c52bbae1c242fbc296bd650fcd1167685f81492 /net-analyzer/fail2ban
parent3f9cf298e89cd5037b982abba06091224ee76daf (diff)
downloadbaldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.tar.gz
baldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.tar.xz
baldeagleos-repo-f716a9fe6455d39eef01e718aae68dae61c19704.zip
Adding metadata
Diffstat (limited to 'net-analyzer/fail2ban')
-rw-r--r--net-analyzer/fail2ban/Manifest1
-rw-r--r--net-analyzer/fail2ban/fail2ban-1.1.0-r6.ebuild153
-rw-r--r--net-analyzer/fail2ban/fail2ban-1.1.0-r7.ebuild154
-rw-r--r--net-analyzer/fail2ban/fail2ban-9999.ebuild148
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch29
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.0.2-umask-tests.patch45
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-nftables.patch25
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-use-supervise-daemon.patch23
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8-fixups.patch40
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8.patch75
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-ddos.patch38
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-pref.patch32
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-sshd-ddos.patch33
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-1.1.0-systemd-order.patch14
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-tmpfiles.conf1
-rw-r--r--net-analyzer/fail2ban/metadata.xml12
16 files changed, 0 insertions, 823 deletions
diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest
deleted file mode 100644
index a9e07e8f972d..000000000000
--- a/net-analyzer/fail2ban/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST fail2ban-1.1.0.tar.gz 603854 BLAKE2B f7c2d3a1e5b5cdca1f26d92cefe75958bb61b87ad1cf316380b91527c96f3261e5665478c5fbb053f6419956dda934c8ef3ce837af2819b1b1c8d162246fc15f SHA512 9bff7b9c41e58a953901800468e5c4153c9db6af01c7eb18111ad8620b40d03a0771020472fb759b2809d250e2bb45471e6c7e8283e72ea48290ecf7bf921821
diff --git a/net-analyzer/fail2ban/fail2ban-1.1.0-r6.ebuild b/net-analyzer/fail2ban/fail2ban-1.1.0-r6.ebuild
deleted file mode 100644
index 8d90ec056c05..000000000000
--- a/net-analyzer/fail2ban/fail2ban-1.1.0-r6.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit bash-completion-r1 edo python-single-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 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="selinux systemd test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="
- ${PYTHON_DEPS}
- $(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}]
- ')
- )
-"
-BDEPEND="
- $(python_gen_cond_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- test? (
- $(python_gen_cond_dep '
- dev-python/aiosmtpd[${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}"/${PN}-1.1.0-openssh-9.8.patch
- "${FILESDIR}"/${PN}-1.1.0-openssh-9.8-fixups.patch
- "${FILESDIR}"/${PN}-1.1.0-openrc-nftables.patch
- "${FILESDIR}"/${PN}-1.1.0-systemd-order.patch
- "${FILESDIR}"/${PN}-1.1.0-postfix-pref.patch
- "${FILESDIR}"/${PN}-1.1.0-postfix-ddos.patch
- "${FILESDIR}"/${PN}-1.1.0-sshd-ddos.patch
-)
-
-src_prepare() {
- default
-
- # 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
-}
-
-src_compile() {
- edo ${EPYTHON} setup.py build
-}
-
-src_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 \
- --verbosity=4 || die "Tests failed with ${EPYTHON}"
-
- # Workaround for bug #790251
- rm -rf fail2ban.egg-info || die
-}
-
-src_install() {
- edo ${EPYTHON} setup.py install --prefix="${EPREFIX}/usr" --root="${D}"
- python_fix_shebang "${ED}"/usr/bin
- python_optimize
-
- einstalldocs
-
- 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 "${S}"/build/fail2ban-openrc.init ${PN}
- systemd_dounit "${S}"/build/${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-1.1.0-r7.ebuild b/net-analyzer/fail2ban/fail2ban-1.1.0-r7.ebuild
deleted file mode 100644
index 11acdf456d92..000000000000
--- a/net-analyzer/fail2ban/fail2ban-1.1.0-r7.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit bash-completion-r1 edo python-single-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 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="selinux systemd test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="
- ${PYTHON_DEPS}
- $(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}]
- ')
- )
-"
-BDEPEND="
- $(python_gen_cond_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- test? (
- $(python_gen_cond_dep '
- dev-python/aiosmtpd[${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}"/${PN}-1.1.0-openssh-9.8.patch
- "${FILESDIR}"/${PN}-1.1.0-openssh-9.8-fixups.patch
- "${FILESDIR}"/${PN}-1.1.0-openrc-nftables.patch
- "${FILESDIR}"/${PN}-1.1.0-systemd-order.patch
- "${FILESDIR}"/${PN}-1.1.0-postfix-pref.patch
- "${FILESDIR}"/${PN}-1.1.0-postfix-ddos.patch
- "${FILESDIR}"/${PN}-1.1.0-sshd-ddos.patch
- "${FILESDIR}"/${PN}-1.1.0-openrc-use-supervise-daemon.patch
-)
-
-src_prepare() {
- default
-
- # 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
-}
-
-src_compile() {
- edo ${EPYTHON} setup.py build
-}
-
-src_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 \
- --verbosity=4 || die "Tests failed with ${EPYTHON}"
-
- # Workaround for bug #790251
- rm -rf fail2ban.egg-info || die
-}
-
-src_install() {
- edo ${EPYTHON} setup.py install --prefix="${EPREFIX}/usr" --root="${D}"
- python_fix_shebang "${ED}"/usr/bin
- python_optimize
-
- einstalldocs
-
- 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 "${S}"/build/fail2ban-openrc.init ${PN}
- systemd_dounit "${S}"/build/${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
deleted file mode 100644
index 2d8eb50f2e74..000000000000
--- a/net-analyzer/fail2ban/fail2ban-9999.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit bash-completion-r1 edo python-single-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 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="selinux systemd test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="
- ${PYTHON_DEPS}
- $(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}]
- ')
- )
-"
-BDEPEND="
- $(python_gen_cond_dep '
- dev-python/setuptools[${PYTHON_USEDEP}]
- ')
- test? (
- $(python_gen_cond_dep '
- dev-python/aiosmtpd[${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}"/${PN}-1.1.0-systemd-order.patch
- "${FILESDIR}"/${PN}-1.1.0-openrc-use-supervise-daemon.patch
-)
-
-src_prepare() {
- default
-
- # 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
-}
-
-src_compile() {
- edo ${EPYTHON} setup.py build
-}
-
-src_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 \
- --verbosity=4 || die "Tests failed with ${EPYTHON}"
-
- # Workaround for bug #790251
- rm -rf fail2ban.egg-info || die
-}
-
-src_install() {
- edo ${EPYTHON} setup.py install --prefix="${EPREFIX}/usr" --root="${D}"
- python_fix_shebang "${ED}"/usr/bin
- python_optimize
-
- einstalldocs
-
- 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 "${S}"/build/fail2ban-openrc.init ${PN}
- systemd_dounit "${S}"/build/${PN}.service
-
- dotmpfiles "${FILESDIR}"/${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/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch b/net-analyzer/fail2ban/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch
deleted file mode 100644
index 3017883f0d5a..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From bda9b88e883207b99781352c68610980e23fa62f Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Wed, 11 Aug 2021 01:58:05 +0100
-Subject: [PATCH] Adjust Apache log paths for Gentoo
-
-Closes: https://bugs.gentoo.org/805485
----
- config/paths-common.conf | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/config/paths-common.conf b/config/paths-common.conf
-index 7383caf..4f4a6e1 100644
---- a/config/paths-common.conf
-+++ b/config/paths-common.conf
-@@ -36,9 +36,9 @@ sshd_backend = %(default_backend)s
- dropbear_log = %(syslog_authpriv)s
- dropbear_backend = %(default_backend)s
-
--apache_error_log = /var/log/apache2/*error.log
-+apache_error_log = /var/log/apache2/*error_log
-
--apache_access_log = /var/log/apache2/*access.log
-+apache_access_log = /var/log/apache2/*access_log
-
- # from /etc/audit/auditd.conf
- auditd_log = /var/log/audit/audit.log
---
-2.32.0
-
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.0.2-umask-tests.patch b/net-analyzer/fail2ban/files/fail2ban-1.0.2-umask-tests.patch
deleted file mode 100644
index 8feca43412ec..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.0.2-umask-tests.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Avoid corrupting umask permanently in the testdir because of fail2ban/server/server.py::start.
-
-In particular:
-* https://bugs.gentoo.org/659010#c11
-* https://bugs.gentoo.org/790251#c10
-* https://bugs.gentoo.org/907350
-
-But see also the many dupes.
---- a/fail2ban/tests/fail2banclienttestcase.py
-+++ b/fail2ban/tests/fail2banclienttestcase.py
-@@ -23,6 +23,7 @@ __author__ = "Serg Brester"
- __copyright__ = "Copyright (c) 2014- Serg G. Brester (sebres), 2008- Fail2Ban Contributors"
- __license__ = "GPL"
-
-+import atexit
- import fileinput
- import os
- import re
-@@ -40,6 +41,14 @@ from ..client.fail2bancmdline import Fail2banCmdLine
- from ..client.fail2banclient import exec_command_line as _exec_client, CSocket, VisualWait
- from ..client.fail2banserver import Fail2banServer, exec_command_line as _exec_server
- from .. import protocol
-+
-+def current_umask():
-+ tmp = os.umask(0o022)
-+ os.umask(tmp)
-+ return tmp
-+
-+old_umask = current_umask()
-+
- from ..server import server
- from ..server.mytime import MyTime
- from ..server.utils import Utils
-@@ -48,6 +57,11 @@ from .utils import LogCaptureTestCase, logSys as DefLogSys, with_tmpdir, shutil,
-
- from ..helpers import getLogger
-
-+def restore_umask():
-+ os.umask(old_umask)
-+
-+atexit.register(restore_umask)
-+
- # Gets the instance of the logger.
- logSys = getLogger(__name__)
-
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-nftables.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-nftables.patch
deleted file mode 100644
index 844be1cedd34..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-nftables.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://github.com/fail2ban/fail2ban/commit/9e31cfc1f10e8304dc0b5adf0a429d57fcb598a3
-
-From 9e31cfc1f10e8304dc0b5adf0a429d57fcb598a3 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sat, 24 Aug 2024 11:59:59 -0400
-Subject: [PATCH] files/fail2ban-openrc.init.in: start after nftables
-
-The "after iptables" clause in the OpenRC service script's depend()
-function causes fail2ban to start after iptables, if iptables is
-scheduled to start. Here we add "after nftables" as well: nftables is
-the successor to iptables, and fail2ban supports it out-of-the-box.
-If nftables is scheduled to start, we want to wait until it's done
-before starting fail2ban.
---- a/files/fail2ban-openrc.init.in
-+++ b/files/fail2ban-openrc.init.in
-@@ -44,7 +44,7 @@ retry="30"
-
- depend() {
- use logger
-- after iptables
-+ after iptables nftables
- }
-
- checkconfig() {
-
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-use-supervise-daemon.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-use-supervise-daemon.patch
deleted file mode 100644
index f65f035e731f..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openrc-use-supervise-daemon.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-I kept hitting a startup failure and couldn't get anywhere with figuring
-out what wa shappening, but OpenRC is moving towards preferring supervise-daemon,
-and this is a bit nicer anyway as it takes any possibility of a race with
-pidfiles out of the equation.
---- a/files/fail2ban-openrc.init.in
-+++ b/files/fail2ban-openrc.init.in
-@@ -33,13 +33,13 @@ FAIL2BAN_SOCKET="${FAIL2BAN_RUNDIR}/${RC_SVCNAME}.sock"
- # The fail2ban-client program is also capable of starting and stopping
- # the server, but things are simpler if we let start-stop-daemon do it.
- command="@BINDIR@/fail2ban-server"
--pidfile="${FAIL2BAN_RUNDIR}/${RC_SVCNAME}.pid"
-
--# We force the pidfile/socket location in this service script because
-+# We force the socket location in this service script because
- # we're taking responsibility for ensuring that their parent directory
- # exists and has the correct permissions (which we can't do if the
- # user is allowed to change them).
--command_args="${FAIL2BAN_OPTIONS} -p ${pidfile} -s ${FAIL2BAN_SOCKET}"
-+supervisor=supervise-daemon
-+command_args="${FAIL2BAN_OPTIONS} -f -s ${FAIL2BAN_SOCKET}"
- retry="30"
-
- depend() {
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8-fixups.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8-fixups.patch
deleted file mode 100644
index 06ff07bd0599..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8-fixups.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://bugs.gentoo.org/936838
-https://github.com/fail2ban/fail2ban/commit/c769046a1f729880cc53efdff4b52ac96010752f
-https://github.com/fail2ban/fail2ban/commit/54c0effceb998b73545073ac59c479d9d9bf19a4
-
-From c769046a1f729880cc53efdff4b52ac96010752f Mon Sep 17 00:00:00 2001
-From: sebres <info@sebres.de>
-Date: Sun, 11 Aug 2024 11:55:39 +0200
-Subject: [PATCH] Revert "`filterd./sshd.conf`: fixed journalmatch
- (sshd.service seems to be renamed to ssh.service)" - it'd patched in debian
- branch. This reverts commit 6fce23e7baa484c7d1f9b0c9a11986f3916c41dd.
-
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -126,7 +126,7 @@ ignoreregex =
-
- maxlines = 1
-
--journalmatch = _SYSTEMD_UNIT=ssh.service + _COMM=sshd
-+journalmatch = _SYSTEMD_UNIT=sshd.service + _COMM=sshd
-
- # DEV Notes:
- #
-
-From 54c0effceb998b73545073ac59c479d9d9bf19a4 Mon Sep 17 00:00:00 2001
-From: sebres <info@sebres.de>
-Date: Sun, 11 Aug 2024 12:10:12 +0200
-Subject: [PATCH] filter.d/sshd.conf: amend to #3747/#3812 (new ssh version
- would log with `_COMM=sshd-session`)
-
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -126,7 +126,7 @@ ignoreregex =
-
- maxlines = 1
-
--journalmatch = _SYSTEMD_UNIT=sshd.service + _COMM=sshd
-+journalmatch = _SYSTEMD_UNIT=sshd.service + _COMM=sshd + _COMM=sshd-session
-
- # DEV Notes:
- #
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8.patch
deleted file mode 100644
index 6b7800ca3f0a..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-openssh-9.8.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-https://bugs.gentoo.org/935392
-https://github.com/fail2ban/fail2ban/commit/6fce23e7baa484c7d1f9b0c9a11986f3916c41dd
-https://github.com/fail2ban/fail2ban/commit/2fed408c05ac5206b490368d94599869bd6a056d
-https://github.com/fail2ban/fail2ban/commit/50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a
-
-From 6fce23e7baa484c7d1f9b0c9a11986f3916c41dd Mon Sep 17 00:00:00 2001
-From: "Sergey G. Brester" <serg.brester@sebres.de>
-Date: Mon, 10 Jun 2024 01:40:59 +0200
-Subject: [PATCH] `filterd./sshd.conf`: fixed journalmatch (sshd.service seems
- to be renamed to ssh.service)
-
-closes gh-3747
----
- config/filter.d/sshd.conf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/filter.d/sshd.conf b/config/filter.d/sshd.conf
-index a954774c62..1c8a02deb5 100644
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -126,7 +126,7 @@ ignoreregex =
-
- maxlines = 1
-
--journalmatch = _SYSTEMD_UNIT=sshd.service + _COMM=sshd
-+journalmatch = _SYSTEMD_UNIT=ssh.service + _COMM=sshd
-
- # DEV Notes:
- #
-
-From 2fed408c05ac5206b490368d94599869bd6a056d Mon Sep 17 00:00:00 2001
-From: Fabian Dellwing <fabian.dellwing@mbconnectline.de>
-Date: Tue, 2 Jul 2024 07:54:15 +0200
-Subject: [PATCH] Adjust sshd filter for OpenSSH 9.8 new daemon name
-
----
- config/filter.d/sshd.conf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/filter.d/sshd.conf b/config/filter.d/sshd.conf
-index 1c8a02deb5..a1fd749aed 100644
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -16,7 +16,7 @@ before = common.conf
-
- [DEFAULT]
-
--_daemon = sshd
-+_daemon = (?:sshd(?:-session)?)
-
- # optional prefix (logged from several ssh versions) like "error: ", "error: PAM: " or "fatal: "
- __pref = (?:(?:error|fatal): (?:PAM: )?)?
-
-From 50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a Mon Sep 17 00:00:00 2001
-From: "Sergey G. Brester" <serg.brester@sebres.de>
-Date: Wed, 3 Jul 2024 19:35:28 +0200
-Subject: [PATCH] filter.d/sshd.conf: ungroup (unneeded for _daemon)
-
----
- config/filter.d/sshd.conf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/filter.d/sshd.conf b/config/filter.d/sshd.conf
-index a1fd749aed..3a84b1ba52 100644
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -16,7 +16,7 @@ before = common.conf
-
- [DEFAULT]
-
--_daemon = (?:sshd(?:-session)?)
-+_daemon = sshd(?:-session)?
-
- # optional prefix (logged from several ssh versions) like "error: ", "error: PAM: " or "fatal: "
- __pref = (?:(?:error|fatal): (?:PAM: )?)?
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-ddos.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-ddos.patch
deleted file mode 100644
index efdc463e1fea..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-ddos.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-https://github.com/fail2ban/fail2ban/pull/4072
-https://bugs.gentoo.org/963047
-
-commit 0fee8dbe9241f8d387f064a079668457a0efd33d
-Author: Ulrich Müller <ulm@gentoo.org>
-Date: Thu Sep 18 07:20:38 2025 +0200
-
- filter.d/postfix.conf: Add optional "NOQUEUE:" to mdpr-ddos
-
- The current regex doesn't match the following log entry, seen with
- Postfix 3.10.2:
-
- Sep 17 18:19:20 mxhost postfix/smtpd[12345]: NOQUEUE: lost connection after CONNECT from unknown[192.0.2.25]
- Sep 17 18:19:20 mxhost postfix/smtpd[12345]: disconnect from unknown[192.0.2.25] commands=0/0
-
---- a/config/filter.d/postfix.conf
-+++ b/config/filter.d/postfix.conf
-@@ -38,7 +38,7 @@
-
- # Includes some of the log messages described in
- # <http://www.postfix.org/POSTSCREEN_README.html>.
--mdpr-ddos = (?:lost connection after (?!(?:DATA|AUTH)\b)[A-Z]+|disconnect(?= from \S+(?: \S+=\d+)* auth=0/(?:[1-9]|\d\d+))|(?:PREGREET \d+|HANGUP) after \S+|COMMAND (?:TIME|COUNT|LENGTH) LIMIT)
-+mdpr-ddos = (?:NOQUEUE: )?(?:lost connection after (?!(?:DATA|AUTH)\b)[A-Z]+|disconnect(?= from \S+(?: \S+=\d+)* auth=0/(?:[1-9]|\d\d+))|(?:PREGREET \d+|HANGUP) after \S+|COMMAND (?:TIME|COUNT|LENGTH) LIMIT)
- mdre-ddos = ^from [^[]*\[<HOST>\]%(_port)s:?
-
- mdpr-extra = (?:%(mdpr-auth)s|%(mdpr-normal)s)
---- a/fail2ban/tests/files/logs/postfix
-+++ b/fail2ban/tests/files/logs/postfix
-@@ -187,6 +187,9 @@
- # failJSON: { "time": "2005-06-08T23:14:54", "match": true , "host": "192.0.2.26", "desc": "abusive clients hitting command limit (gh-3040)" }
- Jun 8 23:14:54 proxy2 postfix/postscreen[473]: COMMAND COUNT LIMIT from [192.0.2.26]:15592 after RCPT
-
-+# failJSON: { "time": "2004-09-17T18:19:20", "match": true , "host": "192.0.2.25" }
-+Sep 17 18:19:20 mxhost postfix/smtpd[12345]: NOQUEUE: lost connection after CONNECT from unknown[192.0.2.25]
-+
-
- # filterOptions: [{}, {"mode": "ddos"}, {"mode": "aggressive"}]
- # failJSON: { "match": false, "desc": "don't affect lawful data (sporadical connection aborts within DATA-phase, see gh-1813 for discussion)" }
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-pref.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-pref.patch
deleted file mode 100644
index 72a21d6681a5..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-postfix-pref.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://github.com/fail2ban/fail2ban/issues/3800
-
-commit 93810fff75640ddfe4c248e670ed80b5d225bf10
-Author: Serg G. Brester <info@sebres.de>
-Date: Fri Jul 26 19:25:09 2024 +0200
-
- consider CONNECT and other rejected commands as a valid `_pref`;
- closes gh-3800
-
---- a/config/filter.d/postfix.conf
-+++ b/config/filter.d/postfix.conf
-@@ -12,7 +12,7 @@
-
- _daemon = postfix(-\w+)?/[^/\[:\s]+(?:/smtp[ds])?
- _port = (?::\d+)?
--_pref = [A-Z]{4}
-+_pref = [A-Z]{4,}
-
- prefregex = ^%(__prefix_line)s<mdpr-<mode>> <F-CONTENT>.+</F-CONTENT>$
-
---- a/fail2ban/tests/files/logs/postfix
-+++ b/fail2ban/tests/files/logs/postfix
-@@ -70,6 +70,9 @@
- # failJSON: { "time": "2005-05-05T15:51:11", "match": true , "host": "216.245.194.173", "desc": "postfix postscreen / gh-1764" }
- May 5 15:51:11 xxx postfix/postscreen[1148]: NOQUEUE: reject: RCPT from [216.245.194.173]:60591: 550 5.7.1 Service unavailable; client [216.245.194.173] blocked using rbl.example.com; from=<spammer@example.com>, to=<goodguy@example.com>, proto=ESMTP, helo=<badguy.example.com>
-
-+# failJSON: { "time": "2005-06-01T19:00:55", "match": true , "host": "192.0.2.114", "desc": "postfix client restriction / gh-3800" }
-+Jun 1 19:00:55 mail postfix/smtpd[7749]: NOQUEUE: reject: CONNECT from unknown[192.0.2.114]: 450 4.7.25 Client host rejected: cannot find your hostname, [178.215.236.114]; proto=SMTP
-+
- # failJSON: { "time": "2005-06-03T06:25:43", "match": true , "host": "192.0.2.11", "desc": "too many errors / gh-2439" }
- Jun 3 06:25:43 srv postfix/smtpd[29306]: too many errors after RCPT from example.com[192.0.2.11]
-
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-sshd-ddos.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-sshd-ddos.patch
deleted file mode 100644
index 6a19031ca406..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-sshd-ddos.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/fail2ban/fail2ban/issues/3907
-https://bugs.gentoo.org/963511
-
-commit 89b5f3bb1ecd3789b3271b648eeb83c620668e6f
-Author: Serg G. Brester <info@sebres.de>
-Date: Thu Dec 26 14:24:15 2024 +0100
-
- `filter.d/sshd.conf`: `ddos` and `aggressive` modes, regex extended for timeout before authentication (optional connection from part);
- closes gh-3907
-
---- a/config/filter.d/sshd.conf
-+++ b/config/filter.d/sshd.conf
-@@ -70,7 +70,7 @@
- # used to differentiate "connection closed" with and without `[preauth]` (fail/nofail cases in ddos mode)
- mdre-normal-other = ^<F-NOFAIL><F-MLFFORGET>(?:Connection (?:closed|reset)|Disconnect(?:ed|ing))</F-MLFFORGET></F-NOFAIL>%(__authng_user)s <ADDR>%(__on_port_opt)s(?:: (?!Too many authentication failures)[^\[]+)?(?: \[preauth\])?\s*$
-
--mdre-ddos = ^(?:Did not receive identification string from|Timeout before authentication for) <HOST>
-+mdre-ddos = ^(?:Did not receive identification string from|Timeout before authentication for(?: connection from)?) <HOST>
- ^kex_exchange_identification: (?:read: )?(?:[Cc]lient sent invalid protocol identifier|[Cc]onnection (?:closed by remote host|reset by peer))
- ^Bad protocol version identification '(?:[^']|.*?)' (?:from )?<HOST>%(__suff)s$
- ^<F-NOFAIL>SSH: Server;Ltype:</F-NOFAIL> (?:Authname|Version|Kex);Remote: <HOST>-\d+;[A-Z]\w+:
---- a/fail2ban/tests/files/logs/sshd
-+++ b/fail2ban/tests/files/logs/sshd
-@@ -360,6 +360,9 @@
- # failJSON: { "match": false, "desc": "Connection reset already triggered above (known IP, no-fail helper unused here)" }
- Jun 7 04:29:10 host sshd[649921]: Connection reset by 192.0.2.16 port 51280
-
-+# failJSON: { "time": "2005-06-10T09:43:06", "match": true , "host": "192.0.2.17", "desc": "ddos: timeout ... connection from, gh-3907" }
-+Jun 10 09:43:06 host sshd[3801]: Timeout before authentication for connection from 192.0.2.17 to 127.0.0.1, pid = 29098
-+
- # filterOptions: [{"mode": "extra"}, {"mode": "aggressive"}]
-
- # several other cases from gh-864:
diff --git a/net-analyzer/fail2ban/files/fail2ban-1.1.0-systemd-order.patch b/net-analyzer/fail2ban/files/fail2ban-1.1.0-systemd-order.patch
deleted file mode 100644
index 39da720466ef..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-1.1.0-systemd-order.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.gentoo.org/871996
---- a/files/fail2ban.service.in
-+++ b/files/fail2ban.service.in
-@@ -1,7 +1,10 @@
- [Unit]
- Description=Fail2Ban Service
- Documentation=man:fail2ban(1)
-+
-+Before=iptables-store.service ip6tables-store.service
- After=network.target iptables.service firewalld.service ip6tables.service ipset.service nftables.service
-+After=iptables-restore.service ip6tables-restore.service
- PartOf=iptables.service firewalld.service ip6tables.service ipset.service nftables.service
-
- [Service]
diff --git a/net-analyzer/fail2ban/files/fail2ban-tmpfiles.conf b/net-analyzer/fail2ban/files/fail2ban-tmpfiles.conf
deleted file mode 100644
index 6e611c6a2dc6..000000000000
--- a/net-analyzer/fail2ban/files/fail2ban-tmpfiles.conf
+++ /dev/null
@@ -1 +0,0 @@
-D /run/fail2ban 0755 root root -
diff --git a/net-analyzer/fail2ban/metadata.xml b/net-analyzer/fail2ban/metadata.xml
deleted file mode 100644
index 12bbcacb9196..000000000000
--- a/net-analyzer/fail2ban/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <stabilize-allarches/>
- <upstream>
- <remote-id type="github">fail2ban/fail2ban</remote-id>
- </upstream>
-</pkgmetadata>