Hello community, here is the log from the commit of package gfxboot for openSUSE:Factory checked in at 2015-11-17 14:20:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gfxboot (Old) and /work/SRC/openSUSE:Factory/.gfxboot.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gfxboot" Changes: -------- --- /work/SRC/openSUSE:Factory/gfxboot/gfxboot.changes 2015-10-24 18:56:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gfxboot.new/gfxboot.changes 2015-11-17 14:20:34.000000000 +0100 @@ -1,0 +2,9 @@ +Thu Nov 12 11:50:22 UTC 2015 - snw...@suse.com + +- documented submenu syntax +- show submenu indicator in RTL layout +- on leaving a submenu, restore cursor position +- implement support for sub-menues (bsc#906990) +- 4.5.11 + +------------------------------------------------------------------- Old: ---- gfxboot-4.5.10.tar.xz New: ---- gfxboot-4.5.11.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gfxboot.spec ++++++ --- /var/tmp/diff_new_pack.lsdevy/_old 2015-11-17 14:20:36.000000000 +0100 +++ /var/tmp/diff_new_pack.lsdevy/_new 2015-11-17 14:20:36.000000000 +0100 @@ -17,7 +17,7 @@ Name: gfxboot -Version: 4.5.10 +Version: 4.5.11 Release: 0 Summary: Graphical Boot Logo for GRUB, LILO and SYSLINUX License: GPL-2.0+ ++++++ KDE.tar.xz ++++++ ++++++ SLED.tar.xz ++++++ ++++++ SLES.tar.xz ++++++ ++++++ examples.tar.xz ++++++ ++++++ gfxboot-4.5.10.tar.xz -> gfxboot-4.5.11.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/VERSION new/gfxboot-4.5.11/VERSION --- old/gfxboot-4.5.10/VERSION 2015-10-19 15:12:28.000000000 +0200 +++ new/gfxboot-4.5.11/VERSION 2015-11-12 13:49:37.000000000 +0100 @@ -1 +1 @@ -4.5.10 +4.5.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/changelog new/gfxboot-4.5.11/changelog --- old/gfxboot-4.5.10/changelog 2015-10-19 15:12:28.000000000 +0200 +++ new/gfxboot-4.5.11/changelog 2015-11-12 13:49:37.000000000 +0100 @@ -1,3 +1,9 @@ +2015-11-12: 4.5.11 + - documented submenu syntax + - show submenu indicator in RTL layout + - on leaving a submenu, restore cursor position + - implement support for sub-menues (bsc #906990) + 2015-10-19: 4.5.10 - update translations (bsc #950962) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/doc/gfxboot.xml new/gfxboot-4.5.11/doc/gfxboot.xml --- old/gfxboot-4.5.10/doc/gfxboot.xml 2015-10-19 15:12:28.000000000 +0200 +++ new/gfxboot-4.5.11/doc/gfxboot.xml 2015-11-12 13:49:37.000000000 +0100 @@ -90,6 +90,63 @@ </sect1> + <sect1 id="submenus"> + <title>syslinux Submenus</title> + + <para> + gfxboot allows you to have submenus with syslinux (without the menu module) by extending the + syslinux config file syntax a bit. + </para> + + <para> + Submenu entries have a label stating with <command>'->FOO '</command> (note + the space) where <command>FOO</command> is an arbitrary string identifying the submenu. + </para> + + <para> + Menu (or submenu) entries that have an <command>append</command> entry <command>'->BAR'</command> + link to submenu <command>BAR</command>. The maximum submenu nesting depth is 16. + </para> + + <para> + As there are spaces in labels required to make this work, use the <command>menu label</command> + statement in syslinux. + </para> + + <para> + Note that this way you can still use the <command>label</command> statement to reach any + menu item (even if it's in a submenu) directly, which keeps the config file also usable + in text mode. + </para> + + <example><title/><para><programlisting> + + # normal entry + label linux + kernel linux + append initrd=initrd + + # link to submenu + label submenu + menu label My Submenu + append ->1 + + # 1st submenu entry + label item1 + menu label ->1 Submenu Item #1 + kernel linux + append initrd=initrd sub=1 + + # 2nd submenu entry + label item2 + menu label ->1 Submenu Item #2 + kernel linux + append initrd=initrd sub=2 + + </programlisting></para></example> + + </sect1> + <sect1 id="reference"> <title>Reference</title> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/gfxboot new/gfxboot-4.5.11/gfxboot --- old/gfxboot-4.5.10/gfxboot 2015-10-19 15:12:28.000000000 +0200 +++ new/gfxboot-4.5.11/gfxboot 2015-11-12 13:49:37.000000000 +0100 @@ -2128,7 +2128,7 @@ $q = "MALLOC_CHECK_=0 $q -enable-kvm" if -d "/sys/devices/system/kvm"; - $q .= " -m 512"; + $q .= " -display sdl -m 512"; $q .= " -boot c" if $vm_env->{boot} eq 'hd'; $q .= " -boot d" if $vm_env->{boot} eq 'cd'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/test/menu/gfxtest.config new/gfxboot-4.5.11/test/menu/gfxtest.config --- old/gfxboot-4.5.10/test/menu/gfxtest.config 1970-01-01 01:00:00.000000000 +0100 +++ new/gfxboot-4.5.11/test/menu/gfxtest.config 2015-11-12 13:49:37.000000000 +0100 @@ -0,0 +1,15 @@ +# all files in this directory ex this config file are added +# to the bootloader directory + +# archive file name in theme directory +archive=bootlogo + +# setup function name in 'gfxtest' script +setup=isolinux + +# list of files to remove in bootloader directory +rm_files="" + +# additional 'gfxboot' args +args="" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.5.10/test/menu/isolinux.cfg new/gfxboot-4.5.11/test/menu/isolinux.cfg --- old/gfxboot-4.5.10/test/menu/isolinux.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/gfxboot-4.5.11/test/menu/isolinux.cfg 2015-11-12 13:49:37.000000000 +0100 @@ -0,0 +1,77 @@ +default harddisk + +# hard disk +label harddisk + localboot -2 + +# install +label linux + kernel linux + append initrd=initrd splash=silent showopts + +# upgrade +label upgrade + kernel linux + append initrd=initrd splash=silent upgrade=1 showopts + +# submenu1 +label submenu1 + menu label My Sub Menu 1 + append ->1 + +# submenu2 +label submenu2 + menu label My Sub Menu 2 + append ->2 + +label xxx11 + menu label ->1 Sub Menu 1 Item #1 + kernel linux + append initrd=initrd splash=silent showopts sub=1.1 + +# submenu +label xxx12 + menu label ->1 Sub Menu 1 Item #2 + kernel linux + append initrd=initrd splash=silent showopts sub=1.2 + +# submenu +label xxx13 + menu label ->1 Sub Menu 1 Item #3 + kernel linux + append initrd=initrd splash=silent showopts sub=1.3 + +label rescue + kernel linux + append initrd=initrd splash=silent showopts rescue=1 + +# memory test +label memtest + kernel memtest + +# submenu2 +label submenu2 + menu label ->1 My Sub Menu 2 + append ->2 + +label xxx21 + menu label ->2 Sub Menu 2 Item #1 + kernel linux + append initrd=initrd splash=silent showopts sub=2.1 + +# submenu1 +label submenu1 + menu label ->2 My Sub Menu 1 + append ->1 + +# submenu +label xxx22 + menu label ->2 Sub Menu 2 Item #2 + kernel linux + append initrd=initrd splash=silent showopts sub=2.2 + + +ui gfxboot bootlogo message +implicit 1 +prompt 1 +timeout 600 ++++++ openSUSE.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/themes/openSUSE/src/common.inc new/themes/openSUSE/src/common.inc --- old/themes/openSUSE/src/common.inc 2015-10-19 15:12:28.000000000 +0200 +++ new/themes/openSUSE/src/common.inc 2015-11-12 13:49:37.000000000 +0100 @@ -187,6 +187,30 @@ window.action actExit eq { /window.action actNothing def + + % select link to submenu we just left + submenu.leave dup { + submenu.build + % kill trailing space + dup dup length 1 sub 0 max 0 put + menu.args length { + 0 1 menu.args length 1 sub { + menu.args over get + 2 index eq + { + /menu.entry exch def + } { + pop + } ifelse + } for + } if + pop + + main.recalc + main.redraw + + "" -1 0 return + } if "" -1 1 return } if @@ -229,6 +253,21 @@ } if } if + % activate submenu + menu.args menu.entry get submenu.tag strstr 1 eq { + menu.args menu.entry get submenu.enter + submenu.build + menu.args length { + /menu.entry 0 def + main.recalc + main.redraw + } { + submenu.leave submenu.build + } ifelse + + "" -1 0 return + } if + % some tricks to make it possible to review the complete command line debug 3 ge xxx.cmdline .undef eq and { /window.action actNothing def @@ -264,7 +303,7 @@ } { boot.ed.list buildcmdline } ifelse - 2 return + submenu.menuidx 2 return } ifelse } if @@ -687,6 +726,11 @@ } if } if + /orig.menu.texts menu.texts def + /orig.menu.args menu.args def + + submenu.build + window.main dup window.init window.show @@ -1032,6 +1076,11 @@ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % ( text ) == > ( new_text ) /menuitemmap { + % drop submenu prefix, if any + dup submenu.tag strstr 1 eq { + 2 add skipnonspaces skipspaces + } if + translate config._2space { /mmm.tmp xfree diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/themes/openSUSE/src/main.bc new/themes/openSUSE/src/main.bc --- old/themes/openSUSE/src/main.bc 2015-10-19 15:12:28.000000000 +0200 +++ new/themes/openSUSE/src/main.bc 2015-11-12 13:49:37.000000000 +0100 @@ -11,6 +11,7 @@ %% include help.inc %% include menu.inc %% include xmenu.inc +%% include submenu.inc %% include dia_video.inc %% include dia_lang.inc %% include dia_dud.inc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/themes/openSUSE/src/menu.inc new/themes/openSUSE/src/menu.inc --- old/themes/openSUSE/src/menu.inc 2015-10-19 15:12:28.000000000 +0200 +++ new/themes/openSUSE/src/menu.inc 2015-11-12 13:49:37.000000000 +0100 @@ -126,7 +126,10 @@ free - config.nobootoptions menu.texts menu.entry get iselement { + config.nobootoptions menu.texts menu.entry get iselement + menu.args menu.entry get submenu.tag strstr 1 eq + or + { boot.ed.list 0 get .inp_show false put } if @@ -223,14 +226,24 @@ /y menu.start.y def 0 1 menu.visible.entries 1 sub { - x y moveto currentpoint menu.bar.width.old menu.bar.height image - x config.rtl { menu.bar.width menu.text.xofs sub } { menu.text.xofs } ifelse add - y menu.text.yofs add moveto - menu.texts exch menu.shift add get menuitemmap - currentfont exch font.large setfont show.rtl setfont - /y y menu.item.height add def + /idx_tmp1 over def + x y moveto currentpoint menu.bar.width.old menu.bar.height image + x config.rtl { menu.bar.width menu.text.xofs sub } { menu.text.xofs } ifelse add + y menu.text.yofs add moveto + menu.texts exch menu.shift add get menuitemmap + currentfont exch font.large setfont show.rtl setfont + + x y moveto idx_tmp1 menu.shift add show.submenu.tag + + /y y menu.item.height add def } for + menu.visible.entries menu.max.entries lt { + menu.visible.entries 1 menu.max.entries 1 sub { + x y moveto currentpoint menu.bar.width.old menu.bar.height image + /y y menu.item.height add def + } for + } if } def @@ -271,6 +284,7 @@ } ifelse moveto + currentpoint config.rtl { menu.bar.width menu.text.xofs sub } { menu.text.xofs } ifelse menu.text.yofs rmoveto menu.status { @@ -282,6 +296,9 @@ menu.texts menu.idx get menuitemmap menu.status { config.talk { dup speak } if } if currentfont exch font.large setfont show.rtl setfont + moveto + + menu.idx show.submenu.tag menu.status { % init boot options @@ -317,6 +334,25 @@ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Show little arrow symbol indicating a submenu entry. +% +% ( menu_idx ) ==> ( ) +/show.submenu.tag { + menu.args exch get submenu.tag strstr 1 eq { + config.rtl { + menu.text.xofs menu.text.yofs rmoveto + "\u25c0" + } { + menu.bar.width menu.text.xofs sub "\u25b6" strsize pop sub + menu.text.yofs rmoveto + "\u25b6" + } ifelse + show + } if +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % Draw main window. % % ( window ) ==> ( ) @@ -324,8 +360,7 @@ /main.show { window.push - /menu.shift 0 def - /menu.visible.entries menu.texts length menu.max.entries min def + main.recalc % get index of default entry /menu.entry 0 def @@ -333,10 +368,6 @@ dup menu.texts exch get menu.dentry eq { /menu.entry exch def exit } { pop } ifelse } for - menu.entry menu.visible.entries sub 0 ge { - /menu.shift menu.entry menu.texts length menu.visible.entries sub min def - } if - boot.text.options setcolor window.current .font get setfont @@ -390,6 +421,20 @@ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Re-calculate basic menu layout data. +% +% ( ) ==> ( ) +/main.recalc { + /menu.shift 0 def + + /menu.visible.entries menu.texts length menu.max.entries min def + + menu.entry menu.visible.entries sub 0 ge { + /menu.shift menu.entry menu.texts length menu.visible.entries sub min def + } if +} def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % Split command line into hidden and normal part. % % ( edit_object ) == > ( ) @@ -428,7 +473,14 @@ pop 0 } if - dup keyEsc eq { exit_popup pop 0 } if + dup keyEsc eq { + submenu.current { + /window.action actExit def + } { + exit_popup + } ifelse + pop 0 + } if dup keyEnter eq { /window.action actStart def diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/themes/openSUSE/src/submenu.inc new/themes/openSUSE/src/submenu.inc --- old/themes/openSUSE/src/submenu.inc 1970-01-01 01:00:00.000000000 +0100 +++ new/themes/openSUSE/src/submenu.inc 2015-11-12 13:49:37.000000000 +0100 @@ -0,0 +1,122 @@ +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% +% Submenu handling. +% +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +% submenu entries are entries that have a label starting with '->FOO ' (note +% the space) where FOO is an arbitrary string identifying the submenu. +% +% Menu entries that have an 'append' entry '->BAR' link to submenu BAR. +% +% As there are spaces in labels required to make this work, use the 'menu +% label' statement in syslinux. + +% submenu entries must start with this string, followed by an arbitrary identifier +/submenu.tag "->" def + +% submenus are stacked here +/submenu.list 16 array def +/submenu.list.index 0 def + +% the current submenu +/submenu.current .undef def + +% array mapping submenu indices to global menu indices +/submenu.menuidx.list [ ] def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Enter submenu. +% +% ( submenu_label ) ==> ( ) +% +/submenu.enter { + submenu.list.index submenu.list length ge { pop return } if + + % append space + dup length 1 add string exch "%s " 2 index sprintf + + /submenu.current over def + submenu.list submenu.list.index rot put + /submenu.list.index submenu.list.index 1 add def +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Leave submenu. +% +% ( ) ==> ( submenu_label ) +% +/submenu.leave { + submenu.list.index 0 eq { .undef return } if + /submenu.list.index submenu.list.index 1 sub def + submenu.list submenu.list.index get + submenu.list submenu.list.index .undef put + /submenu.current + submenu.list.index 0 eq { .undef } { submenu.list submenu.list.index 1 sub get } ifelse + def +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Create menu.texts and menu.args from orig.menu.texts and orig.menu.args. +% +% ( ) ==> ( ) +% +/submenu.build { + /menu.texts [ + 0 1 orig.menu.texts length 1 sub { + dup submenu.showentry { + orig.menu.texts exch get + } { pop } ifelse + } for + ] def + + /menu.args [ + 0 1 orig.menu.args length 1 sub { + dup submenu.showentry { + orig.menu.args exch get + } { pop } ifelse + } for + ] def + + /submenu.menuidx.list [ + 0 1 orig.menu.texts length 1 sub { + dup submenu.showentry not { pop } if + } for + ] def +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Determine if this entry should be shown (i.e. is in current submenu). +% +% ( entry_idx ) ==> ( true|false ) +% +/submenu.showentry { + /sm_idx exch def + sm_idx orig.menu.texts length lt { + orig.menu.texts sm_idx get + submenu.current { + submenu.current strstr 1 eq + } { + submenu.tag strstr 1 ne + } ifelse + } { + false + } ifelse +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Map current submenu index to global menu index. +% (Needed to tell the bootloader where we are.) +% +% ( submenu_idx ) ==> ( menu_idx ) +% +/submenu.menuidx { + dup submenu.menuidx.list length lt { + submenu.menuidx.list exch get + } if +} def + ++++++ upstream.tar.xz ++++++