Redesign RELEASE_INFO handling + fix variable replacements within templates
authorMichael Prokop <mika@grml.org>
Fri, 11 Mar 2022 15:53:06 +0000 (16:53 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 11 Mar 2022 15:53:06 +0000 (16:53 +0100)
commit27016a8d6fae94ae6c61a0784d5bfa6b6fa6a5ae
tree12b37b2e11ce8344fad82f4b992a07b195a72e80
parent581da7443c68c362a7677c905ab5c63eb23c5b73
Redesign RELEASE_INFO handling + fix variable replacements within templates

There's no point in setting "$GRML_NAME $VERSION - $RELEASENAME" at
different places, while it's supposed to be identical to $RELEASE_INFO,
so let's unify it.

Also ensure, that $fixed_release_info is set at the appropriate place.
Otherwise it might be missing, when adjust_boot_files() is invoked from
within grub_setup(). This has been observed to fail for example with
SecureBoot enabled, and using grml-live's `-b` option:

  [*] Secure Boot is enabled [mode: debian]
  [x] Variable fixed_squashfs_name is unset, can't adjust %SQUASHFS_NAME% in templates.
  [x] Variable fixed_release_info is unset, can't adjust %RELEASE_INFO% in templates.
  [*] Generated 64-bit Secure Boot (debian) EFI image /srv/grml-live/grml64-forensic_2022.03-1/grml_chroot//boot/efi.img

Furthermore, $fixed_squashfs_name shouldn't be used in
adjust_boot_files(), as the boot templates usually include
"toram=%SQUASHFS_NAME%", while this shouldn't be stripped of (as it
would break the actual toram feature then).  Instead, the
$fixed_squashfs_name should be used only with specific isolinux/syslinux
config files, where the length matters for the appropriate line length
for its look'n'feel.

This work was funded by Grml-Forensic.
grml-live