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 bugzilla.redhat.com.
Bug 1896378 - audit fails to build with Python 3.10: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Summary: audit fails to build with Python 3.10: SystemError: PY_SSIZE_T_CLEAN macro mu...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: audit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Correia
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-10 12:28 UTC by Tomáš Hrnčiar
Modified: 2021-02-02 16:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-02 16:42:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-10 12:28:58 UTC
audit fails to build with Python 3.10.0a2.

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builddir/build/BUILD/audit-3.0/auparse/test/./auparse_test.py", line 242, in <module>
    au.feed(data)
SystemError: <method 'feed' of 'auparse.AuParser' objects> returned a result with an error set
diff -u ../../auparse/test/auparse_test.ref.py auparse_test.cur
--- ../../auparse/test/auparse_test.ref.py	2019-11-04 19:55:44.000000000 +0000
+++ auparse_test.cur	2020-11-10 09:40:40.972886748 +0000
@@ -574,220 +574,3 @@
 Test 8 Done
 
 Starting Test 9, buffer feed...
-event 1 has 1 records
-    record 1 of type 1006(LOGIN) has 5 fields
-    line=1 file=None
-    event time: 1143146623.787:142, host=(null)
-        type=LOGIN (LOGIN)
-        pid=2027 (2027)
-        uid=0 (root)
-        auid=4294967295 (unset)
-        auid=848 (unknown(848))
-
-event 2 has 1 records
-    record 1 of type 1300(SYSCALL) has 24 fields
-    line=2 file=None
-    event time: 1143146623.875:143, host=(null)
-        type=SYSCALL (SYSCALL)
-        arch=c000003e (x86_64)
-        syscall=188 (setxattr)
-        success=yes (yes)
-        exit=0 (0)
-        a0=7fffffa9a9f0 (0x7fffffa9a9f0)
-        a1=3958d11333 (0x3958d11333)
-        a2=5131f0 (0x5131f0)
-        a3=20 (0x20)
-        items=1 (1)
-        pid=2027 (2027)
-        auid=848 (unknown(848))
-        uid=0 (root)
-        gid=0 (root)
-        euid=0 (root)
-        suid=0 (root)
-        fsuid=0 (root)
-        egid=0 (root)
-        sgid=0 (root)
-        fsgid=0 (root)
-        tty=tty3 (tty3)
-        comm="login" (login)
-        exe="/bin/login" (/bin/login)
-        subj=system_u:system_r:local_login_t:s0-s0:c0.c255 (system_u:system_r:local_login_t:s0-s0:c0.c255)
-
-event 3 has 1 records
-    record 1 of type 1112(USER_LOGIN) has 10 fields
-    line=3 file=None
-    event time: 1143146623.879:146, host=(null)
-        type=USER_LOGIN (USER_LOGIN)
-        pid=2027 (2027)
-        uid=0 (root)
-        auid=848 (unknown(848))
-        uid=848 (unknown(848))
-        exe="/bin/login" (/bin/login)
-        hostname=? (?)
-        addr=? (?)
-        terminal=tty3 (tty3)
-        res=success (success)
-
-Test 9 Done
-
-Starting Test 10, file feed...
-event 1 has 4 records
-    record 1 of type 1400(AVC) has 11 fields
-    line=1 file=None
-    event time: 1170021493.977:293, host=(null)
-        type=AVC (AVC)
-        seresult=denied (denied)
-        seperms=read,write (read,write)
-        pid=13010 (13010)
-        comm="pickup" (pickup)
-        name="maildrop" (maildrop)
-        dev=hda7 (hda7)
-        ino=14911367 (14911367)
-        scontext=system_u:system_r:postfix_pickup_t:s0 (system_u:system_r:postfix_pickup_t:s0)
-        tcontext=system_u:object_r:postfix_spool_maildrop_t:s0 (system_u:object_r:postfix_spool_maildrop_t:s0)
-        tclass=dir (dir)
-
-    record 2 of type 1300(SYSCALL) has 26 fields
-    line=2 file=None
-    event time: 1170021493.977:293, host=(null)
-        type=SYSCALL (SYSCALL)
-        arch=c000003e (x86_64)
-        syscall=2 (open)
-        success=no (no)
-        exit=-13 (EACCES(Permission denied))
-        a0=5555665d91b0 (0x5555665d91b0)
-        a1=10800 (O_RDONLY|O_NONBLOCK|O_DIRECTORY)
-        a2=5555665d91b8 (0x5555665d91b8)
-        a3=0 (0x0)
-        items=1 (1)
-        ppid=2013 (2013)
-        pid=13010 (13010)
-        auid=4294967295 (unset)
-        uid=890 (unknown(890))
-        gid=890 (unknown(890))
-        euid=890 (unknown(890))
-        suid=890 (unknown(890))
-        fsuid=890 (unknown(890))
-        egid=890 (unknown(890))
-        sgid=890 (unknown(890))
-        fsgid=890 (unknown(890))
-        tty=(none) ((none))
-        comm="pickup" (pickup)
-        exe="/usr/libexec/postfix/pickup" (/usr/libexec/postfix/pickup)
-        subj=system_u:system_r:postfix_pickup_t:s0 (system_u:system_r:postfix_pickup_t:s0)
-        key=(null) ((null))
-
-    record 3 of type 1307(CWD) has 2 fields
-    line=3 file=None
-    event time: 1170021493.977:293, host=(null)
-        type=CWD (CWD)
-        cwd="/var/spool/postfix" (/var/spool/postfix)
-
-    record 4 of type 1302(PATH) has 10 fields
-    line=4 file=None
-    event time: 1170021493.977:293, host=(null)
-        type=PATH (PATH)
-        item=0 (0)
-        name="maildrop" (maildrop)
-        inode=14911367 (14911367)
-        dev=03:07 (03:07)
-        mode=040730 (dir,730)
-        ouid=890 (unknown(890))
-        ogid=891 (unknown(891))
-        rdev=00:00 (00:00)
-        obj=system_u:object_r:postfix_spool_maildrop_t:s0 (system_u:object_r:postfix_spool_maildrop_t:s0)
-
-event 2 has 1 records
-    record 1 of type 1101(USER_ACCT) has 11 fields
-    line=5 file=None
-    event time: 1170021601.340:294, host=(null)
-        type=USER_ACCT (USER_ACCT)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=4294967295 (unset)
-        subj=system_u:system_r:crond_t:s0-s0:c0.c1023 (system_u:system_r:crond_t:s0-s0:c0.c1023)
-        acct=root (root)
-        exe="/usr/sbin/crond" (/usr/sbin/crond)
-        hostname=? (?)
-        addr=? (?)
-        terminal=cron (cron)
-        res=success (success)
-
-event 3 has 1 records
-    record 1 of type 1103(CRED_ACQ) has 11 fields
-    line=6 file=None
-    event time: 1170021601.342:295, host=(null)
-        type=CRED_ACQ (CRED_ACQ)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=4294967295 (unset)
-        subj=system_u:system_r:crond_t:s0-s0:c0.c1023 (system_u:system_r:crond_t:s0-s0:c0.c1023)
-        acct=root (root)
-        exe="/usr/sbin/crond" (/usr/sbin/crond)
-        hostname=? (?)
-        addr=? (?)
-        terminal=cron (cron)
-        res=success (success)
-
-event 4 has 1 records
-    record 1 of type 1006(LOGIN) has 5 fields
-    line=7 file=None
-    event time: 1170021601.343:296, host=(null)
-        type=LOGIN (LOGIN)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=4294967295 (unset)
-        auid=0 (root)
-
-event 5 has 1 records
-    record 1 of type 1105(USER_START) has 11 fields
-    line=8 file=None
-    event time: 1170021601.344:297, host=(null)
-        type=USER_START (USER_START)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=0 (root)
-        subj=system_u:system_r:crond_t:s0-s0:c0.c1023 (system_u:system_r:crond_t:s0-s0:c0.c1023)
-        acct=root (root)
-        exe="/usr/sbin/crond" (/usr/sbin/crond)
-        hostname=? (?)
-        addr=? (?)
-        terminal=cron (cron)
-        res=success (success)
-
-event 6 has 1 records
-    record 1 of type 1104(CRED_DISP) has 11 fields
-    line=9 file=None
-    event time: 1170021601.364:298, host=(null)
-        type=CRED_DISP (CRED_DISP)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=0 (root)
-        subj=system_u:system_r:crond_t:s0-s0:c0.c1023 (system_u:system_r:crond_t:s0-s0:c0.c1023)
-        acct=root (root)
-        exe="/usr/sbin/crond" (/usr/sbin/crond)
-        hostname=? (?)
-        addr=? (?)
-        terminal=cron (cron)
-        res=success (success)
-
-event 7 has 1 records
-    record 1 of type 1106(USER_END) has 11 fields
-    line=10 file=None
-    event time: 1170021601.366:299, host=(null)
-        type=USER_END (USER_END)
-        pid=13015 (13015)
-        uid=0 (root)
-        auid=0 (root)
-        subj=system_u:system_r:crond_t:s0-s0:c0.c1023 (system_u:system_r:crond_t:s0-s0:c0.c1023)
-        acct=root (root)
-        exe="/usr/sbin/crond" (/usr/sbin/crond)
-        hostname=? (?)
-        addr=? (?)
-        terminal=cron (cron)
-        res=success (success)
-
-Test 10 Done
-
-Finished non-admin tests

https://docs.python.org/3.10/whatsnew/3.10.html#id2

The PY_SSIZE_T_CLEAN macro must now be defined to use PyArg_ParseTuple() and Py_BuildValue() formats which use #: es#, et#, s#, u#, y#, z#, U# and Z#. See Parsing arguments and building values and the PEP 353.
https://docs.python.org/3.10/c-api/arg.html#arg-parsing https://www.python.org/dev/peps/pep-0353 https://bugs.python.org/issue40943

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01756959-audit/

For all our attempts to build audit with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/audit/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-11-16 10:21:44 UTC
I've bumped the severity to high, because audit is a cripath package.

This seem to have been fixed in upstream already in May:

https://github.com/linux-audit/audit-userspace/commit/005fcc16282bba2689af7b56c9935579a32bce75

Comment 2 Steve Grubb 2020-11-16 15:20:46 UTC
There will be a new release of the audit package soon. That will fix it.


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