[Bug 1208117] New: Teach kernel-scriptlets/rpm-script about systemd-boot
https://bugzilla.suse.com/show_bug.cgi?id=1208117 Bug ID: 1208117 Summary: Teach kernel-scriptlets/rpm-script about systemd-boot Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: fbui@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- rpm-script shell script has: run_bootloader () { if [ -f /etc/sysconfig/bootloader ] && [ -f /boot/grub/menu.lst -o \ -f /etc/lilo.conf -o \ -f /etc/elilo.conf -o \ -f /etc/zipl.conf -o \ -f /etc/default/grub ] then return 0 else return 1 fi } If we want to support systemd-boot as bootloader, the hard-coded list of bootloader config files needs to be updated. However at a first glance it would have been better if `run_bootloader()` didn't make any assumption on the supported bootloaders and let /usr/lib/bootloader/bootloader_entry figure out itself what to do with the current installation. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c1 Franck Bui <fbui@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |martin.wilck@suse.com --- Comment #1 from Franck Bui <fbui@suse.com> --- Martin you're listed as the bug owner of 'suse-module-tools' so I'm assigning this bug to you. Feel free to re-assign if this was a wrong guess. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c2 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fbui@suse.com Flags| |needinfo?(fbui@suse.com) --- Comment #2 from Martin Wilck <martin.wilck@suse.com> --- The assignment is correct, but I need more detailed instructions what to do, as I have zero knowledge about systemd-boot. Actually, a GitHub PR would be appreciated. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c3 Franck Bui <fbui@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(fbui@suse.com) | --- Comment #3 from Franck Bui <fbui@suse.com> --- I would simply get rid of "run_bootloader()" and let /usr/lib/bootloader/bootloader_entry figure out itself what needs to be done. Assuming that bootloader_entry does nothing if /etc/sysconfig/bootloader is missing the overall behavior should remain unchanged. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c4 --- Comment #4 from Martin Wilck <martin.wilck@suse.com> --- Hm, none of this code is mine ... I need to take some time to figure it out. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c5 --- Comment #5 from Franck Bui <fbui@suse.com> --- I can send a PR if it makes things easier for you. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1208117 https://bugzilla.suse.com/show_bug.cgi?id=1208117#c6 --- Comment #6 from Martin Wilck <martin.wilck@suse.com> --- (In reply to Franck Bui from comment #5)
I can send a PR if it makes things easier for you.
Yes, please. I've digged around a bit; it seems to me that /boot/efi/loader/loader.conf would be the configuration file to check for, but that file doesn't have to exist. At least one boot loader entry would need to exist, I suppose; but those will be rather difficult to locate correctly from the scriptlets. IIUC the boot loader entry would have a distribution-specific name; I still have to understand that part (short explantion welcome). Perhaps we should check for the existence of "/usr/bin/bootctl"?
However at a first glance it would have been better if `run_bootloader()` didn't > make any assumption on the supported bootloaders and let /usr/lib/bootloader /bootloader_entry figure out itself what to do with the current installation.
Not sure about this. I assume the run_bootloader() test exists for a reason. Maybe in order to allow a setup where just no bootloader related scripts are run? This goes back all the way to openSUSE 10 (https://bugzilla.suse.com/show_bug.cgi?id=303734). At least we'd need to test if bootloader_entry handles the absence of any configuration files gracefully. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com