Bug 2319141

Summary: libselinux fails to build with Swig 4.3.0
Product: [Fedora] Fedora Reporter: Jitka Plesnikova <jplesnik>
Component: libselinuxAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mmalik, plautrba, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libselinux-3.8-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-30 19:31:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jitka Plesnikova 2024-10-16 12:32:15 UTC
libselinux fails to build with preparing Swig 4.3.0. I tested rebuild in Copr:

https://copr.fedorainfracloud.org/coprs/jplesnik/swig-rebuild/build/8116850/

due to an incompatible change in Swig

https://github.com/swig/swig/blob/master/CHANGES.current

"[Python] #2907 Fix returning null from functions with output
            parameters.  Ensures OUTPUT and INOUT typemaps are handled
            consistently wrt return type.

            New declaration of SWIG_Python_AppendOutput is now:

              SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void);

            The 3rd parameter is new and the new $isvoid special variable
            should be passed to it, indicating whether or not the wrapped
            function returns void.

            Also consider replacing with:

              SWIG_AppendOutput(PyObject* result, PyObject* obj);

            which calls SWIG_Python_AppendOutput with same parameters but adding $isvoid
            for final parameter."

I prepared PR with fix
https://src.fedoraproject.org/rpms/libselinux/pull-request/31

Reproducible: Always

Comment 2 Fedora Update System 2025-01-30 16:32:02 UTC
FEDORA-2025-431101b5da (checkpolicy-3.8-1.fc42, libselinux-3.8-1.fc42, and 5 more) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-431101b5da

Comment 3 Fedora Update System 2025-01-30 19:31:51 UTC
FEDORA-2025-431101b5da (checkpolicy-3.8-1.fc42, libselinux-3.8-1.fc42, and 5 more) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.