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 2021-03-10 08:46:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader"
Wed Mar 10 08:46:50 2021 rev:304 rq:876702 version:4.3.24
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes
2021-02-26 21:58:36.783776642 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.2378/yast2-bootloader.changes
2021-03-10 08:47:06.534260601 +0100
@@ -1,0 +2,13 @@
+Thu Mar 4 09:09:20 UTC 2021 - Josef Reidinger <[email protected]>
+
+- Fix boot summary on s390 (bsc#1181801 and bsc#1179168)
+- 4.3.24
+
+-------------------------------------------------------------------
+Wed Mar 3 09:30:42 UTC 2021 - Josef Reidinger <[email protected]>
+
+- Respect if efivars is mounted read only (bsc#1174111,
+ bsc#1182749)
+- 4.3.23
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-4.3.22.tar.bz2
New:
----
yast2-bootloader-4.3.24.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.97qhkV/_old 2021-03-10 08:47:10.306264495 +0100
+++ /var/tmp/diff_new_pack.97qhkV/_new 2021-03-10 08:47:10.306264495 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.3.22
+Version: 4.3.24
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
++++++ yast2-bootloader-4.3.22.tar.bz2 -> yast2-bootloader-4.3.24.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.3.22/package/yast2-bootloader.changes
new/yast2-bootloader-4.3.24/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.3.22/package/yast2-bootloader.changes
2021-02-18 17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/package/yast2-bootloader.changes
2021-03-04 10:57:29.000000000 +0100
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Thu Mar 4 09:09:20 UTC 2021 - Josef Reidinger <[email protected]>
+
+- Fix boot summary on s390 (bsc#1181801 and bsc#1179168)
+- 4.3.24
+
+-------------------------------------------------------------------
+Wed Mar 3 09:30:42 UTC 2021 - Josef Reidinger <[email protected]>
+
+- Respect if efivars is mounted read only (bsc#1174111,
+ bsc#1182749)
+- 4.3.23
+
+-------------------------------------------------------------------
Mon Feb 15 14:49:00 UTC 2021 - Josef Reidinger <[email protected]>
- Adapted unit test to recent changes in Yast::Report (related to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.3.22/package/yast2-bootloader.spec
new/yast2-bootloader-4.3.24/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.3.22/package/yast2-bootloader.spec 2021-02-18
17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/package/yast2-bootloader.spec 2021-03-04
10:57:29.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.3.22
+Version: 4.3.24
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-4.3.22/src/lib/bootloader/grub_install.rb
new/yast2-bootloader-4.3.24/src/lib/bootloader/grub_install.rb
--- old/yast2-bootloader-4.3.22/src/lib/bootloader/grub_install.rb
2021-02-18 17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/src/lib/bootloader/grub_install.rb
2021-03-04 10:57:29.000000000 +0100
@@ -42,7 +42,7 @@
Yast::Execute.on_target(cmd)
# workaround for arm on SLE15 SP2 (bsc#1167015)
# run grub2-install also non-removable if efi is there
- if Yast::Arch.aarch64 &&
!Dir.glob("/sys/firmware/efi/efivars/*").empty?
+ if Yast::Arch.aarch64 && Systeminfo.writable_efivars?
cmd.delete("--removable")
Yast::Execute.on_target(cmd)
end
@@ -125,7 +125,7 @@
# point) or there is no efi variable exposed. Install grub in the
# removable location there.
# Workaround for SLE15 SP2 - run always as removable on arm (bsc#1167015)
- Yast::Arch.aarch64 || (efi &&
Dir.glob("/sys/firmware/efi/efivars/*").empty?)
+ Yast::Arch.aarch64 || (efi && !Systeminfo.writable_efivars?)
end
def no_device_install?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.3.22/src/lib/bootloader/proposal_client.rb
new/yast2-bootloader-4.3.24/src/lib/bootloader/proposal_client.rb
--- old/yast2-bootloader-4.3.22/src/lib/bootloader/proposal_client.rb
2021-02-18 17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/src/lib/bootloader/proposal_client.rb
2021-03-04 10:57:29.000000000 +0100
@@ -79,6 +79,8 @@
"disable_boot_extended",
"enable_secure_boot",
"disable_secure_boot",
+ "enable_update_nvram",
+ "disable_update_nvram",
"enable_trusted_boot",
"disable_trusted_boot"
].freeze
@@ -368,6 +370,8 @@
end
when "trusted_boot"
bootloader.trusted_boot = value
+ when "update_nvram"
+ bootloader.update_nvram = value
when "secure_boot"
bootloader.secure_boot = value
if value && Yast::Arch.s390
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.3.22/src/lib/bootloader/stage1.rb
new/yast2-bootloader-4.3.24/src/lib/bootloader/stage1.rb
--- old/yast2-bootloader-4.3.22/src/lib/bootloader/stage1.rb 2021-02-18
17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/src/lib/bootloader/stage1.rb 2021-03-04
10:57:29.000000000 +0100
@@ -114,11 +114,17 @@
end
def boot_partition?
- include_real_devs?(boot_partition_names)
+ names = boot_partition_names
+ return false if names.empty?
+
+ include_real_devs?(names)
end
def mbr?
- include_real_devs?(boot_disk_names)
+ names = boot_disk_names
+ return false if names.empty?
+
+ include_real_devs?(names)
end
def logical_boot?
@@ -139,9 +145,11 @@
end
def extended_boot_partition?
- return false if boot_partition_names == extended_boot_partitions_names
+ names = extended_boot_partitions_names
+ return false if names.empty?
+ return false if boot_partition_names == names
- include_real_devs?(extended_boot_partitions_names)
+ include_real_devs?(names)
end
def custom_devices
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.3.22/src/lib/bootloader/systeminfo.rb
new/yast2-bootloader-4.3.24/src/lib/bootloader/systeminfo.rb
--- old/yast2-bootloader-4.3.22/src/lib/bootloader/systeminfo.rb
2021-02-18 17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/src/lib/bootloader/systeminfo.rb
2021-03-04 10:57:29.000000000 +0100
@@ -3,6 +3,7 @@
require "yast"
require "bootloader/bootloader_factory"
require "bootloader/sysconfig"
+require "yast2/execute"
Yast.import "Arch"
@@ -156,6 +157,27 @@
rescue StandardError
false
end
+
+ # Checks if efivars exists and can be written
+ # @see https://bugzilla.suse.com/show_bug.cgi?id=1174111#c37
+ #
+ # @return [Boolean] true if efivars are writable
+ def writable_efivars?
+ # quick check if there are no efivars at all
+ return false if Dir.glob("/sys/firmware/efi/efivars/*").empty?
+
+ # check if efivars are ro
+ mounts = Yast::Execute.locally!("/usr/bin/mount", stdout: :capture)
+ # target line looks like:
+ # efivarfs on /sys/firmware/efi/efivars type efivarfs
(rw,nosuid,nodev,noexec,relatime)
+ efivars = mounts.lines.grep(/type\s+efivarfs/)
+ efivars = efivars.first
+ return false unless efivars
+
+ efivars.match?(/[\(,]rw[,\)]/)
+ rescue Cheetah::ExecutionFailed
+ false
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.3.22/test/bootloader_proposal_client_test.rb
new/yast2-bootloader-4.3.24/test/bootloader_proposal_client_test.rb
--- old/yast2-bootloader-4.3.22/test/bootloader_proposal_client_test.rb
2021-02-18 17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/test/bootloader_proposal_client_test.rb
2021-03-04 10:57:29.000000000 +0100
@@ -57,6 +57,15 @@
expect(Yast::Bootloader.proposed_cfg_changed).to be true
end
+
+ it "works with update_nvram" do
+ bootloader = ::Bootloader::BootloaderFactory.current
+ bootloader.update_nvram = false
+
+ expect { subject.ask_user("chosen_id" => "enable_update_nvram") }
+ .to change { bootloader.update_nvram }.from(false).to(true)
+
+ end
end
context "gui id is passed" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.3.22/test/grub_install_test.rb
new/yast2-bootloader-4.3.24/test/grub_install_test.rb
--- old/yast2-bootloader-4.3.22/test/grub_install_test.rb 2021-02-18
17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/test/grub_install_test.rb 2021-03-04
10:57:29.000000000 +0100
@@ -12,15 +12,7 @@
end
def stub_efivars(removable: false)
- efivardirs = if removable
- []
- else
- ["Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c",
- "BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c",
- "BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c"]
- end
-
- allow(Dir).to receive(:glob).and_return(efivardirs)
+ allow(Bootloader::Systeminfo).to
receive(:writable_efivars?).and_return(!removable)
end
def expect_grub2_install(target, device: nil, removable: false, no_nvram:
false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.3.22/test/systeminfo_test.rb
new/yast2-bootloader-4.3.24/test/systeminfo_test.rb
--- old/yast2-bootloader-4.3.22/test/systeminfo_test.rb 2021-02-18
17:25:29.000000000 +0100
+++ new/yast2-bootloader-4.3.24/test/systeminfo_test.rb 2021-03-04
10:57:29.000000000 +0100
@@ -382,4 +382,44 @@
end
end
end
+
+ describe ".writable_efivars?" do
+ before do
+ allow(Dir).to
receive(:glob).and_return(["BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c"])
+ allow(Yast::Execute).to receive(:locally!).and_return(
+ "pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
+ efivarfs on /sys/firmware/efi/efivars type efivarfs
(rw,nosuid,nodev,noexec,relatime)
+ none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)"
+ )
+ end
+
+ it "returns false if there are no efivars in /sys" do
+ allow(Dir).to receive(:glob).and_return([])
+
+ expect(described_class.writable_efivars?).to eq false
+ end
+
+ it "returns false if there are no efivars in mount" do
+ allow(Yast::Execute).to receive(:locally!).and_return(
+ "pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
+ none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)"
+ )
+
+ expect(described_class.writable_efivars?).to eq false
+ end
+
+ it "returns false if efivars are mounted read only" do
+ allow(Yast::Execute).to receive(:locally!).and_return(
+ "pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
+ efivarfs on /sys/firmware/efi/efivars type efivarfs
(ro,nosuid,nodev,noexec,relatime)
+ none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)"
+ )
+
+ expect(described_class.writable_efivars?).to eq false
+ end
+
+ it "returns true if efivars are writable" do
+ expect(described_class.writable_efivars?).to eq true
+ end
+ end
end