From 6bf09d3b78e5174241965a41118cd8c887df0fc5 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Mon, 5 Mar 2007 16:26:32 -0700 Subject: [PATCH] Imported Debian patch 3.6-3 --- debian/changelog | 10 ++++++ debian/control | 6 ++-- debian/elilo.config | 13 ++++++++ debian/elilo.sh | 2 +- debian/elilo.templates | 25 ++++++++++++++ debian/po/POTFILES.in | 1 + debian/po/templates.pot | 72 +++++++++++++++++++++++++++++++++++++++++ debian/postinst | 60 +++++++++++++++------------------- debian/rules | 2 ++ debian/sys2ansi.pl | 2 +- 10 files changed, 154 insertions(+), 39 deletions(-) create mode 100644 debian/elilo.config create mode 100644 debian/elilo.templates create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/templates.pot diff --git a/debian/changelog b/debian/changelog index bd730c3..31ace07 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +elilo (3.6-3) unstable; urgency=high + + * patch from Dann Frazier that adds an option to run /usr/sbin/elilo in + the postinst using debconf, closes: #410362 + * cranking the urgency since 410362 helps with a problem upgrading to etch + for systems that depend on elilo + * elilo.sh uses bash syntax, so use bash explicitly, closes: #385492 + + -- Bdale Garbee Mon, 5 Mar 2007 16:26:32 -0700 + elilo (3.6-2) unstable; urgency=low * freshen gnu-efi build dependency version, closes: #355252 diff --git a/debian/control b/debian/control index 1571088..31ef487 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,12 @@ Source: elilo Section: admin Priority: optional Maintainer: Bdale Garbee -Build-Depends: debhelper (>> 5), gnu-efi (>=3.0c-1) -Standards-Version: 3.6.2.1 +Build-Depends: debhelper (>> 5), gnu-efi (>=3.0c-1), po-debconf +Standards-Version: 3.7.2 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 --git a/debian/elilo.config b/debian/elilo.config new file mode 100644 index 0000000..eb8c0a9 --- /dev/null +++ b/debian/elilo.config @@ -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 --git a/debian/elilo.sh b/debian/elilo.sh index 6a65e70..4b1a852 100644 --- a/debian/elilo.sh +++ b/debian/elilo.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash ############################################################################### ## diff --git a/debian/elilo.templates b/debian/elilo.templates new file mode 100644 index 0000000..c0bd1c0 --- /dev/null +++ b/debian/elilo.templates @@ -0,0 +1,25 @@ +Template: elilo/runme +Type: boolean +Default: true +_Description: Automatically run elilo? + It is necessary to run /usr/sbin/elilo to install the new elilo binary into + the EFI partition. + . + WARNING: This procedure will write data into the debian directory of the + EFI disk partition, possibly overwriting files installed there by hand. + . + Not installing the new elilo binary on the EFI disk partition may leave the + system in an unbootable state. Alternatives to automatic updating of the + partition include runnning /usr/sbin/elilo by hand, or installing the new + /usr/lib/elilo/elilo.efi executable into the EFI disk partition manually. + +Template: elilo/format +Type: boolean +Default: true +_Description: Reformat and reload EFI partition? + The structure of files in the EFI disk partition has changed since pre-3.2 + versions of the elilo package. The EFI boot manager entry for Debian needs + to be updated to reflect these changes. + . + In most cases, if no manual changes to the EFI partition content need to + be preserved, this update can be handled automatically. diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..4ef1d3d --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] elilo.templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..3be4f39 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,72 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: bdale@gag.com\n" +"POT-Creation-Date: 2007-03-05 16:47-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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 "Automatically run elilo?" +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "" +"It is necessary to run /usr/sbin/elilo to install the new elilo binary into " +"the EFI partition." +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "" +"WARNING: This procedure will write data into the debian directory of the EFI " +"disk partition, possibly overwriting files installed there by hand." +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:1001 +msgid "" +"Not installing the new elilo binary on the EFI disk partition may leave the " +"system in an unbootable state. Alternatives to automatic updating of the " +"partition include runnning /usr/sbin/elilo by hand, or installing the new /" +"usr/lib/elilo/elilo.efi executable into the EFI disk partition manually." +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:2001 +msgid "Reformat and reload EFI partition?" +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:2001 +msgid "" +"The structure of files in the EFI disk partition has changed since pre-3.2 " +"versions of the elilo package. The EFI boot manager entry for Debian needs " +"to be updated to reflect these changes." +msgstr "" + +#. Type: boolean +#. Description +#: ../elilo.templates:2001 +msgid "" +"In most cases, if no manual changes to the EFI partition content need to be " +"preserved, this update can be handled automatically." +msgstr "" diff --git a/debian/postinst b/debian/postinst index 50b76ca..465c7a9 100644 --- a/debian/postinst +++ b/debian/postinst @@ -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 --git a/debian/rules b/debian/rules index 0a1c6a5..c805a03 100755 --- a/debian/rules +++ b/debian/rules @@ -26,6 +26,7 @@ clean: -$(MAKE) clean + debconf-updatepo dh_clean install: build @@ -53,6 +54,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/ diff --git a/debian/sys2ansi.pl b/debian/sys2ansi.pl index ecf7b6b..d8c3f51 100644 --- a/debian/sys2ansi.pl +++ b/debian/sys2ansi.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: sys2ansi.pl,v 1.1 2002/10/29 22:35:52 bdale Exp $ +# $Id: sys2ansi.pl,v 1.1 2002-10-29 22:35:52 bdale Exp $ # # Perl script to convert a Syslinux-format screen to PC-ANSI # to display in a color xterm or on the Linux console -- 2.30.2