Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470006 - sys-apps/portage: support --binhost-profile to avoid superfluous syncing
Summary: sys-apps/portage: support --binhost-profile to avoid superfluous syncing
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 21:23 UTC by Jason A. Donenfeld
Modified: 2024-10-25 10:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason A. Donenfeld gentoo-dev 2013-05-15 21:23:12 UTC
Portage, when using --usepkgonly and --getbinpkgonly, fetches all the information it needs from server/Packages. It does not need PORTDIR, as specified in the documentation.

This is awesome.

However, it awkwardly still depends on a superfluous make.profile and package.use and ACCEPT_KEYWORDS and various other needless files and settings in make.conf. All of this information, however, is available in server/Packages. Portage thus needs a way of using server/Packages as the profile and base per-package USE flags.

The implementation of --binhost-profile would allow a system to have an EMPTY /usr/portage/, and have /etc/portage/make.conf populated with only:

zx2c4@montgomery ~ $ cat /etc/portage/make.conf 
PORTAGE_BINHOST="https://portage-build.zx2c4.com/"
EMERGE_DEFAULT_OPTS="--getbinpkgonly=y --usepkgonly=y --with-bdeps=n --fail-clean=y --binhost-profile=y"

Everything else portage needs would then be gathered from server/Packages.


Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2013-05-24 03:38:56 UTC
There's really not a lot of useful profile information inside the binhost's Packages file, so I'm not sure if it's really worth it to automate pulling profile data from there.

I'm thinking that you should just create an empty /etc/portage/make.profile directory, set your ARCH in /etc/portage/make.profile/make.defaults, and leave it at that. If make.defaults exists, then that's enough to satisfy portage, since this commit:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=18aa5cc076a5597ba7e256f316835606bb5b6df9
Comment 2 Zac Medico gentoo-dev 2013-05-25 05:09:37 UTC
Missing pieces:

 * system set (comes from 'packages' files in the profile)
 * selected set (comes from /var/lib/portage/world on the binhost)
 * package.provided

We have have the binhost export all of these through the Packages file. I'm concerned about package.provided though, because it implies that there exists some separate channel for syncing the "provided" packages. If such a separate channel exists, then why not also used it to sync things like $PORTDIR/profiles and /var/lib/portage/world from the binhost?
Comment 3 Jason A. Donenfeld gentoo-dev 2013-05-25 23:34:32 UTC
> If such a separate channel exists, then why not also used it to sync things

For example, a kernel of a virtual machine.
Comment 4 Zac Medico gentoo-dev 2013-07-03 05:40:41 UTC
For EAPI 5, we need to include the implicit IUSE. PMS refers to it as IUSE_EFFECTIVE, and portage writes /var/db/pkg/*/*/IUSE_EFFECTIVE entries for EAPI 5. So, let's add a IUSE_EFFECTIVE setting in the Packages header section, and all of the EAPI 5 binary packages can use that.
Comment 5 Zac Medico gentoo-dev 2013-08-04 22:16:05 UTC
Include implicit IUSE vars in binhost Packages:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=85f53097ed9fad43b713ac9c13f6beff43da760e
Comment 6 Jason A. Donenfeld gentoo-dev 2013-08-19 12:46:50 UTC
!!! Section 'gentoo' in repos.conf refers to repository without repository name set in '/usr/portage/profiles/repo_name'
!!! main-repo not set in DEFAULT and PORTDIR is empty.
WARNING: One or more repositories have missing repo_name entries:

        /usr/portage/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.


====

If repos.conf does not exist, it should not be checked like what happens with the above error message. Binpkg-only hosts do not need a repo.
Comment 7 Zac Medico gentoo-dev 2013-08-22 16:26:01 UTC
Disable the main-repo warning:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1a6374733c62b1d131a0f2c9da6190364df6e3df

You're going to have to negate the config from /usr/share/portage/config/repos.conf somehow. Currently, one way you can do that is to export PORTAGE_REPOSITORIES="" in your environment. Another way would be to comment out the lines or completely remove /usr/share/portage/config/repos.conf.
Comment 8 Jason A. Donenfeld gentoo-dev 2018-04-16 17:39:36 UTC
Wondering where we stand with this. Is a minimal make.profile still required, or can we get rid of this now?
Comment 9 Zac Medico gentoo-dev 2018-04-16 18:58:08 UTC
In order to get rid of make.profile, we first need to resolve bug 640318. I'm currently working on this, I have some work in progress available in these branches, with TODO notes in the commit messages to explain what's not finished yet:

https://github.com/zmedico/portage/tree/bug_640318_binary_iuse_implicit

https://github.com/zmedico/portage/tree/bug_640318_bindbapi_override_iuse_implicit_cnstr
Comment 10 Zac Medico gentoo-dev 2018-04-18 22:42:12 UTC
The last patch from bug 640318 is included in portage-2.3.31. With emerge --usepkgonly, make.profile can be a directory containing a single 'parent' file that contains /var/empty as the parent, and that's enough to emerge binary packages. When we add the --binhost-profile option, it can disable the make.profile assertions.