#1906 Issue closed: rescue/GNU/Linux/500_clone_keyboard_mappings.sh: find traverses recursively from "/"

Labels: bug, fixed / solved / done

Lukey3332 opened issue at 2018-08-25 09:09:

  • ReaR version ("/usr/sbin/rear -V"): 2.4 / Git

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"): debian buster

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device): amd64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot): BIOS / GRUB2

  • Description of the issue (ideally so that others can reproduce it):
    When doing rear mkbackup, a "find" command will traverse trough all filesystems from the root, which is quite inefficient. (see line 42 in rescue/GNU/Linux/500_clone_keyboard_mappings.sh ) There doesn't seem to be "/usr/share/keymaps" or any other keymap Directory in Debian buster.

  • Work-around, if any:
    Set KEYMAPS_DEFAULT_DIRECTORY and KEYMAPS_DIRECTORY to point to an Empty Directory.

gdha commented at 2018-08-25 09:13:

@Lukey3332 line 42? Can you be a bit more specific please?

Lukey3332 commented at 2018-08-25 09:38:

I meant in rescue/GNU/Linux/500_clone_keyboard_mappings.sh

Lukey3332 commented at 2018-08-26 18:16:

2018-08-25 09:14:17.978127992 Relax-and-Recover 2.4 / Git
2018-08-25 09:14:17.980598967 Command line options: /usr/sbin/rear mkbackup
...
2018-08-25 09:14:23.940197346 Running 'rescue' stage
...
2018-08-25 09:14:25.519846682 Including rescue/GNU/Linux/500_clone_keyboard_mappings.sh
2018-08-25 09:14:25.594687771 Cannot include keyboard mappings (no keymaps default directory '')
2018-08-25 10:07:48.203716290 Including rescue/default/500_ssh.sh
...

During rescue/GNU/Linux/500_clone_keyboard_mappings.sh
there is a needless delay of almost one hour (from 09:14 until 10:07).

gdha commented at 2018-08-28 15:40:

@Lukey3332 are the keymaps perhaps under /usr/share/console/lists/ ?

Lukey3332 commented at 2018-08-28 16:33:

@gdha No, that doesn't exist either. But I did check with apt-file and /usr/share/keymaps Is provided by the console-data Package which isn't installed on my System. Still I think that rear shouldn't try to search for a Keymap on the whole system if the directories already don't exist.

gdha commented at 2018-08-29 06:12:

@Lukey3332 I agree that it is a bit overkill, but as the code was written by @jsmeix I leave the decision with him (when he is back from holiday).

jsmeix commented at 2018-09-13 09:07:

This is a bug that I will fix when time permits.

It was never meant to search the whole tree of filesystems.
I failed to imagine what happens when $keymaps_default_directory is empty.
"Fortunately" (not really - I provide config variables for all stuff intentionally ;-)
there are config variables that can be used to avoid that issue.

jsmeix commented at 2018-10-18 11:17:

With https://github.com/rear/rear/pull/1935 merged
this issue should be fixed.


[Export of Github issue for rear/rear.]