diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-05-22 07:31:18 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-05-22 07:31:18 +0100 |
commit | 908778078736bd36f7a60a2d576d415cb8e000fa (patch) | |
tree | c6a4796c48b608c14dc7e9674cdbd38f905e3c15 /net-analyzer/fail2ban/fail2ban-0.11.2.ebuild | |
parent | 185fa19bbf68a4d4dca534d2b46729207a177f16 (diff) |
gentoo resync : 22.05.2021
Diffstat (limited to 'net-analyzer/fail2ban/fail2ban-0.11.2.ebuild')
-rw-r--r-- | net-analyzer/fail2ban/fail2ban-0.11.2.ebuild | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/net-analyzer/fail2ban/fail2ban-0.11.2.ebuild b/net-analyzer/fail2ban/fail2ban-0.11.2.ebuild index 8f57fd666aa7..caf428f0ca77 100644 --- a/net-analyzer/fail2ban/fail2ban-0.11.2.ebuild +++ b/net-analyzer/fail2ban/fail2ban-0.11.2.ebuild @@ -10,14 +10,17 @@ inherit bash-completion-r1 distutils-r1 systemd tmpfiles DESCRIPTION="Scans log files and bans IPs that show malicious signs" HOMEPAGE="https://www.fail2ban.org/" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +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" -KEYWORDS="~alpha amd64 arm ~arm64 hppa ppc ppc64 sparc x86" IUSE="selinux systemd" -# Needs some work to enable them right now -RESTRICT="test" RDEPEND=" virtual/logger @@ -29,14 +32,16 @@ RDEPEND=" dev-python/python-systemd[${PYTHON_USEDEP}] sys-apps/systemd[python(-),${PYTHON_USEDEP}] )' 'python*' ) - ) + ) " DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) -python_prepare_all() { - default +PATCHES=( + "${FILESDIR}"/${P}-fix-tests-for-2021.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 @@ -51,6 +56,13 @@ python_compile() { 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 @@ -60,8 +72,8 @@ python_install_all() { 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" + 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} @@ -83,13 +95,13 @@ pkg_preinst() { } pkg_postinst() { - if [[ $previous_less_than_0_7 = 0 ]] ; then + 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 "files before restarting Fail2Ban!" elog - elog "Fail2ban is not installed under /usr/lib anymore. The" + 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:" |