Bug#865052: Do not choose efi architecture based on installation arch

2017-06-19 Thread Colin Watson
Control: severity -1 normal

On Sun, Jun 18, 2017 at 10:49:15PM +0200, Andreas Heinlein wrote:
> The meta-package grub-efi depends on either grub-efi-amd64 if
> installation architecture is amd64, or grub-efi-ia32 if installed on i386.

To persuade me that this is important, you'll need to first persuade me
that the grub-efi binary package actually matters.  As far as I'm
concerned, it exists only for upgrade purposes (note that it's in
Section: oldlibs).  Although d-i does use it as a fallback, it generally
tries to work out the firmware architecture instead.

> So either need to determine EFI architecture at install time and then
> pull in the correct package (hard way),

Not so hard considering that the installer has code to do this already!

I think we should probably change d-i to stop expecting grub-efi to
exist even as a fallback, and instead fall back to the userspace
architecture (of course not ideal, but good enough as a fallback given
that it will look at /sys/firmware/efi/fw_platform_size first).  We can
then simply drop grub-efi entirely rather than debating what its
dependencies should be.

> or correct the dependencies and depend on *both* grub-efi-amd64 and
> grub-efi-ia32, regardless of installation architecture (easy way). I
> did the latter for tests on our machines and found no problems so far
> with both of them co-existing.

I don't think you can have tested that very extensively, since
grub-efi-amd64 and grub-efi-ia32 declare Conflicts on each other.  In
general, multiple grub--bin packages are coinstallable, but
multiple grub- packages are not; this is intentional because
the semantics of grub- are to assert ownership of the system's
boot process.

Regards,

-- 
Colin Watson   [cjwat...@debian.org]



Bug#865052: Do not choose efi architecture based on installation arch

2017-06-18 Thread Andreas Heinlein
Package: grub-efi

Version: 2.02~beta3-5

Severity: important

The meta-package grub-efi depends on either grub-efi-amd64 if
installation architecture is amd64, or grub-efi-ia32 if installed on i386.

There is no sane reason to do so. GRUB EFI architecture needs to match
the architecture of the EFI firmware, not necessarily that of the
installed OS. A 32bit EFI can boot a 64bit OS just fine, and vice versa.
There are in fact numerous intel based tablets and convertibles out
there which for whatever reason use a 32bit EFI firmware even though
their Atom CPU is 64bit capable and runs Debian amd64 just fine. I have
one here at hand.

So either need to determine EFI architecture at install time and then
pull in the correct package (hard way), or correct the dependencies and
depend on *both* grub-efi-amd64 and grub-efi-ia32, regardless of
installation architecture (easy way). I did the latter for tests on our
machines and found no problems so far with both of them co-existing.




signature.asc
Description: OpenPGP digital signature