Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2015-10-20 16:22:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-09-19 06:54:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2015-10-20 16:22:10.000000000 +0200 @@ -1,0 +2,41 @@ +Fri Oct 16 14:27:17 CEST 2015 - sch...@suse.de + +- Set StorageDevices flag disks_valid to true while cloning system + in AutoYaST. (bnc#950105) +- 3.1.157 + +------------------------------------------------------------------- +Thu Oct 1 12:21:31 UTC 2015 - jreidin...@suse.com + +- Fix proposing stage1 location in autoyast (bnc#948258) +- 3.1.156 + +------------------------------------------------------------------- +Tue Sep 29 10:28:42 UTC 2015 - jreidin...@suse.com + +- fix device map handling if there's no 'hd0' entry in it + (bsc#947730) by snwint +- 3.1.155 + +------------------------------------------------------------------- +Mon Sep 28 15:41:45 CEST 2015 - sch...@suse.de + +- Including a needed file. This is an additional fix for + bnc#930341. +- 3.1.154 + +------------------------------------------------------------------- +Fri Sep 25 15:22:17 UTC 2015 - jreidin...@suse.com + +- fix booting on ppc with /boot on software raid (bnc#940542) +- 3.1.153 + +------------------------------------------------------------------- +Thu Sep 24 08:53:00 UTC 2015 - jreidin...@suse.com + +- fix one click proposal change to behave reasonable +- add warnings for missing generic_mbr or activate when really + missing (bnc#930341) +- 3.1.152 + +------------------------------------------------------------------- Old: ---- yast2-bootloader-3.1.151.tar.bz2 New: ---- yast2-bootloader-3.1.157.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.LYRTHa/_old 2015-10-20 16:22:11.000000000 +0200 +++ /var/tmp/diff_new_pack.LYRTHa/_new 2015-10-20 16:22:11.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.151 +Version: 3.1.157 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-bootloader-3.1.151.tar.bz2 -> yast2-bootloader-3.1.157.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/package/yast2-bootloader.changes new/yast2-bootloader-3.1.157/package/yast2-bootloader.changes --- old/yast2-bootloader-3.1.151/package/yast2-bootloader.changes 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/package/yast2-bootloader.changes 2015-10-16 15:32:16.000000000 +0200 @@ -1,4 +1,45 @@ ------------------------------------------------------------------- +Fri Oct 16 14:27:17 CEST 2015 - sch...@suse.de + +- Set StorageDevices flag disks_valid to true while cloning system + in AutoYaST. (bnc#950105) +- 3.1.157 + +------------------------------------------------------------------- +Thu Oct 1 12:21:31 UTC 2015 - jreidin...@suse.com + +- Fix proposing stage1 location in autoyast (bnc#948258) +- 3.1.156 + +------------------------------------------------------------------- +Tue Sep 29 10:28:42 UTC 2015 - jreidin...@suse.com + +- fix device map handling if there's no 'hd0' entry in it + (bsc#947730) by snwint +- 3.1.155 + +------------------------------------------------------------------- +Mon Sep 28 15:41:45 CEST 2015 - sch...@suse.de + +- Including a needed file. This is an additional fix for + bnc#930341. +- 3.1.154 + +------------------------------------------------------------------- +Fri Sep 25 15:22:17 UTC 2015 - jreidin...@suse.com + +- fix booting on ppc with /boot on software raid (bnc#940542) +- 3.1.153 + +------------------------------------------------------------------- +Thu Sep 24 08:53:00 UTC 2015 - jreidin...@suse.com + +- fix one click proposal change to behave reasonable +- add warnings for missing generic_mbr or activate when really + missing (bnc#930341) +- 3.1.152 + +------------------------------------------------------------------- Wed Sep 16 08:12:28 UTC 2015 - jreidin...@suse.com - support custom names for raids (bnc#944041) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/package/yast2-bootloader.spec new/yast2-bootloader-3.1.157/package/yast2-bootloader.spec --- old/yast2-bootloader-3.1.151/package/yast2-bootloader.spec 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/package/yast2-bootloader.spec 2015-10-16 15:32:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.151 +Version: 3.1.157 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/include/bootloader/grub2/misc.rb new/yast2-bootloader-3.1.157/src/include/bootloader/grub2/misc.rb --- old/yast2-bootloader-3.1.151/src/include/bootloader/grub2/misc.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/include/bootloader/grub2/misc.rb 2015-10-16 15:32:16.000000000 +0200 @@ -88,9 +88,16 @@ # globals["activate"] and globals["generic_mbr"] flags if needed # all these settings are stored in internal variables def grub_DetectDisks - need_location_reconfigure = BootStorage.detect_disks + location_reconfigure = BootStorage.detect_disks - grub_ConfigureLocation if need_location_reconfigure + return if location_reconfigure == :ok + # if already proposed, then empty location is intention of user + if location_reconfigure == :empty && BootCommon.was_proposed + # in auto install we do not allow empty boot locations + return unless Mode.auto + end + + grub_ConfigureLocation end # Propose the boot loader location for grub diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/include/bootloader/routines/lilolike.rb new/yast2-bootloader-3.1.157/src/include/bootloader/routines/lilolike.rb --- old/yast2-bootloader-3.1.151/src/include/bootloader/routines/lilolike.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/include/bootloader/routines/lilolike.rb 2015-10-16 15:32:16.000000000 +0200 @@ -77,8 +77,16 @@ # selected_location and set the activate flag if needed # all these settings are stored in internal variables def DetectDisks - need_location_reconfigure = BootStorage.detect_disks - ConfigureLocation() if need_location_reconfigure + location_reconfigure = BootStorage.detect_disks + + return if location_reconfigure == :ok + # if already proposed, then empty location is intention of user + if location_reconfigure == :empty && BootCommon.was_proposed + # unless autoinstall where we do not allow empty boot devices (bnc#948258) + return unless Mode.auto + end + + ConfigureLocation() end # Update global options of bootloader diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/lib/bootloader/device_map.rb new/yast2-bootloader-3.1.157/src/lib/bootloader/device_map.rb --- old/yast2-bootloader-3.1.151/src/lib/bootloader/device_map.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/lib/bootloader/device_map.rb 2015-10-16 15:32:17.000000000 +0200 @@ -205,12 +205,14 @@ if device_mapping[priority_device] old_first_device = device_mapping.key("hd0") old_device_id = device_mapping[priority_device] - device_mapping[old_first_device] = old_device_id + device_mapping[old_first_device] = old_device_id if old_first_device device_mapping[priority_device] = "hd0" else log.warn("Unknown priority device '#{priority_device}'. Skipping") end + log.info "Device mapping after re-ordering: #{device_mapping}" + device_mapping end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/lib/bootloader/mbr_update.rb new/yast2-bootloader-3.1.157/src/lib/bootloader/mbr_update.rb --- old/yast2-bootloader-3.1.151/src/lib/bootloader/mbr_update.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/lib/bootloader/mbr_update.rb 2015-10-16 15:32:17.000000000 +0200 @@ -152,13 +152,17 @@ end def boot_devices - if !@boot_devices - @boot_devices = bootloader_devices.dup + return @boot_devices if @boot_devices - boot_device = Yast::BootCommon.getBootPartition - # bnc#494630 - add also boot partitions from soft-raids - @boot_devices << boot_device if boot_device.start_with?("/dev/md") - end + @boot_devices = bootloader_devices.dup + + # ppc do not use boot partition and have to activate prep partition that + # cannot be on raid (bnc#940542) + return @boot_devices if Yast::Arch.ppc64 + + # bnc#494630 - add also boot partitions from soft-raids + boot_device = Yast::BootCommon.getBootPartition + @boot_devices << boot_device if boot_device.start_with?("/dev/md") @boot_devices end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/modules/BootStorage.rb new/yast2-bootloader-3.1.157/src/modules/BootStorage.rb --- old/yast2-bootloader-3.1.151/src/modules/BootStorage.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/modules/BootStorage.rb 2015-10-16 15:32:17.000000000 +0200 @@ -413,11 +413,12 @@ end # Sets properly boot, root and mbr disk. - # @return true if proposal need to be reconfigured + # @return :empty if bl devices are empty, :invalid if storage changed and + # :ok if everything is fine def detect_disks # The AutoYaST config mode does access to the system. # bnc#942360 - return if Mode.config + return :ok if Mode.config mp = Storage.GetMountPoints @@ -450,12 +451,14 @@ # bootloader location. bldevs = BootCommon.GetBootloaderDevices - return true if bldevs.empty? + return :empty if bldevs.empty? all_boot_partitions = possible_locations_for_stage1 - bldevs.any? do |dev| + invalid = bldevs.any? do |dev| !all_boot_partitions.include?(dev) end + + invalid ? :invalid : :ok end def prep_partitions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/modules/BootSupportCheck.rb new/yast2-bootloader-3.1.157/src/modules/BootSupportCheck.rb --- old/yast2-bootloader-3.1.151/src/modules/BootSupportCheck.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/modules/BootSupportCheck.rb 2015-10-16 15:32:17.000000000 +0200 @@ -222,11 +222,7 @@ def efi? cmd = "modprobe efivars 2>/dev/null" SCR.Execute(path(".target.bash_output"), cmd) - if FileUtils.Exists("/sys/firmware/efi/systab") - return true - else - return false - end + FileUtils.Exists("/sys/firmware/efi/systab") end def check_zipl_part @@ -245,6 +241,21 @@ end end + def check_activate_partition + # activate set or there is already activate flag + return true if BootCommon.globals["activate"] == "true" || Yast::Storage.GetBootPartition(Yast::BootCommon.mbrDisk) + + AddNewProblem(_("Activate flag is not set by installer. If it is not set at all, some BIOSes could refuse to boot.")) + false + end + + def check_mbr + return true if BootCommon.globals["generic_mbr"] == "true" || BootCommon.globals["boot_mbr"] == "true" + + AddNewProblem(_("The installer will not modify the MBR of the disk. Unless it already contains boot code, the BIOS won't be able to boot disk.")) + false + end + # GRUB-related check def GRUB ret = GptPartitionTable() @@ -254,12 +265,14 @@ # GRUB2-related check def GRUB2 - ret = GRUB() + ret = [GRUB()] # ensure that s390 have ext* partition for booting (bnc#873951) - ret &&= check_zipl_part if Arch.s390 - ret &&= check_gpt_reserved_partition if Arch.x86_64 + ret << check_zipl_part if Arch.s390 + ret << check_gpt_reserved_partition if Arch.x86_64 + ret << check_activate_partition if Arch.x86_64 || Arch.ppc64 + ret << check_mbr if Arch.x86_64 - ret + ret.all? end # GRUB2EFI-related check diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/src/modules/Bootloader.rb new/yast2-bootloader-3.1.157/src/modules/Bootloader.rb --- old/yast2-bootloader-3.1.151/src/modules/Bootloader.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/src/modules/Bootloader.rb 2015-10-16 15:32:17.000000000 +0200 @@ -39,6 +39,7 @@ Yast.import "Progress" Yast.import "Stage" Yast.import "Storage" + Yast.import "StorageDevices" Yast.import "Directory" # fate 303395 @@ -175,11 +176,15 @@ getLoaderType - # While calling AutoYaST clone_system libStorage - # has to be set to "normal" mode in order to read - # mountpoints correctly + # 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 - Mode.SetMode("normal") if Mode.config + if Mode.config + Mode.SetMode("normal") + StorageDevices.InitDone # Set StorageDevices flag disks_valid to true + end BootCommon.DetectDisks Mode.SetMode(old_mode) if old_mode == "autoinst_config" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/test/boot_storage_test.rb new/yast2-bootloader-3.1.157/test/boot_storage_test.rb --- old/yast2-bootloader-3.1.151/test/boot_storage_test.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/test/boot_storage_test.rb 2015-10-16 15:32:17.000000000 +0200 @@ -179,24 +179,24 @@ expect(Yast::BootCommon.mbrDisk).to eq "/dev/vda" end - it "returns true if bootloader devices is not yet set" do + it "returns :empty if bootloader devices is not yet set" do allow(Yast::BootCommon).to receive(:GetBootloaderDevices).and_return([]) - expect(subject.detect_disks).to eq true + expect(subject.detect_disks).to eq :empty end - it "returns true if any bootloader device is no longer available" do + it "returns :invalid if any bootloader device is no longer available" do allow(Yast::BootCommon).to receive(:GetBootloaderDevices).and_return(["/dev/not_available"]) allow(Yast::Storage).to receive(:GetDefaultMountBy).and_return(:uuid) - expect(subject.detect_disks).to eq true + expect(subject.detect_disks).to eq :invalid end - it "returns false if all bootloader devices are available" do + it "returns :ok if all bootloader devices are available" do allow(Yast::BootCommon).to receive(:GetBootloaderDevices).and_return(["/dev/vda"]) allow(Yast::Storage).to receive(:GetDefaultMountBy).and_return(:uuid) - expect(subject.detect_disks).to eq false + expect(subject.detect_disks).to eq :ok end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.151/test/bootloader_proposal_client_test.rb new/yast2-bootloader-3.1.157/test/bootloader_proposal_client_test.rb --- old/yast2-bootloader-3.1.151/test/bootloader_proposal_client_test.rb 2015-09-16 13:02:09.000000000 +0200 +++ new/yast2-bootloader-3.1.157/test/bootloader_proposal_client_test.rb 2015-10-16 15:32:17.000000000 +0200 @@ -136,7 +136,7 @@ it "call bootloader propose in common installation" do Yast.import "Mode" - expect(Yast::Mode).to receive(:update).and_return(false) + allow(Yast::Mode).to receive(:update).and_return(false) expect(Yast::Bootloader).to receive(:Propose) subject.make_proposal({}) @@ -144,7 +144,7 @@ it "reproprose from scrach during update if old bootloader is not grub2" do Yast.import "Mode" - expect(Yast::Mode).to receive(:update).and_return(true) + allow(Yast::Mode).to receive(:update).and_return(true) expect(subject).to receive("old_bootloader").and_return("grub").twice @@ -159,7 +159,7 @@ it "do not propose during update if if old bootloader is none" do Yast.import "Mode" - expect(Yast::Mode).to receive(:update).and_return(true) + allow(Yast::Mode).to receive(:update).and_return(true) expect(subject).to receive("old_bootloader").and_return("none").twice @@ -168,7 +168,7 @@ it "just read old configuration update if old bootloader is grub2" do Yast.import "Mode" - expect(Yast::Mode).to receive(:update).and_return(true) + allow(Yast::Mode).to receive(:update).and_return(true) expect(subject).to receive("old_bootloader").and_return("grub2")