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-12-13 20:42:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader"
Mon Dec 13 20:42:18 2021 rev:315 rq:939116 version:4.4.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes
2021-11-28 21:29:56.562108095 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.2520/yast2-bootloader.changes
2021-12-13 20:47:00.208504686 +0100
@@ -1,0 +2,6 @@
+Fri Dec 10 12:05:57 UTC 2021 - Steffen Winterfeldt <[email protected]>
+
+- rely on yast-storage-ng to detect UEFI boot support status (bsc#937067)
+- 4.4.10
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-4.4.9.tar.bz2
New:
----
yast2-bootloader-4.4.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.MURAU4/_old 2021-12-13 20:47:00.840505091 +0100
+++ /var/tmp/diff_new_pack.MURAU4/_new 2021-12-13 20:47:00.844505093 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.4.9
+Version: 4.4.10
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
@@ -45,8 +45,8 @@
Requires: yast2-core >= 2.18.7
Requires: yast2-packager >= 2.17.24
Requires: yast2-pkg-bindings >= 2.17.25
-# BlkDevice#preferred_name and Filesystems::BlkFilesystem#preferred_name
-Requires: yast2-storage-ng >= 4.3.36
+# Y2Storage::Arch#efibootmgr?
+Requires: yast2-storage-ng >= 4.4.22
# Support for multiple values in GRUB_TERMINAL
Requires: rubygem(%rb_default_ruby_abi:cfa_grub2) >= 1.0.1
# lenses are needed as cfa_grub2 depends only on augeas bindings, but also
++++++ yast2-bootloader-4.4.9.tar.bz2 -> yast2-bootloader-4.4.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.4.9/package/yast2-bootloader.changes
new/yast2-bootloader-4.4.10/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.4.9/package/yast2-bootloader.changes 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/package/yast2-bootloader.changes
2021-12-10 13:45:01.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Dec 10 12:05:57 UTC 2021 - Steffen Winterfeldt <[email protected]>
+
+- rely on yast-storage-ng to detect UEFI boot support status (bsc#937067)
+- 4.4.10
+
+-------------------------------------------------------------------
Thu Nov 25 08:29:34 UTC 2021 - Michal Filka <[email protected]>
- bnc#1193016
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.4.9/package/yast2-bootloader.spec
new/yast2-bootloader-4.4.10/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.4.9/package/yast2-bootloader.spec 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/package/yast2-bootloader.spec 2021-12-10
13:45:01.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.4.9
+Version: 4.4.10
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
@@ -45,8 +45,8 @@
Requires: yast2-core >= 2.18.7
Requires: yast2-packager >= 2.17.24
Requires: yast2-pkg-bindings >= 2.17.25
-# BlkDevice#preferred_name and Filesystems::BlkFilesystem#preferred_name
-Requires: yast2-storage-ng >= 4.3.36
+# Y2Storage::Arch#efibootmgr?
+Requires: yast2-storage-ng >= 4.4.22
# Support for multiple values in GRUB_TERMINAL
Requires: rubygem(%rb_default_ruby_abi:cfa_grub2) >= 1.0.1
# lenses are needed as cfa_grub2 depends only on augeas bindings, but also
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.4.9/src/lib/bootloader/bootloader_factory.rb
new/yast2-bootloader-4.4.10/src/lib/bootloader/bootloader_factory.rb
--- old/yast2-bootloader-4.4.9/src/lib/bootloader/bootloader_factory.rb
2021-11-25 09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/src/lib/bootloader/bootloader_factory.rb
2021-12-10 13:45:01.000000000 +0100
@@ -9,7 +9,6 @@
Yast.import "Arch"
Yast.import "Mode"
-Yast.import "Linuxrc"
module Bootloader
# Factory to get instance of bootloader
@@ -87,12 +86,7 @@
private
def boot_efi?
- if Yast::Mode.live_installation
- Yast::Execute.locally("modprobe", "efivars")
- ::File.exist?("/sys/firmware/efi/systab")
- else
- Yast::Linuxrc.InstallInf("EFI") == "1"
- end
+ Systeminfo.efi?
end
def proposed_name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.4.9/src/lib/bootloader/systeminfo.rb
new/yast2-bootloader-4.4.10/src/lib/bootloader/systeminfo.rb
--- old/yast2-bootloader-4.4.9/src/lib/bootloader/systeminfo.rb 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/src/lib/bootloader/systeminfo.rb
2021-12-10 13:45:01.000000000 +0100
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "yast"
+require "y2storage"
require "bootloader/bootloader_factory"
require "bootloader/sysconfig"
require "yast2/execute"
@@ -164,25 +165,20 @@
false
end
+ def efi?
+ Y2Storage::Arch.new.efiboot?
+ end
+
# Checks if efivars exists and can be written
# @see https://bugzilla.suse.com/show_bug.cgi?id=1174111#c37
#
+ # The point here is that without writable UEFI variables the UEFI boot
+ # manager cannot (and must not) be updated.
+ #
# @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
+ storage_arch = Y2Storage::Arch.new
+ storage_arch.efiboot? && storage_arch.efibootmgr?
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.4.9/src/modules/BootSupportCheck.rb
new/yast2-bootloader-4.4.10/src/modules/BootSupportCheck.rb
--- old/yast2-bootloader-4.4.9/src/modules/BootSupportCheck.rb 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/src/modules/BootSupportCheck.rb 2021-12-10
13:45:01.000000000 +0100
@@ -132,9 +132,7 @@
# Check if EFI is needed
def efi?
- cmd = "/usr/sbin/modprobe efivars 2>/dev/null"
- SCR.Execute(path(".target.bash_output"), cmd)
- FileUtils.Exists("/sys/firmware/efi/systab")
+ ::Bootloader::Systeminfo.efi?
end
def check_activate_partition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.4.9/test/boot_support_test.rb
new/yast2-bootloader-4.4.10/test/boot_support_test.rb
--- old/yast2-bootloader-4.4.9/test/boot_support_test.rb 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/test/boot_support_test.rb 2021-12-10
13:45:01.000000000 +0100
@@ -35,9 +35,9 @@
Bootloader::BootloaderFactory.current_name = "grub2"
end
- it "returns false if grub2-efi is used and efi not supported" do
+ it "returns false if grub2-efi is used and UEFI is not supported" do
Bootloader::BootloaderFactory.current_name = "grub2-efi"
- allow(Yast::FileUtils).to receive(:Exists).and_return(false)
+ allow(subject).to receive(:efi?).and_return(false)
expect(subject.SystemSupported).to eq false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.4.9/test/systeminfo_test.rb
new/yast2-bootloader-4.4.10/test/systeminfo_test.rb
--- old/yast2-bootloader-4.4.9/test/systeminfo_test.rb 2021-11-25
09:34:21.000000000 +0100
+++ new/yast2-bootloader-4.4.10/test/systeminfo_test.rb 2021-12-10
13:45:01.000000000 +0100
@@ -384,41 +384,24 @@
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([])
+ it "returns false if UEFI is not available" do
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efiboot?).and_return(false)
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efibootmgr?).and_return(true)
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)"
- )
+ it "returns false if UEFI variables are not writable" do
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efiboot?).and_return(true)
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efibootmgr?).and_return(false)
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 UEFI variables are writable" do
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efiboot?).and_return(true)
+ allow_any_instance_of(Y2Storage::Arch).to
receive(:efibootmgr?).and_return(true)
- it "returns true if efivars are writable" do
expect(described_class.writable_efivars?).to eq true
end
end