Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2020-11-13 18:57:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Fri Nov 13 18:57:21 2020 rev:298 rq:848150 version:4.3.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2020-10-26 16:13:27.842779779 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.24930/yast2-bootloader.changes 
    2020-11-13 18:57:29.802007964 +0100
@@ -1,0 +2,16 @@
+Thu Nov 12 10:08:49 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Use shared Yast::Kernel.propose_hibernation? method when
+  proposing kernel parameters (jsc#SLE-12280)
+- 4.3.15
+
+-------------------------------------------------------------------
+Thu Nov  5 21:48:43 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Improve wording in summary to see where boot code is written
+  (jsc#SLE-16033)
+- allow to specify extended or logical partition when boot from
+  partition (bsc#1165042)
+- 4.3.14
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.p41vGH/_old  2020-11-13 18:57:30.770009086 +0100
+++ /var/tmp/diff_new_pack.p41vGH/_new  2020-11-13 18:57:30.770009086 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.3.13
+Version:        4.3.15
 Release:        0
 Summary:        YaST2 - Bootloader Configuration
 License:        GPL-2.0-or-later
@@ -26,7 +26,7 @@
 
 Source0:        %{name}-%{version}.tar.bz2
 
-BuildRequires:  yast2 >= 3.1.176
+BuildRequires:  yast2 >= 4.3.41
 BuildRequires:  yast2-devtools >= 4.2.2
 BuildRequires:  yast2-ruby-bindings >= 1.0.0
 # Y2Storage::Mountable#mount_path
@@ -41,8 +41,8 @@
 PreReq:         /bin/sed %fillup_prereq
 # Base classes for inst clients
 Requires:       parted
-# Yast::Execute class
-Requires:       yast2 >= 3.1.176
+# Kernel.propose_hibernation?
+Requires:       yast2 >= 4.3.41
 Requires:       yast2-core >= 2.18.7
 Requires:       yast2-packager >= 2.17.24
 Requires:       yast2-pkg-bindings >= 2.17.25

++++++ yast2-bootloader-4.3.13.tar.bz2 -> yast2-bootloader-4.3.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/.rubocop.yml 
new/yast2-bootloader-4.3.15/.rubocop.yml
--- old/yast2-bootloader-4.3.13/.rubocop.yml    2020-10-22 16:49:25.000000000 
+0200
+++ new/yast2-bootloader-4.3.15/.rubocop.yml    2020-11-12 16:17:55.000000000 
+0100
@@ -8,7 +8,7 @@
     - 'src/lib/**/*.rb' # be more strict for new code in lib
 
 Metrics/AbcSize:
-  Max: 30
+  Max: 35
   Include:
     - 'src/lib/**/*.rb' # be more strict for new code in lib
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.3.13/package/yast2-bootloader.changes 
new/yast2-bootloader-4.3.15/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.3.13/package/yast2-bootloader.changes        
2020-10-22 16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/package/yast2-bootloader.changes        
2020-11-12 16:17:55.000000000 +0100
@@ -1,4 +1,20 @@
 -------------------------------------------------------------------
+Thu Nov 12 10:08:49 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Use shared Yast::Kernel.propose_hibernation? method when
+  proposing kernel parameters (jsc#SLE-12280)
+- 4.3.15
+
+-------------------------------------------------------------------
+Thu Nov  5 21:48:43 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
+
+- Improve wording in summary to see where boot code is written
+  (jsc#SLE-16033)
+- allow to specify extended or logical partition when boot from
+  partition (bsc#1165042)
+- 4.3.14
+
+-------------------------------------------------------------------
 Thu Oct 22 12:53:21 UTC 2020 - Josef Reidinger <jreidin...@suse.com>
 
 - "write proper value for NVRAM for UEFI (bsc#1157550)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.3.13/package/yast2-bootloader.spec 
new/yast2-bootloader-4.3.15/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.3.13/package/yast2-bootloader.spec   2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/package/yast2-bootloader.spec   2020-11-12 
16:17:55.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.3.13
+Version:        4.3.15
 Release:        0
 Summary:        YaST2 - Bootloader Configuration
 License:        GPL-2.0-or-later
@@ -26,7 +26,7 @@
 
 Source0:        %{name}-%{version}.tar.bz2
 
-BuildRequires:  yast2 >= 3.1.176
+BuildRequires:  yast2 >= 4.3.41
 BuildRequires:  yast2-devtools >= 4.2.2
 BuildRequires:  yast2-ruby-bindings >= 1.0.0
 # Y2Storage::Mountable#mount_path
@@ -41,8 +41,8 @@
 PreReq:         /bin/sed %fillup_prereq
 # Base classes for inst clients
 Requires:       parted
-# Yast::Execute class
-Requires:       yast2 >= 3.1.176
+# Kernel.propose_hibernation?
+Requires:       yast2 >= 4.3.41
 Requires:       yast2-core >= 2.18.7
 Requires:       yast2-packager >= 2.17.24
 Requires:       yast2-pkg-bindings >= 2.17.25
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2.rb 
new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2.rb
--- old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2.rb     2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2.rb     2020-11-12 
16:17:55.000000000 +0100
@@ -110,8 +110,8 @@
 
       locations_val = locations
       if !locations_val.empty?
-        result << Yast::Builtins.sformat(
-          _("Status Location: %1"),
+        result << format(
+          _("Write Boot Code To: %s"),
           locations_val.join(", ")
         )
       end
@@ -193,6 +193,12 @@
 
       partition_location = 
Yast::BootStorage.boot_partitions.map(&:name).join(", ")
       locations << partition_location + _(" (/boot)") if stage1.boot_partition?
+      if stage1.extended_boot_partition?
+        partitions = Yast::BootStorage.boot_partitions.map do |partition|
+          Yast::BootStorage.extended_for_logical(partition).name
+        end
+        locations << partitions.join(", ") + _(" (/boot)")
+      end
       if stage1.mbr?
         # TRANSLATORS: MBR is acronym for Master Boot Record, if nothing 
locally specific
         # is used in your language, then keep it as it is.
@@ -229,6 +235,34 @@
       end
     end
 
+    def logical_partition_line
+      if stage1.boot_partition?
+        _(
+          "Install boot code into a logical partition with /boot " \
+            "(<a href=\"disable_boot_boot\">do not install</a>)"
+        )
+      else
+        _(
+          "Do not install boot code into a logical partition with /boot " \
+            "(<a href=\"enable_boot_boot\">install</a>)"
+        )
+      end
+    end
+
+    def extended_partition_line
+      if stage1.extended_boot_partition?
+        _(
+          "Install boot code into a extended partition with /boot " \
+            "(<a href=\"disable_boot_extended\">do not install</a>)"
+        )
+      else
+        _(
+          "Do not install boot code into a extended partition with /boot " \
+            "(<a href=\"enable_boot_extended\">install</a>)"
+        )
+      end
+    end
+
     # FATE#303643 Enable one-click changes in bootloader proposal
     #
     #
@@ -241,7 +275,14 @@
       # do not allow to switch on boot from partition that do not support it
       if stage1.can_use_boot?
         line << "<li>"
-        line << partition_line
+        if stage1.logical_boot?
+          line << extended_partition_line
+          line << "</li>"
+          line << "<li>"
+          line << logical_partition_line
+        else
+          line << partition_line
+        end
         line << "</li>"
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2_widgets.rb 
new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2_widgets.rb
--- old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2_widgets.rb     
2020-10-22 16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2_widgets.rb     
2020-11-12 16:17:55.000000000 +0100
@@ -843,6 +843,12 @@
 
     def init
       Yast::UI.ChangeWidget(Id(:boot), :Value, stage1.boot_partition?) if 
locations.include?(:boot)
+      if locations.include?(:logical)
+        Yast::UI.ChangeWidget(Id(:logical), :Value, stage1.boot_partition?)
+      end
+      if locations.include?(:extended)
+        Yast::UI.ChangeWidget(Id(:extended), :Value, 
stage1.extended_boot_partition?)
+      end
       Yast::UI.ChangeWidget(Id(:mbr), :Value, stage1.mbr?) if 
locations.include?(:mbr)
 
       init_custom_devices(stage1.custom_devices)
@@ -854,8 +860,10 @@
         next unless Yast::UI.QueryWidget(Id(id), :Value)
 
         case id
-        when :boot
+        when :boot, :logical
           stage1.boot_partition_names.each { |d| stage1.add_udev_device(d) }
+        when :extended
+          stage1.extended_boot_partitions_names.each { |d| 
stage1.add_udev_device(d) }
         when :mbr
           stage1.boot_disk_names.each { |d| stage1.add_udev_device(d) }
         end
@@ -903,6 +911,12 @@
     def location_checkboxes
       checkboxes = []
       checkboxes << checkbox(:boot, _("Boo&t from Partition")) if 
locations.include?(:boot)
+      if locations.include?(:logical)
+        checkboxes << checkbox(:logical, _("Boo&t from Logical Partition"))
+      end
+      if locations.include?(:extended)
+        checkboxes << checkbox(:extended, _("Boot from &Extended Partition"))
+      end
       checkboxes << checkbox(:mbr, _("Boot from &Master Boot Record")) if 
locations.include?(:mbr)
 
       checkboxes.concat(custom_partition_content)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2base.rb 
new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-4.3.13/src/lib/bootloader/grub2base.rb 2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/lib/bootloader/grub2base.rb 2020-11-12 
16:17:55.000000000 +0100
@@ -374,7 +374,7 @@
       swap_parts = Yast::BootStorage.available_swap_partitions
       largest_swap_part = (swap_parts.max_by { |_part, size| size } || 
[""]).first
 
-      resume = Yast::BootArch.ResumeAvailable ? largest_swap_part : ""
+      resume = Yast::Kernel.propose_hibernation? ? largest_swap_part : ""
       # try to use label or udev id for device name... FATE #302219
       resume = UdevMapping.to_mountby_device(resume) if resume != "" && 
!resume.nil?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.3.13/src/lib/bootloader/proposal_client.rb 
new/yast2-bootloader-4.3.15/src/lib/bootloader/proposal_client.rb
--- old/yast2-bootloader-4.3.13/src/lib/bootloader/proposal_client.rb   
2020-10-22 16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/lib/bootloader/proposal_client.rb   
2020-11-12 16:17:55.000000000 +0100
@@ -75,6 +75,8 @@
       "disable_boot_mbr",
       "enable_boot_boot",
       "disable_boot_boot",
+      "enable_boot_extended",
+      "disable_boot_extended",
       "enable_secure_boot",
       "disable_secure_boot",
       "enable_trusted_boot",
@@ -341,15 +343,20 @@
       nil
     end
 
+    CLICK_MAPPING = {
+      "boot_mbr"      => :boot_disk_names,
+      "boot_boot"     => :boot_partition_names,
+      "boot_extended" => :extended_boot_partitions_names
+    }.freeze
     def single_click_action(option, value)
       bootloader = ::Bootloader::BootloaderFactory.current
 
       log.info "single_click_action: option #{option}, value #{value.inspect}"
 
       case option
-      when "boot_mbr", "boot_boot"
+      when "boot_mbr", "boot_boot", "boot_extended"
         stage1 = bootloader.stage1
-        devices = (option == "boot_mbr") ? stage1.boot_disk_names : 
stage1.boot_partition_names
+        devices = stage1.public_send(CLICK_MAPPING[option])
         log.info "single_click_action: devices #{devices}"
         devices.each do |device|
           value ? stage1.add_udev_device(device) : stage1.remove_device(device)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/src/lib/bootloader/stage1.rb 
new/yast2-bootloader-4.3.15/src/lib/bootloader/stage1.rb
--- old/yast2-bootloader-4.3.13/src/lib/bootloader/stage1.rb    2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/lib/bootloader/stage1.rb    2020-11-12 
16:17:55.000000000 +0100
@@ -65,8 +65,13 @@
       case Yast::Arch.architecture
       when "i386", "x86_64"
         res = [:mbr]
-        res << :boot if can_use_boot?
-        res
+        return res unless can_use_boot?
+
+        if logical_boot?
+          res << :logical << :extended
+        else
+          res << :boot
+        end
       else
         log.info "no available non-custom location for arch 
#{Yast::Arch.architecture}"
 
@@ -116,8 +121,31 @@
       include_real_devs?(boot_disk_names)
     end
 
+    def logical_boot?
+      detect_devices
+
+      @boot_objects.any? { |p| p.is?(:partition) && p.type.is?(:logical) }
+    end
+
+    def extended_boot_partitions_names
+      @boot_objects.map do |device|
+        dev = if device.is?(:partition) && device.type.is?(:logical)
+          Yast::BootStorage.extended_for_logical(device)
+        else
+          device
+        end
+        dev.name
+      end
+    end
+
+    def extended_boot_partition?
+      return false if boot_partition_names == extended_boot_partitions_names
+
+      include_real_devs?(extended_boot_partitions_names)
+    end
+
     def custom_devices
-      known_devices = boot_disk_names + boot_partition_names
+      known_devices = boot_disk_names + boot_partition_names + 
extended_boot_partitions_names
       log.info "known devices #{known_devices.inspect}"
 
       devices.reject do |dev|
@@ -212,11 +240,11 @@
       # check if cache is valid
       return if @cache_revision == 
Y2Storage::StorageManager.instance.staging_revision
 
-      devices = Yast::BootStorage.boot_partitions
-      @boot_devices = devices.map(&:name)
+      @boot_objects = Yast::BootStorage.boot_partitions
+      @boot_devices = @boot_objects.map(&:name)
 
-      devices = Yast::BootStorage.boot_disks
-      @mbr_devices = devices.map(&:name)
+      @mbr_objects = Yast::BootStorage.boot_disks
+      @mbr_devices = @mbr_objects.map(&:name)
 
       @cache_revision = Y2Storage::StorageManager.instance.staging_revision
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/src/modules/BootArch.rb 
new/yast2-bootloader-4.3.15/src/modules/BootArch.rb
--- old/yast2-bootloader-4.3.13/src/modules/BootArch.rb 2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/modules/BootArch.rb 2020-11-12 
16:17:55.000000000 +0100
@@ -83,13 +83,6 @@
       end
     end
 
-    # Is Suspend to Disk available?
-    # @return true if STD is available
-    def ResumeAvailable
-      # Do not support s390. (JIRA#SLE-6926)
-      Arch.i386 || Arch.x86_64
-    end
-
     def propose_cpu_mitigations
       linuxrc_value = Yast::Linuxrc.value_for("mitigations")
       log.info "linuxrc mitigations #{linuxrc_value.inspect}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/src/modules/BootStorage.rb 
new/yast2-bootloader-4.3.15/src/modules/BootStorage.rb
--- old/yast2-bootloader-4.3.13/src/modules/BootStorage.rb      2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/src/modules/BootStorage.rb      2020-11-12 
16:17:55.000000000 +0100
@@ -176,8 +176,6 @@
         end
       end
 
-      # now replace all logical partitions for extended
-      partitions.map! { |p| extended_for_logical(p) }
       partitions.uniq!
 
       log.info "stage1 partitions for #{device.inspect} are 
#{partitions.inspect}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/test/boot_arch_test.rb 
new/yast2-bootloader-4.3.15/test/boot_arch_test.rb
--- old/yast2-bootloader-4.3.13/test/boot_arch_test.rb  2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/test/boot_arch_test.rb  2020-11-12 
16:17:55.000000000 +0100
@@ -18,32 +18,6 @@
     allow(Yast::Arch).to receive(:architecture).and_return(arch)
   end
 
-  describe ".ResumeAvailable" do
-    it "returns true if it is on x86_64 architecture" do
-      stub_arch("x86_64")
-
-      expect(subject.ResumeAvailable).to eq true
-    end
-
-    it "returns true if it is on i386 architecture" do
-      stub_arch("i386")
-
-      expect(subject.ResumeAvailable).to eq true
-    end
-
-    it "returns false if it is on s390 architecture" do
-      stub_arch("s390_64")
-      # see Jira#SLE-6926
-      expect(subject.ResumeAvailable).to eq false
-    end
-
-    it "it returns false otherwise" do
-      stub_arch("ppc64")
-
-      expect(subject.ResumeAvailable).to eq false
-    end
-  end
-
   describe ".DefaultKernelParams" do
     context "on x86_64 or i386" do
       before do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.3.13/test/grub2base_test.rb 
new/yast2-bootloader-4.3.15/test/grub2base_test.rb
--- old/yast2-bootloader-4.3.13/test/grub2base_test.rb  2020-10-22 
16:49:25.000000000 +0200
+++ new/yast2-bootloader-4.3.15/test/grub2base_test.rb  2020-11-12 
16:17:55.000000000 +0100
@@ -8,6 +8,7 @@
   before do
     allow(Yast::ProductFeatures).to receive(:GetStringFeature)
       .and_return("")
+    allow(Yast::Kernel).to receive(:propose_hibernation?).and_return(true)
   end
 
   describe "#read" do
@@ -325,18 +326,6 @@
 
           expect(subject.grub_default.kernel_params.serialize).to 
include("product_aurora=shot")
         end
-
-        it "adds no swap partition as resume device" do
-          allow(Yast::BootStorage).to receive(:available_swap_partitions)
-            .and_return(
-              "/dev/dasda2" => 512,
-              "/dev/dasdb2" => 1024
-            )
-
-          subject.propose
-          # see Jira#SLE-6926
-          expect(subject.grub_default.kernel_params.serialize).to_not 
include("resume")
-        end
       end
 
       context "on other architectures" do
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to