Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2025-08-14 11:36:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old) and /work/SRC/openSUSE:Factory/.yast2-bootloader.new.1085 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader" Thu Aug 14 11:36:14 2025 rev:350 rq:1299253 version:5.0.25 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes 2025-08-13 16:24:29.277425606 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new.1085/yast2-bootloader.changes 2025-08-14 11:36:22.412207940 +0200 @@ -1,0 +2,7 @@ +Wed Aug 13 09:36:06 UTC 2025 - Stefan Schubert <sch...@suse.de> + +- "update nvram" option added in grub2-bls and systemd-boot. + (bsc#1228595, bsc#1247952) +- 5.0.25 + +------------------------------------------------------------------- @@ -6 +13 @@ -- 5.0.23 +- 5.0.24 Old: ---- yast2-bootloader-5.0.24.tar.bz2 New: ---- yast2-bootloader-5.0.25.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.276hHd/_old 2025-08-14 11:36:23.080235853 +0200 +++ /var/tmp/diff_new_pack.276hHd/_new 2025-08-14 11:36:23.080235853 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 5.0.24 +Version: 5.0.25 Release: 0 Summary: YaST2 - Bootloader Configuration License: GPL-2.0-or-later ++++++ yast2-bootloader-5.0.24.tar.bz2 -> yast2-bootloader-5.0.25.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/package/yast2-bootloader.changes new/yast2-bootloader-5.0.25/package/yast2-bootloader.changes --- old/yast2-bootloader-5.0.24/package/yast2-bootloader.changes 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/package/yast2-bootloader.changes 2025-08-13 16:49:03.000000000 +0200 @@ -1,9 +1,16 @@ ------------------------------------------------------------------- +Wed Aug 13 09:36:06 UTC 2025 - Stefan Schubert <sch...@suse.de> + +- "update nvram" option added in grub2-bls and systemd-boot. + (bsc#1228595, bsc#1247952) +- 5.0.25 + +------------------------------------------------------------------- Tue Aug 12 07:45:21 UTC 2025 - Stefan Schubert <sch...@suse.de> - Do not register random recovery pin during FDE intallation. (bsc#1247941) -- 5.0.23 +- 5.0.24 ------------------------------------------------------------------- Wed Jul 23 13:30:13 UTC 2025 - Stefan Schubert <sch...@suse.de> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/package/yast2-bootloader.spec new/yast2-bootloader-5.0.25/package/yast2-bootloader.spec --- old/yast2-bootloader-5.0.24/package/yast2-bootloader.spec 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/package/yast2-bootloader.spec 2025-08-13 16:49:03.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 5.0.24 +Version: 5.0.25 Release: 0 Summary: YaST2 - Bootloader Configuration License: GPL-2.0-or-later diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/generic_widgets.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/generic_widgets.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/generic_widgets.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/generic_widgets.rb 2025-08-13 16:49:03.000000000 +0200 @@ -105,6 +105,34 @@ end end + # Represents switcher for NVRAM update + class UpdateNvramWidget < CWM::CheckBox + def initialize + textdomain "bootloader" + + super + end + + def label + _("Update &NVRAM Entry") + end + + def help + _("<p><b>Update NVRAM Entry</b> will add nvram entry for the bootloader\n" \ + "in the firmware.\n" \ + "This is usually desirable unless you want to preserve specific settings\n" \ + "or need to work around firmware issues.</p>\n") + end + + def init + self.value = Bootloader::BootloaderFactory.current.update_nvram + end + + def store + Bootloader::BootloaderFactory.current.update_nvram = value + end + end + # represent choosing default section to boot class DefaultSectionWidget < CWM::ComboBox def initialize diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/grub2_widgets.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/grub2_widgets.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/grub2_widgets.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/grub2_widgets.rb 2025-08-13 16:49:03.000000000 +0200 @@ -261,36 +261,6 @@ end end - # Represents switcher for NVRAM update - class UpdateNvramWidget < CWM::CheckBox - include Grub2Helper - - def initialize - textdomain "bootloader" - - super - end - - def label - _("Update &NVRAM Entry") - end - - def help - _("<p><b>Update NVRAM Entry</b> will add nvram entry for the bootloader\n" \ - "in the firmware.\n" \ - "This is usually desirable unless you want to preserve specific settings\n" \ - "or need to work around firmware issues.</p>\n") - end - - def init - self.value = grub2.update_nvram - end - - def store - grub2.update_nvram = value - end - end - # Represents grub password protection widget class GrubPasswordWidget < CWM::CustomWidget include Grub2Helper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/grub2bls.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/grub2bls.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/grub2bls.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/grub2bls.rb 2025-08-13 16:49:03.000000000 +0200 @@ -28,20 +28,6 @@ @is_proposed = false end - # Secure boot setting shown in summary screen. - # sdbootutil intialize secure boot if shim has been installed. - # - # @return [String] - def secure_boot_summary - link = if secure_boot - "<a href=\"disable_secure_boot\">(#{_("disable")})</a>" - else - "<a href=\"enable_secure_boot\">(#{_("enable")})</a>" - end - - "#{_("Secure Boot:")} #{status_string(secure_boot)} #{link}" - end - # Display bootloader summary # @return a list of summary lines def summary(*) @@ -52,6 +38,7 @@ ) ] result << secure_boot_summary if Systeminfo.secure_boot_available?(name) + result << update_nvram_summary if Systeminfo.nvram_available?(name) result end @@ -61,6 +48,7 @@ end # reads configuration from target disk + # rubocop:disable Metrics/AbcSize def read @sections.read grub_default.timeout = Bls.menu_timeout @@ -73,13 +61,16 @@ end end self.secure_boot = Systeminfo.secure_boot_active? + self.update_nvram = Systeminfo.update_nvram_active? grub_default.kernel_params.replace(lines) log.info "kernel params: #{grub_default.kernel_params}" log.info "bls sections: #{@sections.all}" log.info "bls default: #{@sections.default}" log.info "secure boot: #{secure_boot}" + log.info "update nvram: #{update_nvram}" @is_read = true # flag that settings has been read end + # rubocop:enable Metrics/AbcSize # @return true if configuration is already read def read? @@ -134,6 +125,7 @@ "#{other.cpu_mitigations.to_human_string}" log.info " pmbr_action: #{pmbr_action}=>#{other.pmbr_action}" log.info " secure boot: #{other.secure_boot}" + log.info " update_nvram: #{update_nvram}=>#{other.update_nvram}" log.info " grub_default.kernel_params: #{grub_default.kernel_params.serialize}=>" \ "#{other.grub_default.kernel_params.serialize}" log.info " grub_default.kernel_params: #{grub_default.kernel_params.serialize}=>" \ @@ -143,12 +135,14 @@ merge_grub_default(other) merge_pmbr_action(other) self.secure_boot = other.secure_boot unless other.secure_boot.nil? + self.update_nvram = other.update_nvram unless other.update_nvram.nil? log.info "merging result: timeout: #{grub_default.timeout}" log.info " mitigations: #{cpu_mitigations.to_human_string}" log.info " kernel_params: #{grub_default.kernel_params.serialize}" log.info " pmbr_action: #{pmbr_action}" log.info " secure boot: #{secure_boot}" + log.info " update_nvram: #{update_nvram}" end # rubocop:enable Metrics/AbcSize @@ -165,7 +159,7 @@ def write_sysconfig(prewrite: false) sysconfig = Bootloader::Sysconfig.new(bootloader: name, secure_boot: secure_boot, trusted_boot: false, - update_nvram: false) + update_nvram: update_nvram) prewrite ? sysconfig.pre_write : sysconfig.write end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/systemdboot.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/systemdboot.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/systemdboot.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/systemdboot.rb 2025-08-13 16:49:03.000000000 +0200 @@ -32,6 +32,10 @@ # @return [Boolean] current secure boot setting attr_accessor :secure_boot + # @!attribute update_nvram + # @return [Boolean] current update nvram setting + attr_accessor :update_nvram + attr_reader :sections # @!attribute pmbr_action @@ -48,6 +52,7 @@ @explicit_cpu_mitigations = false @pmbr_action = :nothing @sections = ::Bootloader::BlsSections.new + @update_nvram = true end def kernel_params @@ -58,6 +63,7 @@ def merge(other) log.info "merging: timeout: #{timeout}=>#{other.timeout}" log.info " secure_boot: #{secure_boot}=>#{other.secure_boot}" + log.info " update_nvram: #{update_nvram}=>#{other.update_nvram}" log.info " mitigations: #{cpu_mitigations.to_human_string}=>" \ "#{other.cpu_mitigations.to_human_string}" log.info " pmbr_action: #{pmbr_action}=>#{other.pmbr_action}" @@ -69,6 +75,7 @@ self.timeout = other.timeout unless other.timeout.nil? self.secure_boot = other.secure_boot unless other.secure_boot.nil? self.pmbr_action = other.pmbr_action if other.pmbr_action + self.update_nvram = other.update_nvram unless other.update_nvram.nil? kernel_serialize = kernel_params.serialize # handle specially noresume as it should lead to remove all other resume @@ -90,6 +97,7 @@ log.info "merging result: timeout: #{timeout}" log.info " secure_boot: #{secure_boot}" + log.info " update_nvram: #{update_nvram}" log.info " mitigations: #{cpu_mitigations.to_human_string}" log.info " kernel_params: #{kernel_params.serialize}" log.info " pmbr_action: #{pmbr_action}" @@ -117,6 +125,7 @@ @sections.read self.timeout = Bls.menu_timeout self.secure_boot = Systeminfo.secure_boot_active? + self.update_nvram = Systeminfo.update_nvram_active? lines = "" filename = File.join(Yast::Installation.destdir, CMDLINE) @@ -157,6 +166,7 @@ self.secure_boot = Systeminfo.secure_boot_supported? # for UEFI always remove PMBR flag on disk (bnc#872054) self.pmbr_action = :remove + self.update_nvram = true end # Secure boot setting shown in summary screen. @@ -173,6 +183,19 @@ "#{_("Secure Boot:")} #{status_string(secure_boot)} #{link}" end + # Update nvram shown in summary screen + # + # @return [String] + def update_nvram_summary + link = if update_nvram + "<a href=\"disable_update_nvram\">(#{_("disable")})</a>" + else + "<a href=\"enable_update_nvram\">(#{_("enable")})</a>" + end + + "#{_("Update NVRAM:")} #{status_string(update_nvram)} #{link}" + end + # Display bootloader summary # @return a list of summary lines def summary(*) @@ -183,6 +206,7 @@ ) ] result << secure_boot_summary if Systeminfo.secure_boot_available?(name) + result << update_nvram_summary if Systeminfo.nvram_available?(name) result end @@ -211,7 +235,7 @@ def write_sysconfig(prewrite: false) sysconfig = Bootloader::Sysconfig.new(bootloader: name, secure_boot: secure_boot, trusted_boot: false, - update_nvram: false) + update_nvram: update_nvram) prewrite ? sysconfig.pre_write : sysconfig.write end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/systemdboot_widgets.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/systemdboot_widgets.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/systemdboot_widgets.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/systemdboot_widgets.rb 2025-08-13 16:49:03.000000000 +0200 @@ -66,6 +66,7 @@ def widgets w = [] w << SecureBootWidget.new if secure_boot_widget? + w << UpdateNvramWidget.new if update_nvram_widget? w.map do |widget| MarginBox(horizontal_margin, 0, Left(widget)) end @@ -85,6 +86,10 @@ Systeminfo.secure_boot_available?(systemdboot.name) end + def update_nvram_widget? + Systeminfo.nvram_available?(systemdboot.name) + end + def pmbr_widget? Pmbr.available? end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/src/lib/bootloader/systeminfo.rb new/yast2-bootloader-5.0.25/src/lib/bootloader/systeminfo.rb --- old/yast2-bootloader-5.0.24/src/lib/bootloader/systeminfo.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/src/lib/bootloader/systeminfo.rb 2025-08-13 16:49:03.000000000 +0200 @@ -89,9 +89,6 @@ # Check if the system is expected to have nvram - ie. update_nvram_active? makes a difference def nvram_available?(bootloader_name = nil) - # not for grub2-bls - return false if bootloader_name == "grub2-bls" - (bootloader_name ? efi_used?(bootloader_name) : efi_supported?) || Yast::Arch.ppc end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/test/generic_widgets_test.rb new/yast2-bootloader-5.0.25/test/generic_widgets_test.rb --- old/yast2-bootloader-5.0.24/test/generic_widgets_test.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/test/generic_widgets_test.rb 2025-08-13 16:49:03.000000000 +0200 @@ -25,6 +25,42 @@ end end +describe Bootloader::UpdateNvramWidget do + before do + assign_bootloader("grub2-efi") + end + + it_behaves_like "labeled widget" + + it "is initialized to update nvram flag" do + bootloader.update_nvram = false + expect(subject).to receive(:value=).with(false) + + subject.init + end + + it "stores update nvram flag" do + expect(subject).to receive(:value).and_return(true) + subject.store + + expect(bootloader.update_nvram).to eq true + end + + it "is initialized to update nvram flag" do + bootloader.update_nvram = true + expect(subject).to receive(:value=).with(true) + + subject.init + end + + it "stores update nvram flag" do + expect(subject).to receive(:value).and_return(false) + subject.store + + expect(bootloader.update_nvram).to eq false + end +end + describe Bootloader::LoaderTypeWidget do before do allow(Bootloader::BootloaderFactory) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/test/grub2_bls_test.rb new/yast2-bootloader-5.0.25/test/grub2_bls_test.rb --- old/yast2-bootloader-5.0.24/test/grub2_bls_test.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/test/grub2_bls_test.rb 2025-08-13 16:49:03.000000000 +0200 @@ -24,6 +24,7 @@ allow(Bootloader::Bls).to receive(:menu_timeout) .and_return(10) allow(Yast::Installation).to receive(:destdir).and_return(destdir) + allow(Bootloader::Systeminfo).to receive(:update_nvram_active?).and_return(true) end it "reads menu timeout" do @@ -32,6 +33,12 @@ expect(subject.grub_default.timeout).to eq 10 end + it "reads update nvram configuration from sysconfig" do + subject.read + + expect(subject.update_nvram).to eq true + end + it "reads entries from /etc/kernel/cmdline" do subject.read @@ -133,17 +140,20 @@ end describe "#merge" do - it "overwrite mitigations and menu timeout if specified in merged one" do + it "overwrite mitigations, nvram handling and menu timeout if specified in merged one" do other_cmdline = "splash=silent quiet mitigations=auto" other = described_class.new other.grub_default.timeout = 12 + other.update_nvram = true other.grub_default.kernel_params.replace(other_cmdline) subject.grub_default.timeout = 10 subject.grub_default.kernel_params.replace(cmdline_content) + subject.update_nvram = false subject.merge(other) + expect(subject.update_nvram).to eq true expect(subject.grub_default.timeout).to eq 12 expect(subject.cpu_mitigations.to_human_string).to eq "Auto" expect(subject.grub_default.kernel_params.serialize).to include "security=apparmor splash=silent quiet mitigations=auto" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/test/grub2_widgets_test.rb new/yast2-bootloader-5.0.25/test/grub2_widgets_test.rb --- old/yast2-bootloader-5.0.24/test/grub2_widgets_test.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/test/grub2_widgets_test.rb 2025-08-13 16:49:03.000000000 +0200 @@ -238,43 +238,6 @@ end end -describe Bootloader::Grub2Widget::UpdateNvramWidget do - before do - assign_bootloader("grub2-efi") - end - - it_behaves_like "labeled widget" - - it "is initialized to update nvram flag" do - bootloader.update_nvram = false - expect(subject).to receive(:value=).with(false) - - subject.init - end - - it "stores update nvram flag" do - expect(subject).to receive(:value).and_return(true) - subject.store - - expect(bootloader.update_nvram).to eq true - end - - it "is initialized to update nvram flag" do - bootloader.update_nvram = true - expect(subject).to receive(:value=).with(true) - - subject.init - end - - it "stores update nvram flag" do - expect(subject).to receive(:value).and_return(false) - subject.store - - expect(bootloader.update_nvram).to eq false - end - -end - describe Bootloader::Grub2Widget::TrustedBootWidget do include_examples "CWM::AbstractWidget" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-5.0.24/test/systemdboot_test.rb new/yast2-bootloader-5.0.25/test/systemdboot_test.rb --- old/yast2-bootloader-5.0.24/test/systemdboot_test.rb 2025-08-12 14:45:14.000000000 +0200 +++ new/yast2-bootloader-5.0.25/test/systemdboot_test.rb 2025-08-13 16:49:03.000000000 +0200 @@ -29,6 +29,7 @@ describe "#read" do before do expect(Bootloader::Systeminfo).to receive(:secure_boot_active?).and_return(true) + expect(Bootloader::Systeminfo).to receive(:update_nvram_active?).and_return(true) allow(Yast::Installation).to receive(:destdir).and_return(destdir) end @@ -38,6 +39,12 @@ expect(subject.secure_boot).to eq true end + it "reads update nvram configuration from sysconfig" do + subject.read + + expect(subject.update_nvram).to eq true + end + it "reads entries from /etc/kernel/cmdline" do subject.read @@ -147,15 +154,17 @@ other.secure_boot = true other.timeout = 12 other.kernel_params.replace(other_cmdline) + other.update_nvram = true subject.secure_boot = false subject.timeout = 10 subject.kernel_params.replace(cmdline_content) - + subject.update_nvram = false subject.merge(other) expect(subject.secure_boot).to eq true expect(subject.timeout).to eq 12 + expect(subject.update_nvram).to eq true expect(subject.cpu_mitigations.to_human_string).to eq "Auto" expect(subject.kernel_params.serialize).to include "security=apparmor splash=silent quiet mitigations=auto" end @@ -177,6 +186,12 @@ expect(subject.secure_boot).to eq true end + it "proposes to update nvram" do + subject.propose + + expect(subject.update_nvram).to eq true + end + it "proposes kernel cmdline" do expect(Yast::BootArch).to receive(:DefaultKernelParams).and_return(cmdline_content)