Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2012-04-23 16:14:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-04-02 10:32:16.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2012-04-23 16:14:22.000000000 +0200 @@ -1,0 +2,18 @@ +Mon Apr 23 12:40:24 CEST 2012 - mchang@suse.com + +- add "Boot Loader Options" dialog for grub2-efi that provides widgets for + manipulating global options. These options include timeout, vgamode, + append and default. +- add widgets for enabling serial console and specify it's arguments on + "Boot Loader Options" dialog. +- add "Boot Loader Options" dialog for grub2 that provides widgets for + manipulating global options. These options include activate, generic_mbr, + timeout, vgamode, append and default. +- 2.23.2 + +------------------------------------------------------------------- +Mon Apr 23 11:35:06 CEST 2012 - snwint@suse.de + +- adapted ssh command for 2nd stage ssh installation (bnc#745340) + +------------------------------------------------------------------- Old: ---- yast2-bootloader-2.23.1.tar.bz2 New: ---- yast2-bootloader-2.23.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.0b5VWw/_old 2012-04-23 16:14:24.000000000 +0200 +++ /var/tmp/diff_new_pack.0b5VWw/_new 2012-04-23 16:14:24.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 2.23.1 +Version: 2.23.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-bootloader-2.23.1.tar.bz2 -> yast2-bootloader-2.23.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/VERSION new/yast2-bootloader-2.23.2/VERSION --- old/yast2-bootloader-2.23.1/VERSION 2012-03-30 13:06:02.000000000 +0200 +++ new/yast2-bootloader-2.23.2/VERSION 2012-04-23 12:40:21.000000000 +0200 @@ -1 +1 @@ -2.23.1 +2.23.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/clients/bootloader_finish.ycp new/yast2-bootloader-2.23.2/src/clients/bootloader_finish.ycp --- old/yast2-bootloader-2.23.1/src/clients/bootloader_finish.ycp 2012-03-30 12:09:08.000000000 +0200 +++ new/yast2-bootloader-2.23.2/src/clients/bootloader_finish.ycp 2012-04-23 11:33:44.000000000 +0200 @@ -9,7 +9,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: bootloader_finish.ycp 67632 2012-03-15 09:29:51Z aschnell $ + * $Id: bootloader_finish.ycp 67934 2012-04-13 13:36:57Z aschnell $ * */ @@ -151,9 +151,9 @@ // and we're ready to start (boot into) the installed system // Message that will be displayed along with information // how the boot loader was installed - Misc::boot_msg = _("The system will reboot now. + Misc::boot_msg = sformat(_("The system will reboot now. After reboot, reconnect and run the following: -/usr/lib/YaST2/startup/YaST2.ssh"); +%1"), "yast.ssh"); else // Final message after all packages from CD1 are installed // and we're ready to start (boot into) the installed system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/grub2/Makefile.am new/yast2-bootloader-2.23.2/src/grub2/Makefile.am --- old/yast2-bootloader-2.23.1/src/grub2/Makefile.am 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/grub2/Makefile.am 2012-04-23 11:44:51.000000000 +0200 @@ -4,8 +4,10 @@ yncludedir = @yncludedir@/bootloader/grub2 -ynclude_DATA = \ - dialogs.ycp +ynclude_DATA = \ + dialogs.ycp \ + options.ycp \ + helps.ycp EXTRA_DIST = \ $(ynclude_DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/grub2/Makefile.in new/yast2-bootloader-2.23.2/src/grub2/Makefile.in --- old/yast2-bootloader-2.23.1/src/grub2/Makefile.in 2012-03-05 15:09:52.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/grub2/Makefile.in 2012-04-23 11:44:51.000000000 +0200 @@ -246,8 +246,10 @@ ydatadir = @ydatadir@ yncludedir = @yncludedir@/bootloader/grub2 ystartupdir = @ystartupdir@ -ynclude_DATA = \ - dialogs.ycp +ynclude_DATA = \ + dialogs.ycp \ + options.ycp \ + helps.ycp EXTRA_DIST = \ $(ynclude_DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/grub2/dialogs.ycp new/yast2-bootloader-2.23.2/src/grub2/dialogs.ycp --- old/yast2-bootloader-2.23.1/src/grub2/dialogs.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/grub2/dialogs.ycp 2012-04-23 11:49:07.000000000 +0200 @@ -26,6 +26,51 @@ import "BootCommon"; import "Stage"; +include "bootloader/grub2/options.ycp"; + +/** + * Run dialog for loader installation details for Grub2 + * @return symbol for wizard sequencer + */ +symbol Grub2LoaderDetailsDialog () +{ + y2milestone ("Running Grub2 loader details dialog"); + term contents = `HBox ( + `HSpacing (2), + `VBox ( + `VStretch (), + `Left("activate"), + `Left("generic_mbr"), + `Left("hiddenmenu"), + `HBox ( + `Left(`HSquash("timeout")), + `Left(`HWeight(1, "vgamode")) + ), + `Left("append"), + `Left("default"), + `Left("console"), + `VStretch () + ), + `HSpacing (2) + ); + + string lt = BootCommon::getLoaderType (false); + list<string> widget_names = (lt == "grub2-efi") + ? ["hiddenmenu", "timeout", "append", "default", "vgamode"] + : ["activate","generic_mbr", "hiddenmenu", "timeout", "append", "console", "default", "vgamode"]; + + string caption = _("Boot Loader Options"); + return CWM::ShowAndRun ($[ + "widget_descr" : Grub2Options(), + "widget_names" : widget_names, + "contents" : contents, + "caption" : caption, + "back_button" : Label::BackButton (), + "abort_button" : Label::CancelButton (), + "next_button" : Label::OKButton (), + ]); +} + include "bootloader/grub/options.ycp"; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/grub2/helps.ycp new/yast2-bootloader-2.23.2/src/grub2/helps.ycp --- old/yast2-bootloader-2.23.1/src/grub2/helps.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/grub2/helps.ycp 2012-04-23 11:44:51.000000000 +0200 @@ -0,0 +1,43 @@ +/** + * File: + * include/bootloader/grup2/helps.ycp + * + * Module: + * Bootloader installation and configuration + * + * Summary: + * Help and label strings for bootloader installation and configuration + * + * Authors: + * Joachim Plack <jplack@suse.de> + * + * $Id: helps.ycp 58279 2009-08-04 16:01:51Z juhliarik $ + * + */ + +{ +textdomain "bootloader"; + +global map<string,string> grub2_help_messages = $[ + "append" : + _("<p><b>Optional Kernel Command Line Parameter</b> lets you define additional parameters to pass to the kernel.</p>"), + "vgamode" : + _("<p><b>Vga Mode</b> defines the VGA mode the kernel should set the <i>console</i> to when booting.</p>"), +]; + +global map<string,string> grub2_descriptions = $[ + "append" : _("O&ptional Kernel Command Line Parameter"), + "vgamode" : _("&Vga Mode"), +]; + +} //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.1/src/grub2/options.ycp new/yast2-bootloader-2.23.2/src/grub2/options.ycp --- old/yast2-bootloader-2.23.1/src/grub2/options.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/grub2/options.ycp 2012-04-23 11:46:59.000000000 +0200 @@ -0,0 +1,150 @@ +/** + * File: + * include/bootloader/routines/grub2/options.ycp + * + * Module: + * Bootloader installation and configuration + * + * Summary: + * Grub2 widgets for bootloader options. + * + * Authors: + * Josef Reidinger<jreidinger@suse.cz> + * + * $Id: $ + * + */ + +{ +textdomain "bootloader"; + +import "Label"; +import "Initrd"; +import "System::Bootloader_API"; + +include "bootloader/routines/common_options.ycp"; +include "bootloader/grub/helps.ycp"; +include "bootloader/grub2/helps.ycp"; + +/** + * Init function of widget + * @param widget any id of the widget + */ +void VgaModeInit (string widget) { + list<map> vga_modes = Initrd::VgaModes (); + list items = maplist (map m, vga_modes, { + return `item (`id (sformat ("%1", tohexstring(m["mode"]:0))), + // combo box item + // %1 is X resolution (width) in pixels + // %2 is Y resolution (height) in pixels + // %3 is color depth (usually one of 8, 16, 24, 32) + // %4 is the VGA mode ID (hexadecimal number) + sformat (_("%1x%2, %3 bits (mode %4)"), + m["width"]:0, m["height"]:0, m["color"]:0, tohexstring(m["mode"]:0))); + }); + items = prepend(items,`item(`id("ask"), _("Ask for resolution during boot."))); + items = prepend(items,`item(`id("extended"), _("Standard 8-pixel font mode."))); + // item of a combo box + items = prepend (items, `item (`id ("normal"), _("Text Mode"))); + items = prepend (items, `item (`id (""), _("Unspecified"))); + UI::ChangeWidget (`id (widget), `Items, items); + InitGlobalStr (widget); +} + +void DefaultEntryInit (string widget) { + list items = []; + + foreach (map<string,any> s, BootCommon::sections, { + items = add (items, `item(`id(s["menuentry"]:""), s["menuentry"]:"")); + }); + + UI::ChangeWidget (`id (widget), `Items, items); + InitGlobalStr (widget); + return; +} + +/** + * Init function for console + * @param string widget + */ +void ConsoleInit(string widget){ + boolean enable = BootCommon::globals["terminal"]:"" == "serial"; + UI::ChangeWidget(`id(`console_frame),`Value, enable); + string args = BootCommon::globals["serial"]:""; + UI::ChangeWidget(`id(`console_args),`Value, args); +} + +/** + * Store function of a console + * @param widget any widget key + * @param event map event description of event that occured + */ +void ConsoleStore(string widget, map event){ + boolean use_serial = (boolean) UI::QueryWidget(`id(`console_frame),`Value); + if (use_serial) + { + BootCommon::globals["terminal"] = "serial"; + string console_value = (string) UI::QueryWidget(`id(`console_args),`Value); + if (console_value != "") + BootCommon::globals["serial"] = console_value; + } else { + if (haskey(BootCommon::globals, "terminal")) + BootCommon::globals = remove(BootCommon::globals, "terminal"); + if (haskey(BootCommon::globals, "serial")) + BootCommon::globals = remove(BootCommon::globals, "serial"); + } + + // FATE: #110038: Serial console + // add or remove console key with value for sections + BootCommon::HandleConsole2(); +} + +map<string,map<string,any> > Grub2Options(){ + map<string,map<string,any> > grub2_specific = $[ + "activate" : CommonCheckboxWidget(grub_descriptions["activate"]:"activate", + grub_help_messages["activate"]:""), + "generic_mbr" : CommonCheckboxWidget(grub_descriptions["generic_mbr"]:"generic mbr", + grub_help_messages["generic_mbr"]:""), + "hiddenmenu" : CommonCheckboxWidget(grub_descriptions["hiddenmenu"]:"hidden menu", + grub_help_messages["hiddenmenu"]:""), + "append" : CommonInputFieldWidget(grub2_descriptions["append"]:"append", + grub2_help_messages["append"]:""), + "vgamode" : $[ + "widget" : `combobox, + "label" : grub2_descriptions["vgamode"]:"vgamode", + "opt" : [ `editable, `hstretch ], + "init" : VgaModeInit, + "store" : StoreGlobalStr, + "help" : grub2_help_messages["vgamode"]:"", + ], + + "default" : $[ + "widget" : `combobox, + "label" : grub_descriptions["default"]:"default", + "opt" : [ `editable, `hstretch ], + "init" : DefaultEntryInit, + "store" : StoreGlobalStr, + "help" : grub_help_messages["default"]:"", + ], + + "console" : $[ + "widget" : `custom, + "custom_widget" : `HBox( + `CheckBoxFrame(`id(`console_frame),_("Use &serial console"),true, + `HBox( + `HSpacing(2), + `InputField(`id(`console_args),`opt(`hstretch), _("&Console arguments")), + `HStretch())) + ), + "init" : ConsoleInit, + "store" : ConsoleStore, + "help" : grub_help_messages["serial"]:"" + ], + + ]; + + return (map<string,map<string,any> >)union(grub2_specific,CommonOptions()); +} + +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/modules/BootGRUB2.ycp new/yast2-bootloader-2.23.2/src/modules/BootGRUB2.ycp --- old/yast2-bootloader-2.23.1/src/modules/BootGRUB2.ycp 2012-03-30 13:03:57.000000000 +0200 +++ new/yast2-bootloader-2.23.2/src/modules/BootGRUB2.ycp 2012-04-23 11:44:51.000000000 +0200 @@ -43,6 +43,16 @@ // general functions /** + * Propose global options of bootloader + */ +global map<string,string> StandardGlobals () { + return $[ + "timeout" : "8", + "default" : "0", + ]; +} + +/** * 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 @@ -121,6 +131,12 @@ global define void Propose () { y2milestone ("Proposed globals: %1", BootCommon::globals); + + if (BootCommon::globals == nil || size (BootCommon::globals) == 0) + { + BootCommon::globals = StandardGlobals(); + } + grub_LocationProposal (); map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); @@ -177,6 +193,13 @@ return result; } +global map<string,symbol()> Dialogs () { + y2milestone ("Called GRUB2 Dialogs"); + return $[ + "loader" : Grub2LoaderDetailsDialog, + ]; +} + /** * Return map of provided functions * @return a map of functions (eg. $["write":BootGRUB2::Write]) @@ -189,6 +212,7 @@ "summary" : Summary, "update" : Update, "widgets" : grub2Widgets, + "dialogs" : Dialogs, "write" : Write, ]; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/modules/BootGRUB2EFI.ycp new/yast2-bootloader-2.23.2/src/modules/BootGRUB2EFI.ycp --- old/yast2-bootloader-2.23.1/src/modules/BootGRUB2EFI.ycp 2012-03-30 13:03:57.000000000 +0200 +++ new/yast2-bootloader-2.23.2/src/modules/BootGRUB2EFI.ycp 2012-04-23 11:49:07.000000000 +0200 @@ -39,10 +39,20 @@ // for shared some routines with grub // include "bootloader/grub/misc.ycp"; // for simplified widgets than other -// include "bootloader/grub2efi/dialogs.ycp"; +include "bootloader/grub2/dialogs.ycp"; // general functions /** + * Propose global options of bootloader + */ +global map<string,string> StandardGlobals () { + return $[ + "timeout" : "8", + "default" : "0", + ]; +} + +/** * 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 @@ -117,6 +127,11 @@ global define void Propose () { y2milestone ("Proposed globals: %1", BootCommon::globals); + if (BootCommon::globals == nil || size (BootCommon::globals) == 0) + { + BootCommon::globals = StandardGlobals(); + } + map<string, integer> swap_sizes = BootCommon::getSwapPartitions (); list<string> swap_parts = (list<string>) maplist (string name, integer size, swap_sizes, ``(name)); @@ -155,6 +170,13 @@ return result; } +global map<string,symbol()> Dialogs () { + y2milestone ("Called GRUB2 Dialogs"); + return $[ + "loader" : Grub2LoaderDetailsDialog, + ]; +} + /** * Return map of provided functions * @return a map of functions (eg. $["write":BootGRUB2EFI::Write]) @@ -168,6 +190,7 @@ "update" : Update, #TODO grub2widgets #"widgets" : grub2Widgets, + "dialogs" : Dialogs, "widgets" : $[], "write" : Write, ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/routines/global_widgets.ycp new/yast2-bootloader-2.23.2/src/routines/global_widgets.ycp --- old/yast2-bootloader-2.23.1/src/routines/global_widgets.ycp 2012-03-30 13:02:55.000000000 +0200 +++ new/yast2-bootloader-2.23.2/src/routines/global_widgets.ycp 2012-04-23 11:50:13.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Jiri Srain <jsrain@suse.cz> * - * $Id: global_widgets.ycp 67833 2012-03-30 11:02:53Z snwint $ + * $Id: global_widgets.ycp 67986 2012-04-23 09:50:12Z snwint $ * */ @@ -736,7 +736,7 @@ `HStretch (), `VBox ( `Label (""), - (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo" || lt == "grub2" || lt == "grub2-efi") + (lt == "none" || lt == "default" || lt == "zipl" || lt == "lilo") ? `Empty() : "loader_options" ), `HSpacing (2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.23.1/src/routines/misc.ycp new/yast2-bootloader-2.23.2/src/routines/misc.ycp --- old/yast2-bootloader-2.23.1/src/routines/misc.ycp 2012-03-05 15:09:25.000000000 +0100 +++ new/yast2-bootloader-2.23.2/src/routines/misc.ycp 2012-04-23 11:48:42.000000000 +0200 @@ -12,7 +12,7 @@ * Jiri Srain <jsrain@suse.cz> * Olaf Dabrunz <od@suse.de> * - * $Id: misc.ycp 61035 2010-02-26 09:20:36Z juhliarik $ + * $Id: misc.ycp 67985 2012-04-23 09:48:41Z snwint $ * * WARNING: * To be included to BootCommon.ycp only, requires function @@ -1976,6 +1976,28 @@ } +/** 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 + */ + +global define void HandleConsole2() +{ + string console_value = getConsoleValue(); + + if (globals["append"]:nil != nil) + { + string updated_append = ""; + if ((console_value != "") || (console_value != nil)) + updated_append = BootCommon::UpdateSerialConsole(globals["append"]:"", console_value); + else + updated_append = BootCommon::UpdateSerialConsole(globals["append"]:"", ""); + if (updated_append != nil) + { + globals["append"]=updated_append; + } + } +} /** bnc #450153 - support for installation kernel from add-on * fucntion call client from add-on and update proposal for -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org