commit yast2-bootloader for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2012-04-02 10:32:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old) and /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-bootloader", Maintainer is "snwint@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes 2012-03-06 13:42:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2012-04-02 10:32:16.000000000 +0200 @@ -1,0 +2,17 @@ +Thu Mar 22 10:56:28 UTC 2012 - mchang@suse.com + +- add kernel parameters (detected necessary and user specfied one during + installation) to grub2's config file (bnc#752939) +- 2.23.1 + +------------------------------------------------------------------- +Thu Mar 22 10:56:28 UTC 2012 - mchang@suse.com + +- add new grub2-efi module to support booting on UEFI firmware. + +------------------------------------------------------------------- +Wed Mar 14 15:43:44 CET 2012 - aschnell@suse.de + +- adapted ssh command for 2nd stage ssh installation (bnc#745340) + +------------------------------------------------------------------- Old: ---- yast2-bootloader-2.23.0.tar.bz2 New: ---- yast2-bootloader-2.23.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.lNpHsb/_old 2012-04-02 10:32:18.000000000 +0200 +++ /var/tmp/diff_new_pack.lNpHsb/_new 2012-04-02 10:32:18.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 2.23.0 +Version: 2.23.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-bootloader-2.23.0.tar.bz2 -> yast2-bootloader-2.23.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/VERSION new/yast2-bootloader-2.23.1/VERSION --- old/yast2-bootloader-2.23.0/VERSION 2012-03-05 15:09:26.000000000 +0100 +++ new/yast2-bootloader-2.23.1/VERSION 2012-03-30 13:06:02.000000000 +0200 @@ -1 +1 @@ -2.23.0 +2.23.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/clients/bootloader_finish.ycp new/yast2-bootloader-2.23.1/src/clients/bootloader_finish.ycp --- old/yast2-bootloader-2.23.0/src/clients/bootloader_finish.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/clients/bootloader_finish.ycp 2012-03-30 12:09:08.000000000 +0200 @@ -9,7 +9,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: bootloader_finish.ycp 57011 2009-04-28 14:50:01Z juhliarik $ + * $Id: bootloader_finish.ycp 67632 2012-03-15 09:29:51Z aschnell $ * */ @@ -126,10 +126,11 @@ string usessh_msg = ""; if (Linuxrc::usessh ()) { // TRANSLATORS: part of the reboot message + /// %1 is replaced with a command name // (message ID#SSH) - usessh_msg = _("Then reconnect and run the following: -/usr/lib/YaST2/startup/YaST2.ssh -"); + usessh_msg = sformat(_("Then reconnect and run the following: +%1 +"), "yast.ssh"); } // TRANSLATORS: reboot message diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/BootCommon.ycp new/yast2-bootloader-2.23.1/src/modules/BootCommon.ycp --- old/yast2-bootloader-2.23.0/src/modules/BootCommon.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/BootCommon.ycp 2012-03-30 13:02:55.000000000 +0200 @@ -15,7 +15,7 @@ * Joachim Plack <jplack@suse.de> * Olaf Dabrunz <od@suse.de> * - * $Id: BootCommon.ycp 67562 2012-03-05 13:48:47Z snwint $ + * $Id: BootCommon.ycp 67833 2012-03-30 11:02:53Z snwint $ * */ @@ -187,7 +187,7 @@ /** * type of bootloader to configure/being configured - * shall be one of "lilo", "grub", "elilo", "ppc", "zipl", "grub2" + * shall be one of "lilo", "grub", "elilo", "ppc", "zipl", "grub2", "grub2-efi" */ string loader_type = nil; @@ -289,7 +289,7 @@ * List of all supported bootloaders */ global list<string> bootloaders = ["lilo", "grub", "elilo", - "zipl", "ppc", "grub2"]; + "zipl", "ppc", "grub2", "grub2-efi"]; /** FATE#305008: Failover boot configurations for md arrays with redundancy * if true enable redundancy for md array @@ -1059,7 +1059,9 @@ } if ((Arch::i386() || Arch::x86_64()) && Linuxrc::InstallInf("EFI") == "1") { - loader_type = "elilo"; + // use grub2-efi as default bootloader for x86_64/i386 EFI + // previously we use elilo + loader_type = "grub2-efi"; } loader_type = SupportedLoader (loader_type); @@ -1139,7 +1141,7 @@ global define list<string> getBootloaders () { if (Mode::config ()) { - return ["grub", "lilo", "elilo", "zipl", "ppc", "grub2", "default", "none"]; + return ["grub", "lilo", "elilo", "zipl", "ppc", "grub2", "grub2-efi", "default", "none"]; } list<string> ret = [ getLoaderType (false), @@ -1149,7 +1151,7 @@ { ret = (list<string>)merge (ret, ["lilo", "grub", "grub2"]); if (Arch::x86_64 ()) - ret = (list<string>)merge (ret, ["elilo"]); + ret = (list<string>)merge (ret, ["elilo", "grub2-efi"]); } // in order not to display it twice when "none" is selected ret = filter (string l, ret, { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/BootGRUB2.ycp new/yast2-bootloader-2.23.1/src/modules/BootGRUB2.ycp --- old/yast2-bootloader-2.23.0/src/modules/BootGRUB2.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/BootGRUB2.ycp 2012-03-30 13:03:57.000000000 +0200 @@ -24,7 +24,7 @@ textdomain "bootloader"; -import "Arch"; +import "BootArch"; import "BootCommon"; import "BootStorage"; import "Kernel"; @@ -122,6 +122,30 @@ global define void Propose () { y2milestone ("Proposed globals: %1", BootCommon::globals); grub_LocationProposal (); + + map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); + list<string> swap_parts = (list<string>) + maplist (string name, integer size, swap_sizes, ``(name)); + swap_parts = sort (string a, string b, swap_parts, + ``(swap_sizes[a]:0 > swap_sizes[b]:0) + ); + + string largest_swap_part = swap_parts[0]:""; + + string resume = BootArch::ResumeAvailable () + ? largest_swap_part + : ""; + // try to use label or udev id for device name... FATE #302219 + if ((resume != "") && (resume != nil)) + resume = BootStorage::Dev2MountByDev(resume); + BootCommon::globals["append"] = BootArch::DefaultKernelParams (resume); + + // Let grub2 scripts detects correct root= for us. :) + // BootCommon::globals["root"] = BootStorage::Dev2MountByDev(BootStorage::RootPartitionDevice); + if (BootArch::VgaAvailable () && Kernel::GetVgaType () != "") + { + BootCommon::globals["vgamode"] = Kernel::GetVgaType (); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/BootGRUB2EFI.ycp new/yast2-bootloader-2.23.1/src/modules/BootGRUB2EFI.ycp --- old/yast2-bootloader-2.23.0/src/modules/BootGRUB2EFI.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/BootGRUB2EFI.ycp 2012-03-30 13:03:57.000000000 +0200 @@ -0,0 +1,213 @@ +/** + * File: + * modules/BootGRUB2EFI.ycp + * + * Module: + * Bootloader installation and configuration + * + * Summary: + * Module containing specific functions for GRUB2EFI configuration + * and installation + * + * Authors: + * Jiri Srain <jsrain@suse.cz> + * Joachim Plack <jplack@suse.de> + * Olaf Dabrunz <od@suse.de> + * Philipp Thomas <pth@suse.de> + * + * $Id: BootGRUB2EFI.ycp 63508 2011-03-04 12:53:27Z jreidinger $ + * + */ + +{ +module "BootGRUB2EFI"; + +textdomain "bootloader"; + +import "BootArch"; +import "BootCommon"; +import "BootStorage"; +import "Kernel"; +import "Mode"; +import "Stage"; +import "Storage"; +import "StorageDevices"; +import "Pkg"; +import "HTML"; + +// includes +// for shared some routines with grub +// include "bootloader/grub/misc.ycp"; +// for simplified widgets than other +// include "bootloader/grub2efi/dialogs.ycp"; +// general functions + +/** + * Read settings from disk + * @param reread boolean true to force reread settings from system + * @param avoid_reading_device_map do not read new device map from file, use + * internal data + * @return boolean true on success + */ +global boolean Read (boolean reread, boolean avoid_reading_device_map) { + BootCommon::InitializeLibrary (reread, "grub2-efi"); + if (reread) { + BootCommon::ReadFiles (avoid_reading_device_map); + } + // TODO: check if necessary for grub2efi + // grub_DetectDisks (); + boolean ret = BootCommon::Read (false, avoid_reading_device_map); + + // TODO: check if necessary for grub2 + // refresh device map if not read + // if (BootStorage::device_mapping == nil + // || size (BootStorage::device_mapping) == 0) + // { + // BootStorage::ProposeDeviceMap (); + // } + + return ret; +} + +/** + * Update read settings to new version of configuration files + */ +global define void Update () { + Read (true, true); + + //we don't handle sections, grub2 section create them for us + //BootCommon::UpdateSections (); + BootCommon::UpdateGlobals (); +} + +/** + * Write bootloader settings to disk + * @return boolean true on success + */ +global define boolean Write () { + + boolean ret = BootCommon::UpdateBootloader (); + + if (BootCommon::location_changed) { + boolean grub_ret = BootCommon::InitializeBootloader (); + if (grub_ret == nil) + grub_ret = false; + + y2milestone ("GRUB2EFI return value: %1", grub_ret); + ret = ret && grub_ret; + } + + return ret; +} + +/** + * Reset bootloader settings + * @param init boolean true to repropose also device map + */ +global define void Reset (boolean init) { + if (Mode::autoinst ()) + return; + BootCommon::Reset (init); +} + +/** + * Propose bootloader settings + */ + +global define void Propose () { + y2milestone ("Proposed globals: %1", BootCommon::globals); + + map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); + list<string> swap_parts = (list<string>) + maplist (string name, integer size, swap_sizes, ``(name)); + swap_parts = sort (string a, string b, swap_parts, + ``(swap_sizes[a]:0 > swap_sizes[b]:0) + ); + + string largest_swap_part = swap_parts[0]:""; + + string resume = BootArch::ResumeAvailable () + ? largest_swap_part + : ""; + // try to use label or udev id for device name... FATE #302219 + if ((resume != "") && (resume != nil)) + resume = BootStorage::Dev2MountByDev(resume); + BootCommon::globals["append"] = BootArch::DefaultKernelParams (resume); + + // Let grub2 scripts detects correct root= for us. :) + // BootCommon::globals["root"] = BootStorage::Dev2MountByDev(BootStorage::RootPartitionDevice); + if (BootArch::VgaAvailable () && Kernel::GetVgaType () != "") + { + BootCommon::globals["vgamode"] = Kernel::GetVgaType (); + } +} + +/** + * Display bootloader summary + * @return a list of summary lines + */ + +global define list<string> Summary () { + list<string> result = [ sformat (_("Boot Loader Type: %1"), + BootCommon::getLoaderName (BootCommon::getLoaderType (false), `summary)) ]; + list<string> locations = []; + + return result; +} + +/** + * Return map of provided functions + * @return a map of functions (eg. $["write":BootGRUB2EFI::Write]) + */ +global map<string, any> GetFunctions () { + return $[ + "read" : Read, + "reset" : Reset, + "propose" : Propose, + "summary" : Summary, + "update" : Update, + #TODO grub2widgets + #"widgets" : grub2Widgets, + "widgets" : $[], + "write" : Write, + ]; +} + + +/** + * Initializer of GRUB2EFI bootloader + */ +global define void Initializer () { + y2milestone ("Called GRUB2EFI initializer"); + BootCommon::current_bootloader_attribs = $[ + "propose" : false, + "read" : false, + "scratch" : false, + "restore_mbr" : false, + "bootloader_on_disk" : false, + ]; +} + +/** + * Constructor + */ +global define void BootGRUB2EFI () { + BootCommon::bootloader_attribs["grub2-efi"] = $[ + "required_packages" : ["grub2-efi"], + "loader_name" : "GRUB2-EFI", + "initializer" : BootGRUB2EFI::Initializer, + ]; +} + +} // EOF + +/* + * Local variables: + * mode: ycp + * mode: font-lock + * mode: auto-fill + * indent-level: 4 + * fill-column: 78 + * End: + */ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/BootSupportCheck.ycp new/yast2-bootloader-2.23.1/src/modules/BootSupportCheck.ycp --- old/yast2-bootloader-2.23.0/src/modules/BootSupportCheck.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/BootSupportCheck.ycp 2012-03-30 12:59:55.000000000 +0200 @@ -74,7 +74,7 @@ * Check that bootloader is known and supported */ boolean KnownLoader () { - if (! contains (["grub", "grub2", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) + if (! contains (["grub", "grub2", "grub2-efi", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) { if (Bootloader::getLoaderType () != "lilo") @@ -122,7 +122,7 @@ return true; if (Arch::i386() || Arch::x86_64()) { if (checkElilo()) { - if (lt == "elilo") + if (lt == "elilo" || lt == "grub2-efi") return true; } else { if ((lt == "grub") || (lt == "lilo") || (lt == "grub2")) @@ -304,6 +304,13 @@ } /** + * GRUB2EFI-related check + */ +global boolean GRUB2EFI () { + return true; +} + +/** * ELILO related check */ boolean ELILO () { @@ -357,6 +364,8 @@ supported = ZIPL () && supported; else if (lt == "grub2") supported = GRUB2 () && supported; + else if (lt == "grub2-efi") + supported = GRUB2EFI () && supported; y2milestone ("Configuration supported: %1", supported); return supported; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/Makefile.am new/yast2-bootloader-2.23.1/src/modules/Makefile.am --- old/yast2-bootloader-2.23.0/src/modules/Makefile.am 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/Makefile.am 2012-03-30 12:59:55.000000000 +0200 @@ -12,6 +12,7 @@ BootELILO.ycp \ BootGRUB.ycp \ BootGRUB2.ycp \ + BootGRUB2EFI.ycp \ BootLILO.ycp \ BootPOWERLILO.ycp \ BootZIPL.ycp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/modules/Makefile.in new/yast2-bootloader-2.23.1/src/modules/Makefile.in --- old/yast2-bootloader-2.23.0/src/modules/Makefile.in 2012-03-05 15:09:52.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/modules/Makefile.in 2012-03-30 12:59:55.000000000 +0200 @@ -259,6 +259,7 @@ BootELILO.ycp \ BootGRUB.ycp \ BootGRUB2.ycp \ + BootGRUB2EFI.ycp \ BootLILO.ycp \ BootPOWERLILO.ycp \ BootZIPL.ycp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/routines/dialogs.ycp new/yast2-bootloader-2.23.1/src/routines/dialogs.ycp --- old/yast2-bootloader-2.23.0/src/routines/dialogs.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/routines/dialogs.ycp 2012-03-30 13:02:55.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Jiri Srain <jsrain@suse.cz> * - * $Id: dialogs.ycp 67562 2012-03-05 13:48:47Z snwint $ + * $Id: dialogs.ycp 67833 2012-03-30 11:02:53Z snwint $ * */ @@ -84,7 +84,7 @@ string lt = Bootloader::getLoaderType (); term contents = `VBox ( "tab", - (lt == "grub2") + (lt == "grub2" || lt == "grub2-efi") ? nil : `Right ("adv_button") ); @@ -101,7 +101,7 @@ } // F#300779: end - list<string> widget_names = (lt == "grub2") + list<string> widget_names = (lt == "grub2" || lt == "grub2-efi") ? ["tab"] : ["tab", "adv_button"]; map<string,map<string,any> > widget_descr = $[]; @@ -109,12 +109,12 @@ widget_descr = (map<string,map<string,any> >) union (CommonGlobalWidgets (), Bootloader::blWidgetMaps ()); widget_descr["tab"] = CWMTab::CreateWidget($[ - "tab_order": (lt == "grub2") + "tab_order": (lt == "grub2" || lt == "grub2-efi") ? ["installation"] : ["sections", "installation"], "tabs": TabsDescr (), "widget_descr": widget_descr, - "initial_tab" : (lt == "grub2") + "initial_tab" : (lt == "grub2" || lt == "grub2-efi") ? "installation" : return_tab ]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/routines/global_widgets.ycp new/yast2-bootloader-2.23.1/src/routines/global_widgets.ycp --- old/yast2-bootloader-2.23.0/src/routines/global_widgets.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/routines/global_widgets.ycp 2012-03-30 13:02:55.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Jiri Srain <jsrain@suse.cz> * - * $Id: global_widgets.ycp 67562 2012-03-05 13:48:47Z snwint $ + * $Id: global_widgets.ycp 67833 2012-03-30 11:02:53Z snwint $ * */ @@ -330,6 +330,22 @@ return `redraw; } + if (new_bl == "grub2-efi") { + if (Popup::ContinueCancel (_(" +The grub2-efi is still under develope and test. + +Proceed? +"))) + { + BootCommon::other_bl[old_bl] = Bootloader::Export (); + BootCommon::setLoaderType ("grub2-efi"); + Bootloader::Propose (); + BootCommon::location_changed = true; + BootCommon::changed = true; + } + return `redraw; + } + if (Arch::x86_64 ()) { if (new_bl == "elilo") { // continue/cancel pop-up @@ -720,7 +736,7 @@ `HStretch (), `VBox ( `Label (""), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2" || lt == "grub2-efi") ? `Empty() : "loader_options" ), `HSpacing (2) @@ -728,7 +744,7 @@ `VSpacing (0.4) )), `VStretch (), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2-efi") ? `Empty () : "loader_location", `VStretch (), @@ -737,8 +753,8 @@ : "inst_details", `VStretch () ), `HStretch ()), - "widget_names": (lt == "none" || lt == "default" || lt=="zipl" || lt == "grub2") - ? [ "loader_type", "loader_options", "loader_location"] + "widget_names": (lt == "none" || lt == "default" || lt=="zipl" || lt == "grub2-efi") + ? [ "loader_type", "loader_options" ] : [ "loader_type", "loader_options", "loader_location", "inst_details"] ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.0/src/routines/switcher.ycp new/yast2-bootloader-2.23.1/src/routines/switcher.ycp --- old/yast2-bootloader-2.23.0/src/routines/switcher.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.1/src/routines/switcher.ycp 2012-03-30 13:02:55.000000000 +0200 @@ -12,7 +12,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: switcher.ycp 67562 2012-03-05 13:48:47Z snwint $ + * $Id: switcher.ycp 67833 2012-03-30 11:02:53Z snwint $ * */ @@ -24,6 +24,7 @@ import "BootPOWERLILO"; import "BootZIPL"; import "BootGRUB2"; +import "BootGRUB2EFI"; import "BootCommon"; /** @@ -40,7 +41,8 @@ "elilo" : BootELILO::GetFunctions, "zipl" : BootZIPL::GetFunctions, "ppc" : BootPOWERLILO::GetFunctions, - "grub2" : BootGRUB2::GetFunctions + "grub2" : BootGRUB2::GetFunctions, + "grub2-efi" : BootGRUB2EFI::GetFunctions ]; map<string,any> () gf = (map<string,any>())(bl_functions[bootloader]:nil); if (gf == nil) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de