Bug 2367780

Summary: pungi fails to build with Python 3.14: PermissionError: [Errno 1] Operation not permitted: '/tmp/tmpn4r5l99y/src/symlink2' -> '/tmp/tmpn4r5l99y/dst/symlink2'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: pungiAssignee: Lubomír Sedlář <lsedlar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: admiller, hlin, ksurma, lsedlar, mhroncok, onosek, w
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-26 08:22:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407    

Description Karolina Surma 2025-05-21 12:59:27 UTC
pungi fails to build with Python 3.14.0b1.

____________________ TestLinkerLink.test_link_dir_hardlink _____________________

self = <tests.test_linker.TestLinkerLink testMethod=test_link_dir_hardlink>

    def test_link_dir_hardlink(self):
>       self.linker.link(self.src_dir, self.dst_dir, link_type="hardlink")

tests/test_linker.py:285: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pungi/linker.py:247: in link
    self.link(src_path, dst_path, link_type)
pungi/linker.py:233: in link
    self._link_file(src, dst, link_type)
pungi/linker.py:210: in _link_file
    self.hardlink(src, dst)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pungi.linker.Linker object at 0x7efc75e2f450>
src = '/tmp/tmpn4r5l99y/src/symlink2', dst = '/tmp/tmpn4r5l99y/dst/symlink2'

    def hardlink(self, src, dst):
        if src == dst:
            return
    
        msg = "Hardlinking %s to %s" % (src, dst)
        if self.test:
            self.log_info("TEST: %s" % msg)
            return
        self.log_info(msg)
    
        try:
>           os.link(src, dst)
E           PermissionError: [Errno 1] Operation not permitted: '/tmp/tmpn4r5l99y/src/symlink2' -> '/tmp/tmpn4r5l99y/dst/symlink2'

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14-b1/fedora-rawhide-x86_64/09066403-pungi/

For all our attempts to build pungi with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/package/pungi/

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.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Lubomír Sedlář 2025-05-21 14:46:52 UTC
The failing test is trying to create a hardlink to a symlink to a directory. That is a very weird operation and I think we would be much better off without the ability to do crazy things like that.
https://pagure.io/pungi/pull-request/1840

Comment 2 Miro Hrončok 2025-05-22 17:01:06 UTC
This blocks the @critical-path-compose group.

Comment 3 Lubomír Sedlář 2025-05-26 06:36:54 UTC
The fix is merged in upstream master branch. What is needed to fix the rebuild?
Is it enough to backport that patch to rawhide?
https://src.fedoraproject.org/rpms/pungi/pull-request/10

Comment 4 Miro Hrončok 2025-05-26 08:19:19 UTC
> Is it enough to backport that patch to rawhide?

Yes. Pushing to dist-git is enough; you don't even need to build it. Thanks.