Bug 2387561

Summary: pre-install.d/10packagelist with etckeeper-dnf5 shows permission denied errors when dnf runs as non root
Product: [Fedora] Fedora Reporter: Štefan Gurský <scorpy_sk>
Component: etckeeperAssignee: Thomas Moschny <thomas.moschny>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: alberto, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Štefan Gurský 2025-08-11 08:59:26 UTC
When running dnf as non root user, the following error is displayed:

/etc/etckeeper/pre-install.d/10packagelist: line 4: /var/cache/etckeeper/packagelist.pre-install: Permission denied
/etc/etckeeper/pre-install.d/10packagelist: line 5: /var/cache/etckeeper/packagelist.fmt: Permission denied

That happens even during autocomplete, where it is especially annoying. For example trying to autocomplete `dnf info etcke` (write it into bash and then press TAB) shows the error between entered text and the completion.

I think pre-install.d/10packagelist should not be run in this case at all.


Reproducible: Always

Steps to Reproduce:
1. have etckeeper-dnf5 installed
2. as non root run `dnf info etckeeper`
3. Observe the error message is displayed before output.



Additional Information:
etckeeper-dnf5 is
Version     : 1.18.22
Release     : 3.fc42