From version 0.9.0 changelog: Added fail2ban persistent database - needs dev-lang/python[sqlite] Added systemd journal backend - needs sys-apps/systemd[python] I'm not using systemd, so I haven't tested with that. Reproducible: Always Actual Results: fail2ban-server --version Traceback (most recent call last): File "/usr/lib/python-exec/python3.3/fail2ban-server", line 28, in <module> from fail2ban.server.server import Server File "/usr/lib64/python3.3/site-packages/fail2ban/server/server.py", line 34, in <module> from .database import Fail2BanDb File "/usr/lib64/python3.3/site-packages/fail2ban/server/database.py", line 27, in <module> import sqlite3 ImportError: No module named 'sqlite3'
Index: fail2ban-0.9.0-r1.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-analyzer/fail2ban/fail2ban-0.9.0-r1.ebuild,v retrieving revision 1.1 diff -u -B -r1.1 fail2ban-0.9.0-r1.ebuild --- fail2ban-0.9.0-r1.ebuild 17 Mar 2014 00:43:21 -0000 1.1 +++ fail2ban-0.9.0-r1.ebuild 18 Mar 2014 16:25:41 -0000 @@ -78,10 +78,19 @@ 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 ${CATEGORY}/${PN} && \ - ! 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 ${CATEGORY}/${PN}; then + 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 ! built_with_use dev-lang/python sqlite; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite" + fi + if has_version sys-apps/systemd && ! built_with_use 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 fi } Something like this?
Created attachment 372948 [details, diff] fail2ban-0.9.0-r1.ebuild-elog.patch
Comment on attachment 372948 [details, diff] fail2ban-0.9.0-r1.ebuild-elog.patch Apparently built_with_use is deprecated.
Created attachment 372950 [details, diff] fail2ban-0.9.0-r1.ebuild-elog.patch
It's in the tree, too. Could someone please test this?
For me it's still failing with: # fail2ban-server Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/fail2ban-server", line 28, in <module> from fail2ban.server.server import Server File "/usr/lib64/python2.7/site-packages/fail2ban/server/server.py", line 34, in <module> from .database import Fail2BanDb File "/usr/lib64/python2.7/site-packages/fail2ban/server/database.py", line 27, in <module> import sqlite3 ImportError: No module named sqlite3 even though I configured fail2ban to not use any database in /etc/fail2ban/fail2ban.local: [Definition] dbfile = None And just to be sure it's not the override, I also changed it in /etc/fail2ban/fail2ban.conf: # Options: dbfile # Notes.: Set the file for the fail2ban persistent data to be stored. # A value of ":memory:" means database is only stored in memory # and data is lost once fail2ban is stops. # A value of "None" disables the database. # Values: [ None :memory: FILE ] Default: /var/lib/fail2ban/fail2ban.sqlite3 #dbfile = /var/lib/fail2ban/fail2ban.sqlite3 dbfile = None So it seems dev-lang/python[sqlite] is mandatory for fail2ban to work if a database is used or not. On a side note, the elog regarding the "HOWTO_Upgrade_from_0.6_to_0.8" should probably be removed in the 0.9.x ebuilds as well, since there were major changes in the configuration and the upgrade path described in the wiki for 0.8 doesn't apply any more.
(In reply to Timo Gurr from comment #6) > For me it's still failing with: > > # fail2ban-server > Traceback (most recent call last): > File "/usr/lib/python-exec/python2.7/fail2ban-server", line 28, in <module> > from fail2ban.server.server import Server > File "/usr/lib64/python2.7/site-packages/fail2ban/server/server.py", line > 34, in <module> > from .database import Fail2BanDb > File "/usr/lib64/python2.7/site-packages/fail2ban/server/database.py", > line 27, in <module> > import sqlite3 > ImportError: No module named sqlite3 > > even though I configured fail2ban to not use any database in > /etc/fail2ban/fail2ban.local: [...] > So it seems dev-lang/python[sqlite] is mandatory for fail2ban to work if a > database is used or not. That's not what _this_ bug report is about. > On a side note, the elog regarding the "HOWTO_Upgrade_from_0.6_to_0.8" > should probably be removed in the 0.9.x ebuilds as well, since there were > major changes in the configuration and the upgrade path described in the > wiki for 0.8 doesn't apply any more. Now you're confusing three issues.
It seems someone has fixed the requirement for dev-lang/python[sqlite]. Here is the patch: https://github.com/fail2ban/fail2ban/pull/659
(In reply to Jaakko Perttilä from comment #8) > It seems someone has fixed the requirement for dev-lang/python[sqlite]. > Here is the patch: > https://github.com/fail2ban/fail2ban/pull/659 Wrong bug.
Assumed fixed.