Commit graph

9 commits

Author SHA1 Message Date
Dorian Stoll 5241998eee
pkg: fedora: Update kernel-watchdog service
It seems that I just can't stop finding weird btrfs setups that break
the current script.

When you use btrfs with a default subvolume, GRUB will use normal paths,
like on ext4. So instead of /@/boot/vmlinuz you have /boot/vmlinuz.

The issue is that grub2-mkrelpath doesn't know about that. The script
would have to parse the GRUB configuration and fstab, to figure out
if btrfs is used with a default subvolume, and then add a flag to the
command depending on that.

However, instead of adding yet another workaround, let's just forget
about grubby and do what we want to do ourselves. Because, as it turns
out, not taking a weird detour over the path that GRUB uses to load the
kernel makes everything much easier.

Since this means that we are dealing with even more filepath and string
mangling, I decided to rewrite the script in python. It would work fine
in bash, but it would be even more spaghetti code that I don't really
want to write. And python is always available in Fedora anyway,
because DNF is written in it.
2024-02-06 23:25:26 +01:00
Dorian Stoll 7633736b5a
pkg: fedora: Fix variable name in the watchdog script 2023-10-04 11:52:34 +02:00
Dorian Stoll 7eb766437e pkg: fedora: Use the proper path to set the default kernel
grubby --set-default expects the path that GRUB will use to access
the kernel. This adds compatibility with /boot on a BTRFS subvolume.
2023-09-06 17:23:53 +02:00
Dorian Stoll 8f73c0b34b pkg: fedora: Some updates for default kernel watchdog script 2023-09-05 15:18:54 +02:00
Dorian Stoll 8f7b9fcb79
pkg: fedora: Move the watchdog service to its own package 2023-06-15 23:05:39 +02:00
Dorian Stoll 45d6f32422
pkg: fedora: Use stat to sort by file creation time 2023-06-14 17:47:20 +02:00
Dorian Stoll 39d0d5ec60
pkg: fedora: Use the file creation time to determine the newest kernel 2023-06-14 17:37:13 +02:00
Dorian Stoll 1190026119
pkg: fedora: Ship the default-kernel service from contrib with the kernel package 2023-06-03 14:42:02 +02:00
Dorian Stoll 5dffa283ee
pkg: fedora: Add new package build scripts for building patched kernels
These scripts use the kernel-ark repository that upstream Fedora uses too to
build their kernels.
2023-06-03 14:41:53 +02:00