The package needs porting to Python 3.13.
Currently there is an open blocker: cgitb python module dropped in python 3.13 https://gitlab.com/apparmor/apparmor/-/issues/447
Nevermind the blocker is fixed as of 4.0 and later.
Fix is here in case it needs to be backported to apparmor-3: https://gitlab.com/apparmor/apparmor/-/merge_requests/1439/diffs
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dac75631562535d0ca5ac23105c4b31de063007b commit dac75631562535d0ca5ac23105c4b31de063007b Author: Martin Mokry <martin-kokos@protonmail.com> AuthorDate: 2025-03-29 17:24:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-24 15:32:18 +0000 sys-apps/apparmor-utils: add 4.0.3 Bump to 4.* to include python3.13 compatibility fixes Closes: https://bugs.gentoo.org/952709 Signed-off-by: Martin Mokry <martin-kokos@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41373 Closes: https://github.com/gentoo/gentoo/pull/41373 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/apparmor-utils/Manifest | 1 + .../apparmor-utils/apparmor-utils-4.0.3.ebuild | 81 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48dbd54357f81669e5bf16d3a9ac6eb1f09c8043 commit 48dbd54357f81669e5bf16d3a9ac6eb1f09c8043 Author: Martin Mokry <martin-kokos@protonmail.com> AuthorDate: 2025-03-29 08:15:09 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-24 15:32:17 +0000 sys-libs/libapparmor: add 4.0.3 Bump to 4.* to include python3.13 compatibility fixes Closes: https://bugs.gentoo.org/952709 Signed-off-by: Martin Mokry <martin-kokos@protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41373 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/libapparmor/Manifest | 1 + sys-libs/libapparmor/libapparmor-4.0.3.ebuild | 131 ++++++++++++++++++++++++++ 2 files changed, 132 insertions(+)
*** Bug 955774 has been marked as a duplicate of this bug. ***
sys-apps/apparmor-4.0.3 does not have the python 3.13 fix. # apparmor_parser -V AppArmor parser version 4.0.3 Copyright (C) 1999-2008 Novell Inc. Copyright 2009-2018 Canonical Ltd. # python -V Python 3.13.3 # # aa-disable /etc/apparmor.d/usr.sbin.dovecot Traceback (most recent call last): File "/usr/lib/python-exec/python3.13/aa-disable", line 18, in <module> from apparmor.fail import enable_aa_exception_handler File "/usr/lib/python3.13/site-packages/apparmor/fail.py", line 11, in <module> import cgitb ModuleNotFoundError: No module named 'cgitb' # The fix was committed upstream in November 2024, after the August 4.0.3 release. The first (non-beta) upstream release with the fix is 4.1, released April 2025.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a8d6d0fd44c16e1bf46b35a9019ce6a3a3c17cb commit 0a8d6d0fd44c16e1bf46b35a9019ce6a3a3c17cb Author: Sam James <sam@gentoo.org> AuthorDate: 2025-06-08 09:33:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-06-08 09:34:21 +0000 sys-apps/apparmor-utils: drop py3.13 It doesn't work with <4.1. Bug: https://bugs.gentoo.org/952709 Closes: https://bugs.gentoo.org/957140 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/apparmor-utils/apparmor-utils-3.1.4-r1.ebuild | 4 ++-- sys-apps/apparmor-utils/apparmor-utils-4.0.3.ebuild | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da122fd54debb9c00b323c1b1c22038921425e50 commit da122fd54debb9c00b323c1b1c22038921425e50 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-06-08 09:33:16 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-06-08 09:34:20 +0000 sys-libs/libapparmor: drop py3.13 It doesn't work with <4.1. Bug: https://bugs.gentoo.org/952709 Closes: https://bugs.gentoo.org/957140 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/libapparmor/libapparmor-3.1.4-r2.ebuild | 2 +- sys-libs/libapparmor/libapparmor-4.0.3.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Reopening.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=718e6b711ac1ed3e0d5c12e466d0c19364f108f2 commit 718e6b711ac1ed3e0d5c12e466d0c19364f108f2 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-06-08 10:27:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-06-08 10:27:59 +0000 sys-apps/apparmor-utils: fix py3.13 compat Closes: https://bugs.gentoo.org/957140 Bug: https://bugs.gentoo.org/952709 Signed-off-by: Sam James <sam@gentoo.org> ...4.0.3.ebuild => apparmor-utils-4.0.3-r1.ebuild} | 1 + .../files/apparmor-utils-4.0.3-py3.13.patch | 75 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a369256e2ed4d7ff5f7a3cc7939c8c28dc4d70c2 commit a369256e2ed4d7ff5f7a3cc7939c8c28dc4d70c2 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-06-08 10:24:58 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-06-08 10:27:58 +0000 sys-libs/libapparmor: enable py3.13 Bug: https://bugs.gentoo.org/952709 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/libapparmor/libapparmor-4.0.3.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ec4f94a9ece73eef0839f4893ae99428b18e754 commit 9ec4f94a9ece73eef0839f4893ae99428b18e754 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-06-08 22:59:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-06-08 22:59:41 +0000 sys-apps/apparmor-utils: enable py3.13 I added the patch in 718e6b711ac1ed3e0d5c12e466d0c19364f108f2 but forgot to change PYTHON_COMPAT back again. Bug: https://bugs.gentoo.org/952709 Bug: https://bugs.gentoo.org/957140 Reported-by: thican Signed-off-by: Sam James <sam@gentoo.org> sys-apps/apparmor-utils/apparmor-utils-4.0.3-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)