Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2014-04-05 14:43:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2014-03-26 09:57:17.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2014-04-05 14:43:16.000000000 +0200 @@ -1,0 +2,61 @@ +Fri Apr 4 13:05:55 CEST 2014 - snwint@suse.de + +- install mokutil along with shim (bnc #808852) +- fix regular expessions (ported from bnc #743805) +- 3.1.18 + +------------------------------------------------------------------- +Wed Apr 2 11:26:23 UTC 2014 - jreidinger@suse.com + +- fix crash on s390 (bnc#871597) +- 3.1.17 + +------------------------------------------------------------------- +Wed Apr 2 06:57:01 UTC 2014 - jreidinger@suse.com + +- fix autoyast location proposal (bnc#869083) +- 3.1.16 + +------------------------------------------------------------------- +Wed Apr 2 08:36:41 CEST 2014 - snwint@suse.de + +- don't question device mapping passed to us explicitly by autoyast + (bnc #717978, bnc #870494) + +------------------------------------------------------------------- +Fri Mar 28 10:17:07 UTC 2014 - jreidinger@suse.com + +- improve support grub2 on non-pc architectures + (bnc#866912,bnc#868909) +- 3.1.15 + +------------------------------------------------------------------- +Fri Mar 28 04:03:54 UTC 2014 - mchang@suse.com + +- fix wrong console regexp match (bnc#870514) +- 3.1.14 + +------------------------------------------------------------------- +Fri Mar 21 10:10:45 CET 2014 - snwint@suse.de + +- fix minor typo (bnc #869324) + +------------------------------------------------------------------- +Wed Mar 12 09:15:33 UTC 2014 - mchang@suse.com + +- fix grub2-*-efi package not installed (bnc#867380) +- 3.1.13 + +------------------------------------------------------------------- +Mon Mar 10 12:07:17 UTC 2014 - jreidinger@suse.com + +- do not crash if there is no swap partition (bnc#867435) +- 3.1.12 + +------------------------------------------------------------------- +Mon Mar 10 08:30:40 UTC 2014 - mchang@suse.com + +- fix some serial console issues (bnc#862388) (bnc#866710) +- 3.1.11 + +------------------------------------------------------------------- Old: ---- yast2-bootloader-3.1.10.tar.bz2 New: ---- yast2-bootloader-3.1.18.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.OnIVTj/_old 2014-04-05 14:43:17.000000000 +0200 +++ /var/tmp/diff_new_pack.OnIVTj/_new 2014-04-05 14:43:17.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.10 +Version: 3.1.18 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-bootloader-3.1.10.tar.bz2 -> yast2-bootloader-3.1.18.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/.yardopts new/yast2-bootloader-3.1.18/.yardopts --- old/yast2-bootloader-3.1.10/.yardopts 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-3.1.18/.yardopts 2014-04-04 13:07:50.000000000 +0200 @@ -0,0 +1 @@ +--no-private --markup markdown --protected src/**/*.rb --readme README.md --output-dir ./doc/autodocs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/package/yast2-bootloader.changes new/yast2-bootloader-3.1.18/package/yast2-bootloader.changes --- old/yast2-bootloader-3.1.10/package/yast2-bootloader.changes 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/package/yast2-bootloader.changes 2014-04-04 13:07:50.000000000 +0200 @@ -1,4 +1,65 @@ ------------------------------------------------------------------- +Fri Apr 4 13:05:55 CEST 2014 - snwint@suse.de + +- install mokutil along with shim (bnc #808852) +- fix regular expessions (ported from bnc #743805) +- 3.1.18 + +------------------------------------------------------------------- +Wed Apr 2 11:26:23 UTC 2014 - jreidinger@suse.com + +- fix crash on s390 (bnc#871597) +- 3.1.17 + +------------------------------------------------------------------- +Wed Apr 2 06:57:01 UTC 2014 - jreidinger@suse.com + +- fix autoyast location proposal (bnc#869083) +- 3.1.16 + +------------------------------------------------------------------- +Wed Apr 2 08:36:41 CEST 2014 - snwint@suse.de + +- don't question device mapping passed to us explicitly by autoyast + (bnc #717978, bnc #870494) + +------------------------------------------------------------------- +Fri Mar 28 10:17:07 UTC 2014 - jreidinger@suse.com + +- improve support grub2 on non-pc architectures + (bnc#866912,bnc#868909) +- 3.1.15 + +------------------------------------------------------------------- +Fri Mar 28 04:03:54 UTC 2014 - mchang@suse.com + +- fix wrong console regexp match (bnc#870514) +- 3.1.14 + +------------------------------------------------------------------- +Fri Mar 21 10:10:45 CET 2014 - snwint@suse.de + +- fix minor typo (bnc #869324) + +------------------------------------------------------------------- +Wed Mar 12 09:15:33 UTC 2014 - mchang@suse.com + +- fix grub2-*-efi package not installed (bnc#867380) +- 3.1.13 + +------------------------------------------------------------------- +Mon Mar 10 12:07:17 UTC 2014 - jreidinger@suse.com + +- do not crash if there is no swap partition (bnc#867435) +- 3.1.12 + +------------------------------------------------------------------- +Mon Mar 10 08:30:40 UTC 2014 - mchang@suse.com + +- fix some serial console issues (bnc#862388) (bnc#866710) +- 3.1.11 + +------------------------------------------------------------------- Wed Mar 5 10:02:23 CET 2014 - snwint@suse.de - always allow grub2 (bnc #866863) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/package/yast2-bootloader.spec new/yast2-bootloader-3.1.18/package/yast2-bootloader.spec --- old/yast2-bootloader-3.1.10/package/yast2-bootloader.spec 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/package/yast2-bootloader.spec 2014-04-04 13:07:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.10 +Version: 3.1.18 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/include/bootloader/grub/options.rb new/yast2-bootloader-3.1.18/src/include/bootloader/grub/options.rb --- old/yast2-bootloader-3.1.10/src/include/bootloader/grub/options.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/include/bootloader/grub/options.rb 2014-04-04 13:07:50.000000000 +0200 @@ -733,6 +733,7 @@ def grubBootLoaderLocationWidget contents = VBox( + VSpacing(1), Frame( _("Boot Loader Location"), VBox( @@ -742,35 +743,22 @@ Left( CheckBox(Id("boot_mbr"), _("Boot from &Master Boot Record")) ), - Left(CheckBox(Id("boot_root"), _("Boot from &Root Partition"))), - Left(CheckBox(Id("boot_boot"), _("Boo&t from Boot Partition"))), - Left( - CheckBox( - Id("boot_extended"), - _("Boot from &Extended Partition") - ) - ), - Left( - CheckBox( - Id("boot_custom"), - Opt(:notify), - _("C&ustom Boot Partition") - ) - ), - Left( - ComboBox( - Id("boot_custom_list"), - Opt(:editable, :hstretch), - "", - [] - ) - ), - VStretch() + BootStorage.BootPartitionDevice == BootStorage.RootPartitionDevice ? + Left(CheckBox(Id("boot_root"), _("Boot from &Root Partition"))) : + Left(CheckBox(Id("boot_boot"), _("Boo&t from Boot Partition"))), + BootStorage.ExtendedPartitionDevice ? + Left( + CheckBox( + Id("boot_extended"), + _("Boot from &Extended Partition") + ) + ) : + Empty() ) ) ) ), - VStretch() + VSpacing(1) ) if !BootCommon.PartitionInstallable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/include/bootloader/grub2/dialogs.rb new/yast2-bootloader-3.1.18/src/include/bootloader/grub2/dialogs.rb --- old/yast2-bootloader-3.1.10/src/include/bootloader/grub2/dialogs.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/include/bootloader/grub2/dialogs.rb 2014-04-04 13:07:50.000000000 +0200 @@ -22,6 +22,7 @@ textdomain "bootloader" + Yast.import "Arch" Yast.import "Label" Yast.import "Wizard" Yast.import "CWM" @@ -41,14 +42,19 @@ def boot_code_tab lt = BootCommon.getLoaderType(false) + legacy_intel = (Arch.x86_64 || Arch.i386) && lt != "grub2-efi" + widget_names = ["distributor", "loader_type", "loader_location" ] + widget_names << "activate" << "generic_mbr" if legacy_intel + { "id" => "boot_code_tab", "header" => _("Boot Code Options"), # if name is not included, that it is not displayed - "widget_names" => lt == "grub2-efi" ? ["distributor"] : - ["distributor", "activate", "generic_mbr"], + "widget_names" => widget_names, "contents" => VBox( - VSpacing(1), + VSquash(HBox( + Top(VBox( VSpacing(1), "loader_type")), + Arch.s390 ? Empty() : "loader_location")), MarginBox(1, 0.5, "distributor"), MarginBox(1, 0.5, Left("activate")), MarginBox(1, 0.5, Left("generic_mbr")), @@ -58,10 +64,13 @@ end def kernel_tab + widgets = ["vgamode", "append", "append_failsafe", "console"] + widgets.delete("console") if Arch.s390 # there is no console on s390 (bnc#868909) + { "id" => "kernel_tab", "header" => _("Kernel Parameters"), - "widget_names" => ["vgamode", "append", "append_failsafe", "console"], + "widget_names" => widgets, "contents" => VBox( VSpacing(1), MarginBox(1, 0.5, "vgamode"), @@ -74,10 +83,13 @@ end def bootloader_tab + widgets = ["default", "timeout", "password", "os_prober", "hiddenmenu"] + widgets.delete("os_prober") if Arch.s390 # there is no os prober on s390(bnc#868909) + { "id" => "bootloader_tab", "header" => _("Bootloader Options"), - "widget_names" => ["default", "timeout", "password", "os_prober", "hiddenmenu"], + "widget_names" => widgets, "contents" => VBox( VSpacing(2), HBox( @@ -94,6 +106,12 @@ } end + def Grub2TabDescr + tabs = [ bootloader_tab, kernel_tab, boot_code_tab] + + Hash[tabs.map{|tab| [tab["id"], tab]}] + end + # Run dialog for loader installation details for Grub2 # @return [Symbol] for wizard sequencer def Grub2LoaderDetailsDialog @@ -148,6 +166,7 @@ def grub2SecureBootWidget contents = VBox( + VSpacing(1), Frame( _("Secure Boot"), VBox( @@ -157,12 +176,10 @@ Left( CheckBox(Id("secure_boot"), _("Enable &Secure Boot Support")) ), - VStretch() ) ) ) - ), - VStretch() + ) ) { @@ -206,11 +223,67 @@ ) end + def ppc_location_init(widget) + UI::ChangeWidget( + Id("boot_custom_list"), + :Value, + BootCommon.globals["boot_custom"] + ) + end + + def ppc_location_store(widget, value) + value = UI::QueryWidget( + Id("boot_custom_list"), + :Value, + ) + y2milestone("store boot custom #{value}") + + BootCommon.globals["boot_custom"] = value + end + + def grub_on_ppc_location + contents = VBox( + VSpacing(1), + ComboBox( + Id("boot_custom_list"), + # TRANSLATORS: place where boot code is installed + _("Boot &Loader Location"), + prep_partitions + ) + ) + + { + # need custom to not break ui as intel one is quite complex so some + # spacing is needed + "widget" => :custom, + "custom_widget" => contents, + "init" => fun_ref( + method(:ppc_location_init), + "void (string)" + ), + "store" => fun_ref( + method(:ppc_location_store), + "void (string, map)" + ), + # help text + "help" => _("Choose partition where is boot sequence installed.") + } + + end + # Get generic widgets # @return a map describing all generic widgets def grub2Widgets if @_grub2_widgets == nil - @_grub2_widgets = { "loader_location" => grubBootLoaderLocationWidget } + case Arch.architecture + when "i386", "x86_64" + @_grub2_widgets = { "loader_location" => grubBootLoaderLocationWidget } + when /ppc/ + @_grub2_widgets = { "loader_location" => grub_on_ppc_location } + else + raise "unsuppoted architecture #{Arch.architecture}" + end + @_grub2_widgets.merge! Grub2Options() end deep_copy(@_grub2_widgets) end @@ -219,6 +292,7 @@ if Arch.x86_64 if @_grub2_efi_widgets == nil @_grub2_efi_widgets = { "loader_location" => grub2SecureBootWidget } + @_grub2_efi_widgets.merge! Grub2Options() end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/include/bootloader/routines/autoinstall.rb new/yast2-bootloader-3.1.18/src/include/bootloader/routines/autoinstall.rb --- old/yast2-bootloader-3.1.10/src/include/bootloader/routines/autoinstall.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/include/bootloader/routines/autoinstall.rb 2014-04-04 13:07:50.000000000 +0200 @@ -293,6 +293,8 @@ { Ops.get(entry, "linux", "") => firmware } end Ops.set(exp, ["specific", "device_map"], device_map) + # accept everything + BootStorage.bois_id_missing = false end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/include/bootloader/routines/dialogs.rb new/yast2-bootloader-3.1.18/src/include/bootloader/routines/dialogs.rb --- old/yast2-bootloader-3.1.10/src/include/bootloader/routines/dialogs.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/include/bootloader/routines/dialogs.rb 2014-04-04 13:07:50.000000000 +0200 @@ -32,6 +32,7 @@ Yast.include include_target, "bootloader/routines/popups.rb" Yast.include include_target, "bootloader/routines/section_widgets.rb" Yast.include include_target, "bootloader/routines/global_widgets.rb" + Yast.include include_target, "bootloader/grub2/dialogs.rb" @return_tab = "sections" @@ -114,11 +115,13 @@ CWMTab.CreateWidget( { "tab_order" => lt == "grub2" || lt == "grub2-efi" ? - ["installation"] : + ["boot_code_tab", "kernel_tab", "bootloader_tab"] : ["sections", "installation"], - "tabs" => TabsDescr(), + "tabs" => lt == "grub2" || lt == "grub2-efi" ? + Grub2TabDescr() : + TabsDescr(), "widget_descr" => widget_descr, - "initial_tab" => lt == "grub2" || lt == "grub2-efi" ? "installation" : @return_tab + "initial_tab" => lt == "grub2" || lt == "grub2-efi" ? "boot_code_tab" : @return_tab } ) ) @@ -140,6 +143,7 @@ ) if ret != :back && ret != :abort && ret != :cancel @return_tab = CWMTab.LastTab + @return_tab = "installation" if @return_tab.include? "tab" #workaround different tab set for grub2 end ret end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/include/bootloader/routines/misc.rb new/yast2-bootloader-3.1.18/src/include/bootloader/routines/misc.rb --- old/yast2-bootloader-3.1.10/src/include/bootloader/routines/misc.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/include/bootloader/routines/misc.rb 2014-04-04 13:07:50.000000000 +0200 @@ -2036,6 +2036,46 @@ ret end + # This function gets bootloader's serial settings from append (bnc#862388) + def GetSerialFromAppend () + append = @globals["append"] || "" + type = Builtins.regexpsub(append, "^.*console=([[:alpha:]]+)[[:digit:]]*,*[[:digit:]]*[noe]*[[:digit:]]*.*[[:space:]]*.*$", "\\1") + args = Builtins.regexpsub(append, "^.*console=[[:alpha:]]+([[:digit:]]*,*[[:digit:]]*[noe]*[[:digit:]]*).*[[:space:]]*.*$", "\\1") + + Builtins.y2milestone("BuildSerialFromAppend: %1, %2", type, args) + return "" if type != "ttyS" || args.empty? + + unit = Builtins.regexpsub(args, "([[:digit:]]+),*[[:digit:]]*[noe]*[[:digit:]]*", "\\1") + return "" if unit == "" + + ret = "serial --unit=#{unit}" + + speed = Builtins.regexpsub(args, "[[:digit:]]+,*([[:digit:]]*)[noe]*[[:digit:]]*", "\\1") + speed = "9600" if speed.empty? + ret << " --speed=#{speed}" + + parity = Builtins.regexpsub(args, "[[:digit:]]+,*[[:digit:]]*([noe]*)[[:digit:]]*", "\\1") + case parity + when "n" + ret << " --parity=no" + when "o" + ret << " --parity=odd" + when "e" + ret << " --parity=even" + when "" + # no parity, do nothing + else + raise "unknown parity flag #{parity}" + end + + word = Builtins.regexpsub(args, "[[:digit:]]+,*[[:digit:]]*[noe]*([[:digit:]]*)", "\\1") + if !word.empty? + ret << " --word=#{word}" + end + + ret + end + # FATE #110038: Serial console # Add console arg for kernel if there is defined serial console # - add key console with value to section type image and xen @@ -2092,6 +2132,23 @@ # - add key console with value to section type image and xen def HandleConsole2 + + if @globals["terminal"] != "serial" + # if bootloader is not set to serial console, we should leave the + # kernel append as is to allow it's serial console be enabled + # for debugging output and so on (bnc#866710) + return + end + + if !@globals["serial"] || @globals["serial"].empty? + # http://www.gnu.org/software/grub/manual/grub.html#serial + # https://www.kernel.org/doc/Documentation/serial-console.txt + # default settings is the same, we should at least tell kernel the + # port (aka unit) to use and grub2 defaults to 0. + # speed is also required by builkConsoleValue + @globals["serial"] = "serial --unit=0 --speed=9600" + end + console_value = getConsoleValue if Ops.get(@globals, "append") != nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/lib/bootloader/grub2base.rb new/yast2-bootloader-3.1.18/src/lib/bootloader/grub2base.rb --- old/yast2-bootloader-3.1.10/src/lib/bootloader/grub2base.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/lib/bootloader/grub2base.rb 2014-04-04 13:07:50.000000000 +0200 @@ -9,6 +9,7 @@ textdomain "bootloader" + Yast.import "Arch" Yast.import "BootArch" Yast.import "BootCommon" Yast.import "BootStorage" @@ -42,8 +43,9 @@ "default" => "0", "vgamode" => "", "gfxmode" => "auto", - "terminal" => "gfxterm", - "os_prober" => "true" + "terminal" => Arch.s390 ? "console" : "gfxterm", + "os_prober" => Arch.s390 ? "false" : "true", + "activate" => Arch.ppc ? "true" : "false" } end @@ -101,7 +103,7 @@ BootCommon.globals.merge! StandardGlobals() swap_parts = BootCommon.getSwapPartitions - largest_swap_part = swap_parts.max_by{|part, size| size}.first || "" + largest_swap_part = (swap_parts.max_by{|part, size| size} || [""]).first resume = BootArch.ResumeAvailable ? largest_swap_part : "" # try to use label or udev id for device name... FATE #302219 @@ -114,6 +116,14 @@ BootCommon.globals["distributor"] = Product.name BootCommon.kernelCmdLine = Kernel.GetCmdLine + # Propose bootloader serial settings from kernel cmdline during install (bnc#862388) + serial = BootCommon.GetSerialFromAppend + + if !serial.empty? + BootCommon.globals["terminal"] = "serial" + BootCommon.globals["serial"] = serial + end + Builtins.y2milestone("Proposed globals: %1", BootCommon.globals) nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootCommon.rb new/yast2-bootloader-3.1.18/src/modules/BootCommon.rb --- old/yast2-bootloader-3.1.10/src/modules/BootCommon.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootCommon.rb 2014-04-04 13:07:50.000000000 +0200 @@ -1292,6 +1292,7 @@ publish :function => :getBootDisk, :type => "string ()" publish :function => :HandleConsole, :type => "void ()" publish :function => :HandleConsole2, :type => "void ()" + publish :function => :GetSerialFromAppend, :type => "void ()" publish :function => :UpdateProposalFromClient, :type => "boolean ()" publish :function => :DiskOrderSummary, :type => "string ()" publish :function => :DisksChanged, :type => "boolean ()" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootELILO.rb new/yast2-bootloader-3.1.18/src/modules/BootELILO.rb --- old/yast2-bootloader-3.1.10/src/modules/BootELILO.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootELILO.rb 2014-04-04 13:07:50.000000000 +0200 @@ -251,11 +251,11 @@ output = Ops.get_string(efi_status, "stdout", "") lines = Builtins.splitstring(output, "\n") output = Ops.get_string(lines, 0, "") - if Builtins.regexpmatch(output, "Boot.** (.*) HD") + if Builtins.regexpmatch(output, 'Boot.*\* (.*) HD') Ops.set( BootCommon.globals, "boot_efilabel", - Builtins.regexpsub(output, "Boot.** (.*) HD", "\\1") + Builtins.regexpsub(output, 'Boot.*\* (.*) HD', "\\1") ) efi_entry_found = true else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootGRUB.rb new/yast2-bootloader-3.1.18/src/modules/BootGRUB.rb --- old/yast2-bootloader-3.1.10/src/modules/BootGRUB.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootGRUB.rb 2014-04-04 13:07:50.000000000 +0200 @@ -692,7 +692,7 @@ ) else line << _( - "Do not install bootcode into \"/\" partition (install</a>" + "Do not install bootcode into \"/\" partition (install</a>)" ) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootGRUB2.rb new/yast2-bootloader-3.1.18/src/modules/BootGRUB2.rb --- old/yast2-bootloader-3.1.10/src/modules/BootGRUB2.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootGRUB2.rb 2014-04-04 13:07:50.000000000 +0200 @@ -22,10 +22,15 @@ require "bootloader/grub2base" module Yast + import "Arch" + import "Storage" + class BootGRUB2Class < GRUB2Base def main super + textdomain "bootloader" + # includes # for shared some routines with grub Yast.include self, "bootloader/grub2/misc.rb" @@ -105,7 +110,41 @@ def Propose super - grub_LocationProposal if !BootCommon.was_proposed || !Mode.autoinst + + # do not repropose, only in autoinst mode to allow propose missing parts + if !BootCommon.was_proposed || Mode.autoinst + case Arch.architecture + when "i386", "x86_64" + grub_LocationProposal + when /ppc/ + partition = prep_partitions.first + raise "there is no prep partition" unless partition + + BootCommon.globals["boot_custom"] = partition + when /s390/ + zipl_partition = Storage.GetEntryForMountpoint("/boot/zipl") + raise "missing separate /boot/zipl partition" if zipl_partition.empty? + + BootCommon.globals["boot_custom"] = zipl_partition["device"] + else + raise "unsuported architecture #{Arch.architecture}" + end + end + end + + def prep_partitions + target_map = Storage.GetTargetMap + + partitions = target_map.reduce([]) do |parts, pair| + parts.concat(pair[1]["partitions"] || []) + end + + prep_partitions = partitions.select do |partition| + partition["fsid"] == 0x41 + end + + y2milestone "detected prep partitions #{prep_partitions.inspect}" + prep_partitions.map { |p| p["device"] } end # FATE#303643 Enable one-click changes in bootloader proposal @@ -148,7 +187,7 @@ ) else line << _( - "Do not install bootcode into \"/\" partition (install</a>" + "Do not install bootcode into \"/\" partition (install</a>)" ) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootGRUB2EFI.rb new/yast2-bootloader-3.1.18/src/modules/BootGRUB2EFI.rb --- old/yast2-bootloader-3.1.10/src/modules/BootGRUB2EFI.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootGRUB2EFI.rb 2014-04-04 13:07:50.000000000 +0200 @@ -26,6 +26,7 @@ def main super + textdomain "bootloader" BootGRUB2EFI() end @@ -101,11 +102,20 @@ # Constructor def BootGRUB2EFI + + if Arch.i386 + packages = ["grub2-i386-efi"] + elsif Arch.x86_64 + packages = ["grub2-x86_64-efi", "shim", "mokutil"] + else + raise "no grub packages for EFI available for this architecture" + end + Ops.set( BootCommon.bootloader_attribs, "grub2-efi", { - "required_packages" => ["grub2-efi", "shim"], + "required_packages" => packages, "loader_name" => "GRUB2-EFI", "initializer" => fun_ref(method(:Initializer), "void ()") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootPOWERLILO.rb new/yast2-bootloader-3.1.18/src/modules/BootPOWERLILO.rb --- old/yast2-bootloader-3.1.10/src/modules/BootPOWERLILO.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootPOWERLILO.rb 2014-04-04 13:07:50.000000000 +0200 @@ -1067,10 +1067,10 @@ value = Ops.get_string(s, key, "") # FIXME: check whether this is code for update from SLES8? # then we would delete it. - if Builtins.regexpmatch(value, "^.*.shipped.*$") - value = Builtins.regexpsub(value, "^(.*).shipped(.*)$", "\\1\\2") - elsif Builtins.regexpmatch(value, "^.*.suse.*$") - value = Builtins.regexpsub(value, "^(.*).suse(.*)$", "\\1\\2") + if Builtins.regexpmatch(value, '^.*\.shipped.*$') + value = Builtins.regexpsub(value, '^(.*)\.shipped(.*)$', "\\1\\2") + elsif Builtins.regexpmatch(value, '^.*\.suse.*$') + value = Builtins.regexpsub(value, '^(.*)\.suse(.*)$', "\\1\\2") end Ops.set(s, key, value) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/BootStorage.rb new/yast2-bootloader-3.1.18/src/modules/BootStorage.rb --- old/yast2-bootloader-3.1.10/src/modules/BootStorage.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/BootStorage.rb 2014-04-04 13:07:50.000000000 +0200 @@ -959,10 +959,15 @@ Builtins.foreach(targetMap) do |target_dev, target| bios_id = Ops.get_string(target, "bios_id", "") if bios_id != "" - index = Ops.subtract( - Builtins.tointeger(bios_id), - Builtins.tointeger("0x80") - ) + index = case Arch.architecture + when /ppc/ + # on ppc it looks like "vdevice/v-scsi@71000002/@0" + bios_id[/\d+\z/].to_i + when "i386", "x86_64" + Builtins.tointeger(bios_id) - 0x80 + else + raise "no support for bios id '#{bios_id}' on #{Arch.architecture}" + end grub_dev = Builtins.sformat("hd%1", index) # FATE #303548 - doesn't add disk with same bios_id with different name (multipath machine) if !Ops.get_boolean(ids, index, false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/Bootloader.rb new/yast2-bootloader-3.1.18/src/modules/Bootloader.rb --- old/yast2-bootloader-3.1.10/src/modules/Bootloader.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/Bootloader.rb 2014-04-04 13:07:50.000000000 +0200 @@ -991,7 +991,7 @@ # also skip sections that start with a grub device name # "(hd0,7)/boot/vmlinuz", and are not on the default (currently # mounted) boot partition - if !Builtins.regexpmatch(Ops.get_string(s, "image", ""), "^(hd.*)") + if s["image"].to_s !~ /^\(hd.*\)/ s = ResolveSymlink(s, "image") else Builtins.y2milestone( @@ -1004,7 +1004,7 @@ # resolve initrd link name, but skip if it is on a non-default boot # partition (see above) if Builtins.haskey(s, "initrd") - if !Builtins.regexpmatch(Ops.get_string(s, "initrd", ""), "^(hd.*)") + if s["image"].to_s !~ /^\(hd.*\)/ s = ResolveSymlink(s, "initrd") else Builtins.y2milestone( @@ -1587,10 +1587,10 @@ cmd_enable_se = "pam-config -a --selinux 2>/dev/null" cmd_disable_aa = "pam-config -d --apparmor 2>/dev/null" - out = Convert.to_map(SCR.Execute(path(".target.bash"), cmd_disable_aa)) + out = SCR.Execute(path(".target.bash_output"), cmd_disable_aa) Builtins.y2debug("result of disabling the AppArmor PAM module is %1", out) - out = Convert.to_map(SCR.Execute(path(".target.bash"), cmd_enable_se)) + out = SCR.Execute(path(".target.bash_output"), cmd_enable) Builtins.y2debug("result of enabling the SELinux PAM module is %1", out) nil @@ -1599,10 +1599,10 @@ cmd_disable_se = "pam-config -d --selinux 2>/dev/null" cmd_enable_aa = "pam-config -a --apparmor 2>/dev/null" - out = Convert.to_map(SCR.Execute(path(".target.bash"), cmd_disable_se)) + out = SCR.Execute(path(".target.bash_output"), cmd_disable_se) Builtins.y2debug("result of disabling the SELinux PAM module is %1", out) - out = Convert.to_map(SCR.Execute(path(".target.bash"), cmd_enable_aa)) + out = SCR.Execute(path(".target.bash_output"), cmd_enable_aa) Builtins.y2debug("result of enabling the AppArmor PAM module is %1", out) nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.10/src/modules/GfxMenu.rb new/yast2-bootloader-3.1.18/src/modules/GfxMenu.rb --- old/yast2-bootloader-3.1.10/src/modules/GfxMenu.rb 2014-03-05 10:08:45.000000000 +0100 +++ new/yast2-bootloader-3.1.18/src/modules/GfxMenu.rb 2014-04-04 13:07:50.000000000 +0200 @@ -434,8 +434,8 @@ :from => "any", :to => "list <string>" ) - helps = Builtins.filter(files) { |f| Builtins.regexpmatch(f, "\\.hlp$") } - texts = Builtins.filter(files) { |f| Builtins.regexpmatch(f, "\\.tr$") } + helps = Builtins.filter(files) { |f| Builtins.regexpmatch(f, '\.hlp$') } + texts = Builtins.filter(files) { |f| Builtins.regexpmatch(f, '\.tr$') } helps = Builtins.maplist(helps) { |h| Builtins.substring(h, 0, 2) } texts = Builtins.maplist(texts) { |t| Builtins.substring(t, 0, 2) } Builtins.y2milestone("Texts available for %1", Builtins.sort(texts)) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org