[Bug 995549] New: grub2: use $PRETTY_NAME instead of $NAME $VERSION for $GRUB_DISTRIBUTOR
http://bugzilla.suse.com/show_bug.cgi?id=995549 Bug ID: 995549 Summary: grub2: use $PRETTY_NAME instead of $NAME $VERSION for $GRUB_DISTRIBUTOR Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: mchang@suse.com Reporter: lnussel@suse.com QA Contact: jsrain@suse.com CC: arvidjaar@gmail.com, dleuenberger@suse.com Found By: --- Blocker: --- grub2-default-distributor.patch uses NAME and VERSION from /etc/os-release to construct the GRUB_DISTRIBUTOR variable. With recent changes to /etc/os-release for TW the version now actually has the snapshot number. That number changes every day. Since the grub config isn't updated on every snapshot update the version listed in the bootloader might be outdated. I'd suggest to use PRETTY_NAME from /etc/os-release instead. btw, I think the grub_util_default_distributor function is unnecessarily complex. According to the specification (https://www.freedesktop.org/software/systemd/man/os-release.html) no shell special features are supported on /etc/os-release, so the file can be parsed directly, there is no need to spawn a shell. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 http://bugzilla.suse.com/show_bug.cgi?id=995549#c1 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jreidinger@suse.com, | |kukuk@suse.com --- Comment #1 from Michael Chang <mchang@suse.com> --- (In reply to Ludwig Nussel from comment #0)
grub2-default-distributor.patch uses NAME and VERSION from /etc/os-release to construct the GRUB_DISTRIBUTOR variable. With recent changes to /etc/os-release for TW the version now actually has the snapshot number. That number changes every day. Since the grub config isn't updated on every snapshot update the version listed in the bootloader might be outdated. I'd suggest to use PRETTY_NAME from /etc/os-release instead.
I think the text of varying numbers may also make openQA needles harder to match. A question, should SLE and openSUSE-Leap all change together to use $PRETTY_NAME? I think $PRETTY_NAME was once before considered but rejected while deciding which field to use .. (the discussion was in SLE, but may not apply for openSUSE). CC Thorsten and Josef.
btw, I think the grub_util_default_distributor function is unnecessarily complex. According to the specification (https://www.freedesktop.org/software/systemd/man/os-release.html) no shell special features are supported on /etc/os-release, so the file can be parsed directly, there is no need to spawn a shell.
Thanks for the information, yes it makes sense and I will do it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 http://bugzilla.suse.com/show_bug.cgi?id=995549#c2 --- Comment #2 from Michael Chang <mchang@suse.com> --- The $PRETTY_NAME is obviously too lengthy. I think we should keep "$NAME $VERSION" for both SLE and openSUSE-leap as they don't rolling release, so don't be affected by any snapshot number. # cat /etc/os-release NAME="SLES" VERSION="12-SP2" VERSION_ID="12.2" PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12:sp2" -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 http://bugzilla.suse.com/show_bug.cgi?id=995549#c3 --- Comment #3 from Michael Chang <mchang@suse.com> --- Hi, I think it will work like: if [ "x${NAME}" = "xopenSUSE" ]; then GRUB_DISTRIBUTOR="${PRETTY_NAME}" else GRUB_DISTRIBUTOR="${NAME} ${VERSION}" I am going to test the patch based on above conditions. https://build.opensuse.org/package/view_file/home:michael-chang:branches:Bas... Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 http://bugzilla.suse.com/show_bug.cgi?id=995549#c4 --- Comment #4 from Michael Chang <mchang@suse.com> --- SRID#430338 to oS:Factory. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=995549 http://bugzilla.suse.com/show_bug.cgi?id=995549#c5 Michael Chang <mchang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Michael Chang <mchang@suse.com> --- Set resolved fixed as patch been submitted. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com