Bug 2332856
| Summary: | /var/lib/dnf has no owner. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Fxzx micah <fxzxmicah> |
| Component: | dnf5 | Assignee: | Petr Pisar <ppisar> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 41 | CC: | daniel.mach, jkolarik, jmracek, jrohel, mblaha, nsella, packaging-team-maint, pkratoch, ppisar, rpm-software-management |
| Target Milestone: | --- | Keywords: | Patch, Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | dnf5-5.2.8.1-4.fc42 dnf5-5.2.8.1-3.fc41 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-01-11 01:42:37 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
Fxzx micah
2024-12-17 16:12:20 UTC
/var/lib/dnf directory in Fedora 42 is by dnf-data-4.22.0-1.fc42.noarch package which is built from dnf component. Moving this bug report to that component. But for dnf5 only systems, dnf-data is not needed. I'm not sure whether DNF5 uses that directory for anything than importing DNF4 history into DNF5. Directory where DNF5 stores its persistent data between runs. Default: ``/var/lib/dnf``. I saw this description from the source code. That can be leftover from DNF4 sources. DNF5 sources refer /var/lib/dnf on few places: $ git grep '/var/lib/dnf' doc/dnf5.8.rst: /var/lib/dnf/ doc/dnf5.conf.5.rst: Default: ``/var/lib/dnf``. include/libdnf5/conf/const.hpp:constexpr const char * PERSISTDIR = "/var/lib/dnf"; libdnf5/transaction/Swdb.cpp: // extract persistdir from path - "/var/lib/dnf/" libdnf5/transaction/Swdb.hpp: static constexpr const char * defaultPath = "/var/lib/dnf/history.sqlite"; libdnf5/transaction/Transformer.cpp: * \param inputDir directory to load data from (e.g. `/var/lib/dnf/`) But most of them are dead code. It also constructs that path manually on other places. I will need a help from more knowledgeable DNF5 developers. But you are right that will be safer to track this issue in DNF5. There is not much we could do in DNF4 package as Fedora has a history of preserving unowned files indefinitely. Then it's all up to you, I don't have enough knowledge about this, either. :) We found that directory is still used by DNF5 for countme feature (a cookie reported to a Fedora mirror manager). We will fix DNF5 to own that directory. So /var/lib/dnf/[history.sqlite history.sqlite-shm history.sqlite-wal] is actually useless in dnf5? Those files are read on first dnf5 run. Later on they are useless for dnf5. Merged upstream. FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71 FEDORA-2025-f3bc917e71 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-f3bc917e71` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. |