Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(i18n): a couple of fixes for --sysroot #2618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aafeijoo-suse
Copy link
Member

Keymap includes not added and compressed keymaps not decompressed.

dracut[I]: *** Including module: i18n ***
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
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

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

The results of `find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0`
are directly passed to `findkeymap` containing the `$dracutsysrootdir` path,
which causes that `[[ -f $dracutsysrootdir$1 ]]` evaluates to false because the
same path is prepended again, and the following `find` fails because `MAPNAME`
has an absolute path.

E.g., with `dracutsysrootdir=/.snapshots/9/snapshot`, for `MAPNAME=us` the
`INCLUDES` of `MAP=/.snapshots/9/snapshot/usr/share/kbd/keymaps/i386/qwerty/us.map.gz`
will pass `/.snapshots/9/snapshot/usr/share/kbd/keymaps/i386/include/qwerty-layout.inc` to
`findkeymap`.

```
dracut[I]: *** Including module: i18n ***
find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?
```
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
```
@github-actions github-actions bot added modules Issue tracker for all modules i18n Issues related to the i18n module labels Feb 7, 2024
@aafeijoo-suse
Copy link
Member Author

CC @tblume, issue found via openSUSE Tumbleweed sdboot images.

Copy link

stale bot commented Mar 13, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Mar 13, 2024
@aafeijoo-suse aafeijoo-suse removed the stale communication is stuck label Mar 14, 2024
Copy link

stale bot commented Apr 22, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Issues related to the i18n module modules Issue tracker for all modules stale communication is stuck
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants