Bug#610273: grub-pc: 05_debian_theme ignores COLOR_NORMAL and COLOR_HIGHLIGHT

2011-01-25 Thread Alexander Kurtz
forcemerge 608283 610273
thanks

Am Montag, den 17.01.2011, 02:15 +0300 schrieb Rinat:
 if I specify GRUB_BACKGROUND, default menu color
 is set to black/black which completly unreadable (picture
 black there) even if I set COLOR_NORMAL and COLOR_HIGHLIGHT.
This was fixed in #608263[1].

 I can't change it by specifying parameters only in 
 /etc/default/grub, 05_debian_theme ignores my colors.
This is #608283[2].

BTW: Why do you think that $COLOR_NORMAL and $COLOR_HIGHLIGHT are the
correct variables for specifying custom color? There have been other
suggestions[3], but I think I will go with this [4].

Best regards

Alexander Kurtz

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608263
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608283
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608283#5
[4] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608283#50


signature.asc
Description: This is a digitally signed message part


Bug#610273: grub-pc: 05_debian_theme ignores COLOR_NORMAL and COLOR_HIGHLIGHT

2011-01-16 Thread Rinat
Package: grub-pc
Version: 1.98+20100804-13
Severity: minor
Tags: patch

For some reason I have to place background image for grub
on boot partition (root fs inaccessible before kernel load,
wierd hardware). I like spacefun theme and use it, but
found that if I specify GRUB_BACKGROUND, default menu color
is set to black/black which completly unreadable (picture
black there) even if I set COLOR_NORMAL and COLOR_HIGHLIGHT.

I can't change it by specifying parameters only in 
/etc/default/grub, 05_debian_theme ignores my colors.
I can't use WALLPAPER because it will be overwritten by
/usr/share/desktop-base/grub_background.sh.

So I ask you to apply following patch:

--- 05_debian_theme.old 2010-12-18 03:44:00.0 +0300
+++ 05_debian_theme 2011-01-17 01:23:51.0 +0300
@@ -127,7 +127,7 @@
 # Next try to use the background image and colors specified by desktop-base.
 # If we haven't found a background image yet, use the default from 
desktop-base.
 # Finally, if all of the above fails, use the default theme.
-set_background_image ${GRUB_BACKGROUND} ||
+set_background_image ${GRUB_BACKGROUND} ${COLOR_NORMAL} 
${COLOR_HIGHLIGHT} ||
 set_background_image `ls -1 *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA 
2/dev/null | head -1` ||
 set_background_image ${WALLPAPER} ${COLOR_NORMAL} ${COLOR_HIGHLIGHT} ||
 set_background_image /usr/share/images/desktop-base/desktop-grub.png ||


As you can see, it adds ability to set colors in /etc/default/grub
(and removes the need of changing 05_debian_theme by end user) but
preserved old behavior when COLOR_* not set.


-- Package-specific info:

*** BEGIN /proc/mounts
/dev/disk/by-uuid/f55501f4-9b81-40a6-ad97-996d0197b7e8 / reiserfs rw,noatime 0 0
/dev/sdb1 /boot ext2 rw,noatime,errors=continue 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/device.map
(hd0)   /dev/disk/by-id/ata-TOSHIBA_MK1231GAL_89OHWYT6W
(hd1)   /dev/disk/by-id/usb-JetFlash_TS2GJF160_MVB83UTD-0:0
(hd2)   /dev/disk/by-id/usb-_USB_DISK_Pro_0762102C0105-0:0
*** END /boot/grub/device.map

*** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default=0
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
insmod png
background_image -m stretch /images/spacefun-grub-widescreen.png
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
set locale_dir=($root)/grub/locale
set lang=ru
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
insmod png
if background_image /images/spacefun-grub-widescreen.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.37-rc5rinat' --class debian --class 
gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
echo'Loading Linux 2.6.37-rc5rinat ...'
linux   /vmlinuz-2.6.37-rc5rinat 
root=UUID=f55501f4-9b81-40a6-ad97-996d0197b7e8 ro  enable_mtrr_cleanup 
mtrr_spare_reg_nr=3
echo'Loading initial ramdisk ...'
initrd  /initrd.img-2.6.37-rc5rinat
}
menuentry 'Debian GNU/Linux, with Linux 2.6.37-rc5rinat (recovery mode)' 
--class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 78b52a36-ed60-4e75-87f1-b0a3a050e08a
echo'Loading Linux 2.6.37-rc5rinat ...'
linux   /vmlinuz-2.6.37-rc5rinat 
root=UUID=f55501f4-9b81-40a6-ad97-996d0197b7e8 ro single 
echo'Loading initial ramdisk ...'
initrd