Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 952709 - sys-apps/apparmor-utils: needs porting to Python 3.13
Summary: sys-apps/apparmor-utils: needs porting to Python 3.13
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 955774 (view as bug list)
Depends on:
Blocks: py3.13-tracker
  Show dependency tree
 
Reported: 2025-03-27 16:06 UTC by Michał Górny
Modified: 2025-06-08 23:00 UTC (History)
3 users (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2025-03-27 16:06:54 UTC
The package needs porting to Python 3.13.
Comment 1 martin-kokos 2025-03-28 18:27:25 UTC
Currently there is an open blocker:

cgitb python module dropped in python 3.13 
https://gitlab.com/apparmor/apparmor/-/issues/447
Comment 2 martin-kokos 2025-03-28 18:47:04 UTC
Nevermind the blocker is fixed as of 4.0 and later.
Comment 3 martin-kokos 2025-04-04 15:30:20 UTC
Fix is here in case it needs to be backported to apparmor-3:
https://gitlab.com/apparmor/apparmor/-/merge_requests/1439/diffs
Comment 4 Larry the Git Cow gentoo-dev 2025-04-24 15:32:59 UTC
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(+)
Comment 5 Greg Kubaryk 2025-05-10 22:22:39 UTC
*** Bug 955774 has been marked as a duplicate of this bug. ***
Comment 6 gen2dev 2025-05-15 01:48:01 UTC
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.
Comment 7 Larry the Git Cow gentoo-dev 2025-06-08 09:34:54 UTC
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(-)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-06-08 09:35:14 UTC
Reopening.
Comment 9 Larry the Git Cow gentoo-dev 2025-06-08 10:28:33 UTC
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(-)
Comment 10 Larry the Git Cow gentoo-dev 2025-06-08 23:00:27 UTC
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(-)