Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510758 - sys-boot/grub-0.97* should no longer depend on app-emulation/emul-linux-x86-baselibs
Summary: sys-boot/grub-0.97* should no longer depend on app-emulation/emul-linux-x86-b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gx86-multilib 525566
  Show dependency tree
 
Reported: 2014-05-19 14:29 UTC by Bertrand Jacquin
Modified: 2014-10-20 17:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
grub-0.97-r13.ebuild patch (grub-0.97-r13.ebuild-multi.diff,486 bytes, patch)
2014-05-19 14:30 UTC, Bertrand Jacquin
Details | Diff
Updated patch (grub-0.97-r14.ebuild.diff,1.28 KB, patch)
2014-05-19 15:53 UTC, Michał Górny
Details | Diff
ebuild patch v3 (grub-multilib.ebuild.diff,1.30 KB, patch)
2014-06-28 06:41 UTC, Matthew Ogilvie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2014-05-19 14:29:58 UTC
sys-boot/grub:0 is the only package on many of my systems that depend on app-emulation/emul-linux-x86-baselibs and actually /sbin/grub only needs it for libncurses.so.5

  # ldd /sbin/grub
          linux-gate.so.1 (0xf7782000)
          libncurses.so.5 => /usr/lib32/libncurses.so.5 (0xf76f7000)
          libc.so.6 => /lib32/libc.so.6 (0xf7542000)
          /lib/ld-linux.so.2 (0xf7761000)

You will find attached a patch that intent to use recent multilib effort to get ride of app-emulation/emul-linux-x86-baselibs

Reproducible: Always
Comment 1 Bertrand Jacquin 2014-05-19 14:30:24 UTC
Created attachment 377246 [details, diff]
grub-0.97-r13.ebuild patch
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-19 15:53:31 UTC
Created attachment 377252 [details, diff]
Updated patch

Thanks for the patch. I made a few minor changes, most notably:

1. added [-abi_x86_32(-)] to emul-linux deps. This helps portage understand that once ncurses[abi_x86_32] is installed, emul-linux can be uninstalled.

2. re-enabled the static build for amd64 if ncurses[abi_x86_32,static-libs] is installed. This should make it possible to drop grub-static in the future.

Please test my changes, esp. wrt the static build.
Comment 3 Bertrand Jacquin 2014-05-19 18:38:08 UTC
(In reply to Michał Górny from comment #2)
> Created attachment 377252 [details, diff] [details, diff]
> Updated patch
> 
> Thanks for the patch. I made a few minor changes, most notably:
> 
> 1. added [-abi_x86_32(-)] to emul-linux deps. This helps portage understand
> that once ncurses[abi_x86_32] is installed, emul-linux can be uninstalled.

This is good to known. Thank you

> 2. re-enabled the static build for amd64 if ncurses[abi_x86_32,static-libs]
> is installed. This should make it possible to drop grub-static in the future.

This give :

>>> Configuring source in /var/tmp/portage/sys-boot/grub-0.97-r13/work/grub-0.97 ...
/var/tmp/portage/sys-boot/grub-0.97-r13/temp/environment: line 4096: has_package: command not found
 * ERROR: sys-boot/grub-0.97-r13::as29 failed (configure phase):
 *   You must use the grub-static package if you want a static Grub on amd64!

> Please test my changes, esp. wrt the static build.

Replacing has_package with has_version give the correct result :

  # file /sbin/grub
  /sbin/grub: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, stripped
Comment 4 Matthew Ogilvie 2014-06-28 06:41:22 UTC
Created attachment 379818 [details, diff]
ebuild patch v3

Even when I repeat the s/has_package/has_version/ fix, the previous version would needlessly die when USE="static -ncurses amd_x86_32".

But my new ebuild patch fixes the dependencies so that that various combinations work:

   amd64 or x86
   ncurses or -ncurses
   static or -static
   abi_x86_32 or -abi_x86_32

The combination USE="static ncurses -abi_x86_32" (using emul-linux) should now fail the dependency checks, instead of failing a build-time (src_configure) check.

I tested many of the combinations, except I didn't actually test any -abi_x86_32 (emul-linux) or x86-fbsd cases, and I only "emerge -pv" tested the x86 cases.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-18 13:53:33 UTC
ping ; this is becoming a blocker for unmasking gx86-multilib on amd64 stable.
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-20 17:30:44 UTC
Committed in grub-0.97-r14.  I used mgorny's patch as the basis but adjusted the amd64/static portions so that USE="-ncurses" doesn't kill the emerge.