Bug 2263771 - dnf5 requires full filepath metadata even for operations on "allowed" paths
Summary: dnf5 requires full filepath metadata even for operations on "allowed" paths
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-02-11 18:42 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2026-06-10 18:54 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2173051 0 unspecified CLOSED dnf5 gets confused by path dependency in secondary 2024-11-27 21:07:22 UTC

Description Zbigniew Jędrzejewski-Szmek 2024-02-11 18:42:11 UTC
We noticed this when building images in mkosi, where 'dnf5 install systemd' would fail, because systemd.rpm has Requires:/usr/bin/getfacl.

It's easy to show with any install command:
$ sudo dnf5 install /usr/sbin/zfs
Updating and loading repositories:
 Fedora - Rawhide - Developmental packages for the next Fedora release                100% |   3.0 MiB/s |  56.8 MiB |  00m19s
...

This is the full filepath metadata. But this path is "allowlisted" to be in primary metadata:
$ unzck -c /var/cache/dnf/rawhide-2d95c80a1fa0a67d/repodata/1f05eb1a7a3e817da09b554f3199980b5bbfb7cca4636e0e3490c628963d1885-primary.xml.zck|grep '<file>/usr/sbin/zfs<'
    <file>/usr/sbin/zfs</file>

Paths that are allow-listed must be special-cased. I suspect that this issue is caused by the recent changes to be more informative when (non-allowlisted) file dependencies are used. 


Reproducible: Always

Comment 1 Jan Kolarik 2024-02-12 09:35:15 UTC
I believe this is a problem of our simple mechanism that automatically requests filelists metadata for any filepath specs: "pattern[0] == '/' || (pattern[0] == '*' && pattern[1] == '/');". This should be addressed also for dnf4.

Comment 2 Daan De Meyer 2025-01-21 11:21:02 UTC
Ping this has been open for more than a year and should be a trivial thing to fix

Comment 3 Aoife Moloney 2025-02-26 12:57:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 4 Fedora Release Engineering 2026-05-06 11:35:20 UTC
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '42'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 42 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.


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