Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 2225799 - fail2ban: FTBFS in Fedora rawhide/f39
Summary: fail2ban: FTBFS in Fedora rawhide/f39
Alias: None
Product: Fedora
Classification: Fedora
Component: fail2ban
Version: 39
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Richard Shaw
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2023-07-25 17:37 UTC by Fedora Release Engineering
Modified: 2023-10-05 21:15 UTC (History)
5 users (show)

Fixed In Version: fail2ban-1.0.2-9.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2023-10-05 21:15:21 UTC
Type: ---

Attachments (Terms of Use)
build.log (deleted)
2023-07-25 17:37 UTC, Fedora Release Engineering
no flags Details
root.log (deleted)
2023-07-25 17:37 UTC, Fedora Release Engineering
no flags Details
state.log (deleted)
2023-07-25 17:37 UTC, Fedora Release Engineering
no flags Details

System ID Private Priority Status Summary Last Updated
Github fail2ban fail2ban issues 3487 0 None open [BR]: Fails to build with Python 3.12 - ModuleNotFoundError: No module named 'asynchat' 2023-07-30 11:58:06 UTC

Description Fedora Release Engineering 2023-07-25 17:37:25 UTC
fail2ban failed to build from source in Fedora rawhide/f39

For details on the mass rebuild see:
Please fix fail2ban at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
fail2ban will be orphaned. Before branching of Fedora 40,
fail2ban will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:

Comment 1 Fedora Release Engineering 2023-07-25 17:37:32 UTC
Created attachment 1977870 [details]

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2023-07-25 17:37:39 UTC
Created attachment 1977871 [details]

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2023-07-25 17:37:42 UTC
Created attachment 1977872 [details]

Comment 4 Todd Zullinger 2023-07-30 14:44:38 UTC
I haven't tried either of these ideas, so they may both be fatally flawed or just more effort than they're worth...

Could we either a) bundle the python asyncore and asynchat modules from python 3.11 or b) build against python3.11?

Just until upstream fail2ban is able to convert to asyncio (which seems like it could be a good part of the f39 lifecycle).

Bundling the libraries is a smaller change, but more likely to require some effort in making the bundled libraries work with python3.12, while building against python3.11 is a bigger hammer but probably less packaging effort.

Comment 5 Todd Zullinger 2023-07-30 17:16:05 UTC
I gave the bundling a try.  The current status is at, with ff7b736 (tests: remove test_smtp, smtpd was removed in python-3.12, 2023-07-30) as the tip of the branch.

The last scratch build I ran is

There is a failing test which I'm not sure is related to the asyncore/asynchat or smtpd removals in python 3.12, but I am out of time to keep poking it for now:

FAIL: testRepairDb (fail2ban.tests.databasetestcase.DatabaseTest.testRepairDb)
Traceback (most recent call last):
  File "/builddir/build/BUILD/fail2ban-1.0.2/fail2ban/tests/", line 138, in testRepairDb
    self.assertLogged("Repair seems to be successful",
  File "/builddir/build/BUILD/fail2ban-1.0.2/fail2ban/tests/", line 816, in assertLogged"%r was not found in the log%s: ===\n%s===" % (s_,
AssertionError: 'Repair seems to be successful' was not found in the log: ===
===== [test-repair], next phase - file-size: 14000 =====
Connected to fail2ban persistent database '/tmp/fail2ban_kju3379o.db'
Error opening fail2ban persistent database '/tmp/fail2ban_kju3379o.db': database disk image is malformed
Trying to repair database /tmp/fail2ban_kju3379o.db
  Database backup created: /tmp/fail2ban_kju3379o.db.20230730-162449
f3483d08 -- exec: ('f2b_db=$0; f2b_dbbk=$1; sqlite3 "$f2b_dbbk" ".dump" | sqlite3 "$f2b_db" ', '/tmp/fail2ban_kju3379o.db', '/tmp/fail2ban_kju3379o.db.20230730-162449')
f3483d08 -- returned successfully 0
  Repair seems to be failed, restored 0 byte(s).
  Error repairing of fail2ban database '/tmp/fail2ban_kju3379o.db': Recreate ...
Connected to fail2ban persistent database '/tmp/fail2ban_kju3379o.db'
New database created. Version '4'
  Create missing tables/indices ...
  -> ok
  Check integrity ...
  -> ok
Ran 496 tests in 18.534s
FAILED (failures=1, skipped=12)

Comment 6 Fedora Release Engineering 2023-08-16 07:56:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 7 Fedora Update System 2023-09-29 23:27:31 UTC
FEDORA-2023-e36c5fb76b has been submitted as an update to Fedora 39.

Comment 8 Fedora Update System 2023-09-30 03:31:37 UTC
FEDORA-2023-e36c5fb76b has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e36c5fb76b`
You can provide feedback for this update here:

See also for more information on how to test updates.

Comment 9 Fedora Update System 2023-10-05 21:15:21 UTC
FEDORA-2023-e36c5fb76b has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.