Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How do I merge grub-2 with libzfs USE flag?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Mon Aug 29, 2016 2:55 pm    Post subject: [SOLVED] How do I merge grub-2 with libzfs USE flag? Reply with quote

Hello,

I am trying to merge sys-boot/grub:2 with the libzfs USE flag, but portage seems to think otherwise. It goes like this:
Code:
(chroot) livecd / # emerge -av sys-boot/grub:2

 * IMPORTANT: 12 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-libs/efivar-0.21-r99::musl  66 KiB
[ebuild  N     ] media-libs/libpng-1.6.21:0/16::gentoo  USE="-apng (-neon) -static-libs" 922 KiB
[ebuild  N     ] media-libs/freetype-2.6.3-r1:2::gentoo  USE="adobe-cff bzip2 png -X -bindist -debug -doc -fontforge -harfbuzz (-infinality) -static-libs -utils" 1712 KiB
[ebuild  N     ] sys-apps/pciutils-3.4.1::gentoo  USE="kmod udev zlib -dns -static-libs" 395 KiB
[ebuild  N     ] sys-boot/efibootmgr-0.12::gentoo  35 KiB
[ebuild  N     ] sys-boot/grub-2.02_beta2-r9:2/2.02_beta2-r9::gentoo  USE="fonts themes -debug -device-mapper -doc -efiemu (-libzfs) -mount -multislot -nls -sdl -static {-test} -truetype" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 -loongson -multiboot -pc -qemu -qemu-mips -uboot -xen" 7402 KiB

Total: 6 packages (6 new), Size of downloads: 10531 KiB

Would you like to merge these packages? [Yes/No] n

Quitting.


In my /etc/portage/package.use/package.use file I have "sys-boot/grub:2 -device-mapper libzfs".

It still writes "(-libzfs)" instead of accepting the USE flag. I have also tried this with the beta3 version of grub2, and that gives me the same results.

Here is my emerge --info:
http://pastebin.com/5F2M76GW

I am using a hardened/linux/musl/amd64 profile, incase that matters.

Thanks!


Last edited by ChadJoan on Mon Sep 05, 2016 11:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30911
Location: here

PostPosted: Mon Aug 29, 2016 3:31 pm    Post subject: Reply with quote

if a use flag is in brackets means that are masked. For some reason developers have masked this use flag
package.use.mask wrote:
# Mike Gilbert <floppym@gentoo.org> (29 Jun 2012)
# sys-fs/zfs is not available everywhere.
sys-boot/grub libzfs

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Mon Aug 29, 2016 6:00 pm    Post subject: Reply with quote

OK.

How do I find out where it is masked?
Does it have a message I can read to learn more about the reason behind the masking?
How do I unmask it?

Sorry if these seem obvious; I haven't been able to find any documentation on this, and while I've dealt with plenty of masked packages, I've never seen masked USE flags before.

I looked at the ebuild(s) for grub and couldn't find anything to indicate that the libzfs flag is being masked or why, so I assume this status is applied elsewhere.

Thanks!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Aug 29, 2016 6:38 pm    Post subject: Reply with quote

ChadJoan wrote:
...How do I find out where it is masked? ...
Search /usr/portage/profiles:
  • /usr/portage/profiles/base/package.use.mask applies the mask.
  • /usr/portage/profiles/arch/amd64/package.use.mask selectively removes it for the amd64 profile.
Profile masks like this are for when things really don't work. Also, since you have this mask, you must be working on a 32-bit install. Is the hardware that old or do you have some specific reason for doing a 32-bit install on newer hardware? ZFS is known to not play very well on 32-bit systems so, although I didn't know about it, it doesn't surprise me.

You'll find brief documentation on modifying the profile settings in the Advanced chapter of the Handbook.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Mon Aug 29, 2016 6:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30911
Location: here

PostPosted: Mon Aug 29, 2016 6:39 pm    Post subject: Reply with quote

ChadJoan wrote:
How do I find out where it is masked?

Use flags masked are bound with profile you use. You can find with
Code:
$ find /usr/portage/profiles/ -name use.mask

In the caso of libzfs file with masked use flag is /usr/portage/profiles/base/use.mask

ChadJoan wrote:
Does it have a message I can read to learn more about the reason behind the masking?

On bugs.gentoo.org there is nothing, try send an email to developer (in this case Mike Gilbert <floppym@gentoo.org>).

ChadJoan wrote:
How do I unmask it?

Code:
# echo "-libzfs" >> /etc/portage/profile/use.mask
# echo "sys-boot/grub libzfs" >> /etc/portage/package.use

But I think is not a good idea until you don't know why is masked
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Mon Aug 29, 2016 9:18 pm    Post subject: Reply with quote

Thank you both for pointing me to /usr/portage/profiles.

I did not know this was a profiles specific thing.

John, I am actually working on a 64-bit install. You are right, I really want to avoid running 32-bit stuff if I can help it ;) Check my posted "emerge --info" if you don't believe me.

If I understand the "parent" file in these profiles correctly, then "hardened/linux/musl/arm64" is getting the libzfs mask from "hardened/linux/musl" which is getting the libzfs mask from "base".

fedeliallalinea, thank you for laying it all out.

I see now that this USE mask is defined like so:
Code:
# Mike Gilbert <floppym@gentoo.org> (29 Jun 2012)
# sys-fs/zfs is not available everywhere.
sys-boot/grub libzfs


As it seems you discovered, this message doesn't mean much to us :(

If it were a dependency problem (ex: zfs is not available on every system, but we depend on it), then I would expect the devs to just let Portage's dependency analysis figure out the situations where zfs is not usable on a system and halt in those cases, while letting everyone else build libzfs grub unimpeded. So perhaps Mike meant something else by "not available everywhere".

I think you are right, I will have to bug Mike about it.

Thank you for showing me how to unmask it. I think I tried /etc/portage/use.mask before, but maybe the /profile/ part of that path is important (and I didn't know before that this was a profile-specific feature). I will try to figure out why it's masked before resorting to this, though.

I will try to post again when I figure out why this USE mask is in place.
Back to top
View user's profile Send private message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Mon Sep 05, 2016 11:40 pm    Post subject: Reply with quote

Grub2 with the libzfs USE flag totally works.

I emailed Mike on Monday (2016-Sep-29) and haven't heard anything back. So this weekend I decided to unmask the USE flag and I got the machine booting.

I suspect that the mask might be outdated at this point.

I had far more troubles getting the kernel itself to boot, but that's another story. In summary, I tried hard to avoid the initrd (*sigh* the initrd won) and was missing a graphics module in my kernel, so most of my booting experiments ended in a hang/freeze at "loading Linux <kernel name> ...". That's one way to spend a weekend ;)
Back to top
View user's profile Send private message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Mon Sep 05, 2016 11:54 pm    Post subject: Reply with quote

By the way, this bugzilla entry involved grub and zfs problems, as well as Mike:
https://bugs.gentoo.org/show_bug.cgi?id=404013

Maybe these issues had something to do with this USE flag getting masked.

It's really hard to find that entry for some reason. I'm not sure how I came across it originally, but it's probably a good thing that I saved it.

In my case, I did not experience any constructor recursion. Yay.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum