Bug 2386869

Summary: Offline upgrades cannot read package header
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: dnf5Assignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 42CC: jonathan, mblaha, pkratoch, ppisar, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-08-07 06:54:43 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 Stephen Gallagher 2025-08-06 14:29:23 UTC
Attempting to perform `dnf offline-upgrade download` followed by `dnf offline-upgrade reboot` on a Raspberry Pi 400 (rev 1.0) system fails every time. It reports:

```
Failed to read package header from file "/usr/lib/sysimage/libdnf5/offline/./packages/freeipa-client-encrypted-dns-4.12.2-14.fc42.aarch64.rpm"
```

and reboots, canceling the transaction and refusing to update.

Reproducible: Always

Steps to Reproduce:
1. Install Fedora 42 on a Raspberry Pi 400 (presumably Pi 4 also)
2. dnf offline-upgrade download
3. dnf offline-upgrade reboot
4. Once the system reboots, check the packages installed with `rpm -q`
Actual Results:
None of the staged upgrades have been performed

Expected Results:
Upgrades should be applied.

Additional Information:
The journal for the previous boot shows the error message:

```
Failed to read package header from file "/usr/lib/sysimage/libdnf5/offline/./packages/freeipa-client-encrypted-dns-4.12.2-14.fc42.aarch64.rpm"
```
(the actual RPM represented varies).

Performing a `dnf upgrade` on the live system completes without issue. (I tried with several individual packages, including the kernel.)

Comment 1 Marek Blaha 2025-08-07 06:54:43 UTC
I believe this is due to raspberry does not have a real time clock. But we should at least present more accurate message to the user.

There are some workarounds you can try listed in this discussion: https://discussion.fedoraproject.org/t/dnf-system-upgrade-can-fail-on-raspberry-pi/92403

*** This bug has been marked as a duplicate of bug 2242759 ***