diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
commit | 068424b26532f3551a81421a9be67ed206e5c11a (patch) | |
tree | 583b8d979899a463a4ef5b26d3d49e85df987623 /net-analyzer/fail2ban | |
parent | d162ba1860a88062f4cd61f8b52fc303ba0b2991 (diff) |
gentoo resync : 11.08.2021
Diffstat (limited to 'net-analyzer/fail2ban')
-rw-r--r-- | net-analyzer/fail2ban/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild | 131 | ||||
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-9999.ebuild | 6 | ||||
-rw-r--r-- | net-analyzer/fail2ban/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch | 29 |
4 files changed, 168 insertions, 2 deletions
diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest index bbefb09c8f51..568bfe3b9f47 100644 --- a/net-analyzer/fail2ban/Manifest +++ b/net-analyzer/fail2ban/Manifest @@ -1,5 +1,7 @@ +AUX fail2ban-0.11.2-adjust-apache-logs-paths.patch 893 BLAKE2B 5b80b81488a5245d9d9d15a1b0205a1d86f132e3faa5ea3e5cf91d55082b2d264e558dca4b7fbe62f643601b3315ac31cae387c433c2d90b670965abfa744f87 SHA512 dddff4858431170f5a24daab2d3cedcdcd7a1194b8ecbbcd794dfe00dcaee4af410afef102d3a25f86f541267d7be63e3e1d239c879e95d20cef9f0dacdcdc4c AUX fail2ban-0.11.2-fix-tests-for-2021.patch 1821 BLAKE2B 52fae8ace32d6205d290d7e3a57378e10398742a735e9bf734d1ba4c6ff73abeb7bff8d0f76924c815a1dcdd7e57bf1a584956e1c03ff0db93f20ce68f1c8176 SHA512 a3db4065b5e815d409318c7aeb0f2fac87b2f91f7b1923a4c1684cbc97eb086ccd0fab993270d8c84d6f9da911f467d391689f312d89cea7cc6d59c20cfd39b0 DIST fail2ban-0.11.2.tar.gz 559552 BLAKE2B 0c61c1d5f6eb23d585533fbb84e69343cb305df188537a97002489318292c6056447c4c221c9d4d4cde6cca52f0c2fb877b597957f703e4d6707801a646e52b0 SHA512 46b27abd947b00ea64106dbac563ef8afef38eec86684024d47d9a0e8c1969ff864ad6df7f4f8de2aa3eb1af6d769fb6796592d9f0e35521d5f95f17b8cade97 +EBUILD fail2ban-0.11.2-r1.ebuild 3689 BLAKE2B 5dc2fa9338ed3b48fa81521ce89ed70eafe0da29fa224c3bd7f364cd6472e19164b4b271553d607c38d83d5058ac5b346d95d917b9caa7028f0dd1d052e1adeb SHA512 ed072821e005a52809b6bfd0f0885bb3e90d157f7e5f638ba64efde3132f781e2925316bc45cfcf82dbbeb05422e74bc38d631004e0f83cc64a712b692035610 EBUILD fail2ban-0.11.2.ebuild 3625 BLAKE2B f4b38ddd45e4cc6f9c5e39a56aae7e131c98d3867fece38c5e6936161b47b6885e6d5a294be2531a8b8a4c4d67f38b7bcb03156b8193f3bcb3279c3f0a40732c SHA512 ce4be968377b06d0e95735d487a7c1c9de1b19a659b12fe03d50a792fdf69fdc81633201417cd6a932220d9228c4e17e3d8e70e884eba7c5d2cc9d1b6624c216 -EBUILD fail2ban-9999.ebuild 3577 BLAKE2B d355a7e2dd272987146d9bf37de7ff205052837ad04324964e7bef2a18759c0db07ca3cbe494f989acf36663138a3ed5755930ef6c3de99ee50677c4afab2733 SHA512 9553bf8079c7b886c038a87aec8bca6862290568463fd5aaf585741853ac4b8582e0b033a5ff40d9174cce5d47b8617dc23d971eb17e398638021f30c93237bf +EBUILD fail2ban-9999.ebuild 3647 BLAKE2B d8f991763425786647a84c1323ab5c660be6bf5accbe2a3d97b771b55f83880d59b40205fa4dd70699a15f04c5ab6ef634fc00962b8ed8018da668b6fbf71f08 SHA512 95d57eb6462f8907a9c9bc0632213935f62a8741350c0b8878765399bf413496ece5b1e0b1cf7a3d58e5b7fba0730ff3261e5201f346c11f779eb7973bcc8174 MISC metadata.xml 356 BLAKE2B 28861bc6e3c62f2c21ea1480816f2645de929f009dccf7f6ecf9d8a10ed72214fa80acab6bd72ca314b6f3154096b0c0f0324b07fece238150c356aac17886e9 SHA512 5759cb73ed737bf25d4fc68dc12a722100e5d7aba222a082d49900e8cbc06cbd1bf5d7272fae9f6256d475fe29397f391fcbffda9eee4e73214ad941da27ce69 diff --git a/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild b/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild new file mode 100644 index 000000000000..a858cbe09d29 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-0.11.2-r1.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8,9} ) +DISTUTILS_SINGLE_IMPL=1 + +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/${PN}/${PN}" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="selinux systemd" + +RDEPEND=" + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( + $(python_gen_cond_dep ' + || ( + dev-python/python-systemd[${PYTHON_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_USEDEP}] + )' 'python*' ) + ) +" + +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 +) + +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 + + sed -i -e 's|runscript|openrc-run|g' files/gentoo-initd || die + + distutils-r1_python_prepare_all +} + +python_compile() { + ./fail2ban-2to3 || die + distutils-r1_python_compile +} + +python_test() { + bin/fail2ban-testcases \ + --no-network \ + --no-gamin \ + --verbosity=4 || die "Tests failed with ${EPYTHON}" +} + +python_install_all() { + distutils-r1_python_install_all + + rm -rf "${ED}"/usr/share/doc/${PN} "${ED}"/run || die + + # Not ${FILESDIR} + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + + sed -e "s:@BINDIR@:${EPREFIX}/usr/bin:g" files/${PN}.service.in > "${T}"/${PN}.service || die + systemd_dounit "${T}"/${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 && ! has_version app-admin/gamin ; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "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 + + if has_version sys-apps/systemd[-python] ; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-9999.ebuild b/net-analyzer/fail2ban/fail2ban-9999.ebuild index 2ad8f462e23d..9d117cebef47 100644 --- a/net-analyzer/fail2ban/fail2ban-9999.ebuild +++ b/net-analyzer/fail2ban/fail2ban-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{8,9} ) DISTUTILS_SINGLE_IMPL=1 inherit bash-completion-r1 distutils-r1 systemd tmpfiles @@ -38,6 +38,10 @@ RDEPEND=" DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) +PATCHES=( + "${FILESDIR}"/${PN}-0.11.2-adjust-apache-logs-paths.patch +) + python_prepare_all() { # Replace /var/run with /run, but not in the top source directory find . -mindepth 2 -type f -exec \ 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 new file mode 100644 index 000000000000..3017883f0d5a --- /dev/null +++ b/net-analyzer/fail2ban/files/fail2ban-0.11.2-adjust-apache-logs-paths.patch @@ -0,0 +1,29 @@ +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 + |