Your message dated Tue, 08 Feb 2011 17:04:37 +0100
with message-id <1297181077.3023.0.camel@alexander>
and subject line Re: Bug#561923: grub-pc: Automatically convert background 
images to suitable format
has caused the Debian Bug report #561923,
regarding [grub-pc] automaticlly add right size of splashimages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
561923: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561923
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: grub-pc
Version: 1.98~20100101-1
Severity: wishlist
Tags: patch

Hello,
I have created a patch, so update-grub will automaticly create a splashimage 
of the size, that is set in /etc/default/grub.
Should I send this patch to the grub developers?

hefee


--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.32-2.slh.4-sidux-686

Debian Release: squeeze/sid
  500 unstable/snapshots stable unofficial.debian-maintainers.org 
  500 unstable        www.debian-multimedia.org 
  500 unstable        sidux.wuertz.org 
  500 unstable        sidux.com 
  500 unstable        ftp.debian.org 
  500 unstable        deb.opera.com 
  500 testing         ftp.debian.org 
  500 stable/backports stable unofficial.debian-maintainers.org 
    1 experimental    ftp.debian.org 

--- Package information. ---
Depends                   (Version) | Installed
===================================-+-====================
libc6                      (>= 2.3) | 2.10.2-3
debconf                   (>= 0.5)  | 1.5.28
 OR debconf-2.0                     | 
grub-common     (= 1.98~20100101-1) | 1.98~20100101-1
ucf                                 | 3.0025


Package's Recommends field is empty.

Suggests          (Version) | Installed
===========================-+-===========
desktop-base     (>= 4.0.6) | 



--- Output from package bug script ---

*********************** BEGIN /proc/mounts
/dev/mapper/vg-root / ext4 rw,noatime,errors=remount-ro,barrier=0,data=ordered 
0 0
/dev/sda1 /boot ext2 rw,noatime,errors=continue 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0) /dev/sda
*********************** END /boot/grub/device.map

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

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=1024x768
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
set locale_dir=/boot/grub/locale
set lang=de
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
insmod tga
if background_image /grub/splashimages/Hortensia-1-1024x768.tga ; then
  set color_normal=black/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.32-2.slh.4-sidux-686" {
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
        linux   //vmlinuz-2.6.32-2.slh.4-sidux-686 root=/dev/mapper/vg-root ro 
quiet 
vga=794 quiet
        initrd  //initrd.img-2.6.32-2.slh.4-sidux-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.32-2.slh.4-sidux-686 (recovery 
mode)" {
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set b8fd11ee-24b7-4495-8fff-280f9e7ac06a
        linux   //vmlinuz-2.6.32-2.slh.4-sidux-686 root=/dev/mapper/vg-root ro 
single 
quiet vga=794
        initrd  //initrd.img-2.6.32-2.slh.4-sidux-686
}
### END /etc/grub.d/10_linux ###

### 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 ###
*********************** END /boot/grub/grub.cfg
--- /etc/grub.d/05_debian_theme	2010-01-04 16:59:42.123993633 +0100
+++ /etc/grub.d/05_debian_theme.new	2010-01-04 16:31:47.916994483 +0100
@@ -4,6 +4,7 @@
 
 # this allows desktop-base to override our settings
 f=/usr/share/desktop-base/grub_background.sh
+WALLPAPER_PATH=/boot/grub/splashimages/
 if test -e ${f} ; then
   source ${f}
 else
@@ -23,7 +24,12 @@
 # check for usable backgrounds
 use_bg=false
 if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
-  for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
+ if [ ! -e ${WALLPAPER_PATH}`basename ${WALLPAPER}` ] &&  [ ! `is_path_readable_by_grub ${WALLPAPER}` ] ; then
+  	echo "File is not readable by grub -> copying file to ${WALLPAPER_PATH}" >&2
+	mkdir -p ${WALLPAPER_PATH}
+  	cp ${WALLPAPER} ${WALLPAPER_PATH}`basename ${WALLPAPER}`
+  fi
+  for i in ${WALLPAPER_PATH}`basename ${WALLPAPER}` ${WALLPAPER}; do
     if is_path_readable_by_grub $i ; then 
       bg=$i
       case ${bg} in
@@ -43,6 +49,17 @@
 # set the background if possible
 if ${use_bg} ; then
   prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
+
+  #resize the image, if nessesary
+  if [ "x${GRUB_GFXRESIZE}" != "x" ]; then 
+  	extension="${bg##*.}"
+  	newname=${WALLPAPER_PATH}/`basename ${bg} .${extension}`-${GRUB_GFXMODE}.${extension}
+  	if [ ! -e ${newname} ] ; then
+ 		echo "resizing splashimage...">&2
+		convert ${bg} -resize ${GRUB_GFXMODE}! ${newname}
+	fi
+	bg=${newname}
+  fi
   cat << EOF
 insmod ${reader}
 if background_image `make_system_path_relative_to_its_root ${bg}` ; then
--- /etc/default/grub	2010-01-04 17:01:42.231995940 +0100
+++ /etc/default/grub.new	2010-01-04 17:02:58.290995324 +0100
@@ -20,3 +20,7 @@
 
 # Uncomment to disable generation of recovery mode menu entries
 #GRUB_DISABLE_LINUX_RECOVERY="true"
+
+#Resizing the splashimage, if one is available to the right size
+#needs the command `convert`
+#GRUB_GFXRESIZE=true
--- /usr/sbin/grub-mkconfig	2010-01-01 12:13:03.000000000 +0100
+++ /usr/sbin/grub-mkconfig.new	2010-01-04 16:33:01.603994215 +0100
@@ -220,6 +220,7 @@
   GRUB_DISABLE_LINUX_UUID \
   GRUB_DISABLE_LINUX_RECOVERY \
   GRUB_GFXMODE \
+  GRUB_GFXRESIZE \
   GRUB_DISABLE_OS_PROBER
 
 if test "x${grub_cfg}" != "x"; then

--- End Message ---
--- Begin Message ---
Version: 1.98-1

Am Donnerstag, den 27.01.2011, 10:48 +0100 schrieb Alexander Kurtz: 
> Am Mittwoch, den 26.01.2011, 14:36 +0000 schrieb Colin Watson:
> > My main concern is that in future I want GRUB_GFXMODE to be dynamic,
> > detected from VBE at boot time (it's already this way in Ubuntu).  This
> > means that userspace wouldn't know what size to convert to.
> 
> That's a valid argument against doing automatic conversions. I've got
> two more:
> 
>  a) Adding ImageMagick as an extra dependency would pull in over 100 
>     additional packages with a total size of over 50 MB. I don't think
>     this is desirable, especially as the benefit wouldn't be that large.
> 
>  b) Adding support for using ImageMagick to 05_debian_theme only if
>     available would make the code much more complicated and add a 
>     number of special cases. Consider the following example:
> 
>     The background image is directly readable by GRUB: Normally no 
>     caching would be necessary, but if you have ImageMagick installed 
>     the picture would be automatically converted and stored 
>     under /boot/grub/. This may be useful in some cases, however
>     if GRUB could have read the picture without any extra conversion
>     this is just a waste of (possible precious) disk space. Consequently
>     we would have to add logic to determine whether converting the 
>     background image is useful. I really don't think that's the task of
>     a bootloader.
> 
> > Can't we do whatever conversion is needed at boot time instead?  GRUB
> > has some fairly sophisticated image processing facilities nowadays.
> 
> After doing some testing, I think that there are actually no conversions
> necessary. I've tested all the pictures from these paths
> 
>       /usr/share/backgrounds/cosmos/
>       /usr/share/images/desktop-base/
>       /usr/share/pixmaps/backgrounds/gnome/nature/
> 
> plus some private pictures from my digital camera. Apart from #611123[1]
> everything worked just fine - regardless of resolution or file format of
> the pictures.
> 
> IMHO this bug can be closed beginning with version 1.98-1 (this version
> added support for bitmap scaling). Any objections?

Since I didn't receive any objections, I'm closing this bug now. Feel
free to reopen if necessary!

Best regards

Alexander Kurtz

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


--- End Message ---

Reply via email to