]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut-init.sh): handle decompress with `--sysroot`
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 7 Feb 2024 10:49:14 +0000 (11:49 +0100)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 12 Apr 2024 17:20:29 +0000 (13:20 -0400)
Remove `$dracutsysrootdir` from the file path passed to the decompress command,
otherwise the path is wrong and the file is not decompressed in the temporary
directory where the initramfs is being built.

E.g.:

```
dracut[I]: *** Including module: i18n ***
gzip: /var/tmp/dracut.6Iqygd/initramfs/.snapshots/12/snapshot/usr/share/kbd/keymaps/i386/include/euro1.map.gz: No such file or directory
gzip: /var/tmp/dracut.6Iqygd/initramfs/.snapshots/12/snapshot/usr/share/kbd/keymaps/i386/qwerty/us.map.gz: No such file or directory
gzip: /var/tmp/dracut.6Iqygd/initramfs/.snapshots/12/snapshot/usr/share/kbd/keymaps/xkb/us.map.gz: No such file or directory
```

dracut-init.sh

index c37038e37917eb54496603a40fcca564ed2722a8..20aef982db8fa4ca0672cb3a383ea2432b0f4673 100755 (executable)
@@ -730,7 +730,7 @@ inst_decompress() {
         inst_simple "${_src}"
         # Decompress with chosen tool.  We assume that tool changes name e.g.
         # from 'name.gz' to 'name'.
-        ${_cmd} "${initdir}${_src}"
+        ${_cmd} "${initdir}${_src#"$dracutsysrootdir"}"
     done
 }