Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520516 - =net-analyzer/fail2ban-0.9.0-r1 should depend on systemd? ( sys-apps/systemd[python] )
Summary: =net-analyzer/fail2ban-0.9.0-r1 should depend on systemd? ( sys-apps/systemd[...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-22 10:57 UTC by Fabio Scaccabarozzi
Modified: 2014-10-28 16:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Scaccabarozzi 2014-08-22 10:57:25 UTC
fail2ban fails to work correctly with systemd as a backend if systemd is built without "python" useflags (which enables python bindings for systemd, used by fail2ban).
Specifically, what's missing in DEPEND and RDEPEND should be:
systemd? ( sys-apps/systemd[python] )

Reproducible: Always

Steps to Reproduce:
1. emerge net-analyzer/fail2ban on a systemd system
2. ensure systemd has no "python" flag set
3. start fail2ban with some active jail
Actual Results:  
I have omitted several "ERROR NOK" lines duplicates of the jail-specific ones:
fail2ban-client[25206]: ERROR  NOK: ("Failed to initialize any backend for Jail 'nginx-http-auth'",)
fail2ban-client[25206]: ERROR  NOK: ('nginx-http-auth',)
fail2ban-client[25206]: ERROR  NOK: ('nginx-http-auth',)
...
fail2ban-client[25206]: ERROR  NOK: ("Failed to initialize any backend for Jail 'pure-ftpd'",)
fail2ban-client[25206]: ERROR  NOK: ('pure-ftpd',)
fail2ban-client[25206]: ERROR  NOK: ('pure-ftpd',)
...

Expected Results:  
fail2ban-client[14556]: 2014-08-22 12:44:53,436 fail2ban.server.server[14557]: INFO    Starting Fail2ban v0.9.0
fail2ban-client[14556]: 2014-08-22 12:44:53,437 fail2ban.server.server[14557]: INFO    Starting in daemon mode
systemd[1]: Started Fail2ban Service.

The problem is due to the fact that systemd has no "python" flag enabled, hence no python bindings, which are specified as a requirement with systemd on the fail2ban docs.
After enabling the flag, fail2ban correctly loads the jails and starts.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-28 08:39:31 UTC
systemd@?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-28 09:33:22 UTC
Sounds correct to me. If the service file is completely unusable without systemd[python], it should also be made conditional to USE=systemd.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-28 10:10:14 UTC
Added in 0.9.1.
Comment 4 Mike Gilbert gentoo-dev 2014-10-28 16:39:41 UTC
The dependency is still not quite right; fail2ban is installed for multiple python versions (via distutils-r1), but systemd bindings are only installed for one (via python-single-r1).

I created bug 527254 to convert systemd to python-r1.