go-debos / fakemachine

fake a machine
Apache License 2.0
34 stars 38 forks source link

Fix compatibility when kmod module_directory prefixed with /usr #195

Closed obbardc closed 9 months ago

obbardc commented 9 months ago

Debian's kmod now builds with --with-module-directory=/usr/lib/modules1 (while the default is --with-module-directory=/lib/modules) which means that modinfo now outputs module paths with /usr prefix already.

In fakemachine, on merged-usr systems, modules are copied into the initrd with a prefixed path of /usr, no matter the system path produced by modinfo. This means that modules are now copied into the wrong place, e.g /usr/usr/....

Fix compatibility with kmod built with /usr prefixed module-directory by ensuring the module destination path has a prefix of /usr, rather than always prefixing the destination path with /usr.

Fixes: https://github.com/go-debos/fakemachine/issues/194

obbardc commented 9 months ago

Argh so yeah I just tried older kmod and things work fine. Updated commit message to be less confusing ;-).

sjoerdsimons commented 9 months ago

Argh so yeah I just tried older kmod and things work fine. Updated commit message to be less confusing ;-).

If i'm not mistaken you only chagned the title of this PR not the patch commit message ?

obbardc commented 9 months ago

@sjoerdsimons I didn't push.