Fedora Account System
Red Hat Associate
Red Hat Customer
Since switching to dnf5 (and as of fully updated Fedora 41), package downloads fail if they have a space in the URL. This was working with DNF 3 and 4. Reproducible: Always Steps to Reproduce: > mkdir -p 'repo/test dir' > dnf5 download --destdir='repo/test dir' filesystem > createrepo_c repo > dnf5 --disablerepo='*' --repofrompath=tmp,"file://$PWD/repo" --setopt=tmp.{gpgcheck,metadata_expire}=0 download filesystem Actual Results: > Updating and loading repositories: > tmp > Repositories loaded. > Downloading Packages: > filesystem-0:3.18-23.fc41.x86_64 > >>> Curl error (3): URL using bad/illegal format or missing URL for file:///home/dm0/repo/test dir/filesystem-3.18-23.fc41.x86_64.rpm [URL rejected: Malformed input to a URL function] - file:///home/dm0/repo/test dir/filesystem-3.18-23.fc4 > >>> No more mirrors to try - All mirrors were already tried without successFailed to download packages > Librepo error: Cannot download test dir/filesystem-3.18-23.fc41.x86_64.rpm: All mirrors were tried Expected Results: It should download the package from the local repo. The download command will work with dnf-3 and dnf4 or if you remove the space with the following commands first. > mv 'repo/test dir' repo/test-dir > createrepo_c repo The error happens with repositories on the web, I just used a local repo here for simplicity. In particular, this is breaking a CI artifact host that puts packages in project-based subdirectories where project names can have spaces.
`createrepo_c` stores '<location href="test dir/filesystem-3.18-8.fc40.x86_64.rpm"/>' to the primary.xml file. Special characters (and space) must be encoded in the URL. Usually the rule is applied to `href` as well. And '<location href="test%20dir/filesystem-3.18-8.fc40.x86_64.rpm"/>' works with `dnf5` (`libdnf5`). Is there a bug in `createrepo_c`? Is unencoded space in `href` correct? However, the old dnf4 assumes an unencoded path in the `href`. So for compatibility we probably need to change `libdnf5` to behave like `dnf4` and assume an unencoded path in `href`.
No, we need to fix createrepo_c to follow URI syntax as prescribed by XML. There is also a bug in DNF5 <https://github.com/rpm-software-management/dnf5/issues/1321>.
Hi RedHat Team, Any update on this bug ? Can you share an ETA for the fix ? Thanks Abhijeet
I have found a similar issue with dnf5 and packages with a carat character `^` in Fedora Linux 42 with dnf5-5.2.13.1 https://github.com/rpm-software-management/dnf5/issues/1321#issuecomment-2858261121
No ETA. RedHat teams works on RHEL and RHEL does not use DNF5 now.
*** Bug 2382271 has been marked as a duplicate of this bug. ***
FEDORA-2025-763e312d6a (dnf5-5.2.17.0-1.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-763e312d6a
FEDORA-2025-763e312d6a has been pushed to the Fedora 43 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-763e312d6a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-763e312d6a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-763e312d6a (dnf5-5.2.17.0-1.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report.
*** Bug 2407379 has been marked as a duplicate of this bug. ***
Reopening for fixing this in Fedora 42 and 41.
FEDORA-2025-3ffc7cce52 (dnf5-5.2.17.0-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-3ffc7cce52
FEDORA-2025-d46e5baaa0 (dnf5-5.2.17.0-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-d46e5baaa0
FEDORA-2025-3ffc7cce52 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-3ffc7cce52` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-3ffc7cce52 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-d46e5baaa0 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-d46e5baaa0` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-d46e5baaa0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-3ffc7cce52 (dnf5-5.2.17.0-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-d46e5baaa0 (dnf5-5.2.17.0-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.