Bug 2334009

Summary: livecd-creator fails after upgrades installed on 2024-12-22, which included python3.x86_64 3.13.1-2.fc41
Product: [Fedora] Fedora Reporter: skeeter9807
Component: livecd-toolsAssignee: Neal Gompa <ngompa13>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 41CC: atu, bcl, bruno, david, dwrobel, metherid, ngompa13, niehaus, tmichett, yabobjonez
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description skeeter9807 2024-12-24 16:39:51 UTC
Livecd-tools fails after installing the upgrades to Fedora Workstation 41 available on 2024-12-22.  Among the small number of upgrades available that day was an upgrade to python3.x86_64 3.13.1-2.fc41 from python3.x86_64 3.13.0-1.fc41. Livecd-creator worked flawlessly before the upgrades.

After the upgrades, every time I run livecd-creator the following error messages show as the livecd-creator script fails:

Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 265, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/bin/livecd-creator", line 195, in main
    ks = imgcreate.read_kickstart(options.kscfg)
  File "/usr/lib/python3.13/site-packages/imgcreate/kickstart.py", line 54, in read_kickstart
    ksfile = urlgrabber.urlgrab(path, filename=tmpks)
  File "/usr/lib/python3.13/site-packages/urlgrabber/grabber.py", line 808, in urlgrab
    return default_grabber.urlgrab(url, filename, **kwargs)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/urlgrabber/grabber.py", line 1205, in urlgrab
    (url,parts) = opts.urlparser.parse(url, opts)
                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/urlgrabber/grabber.py", line 873, in parse
    pathname = pathname2url(url)
  File "/usr/lib64/python3.13/urllib/request.py", line 1679, in pathname2url
    return quote(pathname, encoding=encoding, errors=errors)
  File "/usr/lib64/python3.13/urllib/parse.py", line 908, in quote
    raise TypeError("quote() doesn't support 'encoding' for bytes")
TypeError: quote() doesn't support 'encoding' for bytes

Comment 1 skeeter9807 2025-01-13 02:49:42 UTC
Update:

1.  a) On 2025-01-12 I reinstalled f41 workstation
    b) ran livecd-creator
    c) live image built as expected
    
2.  a) dnf5 upgrade -x *python*
    b) ran livecd-creator
    c) live image built as expected
    
3.  a) dnf5 upgrade
    b) ran livecd-creator
    c) livecd-creator failed with error messages already reported.
    
4.  Conclusion:  There is an incompatibility between the livecd-creator script and the python3 packages in the fedora repositories as of 2025-01-13 0230 UTC.

P.S. I realize f40 is approaching end of life, but this issue affects f40 workstation as well.

Comment 2 Travis Michette 2025-02-07 00:40:25 UTC
Update for FC41 ... looking at the bug, it still appears to live in the FC42 packages too, my solution and work around to get my build system working again was to downgrade all the Python packages and then perform a version lock.

[root@fedora-builder FedoraRemix]# dnf downgrade *python*

[root@fedora-builder FedoraRemix]# dnf versionlock add *python*

Allowed the build system to get up and running again. Tracking the bug separately with exact package versions in Github repo issue tied to FedoraRemix build.

https://github.com/tmichett/Fedora_Remix/issues/83

Comment 3 Travis Michette 2025-02-25 13:13:20 UTC
https://github.com/livecd-tools/livecd-tools/issues/279

Further testing led to the discovering the issue appears only with the kickstart.py. The work around on a system with unlocked versions of Python can be fixed with ...

[root@fedora FedoraRemix]# sudo mv /usr/lib/python3.13/site-packages/imgcreate/kickstart.py /usr/lib/python3.13/site-packages/imgcreate/kickstart_bkup.py
[root@fedora FedoraRemix]# sudo cp ~travis/Downloads/kickstart.py /usr/lib/python3.13/site-packages/imgcreate/kickstart.py
[root@fedora FedoraRemix]# chmod +x /usr/lib/python3.13/site-packages/imgcreate/kickstart.py


I believe that Bryan Kearney pointed this out a long while ago with how it processes kickstart files, so is this a regression?

https://lists.fedoraproject.org/archives/list/livecd@lists.fedoraproject.org/thread/H3DKUMLTFFOSU7VFDP2GEIWOP5RXISG4/?sort=date

Comment 4 Damian Wrobel 2025-04-02 12:35:36 UTC
I also stumbled on this and for local files this seems to be fixed in [1].

Would you please consider pushing an update for >=F41?

[1] https://github.com/livecd-tools/livecd-tools/commit/41e15de6de2caef6bfadafcaf3dbb60c0531079c.patch

Comment 5 Michael Niehaus 2025-04-15 18:29:48 UTC
Same problem today with a new Fedora 42 install.  Manually changing the kickstart.py file with the previously-mentioned patch did work around the issue.

Ideally someone would do a new release of livecd-tools, which would then be picked up by Fedora, but it seems no one is active on that project.

Comment 6 Anton Guda 2025-06-22 08:20:25 UTC
Works for me with proposed patch 41e15de6de2caef6bfadafcaf3dbb60c0531079c.patch (local rebuild).