]> git.ipfire.org Git - thirdparty/mkosi.git/commit
kmod: Beef up firmware symlink chasing 3877/head
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Mon, 25 Aug 2025 12:23:51 +0000 (14:23 +0200)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Tue, 26 Aug 2025 12:44:08 +0000 (14:44 +0200)
commit6caa830e74256dcfdf25ec266224e44b43ff9678
treeb1ce14ad3d88df612a9d4f901d0a72e4f611a87a
parent9f84678d458410b2c96e6e4c7950e262a2818b32
kmod: Beef up firmware symlink chasing

- It turns out we need to handle absolutely symlinks after all as
  /usr/lib/firmware/regulatory.db is a symlink to /etc/alternatives
  in Debian and derivatives.
- Our previous implementation didn't handle cases where a symlink target
  consisted out of two parts e.g. if C -> A/B then we wouldn't try to resolve
  A.

Fix both issues by switching to a minimal implementation of the chase()
function in systemd.

To avoid having to include /etc stuff in the kernel modules initrd, we resolve
get rid of any intermediate symlinks to /etc/alternatives that we encounter.

Follow up for 221293e33defe30b111bc13957a0d52d2ea1c45b
mkosi/kmod.py
mkosi/util.py