mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-10 06:57:08 -08:00
net-analyzer/fail2ban: cleanup live
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_SINGLE_IMPL=1
|
||||
DISUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1 systemd tmpfiles
|
||||
@@ -29,10 +30,8 @@ RDEPEND="
|
||||
selinux? ( sec-policy/selinux-fail2ban )
|
||||
systemd? (
|
||||
$(python_gen_cond_dep '
|
||||
|| (
|
||||
dev-python/python-systemd[${PYTHON_USEDEP}]
|
||||
sys-apps/systemd[python(-),${PYTHON_USEDEP}]
|
||||
)' 'python*' )
|
||||
dev-python/python-systemd[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
|
||||
@@ -50,15 +49,9 @@ python_prepare_all() {
|
||||
sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die
|
||||
}
|
||||
|
||||
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}"
|
||||
|
||||
# Workaround for bug #790251
|
||||
@@ -100,7 +93,7 @@ pkg_preinst() {
|
||||
pkg_postinst() {
|
||||
tmpfiles_process ${PN}-tmpfiles.conf
|
||||
|
||||
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"
|
||||
@@ -113,10 +106,9 @@ pkg_postinst() {
|
||||
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"
|
||||
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
|
||||
@@ -125,9 +117,4 @@ pkg_postinst() {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user