Package: u-boot-menu Version: 4.0.2 Severity: important Dear Maintainer,
Previously there was call to check with lsb_release what the default label should be. Currently, it is customizable via the config file, or fallsback to Debian. It would be nice to read "PRETTY_NAME" from /etc/os-release file and use that instead. That will give automatic customization for all the derivatives, and would look nicer on debian too. As the OS release version would be listed too, and updated upon upgrades. It will also match names that used by grub2 / sd-bootctl / etc. Please see the patch attached, which is also submitted as salsa pull request. https://salsa.debian.org/debian/u-boot-menu/-/merge_requests/3 It is without debian/changelog, but that can be generated with `gbp dch`. Regards, Dimitri.
>From 6201a4070c73f5d6c75dd6bd3430ee760b907f1e Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov <x...@ubuntu.com> Date: Thu, 19 Nov 2020 00:01:09 +0000 Subject: [PATCH] u-boot-update: use PRETTY_NAME from os-release as menu label. --- u-boot-update | 12 +++++++++++- u-boot-update.8 | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/u-boot-update b/u-boot-update index f4a5416ca2..f971c38824 100755 --- a/u-boot-update +++ b/u-boot-update @@ -49,6 +49,16 @@ then . /etc/default/u-boot fi +# Reading the os-release file +if [ -e /etc/os-release ] +then + . /etc/os-release +elif [ -e /usr/lib/os-release ] +then + . /usr/lib/os-release +fi + + U_BOOT_UPDATE="${U_BOOT_UPDATE:-true}" if [ "${U_BOOT_UPDATE}" != "true" ] @@ -79,7 +89,7 @@ U_BOOT_ALTERNATIVES="${U_BOOT_ALTERNATIVES:-default recovery}" U_BOOT_DEFAULT="${U_BOOT_DEFAULT:-l0}" U_BOOT_ENTRIES="${U_BOOT_ENTRIES:-all}" U_BOOT_TIMEOUT="${U_BOOT_TIMEOUT:-50}" -U_BOOT_MENU_LABEL="${U_BOOT_MENU_LABEL:-Debian GNU/Linux kernel}" +U_BOOT_MENU_LABEL="${U_BOOT_MENU_LABEL:-${PRETTY_NAME:-Debian GNU/Linux kernel}}" U_BOOT_PARAMETERS="${U_BOOT_PARAMETERS:-ro quiet}" U_BOOT_FDT_DIR="${U_BOOT_FDT_DIR:-/usr/lib/linux-image-}" diff --git a/u-boot-update.8 b/u-boot-update.8 index 3397bc898f..410a0a995b 100644 --- a/u-boot-update.8 +++ b/u-boot-update.8 @@ -19,7 +19,7 @@ This variable specifies the default entry to boot. The name of an entry consists .IP "U_BOOT_ENTRIES=""\fBall\fR""" 4 This variables specifies how many kernel versions should be used to populate the boot configuration. Value is an integer starting with 1, or 'all' to populate for all kernels, default is 'all'. .IP "U_BOOT_MENU_LABEL=""\fBDebian GNU/Linux, kernel\fR""" 4 -This variable specifies the text that is used as a description in the boot menu. Value is an arbitrary string. If lsb_release is installed, the distributors id is automatically determined. If lsb_release is not available, it defaults to 'Debian GNU/Linux, kernel'. +This variable specifies the text that is used as a description in the boot menu. Value is an arbitrary string. If not specified, PRETTY_NAME from /etc/os\-release is used. Otherwise, it defaults to 'Debian GNU/Linux, kernel'. .IP "U_BOOT_PARAMETERS=""\fBro quiet\fR""" 4 This variable specifies additional boot parameters that are appended to each kernel entry. Value is an arbitrary string, default is 'ro quiet' (except for recovery entries, where quiet is avoided). .IP "U_BOOT_ROOT=""\fBroot\fR=\fIDEVICE\fR""" 4 -- 2.27.0