Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668334 - sys-apps/portage: replace PORTAGE_BINHOST with a directory of structured config files like repos.conf
Summary: sys-apps/portage: replace PORTAGE_BINHOST with a directory of structured conf...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 661332 668302 739718 768957
  Show dependency tree
 
Reported: 2018-10-11 17:24 UTC by Zac Medico
Modified: 2021-06-15 07:23 UTC (History)
3 users (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 Zac Medico gentoo-dev 2018-10-11 17:24:25 UTC
The are many adjustments that might need to be made for binary package repositories, so a structured configuration format is needed to replace the PORTAGE_BINHOST variable. This could also replace the PKGDIR variable, with PKGDIR becoming the storage location for a local binary package repository.
Comment 2 Larry the Git Cow gentoo-dev 2020-09-08 02:35:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c36a4ec6694b8b9e22fb63298d1588589acb1ab2

commit c36a4ec6694b8b9e22fb63298d1588589acb1ab2
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-09-06 21:12:32 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-09-08 01:37:42 +0000

    Add binrepos.conf to replace PORTAGE_BINHOST (bug 668334)
    
    Support /etc/portage/binrepos.conf as a replacement for the
    PORTAGE_BINHOST variable. Behavior is similar to repos.conf,
    initially supporting just the sync-uri attribute. Both binrepos.conf
    and PORTAGE_BINHOST can be used simultaneously, in the same way that
    repos.conf and PORTDIR_OVERLAY can be used simultaneously.
    
    The emerge --info output for binrepos.conf looks like this:
    
    Binary Repositories:
    
    example-binhost
        sync-uri: https://example.com/binhost
    
    Bug: https://bugs.gentoo.org/668334
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/actions.py                  |  13 +++-
 lib/portage/binrepo/__init__.py         |   0
 lib/portage/binrepo/config.py           | 131 ++++++++++++++++++++++++++++++++
 lib/portage/const.py                    |   1 +
 lib/portage/dbapi/bintree.py            |  14 +++-
 lib/portage/tests/emerge/test_simple.py |  14 +++-
 man/make.conf.5                         |   3 +-
 man/portage.5                           |  38 +++++++++
 8 files changed, 206 insertions(+), 8 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2020-09-08 03:51:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd840baeef963f5fe746f9167976ce0eed83a3b4

commit fd840baeef963f5fe746f9167976ce0eed83a3b4
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-09-08 03:44:51 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-09-08 03:51:23 +0000

    sys-apps/portage: Bump to version 3.0.6
    
     #668302 binrepos.conf: support fetchcommand customization
     #668334 Add binrepos.conf to replace PORTAGE_BINHOST
     #704416 env-update: create systemd user-session environment
     #737470 egencache --update-pkg-desc: emulate esync --verbose
     #737480 emerge --search: auto-detect regular expressions
     #739908 @change-deps: fix erroneous repeated rebuilds
     #740588 make.conf: Treat __* variables as local
     #740898 PORTAGE_BINHOST urlopen proxy support
     #740904 rsync and gemato proxy support
    
    Bug: https://bugs.gentoo.org/739718
    Bug: https://bugs.gentoo.org/668302
    Bug: https://bugs.gentoo.org/668334
    Bug: https://bugs.gentoo.org/704416
    Bug: https://bugs.gentoo.org/737470
    Bug: https://bugs.gentoo.org/737480
    Bug: https://bugs.gentoo.org/739908
    Bug: https://bugs.gentoo.org/740588
    Bug: https://bugs.gentoo.org/740898
    Bug: https://bugs.gentoo.org/740904
    Package-Manager: Portage-3.0.6, Repoman-3.0.1
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest             |   1 +
 sys-apps/portage/portage-3.0.6.ebuild | 265 ++++++++++++++++++++++++++++++++++
 2 files changed, 266 insertions(+)
Comment 4 Eugeny Shkrigunov 2020-10-16 09:22:26 UTC
What about packages built locally (for example, built in a chroot environment or lxc container)?
Or packages available locally (for example, NFS mount, etc.)?

I have previously used:
PORTAGE_BINHOST=" "
PKGDIR="/path_to/packages"

But now I get a warning:
!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.
Comment 5 Zac Medico gentoo-dev 2020-10-17 10:23:56 UTC
(In reply to Eugeny Shkrigunov from comment #4)
> What about packages built locally (for example, built in a chroot
> environment or lxc container)?
> Or packages available locally (for example, NFS mount, etc.)?

I suppose we could use a file:///path_to/packages src-uri in binrepos.conf. I've tested this locally, and it failed with an "Unsupported scheme ‘file’" error, so we'll have to fix that.

> I have previously used:
> PORTAGE_BINHOST=" "
> PKGDIR="/path_to/packages"
> 
> But now I get a warning:
> !!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but
> use is requested.

The warning message used to be suppressed by a non-empty PORTAGE_BINHOST value, but now it's only suppressed if there's at least one repo configured via binrepos.conf or PORTAGE_BINHOST.
Comment 6 Zac Medico gentoo-dev 2021-02-06 21:18:52 UTC
(In reply to Zac Medico from comment #5)
> (In reply to Eugeny Shkrigunov from comment #4)
> > What about packages built locally (for example, built in a chroot
> > environment or lxc container)?
> > Or packages available locally (for example, NFS mount, etc.)?
> 
> I suppose we could use a file:///path_to/packages src-uri in binrepos.conf.
> I've tested this locally, and it failed with an "Unsupported scheme ‘file’"
> error, so we'll have to fix that.

I've opened bug 768957 for this.