[yast-commit] [ci_new_pac] JFYI yast2-bootloader -> sle12
Script 'mail_helper' called by bg Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: bg. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-bootloader -> sle12 ## BNC# 893449 : "SLED12 RC2 cannot boot into system after installation is complete when set / and /home be lvm" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-bootloader/yast2-bootloader.changes 2014-08-15 16:13:26.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-bootloader/yast2-bootloader.changes 2014-08-26 14:34:41.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Aug 26 11:37:17 UTC 2014 - jreidinger@suse.com + +- fix partition activation on LVM (bnc#893449) +- fix activation device when md raid devices do not have + recognizable bios id +- 3.1.90 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-bootloader - yast2-kdump - yast2-product-creator - yast2-reipl - yast2-schema - yast2-vm ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-bootloader (Old) and /mounts/work_src_done/SLE12/yast2-bootloader (BS:build ID:43139 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-bootloader", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-bootloader-3.1.89.tar.bz2 New: ---- yast2-bootloader-3.1.90.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.WPP5FS/_old 2014-08-26 15:42:50.000000000 +0200 +++ /var/tmp/diff_new_pack.WPP5FS/_new 2014-08-26 15:42:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.89 +Version: 3.1.90 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-bootloader-3.1.89.tar.bz2 -> yast2-bootloader-3.1.90.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.89/package/yast2-bootloader.changes new/yast2-bootloader-3.1.90/package/yast2-bootloader.changes --- old/yast2-bootloader-3.1.89/package/yast2-bootloader.changes 2014-08-15 14:24:52.000000000 +0200 +++ new/yast2-bootloader-3.1.90/package/yast2-bootloader.changes 2014-08-26 14:30:12.000000000 +0200 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Aug 26 11:37:17 UTC 2014 - jreidinger@suse.com + +- fix partition activation on LVM (bnc#893449) +- fix activation device when md raid devices do not have + recognizable bios id +- 3.1.90 + +------------------------------------------------------------------- Fri Aug 15 12:27:58 CEST 2014 - snwint@suse.de - remove nonsense check (bnc #768538) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.89/package/yast2-bootloader.spec new/yast2-bootloader-3.1.90/package/yast2-bootloader.spec --- old/yast2-bootloader-3.1.89/package/yast2-bootloader.spec 2014-08-15 14:24:52.000000000 +0200 +++ new/yast2-bootloader-3.1.90/package/yast2-bootloader.spec 2014-08-26 14:30:12.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.89 +Version: 3.1.90 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.89/src/include/bootloader/grub2/misc.rb new/yast2-bootloader-3.1.90/src/include/bootloader/grub2/misc.rb --- old/yast2-bootloader-3.1.89/src/include/bootloader/grub2/misc.rb 2014-08-15 14:24:52.000000000 +0200 +++ new/yast2-bootloader-3.1.90/src/include/bootloader/grub2/misc.rb 2014-08-26 14:30:12.000000000 +0200 @@ -90,7 +90,9 @@ # value, and code on the caller side that evaluates this. if Builtins.substring(loader_device, 0, 7) == "/dev/md" md = BootCommon.Md2Partitions(loader_device) - min = 256 # max. is 255; 256 means "no bios_id found" + # max. is 255; 256 means "no bios_id found", so to have at least one + # underlaying device use higher + min = 257 device = "" Builtins.foreach(md) do |d, id| if Ops.less_than(id, min) @@ -105,21 +107,24 @@ end end + tm = Storage.GetTargetMap + partitions = Ops.get_list(tm, [mbr_dev, "partitions"], []) + partitions.select! { |p| p["used_fs"] != :swap } # (bnc # 337742) - Unable to boot the openSUSE (32 and 64 bits) after installation - # if loader_device is disk device activate BootStorage::BootPartitionDevice + # if loader_device is disk Choose any partition which is not swap to + # satisfy such bios (bnc#893449) if num == 0 - Builtins.y2milestone("loader_device is disk device") - p_dev = Storage.GetDiskPartition(BootStorage.BootPartitionDevice) - num = BootCommon.myToInteger(Ops.get(p_dev, "nr")) - # handle situation when we have md raid and boot from md0 and sda and md0 is boot device (bnc#882592) - # This also prevents mess when we can potentially have mix of different number and device - return {} if p_dev["disk"] != mbr_dev + # strange, no partitions on our mbr device, we probably won't boot + if partitions.empty? + Builtins.y2warning("no non-swap partitions for mbr device #{mbr_dev}") + return {} + end + num = partitions.first["nr"] + Builtins.y2milestone("loader_device is disk device, so use its #{num} partition") end if Ops.greater_than(num, 4) Builtins.y2milestone("Bootloader partition type can be logical") - tm = Storage.GetTargetMap - partitions = Ops.get_list(tm, [mbr_dev, "partitions"], []) Builtins.foreach(partitions) do |p| if Ops.get(p, "type") == :extended num = Ops.get_integer(p, "nr", num) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.89/test/partitions_to_activate_test.rb new/yast2-bootloader-3.1.90/test/partitions_to_activate_test.rb --- old/yast2-bootloader-3.1.89/test/partitions_to_activate_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-3.1.90/test/partitions_to_activate_test.rb 2014-08-26 14:30:13.000000000 +0200 @@ -0,0 +1,76 @@ +require_relative "test_helper" + +Yast.import "BootGRUB2" + +# it should be probably part of BootStorage module, but we are too late in +# release phase, so place it here and adapt when location of this method changed +describe Yast::BootloaderGrub2MiscInclude do + before do + # simple mock getting disks from partition as it need initialized libstorage + allow(Yast::Storage).to receive(:GetDiskPartition) do |partition| + if partition == "/dev/system/root" + disk = "/dev/system" + number = "system" + else + number = partition[/(\d+)$/,1] + disk = number ? partition[0..-(number.size+1)] : partition + end + { "disk" => disk, "nr" => number } + end + allow(Yast::Storage).to receive(:GetDeviceName) do |disk, partition| + disk+partition.to_s + end + end + + + def target_map_stub(name) + path = File.join(File.dirname(__FILE__), "data", name) + tm = eval(File.read(path)) + allow(Yast::Storage).to receive(:GetTargetMap).and_return(tm) + end + + describe "#grub_getPartitionToActivate" do + it "returns map with device, its disk and partition number" do + target_map_stub("storage_mdraid.rb") + result = Yast::BootGRUB2.grub_getPartitionToActivate("/dev/vda1") + expected_result = { + "mbr" => "/dev/vda", + "num" => 1, + "dev" => "/dev/vda1" + } + expect(result).to eq expected_result + end + + it "returns underlaying devices for md raid" do + target_map_stub("storage_mdraid.rb") + result = Yast::BootGRUB2.grub_getPartitionToActivate("/dev/md1") + expected_result = { + "mbr" => "/dev/vda", + "num" => 1, + "dev" => "/dev/vda1" + } + expect(result).to eq expected_result + + end + + it "choose any partition on disk if disk is passed" do + target_map_stub("storage_lvm.rb") + result = Yast::BootGRUB2.grub_getPartitionToActivate("/dev/vda") + expected_result = { + "mbr" => "/dev/vda", + "num" => 3, + "dev" => "/dev/vda3" + } + expect(result).to eq expected_result + end + + it "return empty map if device do not exists" do + target_map_stub("storage_lvm.rb") + result = Yast::BootGRUB2.grub_getPartitionToActivate("/dev/nonexist") + expected_result = {} + expect(result).to eq expected_result + end + + # TODO prepare test for extended partition, need target map containing it + end +end continue with "q"... Checked in at Tue Aug 26 15:43:20 CEST 2014 by bg Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
bg