tag 410362 + patch severity 410362 important thanks This patch fixes the problem by prompting the user to install the new elilo and warning that not doing so could result in an unbootable system. This way a dist-upgrade from sarge to etch will result in a bootable system w/o relying on elilo being unpacked before the linux-image package is configured.
Of course its still possible for someone to install a new linux-image w/o upgrading elilo, which will still leave the system unbootable. But, I really don't know how to solve that without adding a versioned dependency on elilo (which is currently just a Suggests today, consistent with the other archs I've checked). This patch also adds debconf support to elilo and, to make you super nervous, this is the first time I've debconfized a package. But, I was able to leverage a lot of it from the lilo package. Raising the severity to important because of the risk of leaving the system unbootable. I've tested: * Upgrading from 3.6-2 and answering yes to debconf - it properly installs the bootloader and doesn't ask to do the format * Upgrading from a fake 3.2-0 package to force the format question - it prompts me, and it works * dpkg-reconfiguring and saying both yes and no * re-installing, after debconf has been configured, to see that it honors my cached answer w/o prompting again * A d-i install, where it pulled my version - verified it asked me no questions, told me no lies (and better yet, booted). I re-installed elilo after booting and it triggered the debconf question Note that I'm not at all married to the specific text I've chosen for the template - feel free to change as desired. diff -urpN elilo-3.6.orig/debian/changelog elilo-3.6/debian/changelog --- elilo-3.6.orig/debian/changelog 2007-03-02 14:35:11.000000000 -0700 +++ elilo-3.6/debian/changelog 2007-03-02 14:34:15.000000000 -0700 @@ -1,3 +1,10 @@ +elilo (3.6-2dannfconf1) unstable; urgency=low + + * Debconfify, adding an option to run /usr/sbin/elilo in the postinst, + closes: #410362 + + -- dann frazier <[EMAIL PROTECTED]> Fri, 2 Mar 2007 14:33:38 -0700 + elilo (3.6-2) unstable; urgency=low * freshen gnu-efi build dependency version, closes: #355252 diff -urpN elilo-3.6.orig/debian/control elilo-3.6/debian/control --- elilo-3.6.orig/debian/control 2007-03-02 14:35:11.000000000 -0700 +++ elilo-3.6/debian/control 2007-03-02 13:16:14.000000000 -0700 @@ -2,12 +2,12 @@ Source: elilo Section: admin Priority: optional Maintainer: Bdale Garbee <[EMAIL PROTECTED]> -Build-Depends: debhelper (>> 5), gnu-efi (>=3.0c-1) +Build-Depends: debhelper (>> 5), gnu-efi (>=3.0c-1), po-debconf Standards-Version: 3.6.2.1 Package: elilo Architecture: i386 ia64 -Depends: efibootmgr, dosfstools +Depends: efibootmgr, dosfstools, debconf (>= 0.5) Description: Bootloader for systems using EFI-based firmware This is the Linux bootloader for systems using the Intel EFI firmware specification. This includes all ia64 systems, and some ia32 systems. diff -urpN elilo-3.6.orig/debian/elilo.config elilo-3.6/debian/elilo.config --- elilo-3.6.orig/debian/elilo.config 1969-12-31 17:00:00.000000000 -0700 +++ elilo-3.6/debian/elilo.config 2007-03-02 13:51:31.000000000 -0700 @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +if [ "2" ] && dpkg --compare-versions $2 lt 3.2-1 +then + db_input high elilo/format || true +else + db_input high elilo/runme || true +fi +db_go || true diff -urpN elilo-3.6.orig/debian/elilo.templates elilo-3.6/debian/elilo.templates --- elilo-3.6.orig/debian/elilo.templates 1969-12-31 17:00:00.000000000 -0700 +++ elilo-3.6/debian/elilo.templates 2007-03-02 14:30:01.000000000 -0700 @@ -0,0 +1,31 @@ +Template: elilo/runme +Type: boolean +Default: false +_Description: Automatically run elilo? + It is necessary to run /usr/sbin/elilo to install the new elilo binary into + the EFI partition. If you would like to automatically run /usr/sbin/elilo + after installation, say yes here. + . + WARNING: This procedure will write data into the debian directory in your + EFI partition, possibly overwriting files you have installed there + manually. + . + However, if you skip this step, you may leave your system in an unbootable + state. If you wish to skip the automatic install, it is recommended that + you run /usr/sbin/elilo or install the new /usr/lib/elilo/elilo.efi file + manually. + +Template: elilo/format +Type: boolean +Default: false +_Description: Reformat and reload EFI partition? + You appear to be upgrading from an old (pre-3.2) version of the elilo + package. The structure of files in the EFI partition is different + now, and the EFI boot manager entry for Debian needs to be updated. + . + If you have not made any manual changes to the EFI partition content + that you want to preserve, we can reformat and reload that partition + for you, and rewrite the boot manager entry to be correct. + . + Do you want me to reformat and reload the EFI partition and write an + updated boot manager entry for you? diff -urpN elilo-3.6.orig/debian/po/POTFILES.in elilo-3.6/debian/po/POTFILES.in --- elilo-3.6.orig/debian/po/POTFILES.in 1969-12-31 17:00:00.000000000 -0700 +++ elilo-3.6/debian/po/POTFILES.in 2007-03-02 13:14:22.000000000 -0700 @@ -0,0 +1 @@ +[type: gettext/rfc822deb] elilo.templates diff -urpN elilo-3.6.orig/debian/po/templates.pot elilo-3.6/debian/po/templates.pot --- elilo-3.6.orig/debian/po/templates.pot 1969-12-31 17:00:00.000000000 -0700 +++ elilo-3.6/debian/po/templates.pot 2007-03-02 13:14:22.000000000 -0700 @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <[EMAIL PROTECTED]>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: [EMAIL PROTECTED]" +"POT-Creation-Date: 2007-03-02 13:14-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n" +"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "Do you want to run /usr/sbin/elilo now?" +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "" +"It was detected that it's necessary to run /usr/sbin/elilo in order to " +"install the new elilo binary into the EFI partition." +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "" +"WARNING: This procedure will write data in your EFI partition and may " +"overwrite some things in that place. If you skip this step, you must run /" +"usr/sbin/elilo before reboot your computer or your system may be unbootable." +msgstr "" diff -urpN elilo-3.6.orig/debian/postinst elilo-3.6/debian/postinst --- elilo-3.6.orig/debian/postinst 2007-03-02 14:35:11.000000000 -0700 +++ elilo-3.6/debian/postinst 2007-03-02 13:48:15.000000000 -0700 @@ -1,12 +1,32 @@ -#!/bin/sh -e +#!/bin/sh + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi -# don't bother with debconf for this, since very few systems are likely to -# be affected by this upgrade, and it's a one-shot deal. this postinst can -# probably be safely removed for the woody+1 release. case "$1" in - configure) - # continue below + configure|reconfigure) + # On new installs, do nothing - elilo-installer will handle it for d-i + if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then + exit 0 + fi + if [ "$2" ] && dpkg --compare-versions $2 lt 3.2-1 + then + db_get elilo/format || true; + if [ x"$RET" = x"true" ]; then + echo "Running elilo..." + /usr/sbin/elilo --format --efiboot + fi + exit 0 + fi + db_get elilo/runme || true; + if [ x"$RET" = x"true" ]; then + echo "Running elilo..." + /usr/sbin/elilo + fi ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -19,34 +39,6 @@ case "$1" in ;; esac -if [ "$2" ] && dpkg --compare-versions $2 lt 3.2-1 -then - echo "" - echo "You appear to be upgrading from an old (pre-3.2) version of the elilo" - echo "package. The structure of files in the EFI partition is different" - echo "now, and the EFI boot manager entry for Debian needs to be updated." - echo "" - echo "If you have not made any manual changes to the EFI partition content" - echo "that you want to preserve, we can reformat and reload that partition" - echo "for you, and rewrite the boot manager entry to be correct." - echo "" - echo "Do you want me to reformat and reload the EFI partition and write an" - echo -n "updated boot manager entry for you [Ny]? " - - read answer - case "$answer" in - [Yy]*) - echo -n "Working... " - /usr/sbin/elilo --format --efiboot - echo "done." - ;; - *) - echo "No action taken. See /usr/share/doc/elilo/* for more info." - ;; - esac - echo "" -fi - #DEBHELPER# exit 0 diff -urpN elilo-3.6.orig/debian/rules elilo-3.6/debian/rules --- elilo-3.6.orig/debian/rules 2007-03-02 14:35:11.000000000 -0700 +++ elilo-3.6/debian/rules 2007-03-02 13:06:22.000000000 -0700 @@ -53,6 +53,7 @@ binary-arch: build install dh_testdir dh_testroot dh_installdocs + dh_installdebconf dh_installexamples examples/netboot examples/textmenu_chooser cp debian/sys2ansi.pl \ debian/elilo/usr/share/doc/elilo/examples/textmenu_chooser/ -- dann frazier | HP Open Source and Linux Organization -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]