Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 921105

Summary: emerge can see binpkgs with -pK flag, but not with -K alone
Product: Portage Development Reporter: Ivan Occam <ivan.occam>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: normal CC: mgorny, syu.os
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 930802    
Attachments: log of attempt to emerge binpkgs, with and without --pretend and --debug options
local emerge.info
server emerge --info
output of emerge -pK
output of emerge -dpK
output of emerge -K
output of emerge -Kd

Description Ivan Occam 2023-12-30 21:58:20 UTC
Created attachment 881051 [details]
log of attempt to emerge binpkgs, with and without --pretend and --debug options

While attempting to install binpkgs hosted on a nfs4 share mounted at /var/cache/binpkgs, emerge is able to see the binary packages when the '--pretend' option is used, but not when actual install is attempted. When attempting a proper install, it fails with an message that 'there are no binary packages to satisfy "PACKAGE".'
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-30 22:00:48 UTC
Could you give those as sep. attachments or within a tarfile please?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-30 22:01:17 UTC
... and emerge --info
Comment 3 Ivan Occam 2023-12-30 22:02:23 UTC
(In reply to Sam James from comment #2)
> ... and emerge --info

Will do!
Comment 4 Ivan Occam 2023-12-30 22:03:18 UTC
Created attachment 881052 [details]
local emerge.info
Comment 5 Ivan Occam 2023-12-30 22:08:47 UTC
Created attachment 881053 [details]
server emerge --info

emerge --info on the server which built and hosts the binpkgs
Comment 6 Ivan Occam 2023-12-30 22:10:44 UTC
Created attachment 881054 [details]
output of emerge -pK
Comment 7 Ivan Occam 2023-12-30 22:13:20 UTC
Created attachment 881055 [details]
output of emerge -dpK
Comment 8 Ivan Occam 2023-12-30 22:16:19 UTC
Created attachment 881057 [details]
output of emerge -K

Other than this, emerge just provides a message stating the binpkgs cannot be found.
Comment 9 Ivan Occam 2023-12-30 22:17:07 UTC
Created attachment 881058 [details]
output of emerge -Kd

emerge's only other message is it cannot find the binary package
Comment 10 Ivan Occam 2023-12-31 21:12:05 UTC
I can confirm this behaviour persists despite mounting the nfs4 share via /etc/fstab at boot, and on three different client computers.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-02 08:22:50 UTC
Huh, it really does give up super early. zac?
Comment 12 Zac Medico gentoo-dev 2024-01-05 17:40:44 UTC
Very puzzling. The --pretend option seems like it should only make a difference if FEATURES=binpkg-request-signature is enabled. Is there any difference if you use -k instead of -K?
Comment 13 Ivan Occam 2024-01-06 00:28:29 UTC
With -k, emerge wants to compile all the target packages from source, and will proceed to compilation.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-06 10:01:07 UTC
I'm looking for some more ideas but in the meantime: I wonder if you could try bisect it roughly if you try say, portage-3.0.10 - does that work?

You can try it from a source checkout with https://wiki.gentoo.org/wiki/Project:Portage#Testing_Portage.

You have to pick a newer version though if using gpkg.
Comment 15 Ivan Occam 2024-01-07 00:45:06 UTC
When I tried doing a source checkout with versions 0.20 and 0.31, I had the same result. And after modifying my PYTHONPATH and PATH as described in the wiki page, my standard emerge install of 3.0.59 couldn't see the binpkgs, even with the --pretend flag.

More significantly, while testing, I noticed that the issue might have to do wit h sudo ... if I do 'sudo emerge -pvK PACKAGE', it cannot see the binpkgs. But if I run the same command without sudo I see the bins as expected.

Hope that helps. Something to do with the UID?
Comment 16 Ivan Occam 2024-01-07 00:48:40 UTC
Oh, and yes, I did use gpkg, for the record.
Comment 17 Zac Medico gentoo-dev 2024-01-07 02:42:42 UTC
(In reply to Ivan Occam from comment #15)
> More significantly, while testing, I noticed that the issue might have to do
> wit h sudo ... if I do 'sudo emerge -pvK PACKAGE', it cannot see the
> binpkgs. But if I run the same command without sudo I see the bins as
> expected.

This sounds like it could be related to something like root_squash in your nfs exports. As it is, /var/cache/binpkgs typically needs to be both readable and writable by root.
Comment 18 Ivan Occam 2024-01-07 19:14:56 UTC
I got it to work using export options of (rw,no_subtree_check,root_squash), and directory permissions on the server of 775 for /var/cache/binpkgs.

However, the wiki specifically states to use read-only options at https://wiki.gentoo.org/wiki/Binary_package_guide#NFS_exported
Is the wiki incorrect? It would be trivial for me to correct that.