Bugzilla – Bug 1216620
u-boot/raspberrypi-firmware without side effects
Last modified: 2023-10-26 12:50:29 UTC
u-boot and raspberrypi-firmware both ship files in /boot and also have %post scriptlets that mess with files in /boot. E.g copying stuff to /boot/efi, assuming the efi partition is mounted there. That is problematic in several ways - static OS content must be in /usr exclusively. That makes sure all files are covered by snapshot and rollback and the rpm db stays consistent. It's also a precondition for OS deployments that ship read-only /usr images. - messing with /boot in scriptlets means there are side effects in the middle of transactions. So if on MicroOS an OS update fails and the snapshot in progress gets thrown away for whatever reason, the changes in /boot may have already happened. - the efi partition may not be mounted at /boot/efi. Currently systemd upstream leans towards /efi for example So can we ship the rpm content in /usr please? Is there an established location used by other distros already? Something like /usr/lib/boot/efi for example for files that we know must be on fixed locations on the ESP? Regarding the scriptlets, maybe we can integrate with perl-Bootloader (ie update-bootloader) so it takes care of copying the files into the esp?