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-24 20:23:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Fri Dec 24 20:23:01 2021 rev:316 rq:942262 version:4.4.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2021-12-13 20:47:00.208504686 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.2520/yast2-bootloader.changes  
    2021-12-24 20:23:23.654026150 +0100
@@ -1,0 +2,6 @@
+Thu Dec 23 16:13:08 UTC 2021 - Josef Reidinger <jreidin...@suse.com>
+
+- Always check tpm device for trusted boot (bsc#1193886)
+- 4.4.11
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-4.4.10.tar.bz2

New:
----
  yast2-bootloader-4.4.11.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.efcWyf/_old  2021-12-24 20:23:24.362026521 +0100
+++ /var/tmp/diff_new_pack.efcWyf/_new  2021-12-24 20:23:24.370026525 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.4.10
+Version:        4.4.11
 Release:        0
 Summary:        YaST2 - Bootloader Configuration
 License:        GPL-2.0-or-later

++++++ yast2-bootloader-4.4.10.tar.bz2 -> yast2-bootloader-4.4.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.4.10/package/yast2-bootloader.changes 
new/yast2-bootloader-4.4.11/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.4.10/package/yast2-bootloader.changes        
2021-12-10 13:45:01.000000000 +0100
+++ new/yast2-bootloader-4.4.11/package/yast2-bootloader.changes        
2021-12-23 17:27:19.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Dec 23 16:13:08 UTC 2021 - Josef Reidinger <jreidin...@suse.com>
+
+- Always check tpm device for trusted boot (bsc#1193886)
+- 4.4.11
+
+-------------------------------------------------------------------
 Fri Dec 10 12:05:57 UTC 2021 - Steffen Winterfeldt <snw...@suse.com>
 
 - rely on yast-storage-ng to detect UEFI boot support status (bsc#937067)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.4.10/package/yast2-bootloader.spec 
new/yast2-bootloader-4.4.11/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.4.10/package/yast2-bootloader.spec   2021-12-10 
13:45:01.000000000 +0100
+++ new/yast2-bootloader-4.4.11/package/yast2-bootloader.spec   2021-12-23 
17:27:19.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.4.10
+Version:        4.4.11
 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.4.10/src/lib/bootloader/systeminfo.rb 
new/yast2-bootloader-4.4.11/src/lib/bootloader/systeminfo.rb
--- old/yast2-bootloader-4.4.10/src/lib/bootloader/systeminfo.rb        
2021-12-10 13:45:01.000000000 +0100
+++ new/yast2-bootloader-4.4.11/src/lib/bootloader/systeminfo.rb        
2021-12-23 17:27:19.000000000 +0100
@@ -61,14 +61,14 @@
       # param bootloader_name [String] bootloader name
       # @return [Boolean] true if trusted boot setting is available with this 
bootloader
       def trusted_boot_available?(bootloader_name)
+        # TPM availability is must have
+        return false unless File.exist?("/dev/tpm0")
+
         # for details about grub2 efi trusted boot support see FATE#315831
         (
           bootloader_name == "grub2" &&
           (Yast::Arch.x86_64 || Yast::Arch.i386)
-        ) || (
-          bootloader_name == "grub2-efi" &&
-          File.exist?("/dev/tpm0")
-        )
+        ) || bootloader_name == "grub2-efi"
       end
 
       # Check if UEFI will be used.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.4.10/test/systeminfo_test.rb 
new/yast2-bootloader-4.4.11/test/systeminfo_test.rb
--- old/yast2-bootloader-4.4.10/test/systeminfo_test.rb 2021-12-10 
13:45:01.000000000 +0100
+++ new/yast2-bootloader-4.4.11/test/systeminfo_test.rb 2021-12-23 
17:27:19.000000000 +0100
@@ -117,6 +117,18 @@
   end
 
   describe ".trusted_boot_available?" do
+    before do
+      allow(File).to receive(:exist?).with("/dev/tpm0").and_return(true)
+    end
+
+    context "when tpm device does not exist" do
+      it "returns false" do
+        allow(File).to receive(:exist?).with("/dev/tpm0").and_return(false)
+        expect(described_class.trusted_boot_available?("grub2-efi")).to be 
false
+        expect(described_class.trusted_boot_available?("grub2")).to be false
+      end
+    end
+
     context "if bootloader is grub2" do
       context "and arch is x86_64" do
         let(:arch) { "x86_64" }
@@ -152,18 +164,8 @@
     end
 
     context "if bootloader is grub2-efi" do
-      context "and a tpm device exists" do
-        it "returns true" do
-          allow(File).to receive(:exist?).with("/dev/tpm0").and_return(true)
-          expect(described_class.trusted_boot_available?("grub2-efi")).to be 
true
-        end
-      end
-
-      context "and a tpm device does not exist" do
-        it "returns false" do
-          allow(File).to receive(:exist?).with("/dev/tpm0").and_return(false)
-          expect(described_class.trusted_boot_available?("grub2-efi")).to be 
false
-        end
+      it "returns true" do
+        expect(described_class.trusted_boot_available?("grub2-efi")).to be true
       end
     end
   end

Reply via email to