Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2016-07-12 23:45:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2016-07-01 09:51:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2016-07-12 23:45:25.000000000 +0200
@@ -1,0 +2,20 @@
+Mon Jul 11 12:18:29 UTC 2016 - [email protected]
+
+- do not crash after configuration in autoyast bootloader section
+  without previous cloning (bnc#985007)
+- 3.1.197
+
+-------------------------------------------------------------------
+Thu Jul  7 07:51:12 UTC 2016 - [email protected]
+
+- set by default SECURE_BOOT to false on architectures that do not
+  support it to avoid call of shim there (bnc#984895)
+- 3.1.196
+
+-------------------------------------------------------------------
+Fri Jul  1 15:10:53 UTC 2016 - [email protected]
+
+- Optimize code for quicker run (bnc#986649)
+- 3.1.195
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.dBLTW3/_old  2016-07-12 23:45:26.000000000 +0200
+++ /var/tmp/diff_new_pack.dBLTW3/_new  2016-07-12 23:45:26.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.194
+Version:        3.1.197
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-3.1.194.tar.bz2 -> yast2-bootloader-3.1.197.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/package/yast2-bootloader.changes 
new/yast2-bootloader-3.1.197/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.194/package/yast2-bootloader.changes       
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/package/yast2-bootloader.changes       
2016-07-11 15:22:46.000000000 +0200
@@ -1,4 +1,24 @@
 -------------------------------------------------------------------
+Mon Jul 11 12:18:29 UTC 2016 - [email protected]
+
+- do not crash after configuration in autoyast bootloader section
+  without previous cloning (bnc#985007)
+- 3.1.197
+
+-------------------------------------------------------------------
+Thu Jul  7 07:51:12 UTC 2016 - [email protected]
+
+- set by default SECURE_BOOT to false on architectures that do not
+  support it to avoid call of shim there (bnc#984895)
+- 3.1.196
+
+-------------------------------------------------------------------
+Fri Jul  1 15:10:53 UTC 2016 - [email protected]
+
+- Optimize code for quicker run (bnc#986649)
+- 3.1.195
+
+-------------------------------------------------------------------
 Wed Jun 15 12:42:08 UTC 2016 - [email protected]
 
 - do not activate partition on gpt disks on ppc (bnc#983194)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/package/yast2-bootloader.spec 
new/yast2-bootloader-3.1.197/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.194/package/yast2-bootloader.spec  2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/package/yast2-bootloader.spec  2016-07-11 
15:22:46.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.194
+Version:        3.1.197
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/auto_client.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/auto_client.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/auto_client.rb      
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/auto_client.rb      
2016-07-11 15:22:46.000000000 +0200
@@ -36,6 +36,7 @@
     end
 
     def summary
+      Yast::BootStorage.detect_disks
       formatted_summary = Yast::Bootloader.Summary.map { |l| "<LI>#{l}</LI>" }
 
       "<UL>" + formatted_summary.join("\n") + "</UL>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/autoyast_converter.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/autoyast_converter.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/autoyast_converter.rb       
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/autoyast_converter.rb       
2016-07-11 15:22:46.000000000 +0200
@@ -190,6 +190,10 @@
           res[key] = stage1.public_send(method) ? "true" : "false"
         end
 
+        # if there is no separated boot, then root and boot partition is same, 
so in such case
+        # have only one true there
+        res["boot_boot"] = "false" if res["boot_root"] == "true" && 
res["boot_boot"] == "true"
+
         res["boot_custom"] = stage1.custom_devices.join(",") unless 
stage1.custom_devices.empty?
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/grub2efi.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/grub2efi.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/grub2efi.rb 2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/grub2efi.rb 2016-07-11 
15:22:46.000000000 +0200
@@ -97,6 +97,8 @@
       when "x86_64"
         res << "grub2-x86_64-efi"
         res << "shim" << "mokutil" if @secure_boot
+      when "arm"
+        res << "grub2-arm-efi"
       when "aarch64"
         res << "grub2-arm64-efi"
       else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/grub_install.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/grub_install.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/grub_install.rb     
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/grub_install.rb     
2016-07-11 15:22:46.000000000 +0200
@@ -83,6 +83,7 @@
     EFI_TARGETS = {
       "i386"    => "i386-efi",
       "x86_64"  => "x86_64-efi",
+      "arm"     => "arm-efi",
       "aarch64" => "arm64-efi"
     }
     def target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/sections.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/sections.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/sections.rb 2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/sections.rb 2016-07-11 
15:22:46.000000000 +0200
@@ -36,7 +36,7 @@
       log.info "set new default to '#{value.inspect}'"
 
       # empty value mean no default specified
-      raise "Unknown value #{value.inspect}" if !all.include?(value) && 
!value.empty?
+      raise "Unknown value #{value.inspect}" if !all.empty? && 
!all.include?(value) && !value.empty?
 
       @default = value
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/stage1_proposal.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/stage1_proposal.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/stage1_proposal.rb  
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/stage1_proposal.rb  
2016-07-11 15:22:46.000000000 +0200
@@ -167,7 +167,8 @@
       # BootPartitionDevice, or the devices from which the soft-RAID device for
       # "/boot" is built)
       def underlaying_boot_partition_devices
-        
::Bootloader::Stage1Device.new(Yast::BootStorage.BootPartitionDevice).real_devices
+        @underlaying_boot_partition_devices ||=
+          
::Bootloader::Stage1Device.new(Yast::BootStorage.BootPartitionDevice).real_devices
       end
 
       def boot_partition_on_mbr_disk?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/sysconfig.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/sysconfig.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/sysconfig.rb        
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/sysconfig.rb        
2016-07-11 15:22:46.000000000 +0200
@@ -1,5 +1,7 @@
 require "yast"
 
+Yast.import "Arch"
+
 module Bootloader
   # Represents sysconfig file for bootloader usually located in 
/etc/sysconfig/bootloader
   class Sysconfig
@@ -28,7 +30,13 @@
     def self.from_system
       bootloader = Yast::SCR.Read(AGENT_PATH + "LOADER_TYPE")
       # propose secure boot always to true (bnc#872054), otherwise respect 
user choice
-      secure_boot = Yast::SCR.Read(AGENT_PATH + "SECURE_BOOT") != "no"
+      # but only on architectures that support it (bnc#984895)
+      if Yast::Arch.x86_64 || Yast::Arch.i386
+        secure_boot = Yast::SCR.Read(AGENT_PATH + "SECURE_BOOT") != "no"
+      else
+        secure_boot = false
+      end
+
       trusted_boot = Yast::SCR.Read(AGENT_PATH + "TRUSTED_BOOT") == "yes"
 
       new(bootloader: bootloader, secure_boot: secure_boot, trusted_boot: 
trusted_boot)
@@ -63,7 +71,7 @@
         "## Default:\t\"no\"\n" \
         "#\n" \
         "# Enable UEFI Secure Boot support\n" \
-        "# This setting is only relevant to UEFI which supports UEFI. It 
won't\n" \
+        "# This setting is only relevant to UEFI which supports Secure Boot. 
It won't\n" \
         "# take effect on any other firmware type.\n" \
         "#\n" \
         "#\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.194/src/lib/bootloader/udev_mapping.rb 
new/yast2-bootloader-3.1.197/src/lib/bootloader/udev_mapping.rb
--- old/yast2-bootloader-3.1.194/src/lib/bootloader/udev_mapping.rb     
2016-06-15 15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/lib/bootloader/udev_mapping.rb     
2016-07-11 15:22:46.000000000 +0200
@@ -24,15 +24,13 @@
     # @raise when device have udev format but do not exists
     # @return [String,nil] kernel device or nil when running AutoYaST 
configuration.
     def to_kernel_device(dev)
-      # AutoYaST configuration mode. There is no access to the system
-      return nil if Yast::Mode.config
-
       log.info "call to_kernel_device for #{dev}"
       raise "invalid device nil" unless dev
 
       # for non-udev devices try to see specific raid names (bnc#944041)
       if dev =~ /^\/dev\/disk\/by-/
-        all_devices[dev] or raise "Unknown udev device #{dev}"
+        # in mode config if not found, then return itself
+        all_devices[dev] or Yast::Mode.config ? dev : raise("Unknown udev 
device #{dev}")
       else
         param = Yast::ArgRef.new({})
         result = Yast::Storage.GetContVolInfo(dev, param)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/src/modules/BootStorage.rb 
new/yast2-bootloader-3.1.197/src/modules/BootStorage.rb
--- old/yast2-bootloader-3.1.194/src/modules/BootStorage.rb     2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/modules/BootStorage.rb     2016-07-11 
15:22:46.000000000 +0200
@@ -174,9 +174,21 @@
 
     # Sets properly boot, root and mbr disk.
     def detect_disks
+      return unless @RootPartitionDevice.empty? # quit if already detected
+      # While calling "yast clone_system" and while cloning bootloader
+      # in the AutoYaST module, libStorage has to be set to "normal"
+      # mode in order to read mountpoints correctly.
+      # (bnc#950105)
+      old_mode = Mode.mode
+      if Mode.config
+        Mode.SetMode("normal")
+        log.info "Initialize libstorage in readonly mode" # bnc#942360
+        Storage.InitLibstorage(true)
+        StorageDevices.InitDone # Set StorageDevices flag disks_valid to true
+      end
+
       # The AutoYaST config mode does access to the system.
       # bnc#942360
-      return :ok if Mode.config
 
       mp = Storage.GetMountPoints
 
@@ -196,6 +208,8 @@
       @ExtendedPartitionDevice = extended_partition_for(@BootPartitionDevice)
 
       @mbr_disk = find_mbr_disk
+
+      Mode.SetMode(old_mode) if old_mode == "autoinst_config"
     end
 
     def prep_partitions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/src/modules/Bootloader.rb 
new/yast2-bootloader-3.1.197/src/modules/Bootloader.rb
--- old/yast2-bootloader-3.1.194/src/modules/Bootloader.rb      2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/src/modules/Bootloader.rb      2016-07-11 
15:22:46.000000000 +0200
@@ -91,7 +91,7 @@
     # @return [Boolean] true on success
     def Import(data)
       # AutoYaST configuration mode. There is no access to the system
-      Yast::BootStorage.detect_disks unless Mode.config
+      Yast::BootStorage.detect_disks
 
       imported_configuration = ::Bootloader::AutoyastConverter.import(data)
       ::Bootloader::BootloaderFactory.clear_cache
@@ -144,18 +144,7 @@
       Progress.NextStage
       return false if !checkUsedStorage
 
-      # While calling "yast clone_system" and while cloning bootloader
-      # in the AutoYaST module, libStorage has to be set to "normal"
-      # mode in order to read mountpoints correctly.
-      # (bnc#950105)
-      old_mode = Mode.mode
-      if Mode.config
-        Mode.SetMode("normal")
-        StorageDevices.InitDone # Set StorageDevices flag disks_valid to true
-      end
-
       BootStorage.detect_disks
-      Mode.SetMode(old_mode) if old_mode == "autoinst_config"
 
       Progress.NextStage
       return false if testAbort
@@ -348,6 +337,7 @@
     #   Bootloader.modify_kernel_params(:xen_host, "cio_ignore" => :present)
     #
     def modify_kernel_params(*args)
+      ReadOrProposeIfNeeded() # ensure we have data to modify
       current_bl = ::Bootloader::BootloaderFactory.current
       # currently only grub2 bootloader supported
       return :missing unless current_bl.respond_to?(:grub_default)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/test/boot_storage_test.rb 
new/yast2-bootloader-3.1.197/test/boot_storage_test.rb
--- old/yast2-bootloader-3.1.194/test/boot_storage_test.rb      2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/test/boot_storage_test.rb      2016-07-11 
15:22:46.000000000 +0200
@@ -46,10 +46,11 @@
       allow(Yast::Storage).to receive(:GetContVolInfo).and_return(false)
       # disable general mock for disk detection
       allow(subject).to receive(:detect_disks).and_call_original
+      subject.RootPartitionDevice = ""
     end
 
     it "fills RootPartitionDevice variable" do
-      subject.RootPartitionDevice = nil
+      subject.RootPartitionDevice = ""
 
       subject.detect_disks
 
@@ -57,7 +58,7 @@
     end
 
     it "fills BootPartitionDevice variable" do
-      subject.BootPartitionDevice = nil
+      subject.BootPartitionDevice = ""
 
       subject.detect_disks
 
@@ -65,7 +66,7 @@
     end
 
     it "sets ExtendedPartitionDevice variable to nil if boot is not logical" do
-      subject.ExtendedPartitionDevice = nil
+      subject.ExtendedPartitionDevice = ""
 
       subject.detect_disks
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/test/grub2_efi_test.rb 
new/yast2-bootloader-3.1.197/test/grub2_efi_test.rb
--- old/yast2-bootloader-3.1.194/test/grub2_efi_test.rb 2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/test/grub2_efi_test.rb 2016-07-11 
15:22:46.000000000 +0200
@@ -87,6 +87,12 @@
       expect(subject.packages).to include("grub2-i386-efi")
     end
 
+    it "adds to list grub2-arm-efi on arm" do
+      allow(Yast::Arch).to receive(:architecture).and_return("arm")
+
+      expect(subject.packages).to include("grub2-arm-efi")
+    end
+
     it "adds to list grub2-arm64-efi on aarch64" do
       allow(Yast::Arch).to receive(:architecture).and_return("aarch64")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/test/stage1_test.rb 
new/yast2-bootloader-3.1.197/test/stage1_test.rb
--- old/yast2-bootloader-3.1.194/test/stage1_test.rb    2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/test/stage1_test.rb    2016-07-11 
15:22:46.000000000 +0200
@@ -186,6 +186,9 @@
       before do
         allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
         allow(subject).to receive(:can_use_boot?).and_call_original
+        allow(Yast::BootStorage).to receive(:detect_disks).and_call_original
+        # reset cache
+        Yast::BootStorage.RootPartitionDevice = ""
       end
 
       it "returns map with :extended set to extended partition" do
@@ -196,7 +199,6 @@
 
       it "returns map with :root if separated /boot is not available" do
         target_map_stub("storage_tmpfs.yaml")
-        allow(Yast::BootStorage).to receive(:detect_disks).and_call_original
         Yast::BootStorage.detect_disks
 
         expect(subject.available_locations[:root]).to eq "/dev/vda1"
@@ -204,7 +206,6 @@
 
       it "returns map with :boot if separated /boot is available" do
         target_map_stub("storage_mdraid.yaml")
-        allow(Yast::BootStorage).to receive(:detect_disks).and_call_original
         Yast::BootStorage.detect_disks
 
         expect(subject.available_locations[:boot]).to eq "/dev/md1"
@@ -212,7 +213,6 @@
 
       it "returns map without :boot nor :root when xfs used" do
         target_map_stub("storage_xfs.yaml")
-        allow(Yast::BootStorage).to receive(:detect_disks).and_call_original
         Yast::BootStorage.detect_disks
 
         res = subject.available_locations
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.194/test/sysconfig_test.rb 
new/yast2-bootloader-3.1.197/test/sysconfig_test.rb
--- old/yast2-bootloader-3.1.194/test/sysconfig_test.rb 2016-06-15 
15:17:59.000000000 +0200
+++ new/yast2-bootloader-3.1.197/test/sysconfig_test.rb 2016-07-11 
15:22:46.000000000 +0200
@@ -21,6 +21,36 @@
       expect(sysconfig.bootloader).to eq "grub2"
       expect(sysconfig.secure_boot).to be false
     end
+
+    context "x86_64" do
+      before do
+        allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
+      end
+
+      it "defaults secure_boot to true if not set" do
+        allow(Yast::SCR).to receive(:Read).with(
+          Yast::Path.new(".sysconfig.bootloader.SECURE_BOOT")
+        ).and_return(nil)
+
+        sysconfig = Bootloader::Sysconfig.from_system
+        expect(sysconfig.secure_boot).to be true
+      end
+    end
+
+    context "on other architectures" do
+      before do
+        allow(Yast::Arch).to receive(:architecture).and_return("aarch64")
+      end
+
+      it "defaults secure_boot to false if not set" do
+        allow(Yast::SCR).to receive(:Read).with(
+          Yast::Path.new(".sysconfig.bootloader.SECURE_BOOT")
+        ).and_return(nil)
+
+        sysconfig = Bootloader::Sysconfig.from_system
+        expect(sysconfig.secure_boot).to be false
+      end
+    end
   end
 
   describe "#write" do


Reply via email to