Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2016-11-23 13:36:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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        
2016-11-15 17:53:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2016-11-23 13:36:34.000000000 +0100
@@ -1,0 +2,21 @@
+Tue Nov 22 18:38:42 UTC 2016 - jreidin...@suse.com
+
+- Do not crash in bootloader when default mount by is set to label
+  (bsc#1009493)
+- 3.2.10
+
+-------------------------------------------------------------------
+Tue Nov 22 13:41:42 UTC 2016 - jreidin...@suse.com
+
+- use proper sources when doing kexec (bsc#981434)
+- 3.2.9
+
+-------------------------------------------------------------------
+Wed Nov 16 14:19:14 UTC 2016 - jreidin...@suse.com
+
+- when protecting modification of kernel parameters by password,
+  add also rd.shell=0 parameter to avoid getting into initrd shell
+  (bsc#1009220)
+- 3.2.8
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-3.2.7.tar.bz2

New:
----
  yast2-bootloader-3.2.10.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.tFD15y/_old  2016-11-23 13:36:35.000000000 +0100
+++ /var/tmp/diff_new_pack.tFD15y/_new  2016-11-23 13:36:35.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.2.7
+Version:        3.2.10
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-bootloader-3.2.7.tar.bz2 -> yast2-bootloader-3.2.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/package/yast2-bootloader.changes 
new/yast2-bootloader-3.2.10/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.2.7/package/yast2-bootloader.changes 2016-11-14 
16:12:49.000000000 +0100
+++ new/yast2-bootloader-3.2.10/package/yast2-bootloader.changes        
2016-11-22 18:38:57.000000000 +0100
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Tue Nov 22 18:38:42 UTC 2016 - jreidin...@suse.com
+
+- Do not crash in bootloader when default mount by is set to label
+  (bsc#1009493)
+- 3.2.10
+
+-------------------------------------------------------------------
+Tue Nov 22 13:41:42 UTC 2016 - jreidin...@suse.com
+
+- use proper sources when doing kexec (bsc#981434)
+- 3.2.9
+
+-------------------------------------------------------------------
+Wed Nov 16 14:19:14 UTC 2016 - jreidin...@suse.com
+
+- when protecting modification of kernel parameters by password,
+  add also rd.shell=0 parameter to avoid getting into initrd shell
+  (bsc#1009220)
+- 3.2.8
+
+-------------------------------------------------------------------
 Mon Nov 14 14:21:16 UTC 2016 - lsle...@suse.cz
 
 - Revert the package deselection check (from 3.2.3), there is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/package/yast2-bootloader.spec 
new/yast2-bootloader-3.2.10/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.2.7/package/yast2-bootloader.spec    2016-11-14 
16:12:49.000000000 +0100
+++ new/yast2-bootloader-3.2.10/package/yast2-bootloader.spec   2016-11-22 
18:38:57.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.2.7
+Version:        3.2.10
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/src/lib/bootloader/grub2_widgets.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/grub2_widgets.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/grub2_widgets.rb      
2016-11-14 16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/grub2_widgets.rb     
2016-11-22 18:38:57.000000000 +0100
@@ -2,6 +2,7 @@
 
 require "bootloader/generic_widgets"
 require "bootloader/device_map_dialog"
+require "cfa/matcher"
 
 Yast.import "BootStorage"
 Yast.import "Initrd"
@@ -409,6 +410,8 @@
 
     def store
       usepass = Yast::UI.QueryWidget(Id(:use_pas), :Value)
+      matcher = CFA::Matcher.new(key: "rd.shell")
+      grub_default.kernel_params.remove_parameter(matcher)
       if !usepass
         password.used = false
         return
@@ -421,6 +424,7 @@
       password.password = value if value != MASKED_PASSWORD
 
       value = Yast::UI.QueryWidget(Id(:unrestricted_pw), :Value)
+      grub_default.kernel_params.add_parameter("rd.shell", "0") if value
       password.unrestricted = value
     end
 
@@ -430,7 +434,9 @@
           "At boot time, modifying or even booting any entry will require the" 
\
           " password. If <b>Protect Entry Modification Only</b> is checked 
then " \
           "booting any entry is not restricted but modifying entries requires 
" \
-          "the password (which is the way GRUB 1 behaved).<br>" \
+          "the password (which is the way GRUB 1 behaved). As side-effect of " 
\
+          "this option, rd.shell=0 is added to kernel parameters, to prevent " 
\
+          "an unauthorized access to the initrd shell.<br>" \
           "YaST will only accept the password if you repeat it in " \
           "<b>Retype Password</b>. The password applies to the GRUB2 user 
'root' " \
           "which is distinct from the Linux 'root'. YaST currently does not 
support" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/src/lib/bootloader/kexec.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/kexec.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/kexec.rb      2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/kexec.rb     2016-11-22 
18:38:57.000000000 +0100
@@ -99,8 +99,8 @@
       cmd = Yast::Builtins.sformat(
         "/bin/cp -L %1/%2 %1/%3 %4",
         Yast::Installation.destdir,
-        "vmlinuz",
-        "initrd",
+        "boot/vmlinuz",
+        "boot/initrd",
         Yast::Directory.vardir
       )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/src/lib/bootloader/sections.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/sections.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/sections.rb   2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/sections.rb  2016-11-22 
18:38:57.000000000 +0100
@@ -32,7 +32,7 @@
     end
 
     # Sets default section internally.
-    # @param [String] new boot title to boot
+    # @param [String] value of new boot title to boot
     # @note to write it to system use #write later
     def default=(value)
       log.info "set new default to '#{value.inspect}'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/src/lib/bootloader/stage1_device.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/stage1_device.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/stage1_device.rb      
2016-11-14 16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/stage1_device.rb     
2016-11-22 18:38:57.000000000 +0100
@@ -24,7 +24,7 @@
       @intended_device = device
     end
 
-    # @returns [Array<String>] list of devices where stage1 need to be 
installed
+    # @return [Array<String>] list of devices where stage1 need to be installed
     # to fit the best intended device. Devices used kernel device names, so no
     # udev names
     def real_devices
@@ -40,7 +40,7 @@
   private
 
     # underlaying_devices without any caching
-    # @see {#underlaying_devices}
+    # @see #underlaying_devices
     def underlaying_devices_for(dev)
       res = underlaying_devices_one_level(dev)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/src/lib/bootloader/stage1_proposal.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/stage1_proposal.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/stage1_proposal.rb    
2016-11-14 16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/stage1_proposal.rb   
2016-11-22 18:38:57.000000000 +0100
@@ -9,7 +9,7 @@
 module Bootloader
   # Represents object that can set passed stage1 to proposed values.
   # It is highly coupled with Stage1 class and it is recommended to use
-  # {Stage1#proposal} instead of direct usage of this class.
+  # {Bootloader::Stage1#propose} instead of direct usage of this class.
   class Stage1Proposal
     include Yast::Logger
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.2.7/src/lib/bootloader/udev_mapping.rb 
new/yast2-bootloader-3.2.10/src/lib/bootloader/udev_mapping.rb
--- old/yast2-bootloader-3.2.7/src/lib/bootloader/udev_mapping.rb       
2016-11-14 16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/lib/bootloader/udev_mapping.rb      
2016-11-22 18:38:57.000000000 +0100
@@ -56,6 +56,12 @@
       # explicit request to mount by kernel device
       return kernel_dev if mount_by == :device
 
+      disk = Yast::Storage.GetTargetMap.key?(kernel_dev)
+      if disk && mount_by == :label
+        log.info "mount by label for disk, so using kernel device as fallback"
+        return kernel_dev
+      end
+
       udev_data_key = MOUNT_BY_MAPPING_TO_UDEV[mount_by]
       raise "Internal error unknown mountby #{mount_by}" unless udev_data_key
       udev_pair = map_device_to_udev_devices(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/src/modules/Bootloader.rb 
new/yast2-bootloader-3.2.10/src/modules/Bootloader.rb
--- old/yast2-bootloader-3.2.7/src/modules/Bootloader.rb        2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/src/modules/Bootloader.rb       2016-11-22 
18:38:57.000000000 +0100
@@ -300,7 +300,7 @@
     # Gets value for given parameter in kernel parameters for given flavor.
     # @param [Symbol] flavor flavor of kernel, for possible values see 
#modify_kernel_param
     # @param [String] key of parameter on kernel command line
-    # @returns [String,:missing,:present] Returns string for parameters with 
value,
+    # @return [String,:missing,:present] Returns string for parameters with 
value,
     #   `:missing` if key is not there and `:present` for parameters without 
value.
     #
     # @example get crashkernel parameter to common kernel
@@ -457,9 +457,8 @@
 
     NONSPLASH_VGA_VALUES = ["", "false", "ask"].freeze
 
-    # store new vgamode if needed and regenerate initrd in such case
-    # @param params_to_save used to store predefined vgamode value
-    # @return boolean if succeed
+    # regenerates initrd if needed
+    # @return boolean true if succeed
     def write_initrd
       return true unless Initrd.changed
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/test/data/grub.cfg 
new/yast2-bootloader-3.2.10/test/data/grub.cfg
--- old/yast2-bootloader-3.2.7/test/data/grub.cfg       1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-bootloader-3.2.10/test/data/grub.cfg      2016-11-22 
18:38:57.000000000 +0100
@@ -0,0 +1,211 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+if [ -f ${config_directory}/grubenv ]; then
+  load_env -f ${config_directory}/grubenv
+elif [ -s $prefix/grubenv ]; then
+  load_env
+fi
+
+if [ "${env_block}" ] ; then
+  load_env -f "${env_block}"
+fi
+
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   if [ "${env_block}" ] ; then
+     save_env -f "${env_block}" next_entry
+   fi
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+if [ x$feature_default_font_path = xy ] ; then
+   font=unicode
+else
+insmod part_msdos
+insmod ext2
+set root='hd0,msdos1'
+if [ x$feature_platform_search_hint = xy ]; then
+  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+else
+  search --no-floppy --fs-uuid --set=root b66c1028-cd4a-4c08-b92d-fc4b9840845d
+fi
+    font="/usr/share/grub2/unicode.pf2"
+fi
+
+if loadfont $font ; then
+  set gfxmode=auto
+  load_video
+  insmod gfxterm
+  set locale_dir=$prefix/locale
+  set lang=ru_RU
+  insmod gettext
+fi
+terminal_output gfxterm
+insmod part_msdos
+insmod ext2
+set root='hd0,msdos1'
+if [ x$feature_platform_search_hint = xy ]; then
+  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+else
+  search --no-floppy --fs-uuid --set=root b66c1028-cd4a-4c08-b92d-fc4b9840845d
+fi
+insmod gfxmenu
+loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
+loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
+loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
+loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
+insmod png
+set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
+export theme
+if [ x${boot_once} = xtrue ]; then
+  set timeout=0
+elif [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=8
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=8
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/00_tuned ###
+set tuned_params=""
+### END /etc/grub.d/00_tuned ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'openSUSE Tumbleweed'  --class opensuse --class gnu-linux --class 
gnu --class os $menuentry_id_option 
'gnulinux-simple-b66c1028-cd4a-4c08-b92d-fc4b9840845d' {
+       load_video
+       set gfxpayload=keep
+       insmod gzio
+       insmod part_msdos
+       insmod ext2
+       set root='hd0,msdos1'
+       if [ x$feature_platform_search_hint = xy ]; then
+         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+       else
+         search --no-floppy --fs-uuid --set=root 
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+       fi
+       echo    'Загружается Linux 4.8.6-2-default …'
+       linux   /boot/vmlinuz-4.8.6-2-default 
root=UUID=b66c1028-cd4a-4c08-b92d-fc4b9840845d  splash=silent quiet showopts 
elevator=cfq
+       echo    'Загружается начальный виртуальный диск …'
+       initrd  /boot/initrd-4.8.6-2-default
+}
+submenu 'Дополнительные параметры для openSUSE Tumbleweed' --hotkey=1 
$menuentry_id_option 'gnulinux-advanced-b66c1028-cd4a-4c08-b92d-fc4b9840845d' {
+       menuentry 'openSUSE Tumbleweed, с Linux 4.8.6-2-default' --hotkey=2 
--class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.8.6-2-default-advanced-b66c1028-cd4a-4c08-b92d-fc4b9840845d' {
+               load_video
+               set gfxpayload=keep
+               insmod gzio
+               insmod part_msdos
+               insmod ext2
+               set root='hd0,msdos1'
+               if [ x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root 
--hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 
--hint='hd0,msdos1'  b66c1028-cd4a-4c08-b92d-fc4b9840845d
+               else
+                 search --no-floppy --fs-uuid --set=root 
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+               fi
+               echo    'Загружается Linux 4.8.6-2-default …'
+               linux   /boot/vmlinuz-4.8.6-2-default 
root=UUID=b66c1028-cd4a-4c08-b92d-fc4b9840845d  splash=silent quiet showopts 
elevator=cfq
+               echo    'Загружается начальный виртуальный диск …'
+               initrd  /boot/initrd-4.8.6-2-default
+       }
+       menuentry 'openSUSE Tumbleweed, с Linux 4.8.6-1-default'  --class 
opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.8.6-1-default-advanced-b66c1028-cd4a-4c08-b92d-fc4b9840845d' {
+               load_video
+               set gfxpayload=keep
+               insmod gzio
+               insmod part_msdos
+               insmod ext2
+               set root='hd0,msdos1'
+               if [ x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root 
--hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 
--hint='hd0,msdos1'  b66c1028-cd4a-4c08-b92d-fc4b9840845d
+               else
+                 search --no-floppy --fs-uuid --set=root 
b66c1028-cd4a-4c08-b92d-fc4b9840845d
+               fi
+               echo    'Загружается Linux 4.8.6-1-default …'
+               linux   /boot/vmlinuz-4.8.6-1-default 
root=UUID=b66c1028-cd4a-4c08-b92d-fc4b9840845d  splash=silent quiet showopts 
elevator=cfq
+               echo    'Загружается начальный виртуальный диск …'
+               initrd  /boot/initrd-4.8.6-1-default
+       }
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_memtest86+ ###
+### END /etc/grub.d/20_memtest86+ ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
+
+### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###
+### END /etc/grub.d/80_suse_btrfs_snapshot ###
+
+### BEGIN /etc/grub.d/90_persistent ###
+### END /etc/grub.d/90_persistent ###
+
+### BEGIN /etc/grub.d/95_textmode ###
+### END /etc/grub.d/95_textmode ###
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/test/grub2_widgets_test.rb 
new/yast2-bootloader-3.2.10/test/grub2_widgets_test.rb
--- old/yast2-bootloader-3.2.7/test/grub2_widgets_test.rb       2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/test/grub2_widgets_test.rb      2016-11-22 
18:38:57.000000000 +0100
@@ -411,6 +411,15 @@
 
         expect(bootloader.password.used).to eq false
       end
+
+      it "removes rd.shell parameter from kernel command line" do
+        allow(Yast::UI).to receive(:QueryWidget).with(Id(:use_pas), 
:Value).and_return(false)
+        bootloader.grub_default.kernel_params.add_parameter("rd.shell", "0")
+
+        subject.store
+
+        expect(bootloader.grub_default.kernel_params.parameter("rd.shell")).to 
eq false
+      end
     end
 
     context "use password checkbox checked" do
@@ -445,6 +454,13 @@
         expect(bootloader.password).to receive(:password=).with("pwd")
         subject.store
       end
+
+      it "adds rd.shell=0 parameter to kernel command line if unrestricted 
mode is used" do
+        expect(Yast::UI).to receive(:QueryWidget).with(Id(:unrestricted_pw), 
:Value).and_return(true)
+        subject.store
+
+        expect(bootloader.grub_default.kernel_params.parameter("rd.shell")).to 
eq "0"
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/test/sections_test.rb 
new/yast2-bootloader-3.2.10/test/sections_test.rb
--- old/yast2-bootloader-3.2.7/test/sections_test.rb    2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/test/sections_test.rb   2016-11-22 
18:38:57.000000000 +0100
@@ -1,8 +1,10 @@
 #! /usr/bin/env rspec --format doc
+# encoding: utf-8
 
 require_relative "./test_helper"
 
 require "bootloader/sections"
+require "cfa/memory_file"
 
 describe Bootloader::Sections do
   subject do
@@ -50,6 +52,24 @@
 
       expect(subject.default).to eq "windows"
     end
+
+    it "raises exception if section do not exists" do
+      expect { subject.default = "non-exist" }.to raise_error(RuntimeError)
+    end
+
+    # disabled as failing on older ruby
+    #    it "handles localized grub.cfg" do
+    #      data_path = File.expand_path("../data/grub.cfg", __FILE__)
+    #      file = CFA::MemoryFile.new(File.read(data_path))
+    #      grub_cfg = CFA::Grub2::GrubCfg.new(file_handler: file)
+    #      grub_cfg.load
+    #
+    #      sections = Bootloader::Sections.new(grub_cfg)
+    #
+    #      expect { sections.default = "openSUSE Tumbleweed, с Linux 
4.8.6-2-default" }.to_not raise_error
+    #      expect { sections.default = "openSUSE Tumbleweed, \u0441 Linux 
4.8.6-2-default" }.to_not raise_error
+    #      expect { sections.default = "openSUSE Tumbleweed, \xD1\x81 Linux 
4.8.6-2-default" }.to_not raise_error
+    #    end
   end
 
   describe "#write" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.2.7/test/udev_mapping_test.rb 
new/yast2-bootloader-3.2.10/test/udev_mapping_test.rb
--- old/yast2-bootloader-3.2.7/test/udev_mapping_test.rb        2016-11-14 
16:12:50.000000000 +0100
+++ new/yast2-bootloader-3.2.10/test/udev_mapping_test.rb       2016-11-22 
18:38:57.000000000 +0100
@@ -100,6 +100,13 @@
       expect(subject.to_mountby_device("/dev/vda1")).to eq "/dev/vda1"
     end
 
+    it "returns kernel device if mount by label is used for disk" do
+      target_map_stub("storage_dm.yaml")
+      expect(Yast::Storage).to receive(:GetDefaultMountBy).and_return(:label)
+
+      expect(subject.to_mountby_device("/dev/sda")).to eq "/dev/sda"
+    end
+
     it "returns its name if partition do not exists" do
       target_map_stub("storage_lvm.yaml")
       allow(Yast::Storage).to receive(:GetDefaultMountBy).and_return(:uuid)


Reply via email to