Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
grub2 (1.98+20100804-11) unstable; urgency=low * Exit silently from zz-update-grub kernel hook if update-grub does not exist (e.g. if grub-pc has been removed but not purged; closes: #606184). * Apply debconf template review by debian-l10n-english and mark several more strings for translation, thanks to David Prévot and Justin B Rye (closes: #605748). * Unfuzzy some translations that were not updated in this round (thanks, David Prévot; closes: #606921). * Incorporate rewritten 05_debian_theme by Alexander Kurtz, which works when /usr is inaccessible by GRUB (closes: #605705). * Backport from upstream: - Recognise DDF1 DM-RAID (closes: #603354). [ Updated translations ] * Chinese (YunQiang Su). Closes: #606426 * Indonesian (Arief S Fitrianto). Closes: #606431 * Slovenian (Vanja Cvelbar). Closes: #606445 * Swedish (Martin Bagge / brother). Closes: #606455 * Ukrainian (Yatsenko Alexandr). Closes: #606538 * Basque (Iñaki Larrañaga Murgoitio). Closes: #606644 * Slovak (Slavko). Closes: #606663 * Catalan (Jordi Mallach). * Bulgarian (Damyan Ivanov). Closes: #606452 * Persian (Morteza Fakhraee). Closes: #606672 * Russian (Yuri Kozlov). Closes: #606753 * Dutch (Paul Gevers). Closes: #606807 * Japanese (Hideki Yamane). Closes: #606836 * French (Christian Perrier). Closes: #606842 * Czech (Miroslav Kure). Closes: #606854 * Spanish (Francisco Javier Cuadrado). Closes: #606903 * Portuguese (Tiago Fernandes / Miguel Figueiredo). Closes: #606908 * German (Martin Eberhard Schauer). Closes: #606896 -- Colin Watson <cjwat...@debian.org> Sat, 18 Dec 2010 17:20:09 +0000 This is a bit bigger than I had initially planned; sorry! Most of this is the template/translation changes agreed with / requested by the i18n team due to some debconf templates being visible but untranslated - see #605748 for the details. Here are the changes not covered by that, which IMO are RC: * Exit silently from zz-update-grub kernel hook if update-grub does not exist (e.g. if grub-pc has been removed but not purged; closes: #606184). Severity: critical (maybe ought to be grave since the kernel and grub2 are not exactly unrelated, but whatever) - can break kernel upgrades. === modified file 'debian/kernel/zz-update-grub' --- debian/kernel/zz-update-grub 2010-08-23 08:55:01 +0000 +++ debian/kernel/zz-update-grub 2010-12-07 09:51:33 +0000 @@ -1,6 +1,8 @@ #! /bin/sh set -e +which update-grub >/dev/null 2>&1 || exit 0 + set -- $DEB_MAINT_PARAMS mode="${1#\'}" mode="${mode%\'}" * Incorporate rewritten 05_debian_theme by Alexander Kurtz, which works when /usr is inaccessible by GRUB (closes: #605705). Severity: serious, set thus by me because this is the first thing users see every time they boot Debian. We should make sure that it is consistent, especially for partitioning layouts that are offered as standard in the installer. Unfortunately not trivial, but it's carefully written with lots of error handling and both Alexander and I have tested it; I've made sure to test it with both a plain partitioning layout and LVM/LUKS. === modified file 'debian/grub.d/05_debian_theme' --- debian/grub.d/05_debian_theme 2010-07-16 17:47:57 +0000 +++ debian/grub.d/05_debian_theme 2010-12-18 13:36:56 +0000 @@ -1,64 +1,134 @@ -#!/bin/sh -e +#!/bin/sh +set -e +# grub-mkconfig helper script. +# Copyright (C) 2010 Alexander Kurtz <kurtz.a...@googlemail.com> +# +# GRUB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GRUB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GRUB. If not, see <http://www.gnu.org/licenses/>. + +# Include the GRUB helper library for grub-mkconfig. . /usr/lib/grub/grub-mkconfig_lib -# this allows desktop-base to override our settings -f=/usr/share/desktop-base/grub_background.sh -if test -e ${f} ; then - . ${f} -else - WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png" - COLOR_NORMAL="black/black" - COLOR_HIGHLIGHT="magenta/black" -fi +# We want to work in /boot/grub/ only. +test -d "${GRUB_PREFIX}"; cd "${GRUB_PREFIX}" -set_blue_theme() -{ - cat << EOF -set menu_color_normal=cyan/blue -set menu_color_highlight=white/blue -EOF +# Set the location of a possibly necessary cache file for the background image. +# NOTE: This MUST BE A DOTFILE to avoid confusing it with user-defined images. +BACKGROUND_CACHE=".background_cache" + +set_default_theme(){ + # Set the traditional Debian blue theme. + echo "${1}set menu_color_normal=cyan/blue" + echo "${1}set menu_color_highlight=white/blue" } -# check for usable backgrounds -use_bg=false -for output in ${GRUB_TERMINAL_OUTPUT}; do - if [ "$output" = "gfxterm" ] ; then - for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do - if is_path_readable_by_grub $i ; then - bg=$i - case ${bg} in - *.png) reader=png ;; - *.tga) reader=tga ;; - *.jpg|*.jpeg) reader=jpeg ;; - esac - if test -e /boot/grub/${reader}.mod ; then - echo "Found background image: `basename ${bg}`" >&2 - use_bg=true - break - fi - fi - done - break - fi -done - -# set the background if possible -if ${use_bg} ; then - prepare_grub_to_access_device `${grub_probe} --target=device ${bg}` - cat << EOF -insmod ${reader} -if background_image `make_system_path_relative_to_its_root ${bg}` ; then - set color_normal=${COLOR_NORMAL} - set color_highlight=${COLOR_HIGHLIGHT} -else +set_background_image(){ + # Step #1: Search all available output modes ... + local output + for output in ${GRUB_TERMINAL_OUTPUT}; do + if [ "x$output" = "xgfxterm" ]; then + break + fi + done + + # ... and check if we are able to display a background image at all. + if ! [ "x${output}" = "xgfxterm" ]; then + return 1 + fi + + # Step #2: Check if the specified background image exists. + if ! [ -f "${1}" ]; then + return 2 + fi + + # Step #3: Search the correct GRUB module for our background image. + local reader + case "${1}" in + *.jpg|*.JPG|*.jpeg|*.JPEG) reader="jpeg";; + *.png|*.PNG) reader="png";; + *.tga|*.TGA) reader="tga";; + *) return 3;; # Unknown image type. + esac + + # Step #4: Check if the necessary GRUB module is available. + if ! [ -f "${reader}.mod" ]; then + return 4 + fi + + # Step #5: Check if GRUB can read the background image directly. + # If so, we can remove the cache file (if any). Otherwise the backgound + # image needs to be cached under /boot/grub/. + if is_path_readable_by_grub "${1}"; then + rm --force "${BACKGROUND_CACHE}.jpeg" \ + "${BACKGROUND_CACHE}.png" "${BACKGROUND_CACHE}.tga" + elif cp "${1}" "${BACKGROUND_CACHE}.${reader}"; then + set -- "${BACKGROUND_CACHE}.${reader}" "${2}" "${3}" + else + return 5 + fi + + # Step #6: Prepare GRUB to read the background image. + if ! prepare_grub_to_access_device "`${grub_probe} --target=device "${1}"`"; then + return 6 + fi + + # Step #7: Everything went fine, print out a message to stderr ... + echo "Found background image: ${1}" >&2 + + # ... and write our configuration snippet to stdout. Use the colors + # desktop-base specified. If we're using a user-defined background, use + # the default colors since we've got no idea how the image looks like. + # If loading the background image fails, use the default theme. + echo "insmod ${reader}" + echo "if background_image `make_system_path_relative_to_its_root "${1}"`; then" + echo " set color_normal=${2:-black/black}" + echo " set color_highlight=${3:-magenta/black}" + echo "else" + set_default_theme " " + echo "fi" +} + +# Earlier versions of grub-pc copied the default background image to /boot/grub +# during postinst. Remove those obsolete images if they haven't been touched by +# the user. They are still available under /usr/share/images/desktop-base/ if +# desktop-base is installed. +while read checksum background; do + if [ -f "${background}" ] && [ "x`sha1sum "${background}"`" = "x${checksum} ${background}" ]; then + echo "Removing old background image: ${background}" >&2 + rm "${background}" + fi +done <<EOF +648ee65dd0c157a69b019a5372cbcfea4fc754a5 debian-blueish-wallpaper-640x480.png +0431e97a6c661084c59676c4baeeb8c2f602edb8 debian-blueish-wallpaper-640x480.png +968ecf6696c5638cfe80e8e70aba239526270864 debian-blueish-wallpaper-640x480.tga +11143e8c92a073401de0b0fd42d0c052af4ccd9b moreblue-orbit-grub.png +d00d5e505ab63f2d53fa880bfac447e2d3bb197c moreblue-orbit-grub.png +f5b12c1009ec0a3b029185f6b66cd0d7e5611019 moreblue-orbit-grub.png EOF -fi -# otherwise, set the traditional Debian blue theme -if ${use_bg} ; then - set_blue_theme | sed -e "s/^/ /g" - echo "fi" -else - set_blue_theme +# Include the configuration of desktop-base if available. +if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then + . "/usr/share/desktop-base/grub_background.sh" fi + +# First check whether the user has specified a background image explicitly. +# Next search for pictures the user put into /boot/grub/ and use the first one. +# 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 "`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" || +set_default_theme === modified file 'debian/postinst.in' --- debian/postinst.in 2010-08-04 02:45:47 +0000 +++ debian/postinst.in 2010-12-18 13:36:56 +0000 @@ -571,7 +571,7 @@ case "$1" in # /boot/grub/ has more chances of being accessible by GRUB if test -e /boot/grub/grub.cfg ; then - for i in /usr/share/grub/unicode.pf2 /usr/share/images/desktop-base/moreblue-orbit-grub.png ; do + for i in /usr/share/grub/unicode.pf2 ; do if test -e $i ; then cp $i /boot/grub/ fi === modified file 'debian/postrm.in' --- debian/postrm.in 2010-07-13 02:39:10 +0000 +++ debian/postrm.in 2010-12-18 13:36:56 +0000 @@ -23,7 +23,7 @@ case "$1" in db_go || true db_get grub-pc/postrm_purge_boot_grub || true if [ "$RET" = "true" ] ; then - rm -f /boot/grub/{grub.cfg,ascii.pf2,unicode.pf2,moreblue-orbit-grub.png,*.mod,*.lst,*.img,efiemu32.o,efiemu64.o,device.map,grubenv,installed-version} || true + rm -f /boot/grub/{grub.cfg,ascii.pf2,unicode.pf2,moreblue-orbit-grub.png,*.mod,*.lst,*.img,efiemu32.o,efiemu64.o,device.map,grubenv,installed-version,.background_cache.jpeg,.background_cache.png,.background_cache.tga} || true rm -rf /boot/grub/locale rmdir --ignore-fail-on-non-empty /boot/grub || true fi * Backport from upstream: - Recognise DDF1 DM-RAID (closes: #603354). Severity: serious, set thus by me; tiny patch enabling support for the last piece of DM-RAID metadata not handled by GRUB. === added file 'debian/patches/ddf1_fakeraid.patch' --- debian/patches/ddf1_fakeraid.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/ddf1_fakeraid.patch 2010-12-18 17:15:51 +0000 @@ -0,0 +1,19 @@ +Description: Recognise DDF1 DM-RAID +Author: Modestas Vainius <mo...@debian.org> +Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/2946 +Forwarded: yes +Last-Update: 2010-12-18 + +Index: b/kern/emu/getroot.c +=================================================================== +--- a/kern/emu/getroot.c ++++ b/kern/emu/getroot.c +@@ -569,6 +569,8 @@ + return 1; + else if (! strncmp (os_dev, "/dev/mapper/sil_", 16)) + return 1; ++ else if (! strncmp (os_dev, "/dev/mapper/ddf1_", 17)) ++ return 1; + + return 0; + } === modified file 'debian/patches/series' --- debian/patches/series 2010-11-30 18:41:15 +0000 +++ debian/patches/series 2010-12-18 17:15:51 +0000 @@ -28,3 +28,4 @@ refuse_embedingless_cross_disk.patch fix_grub_install_error_msg.patch message_refresh.patch fix_crash_condition_in_kfreebsd_loader.patch +ddf1_fakeraid.patch Thanks, -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org