Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 861659 - sys-apps/portage: document GLEP 82 (e.g. restrict-allowed) (was: dev-util/pkgcheck: UnknownRestrict for RESTRICT="primaryuri" (Portage extension))
Summary: sys-apps/portage: document GLEP 82 (e.g. restrict-allowed) (was: dev-util/pkg...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 902189
Blocks: 835013
  Show dependency tree
 
Reported: 2022-07-28 07:38 UTC by amano.kenji
Modified: 2023-04-07 10:06 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 amano.kenji 2022-07-28 07:38:11 UTC
primaryuri is documented in `man 5 ebuild`.

But, `pkgcheck scan` doesn't recognize primaryuri in my ebuilds.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-28 07:40:11 UTC
Note that primaryuri is not a required token per PMS: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-680007.3.6
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-28 08:09:40 UTC
This is controlled by metadata/layout.conf restrict-allowed.
Comment 3 amano.kenji 2022-07-28 12:44:28 UTC
I can't find any documentation about restrict-allowed in `man 5 portage` or `man 5 ebuild`.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-28 13:30:54 UTC
(In reply to amano.kenji from comment #3)
> I can't find any documentation about restrict-allowed in `man 5 portage` or
> `man 5 ebuild`.

See https://www.gentoo.org/glep/glep-0082.html#configuration-keys, but indeed, Portage should document it.

I've been working on the man pages recently.
Comment 5 amano.kenji 2022-07-28 23:42:09 UTC
Don't forget https://wiki.gentoo.org/wiki/Repository_format/metadata/layout.conf
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-29 00:30:53 UTC
(In reply to amano.kenji from comment #5)
> Don't forget
> https://wiki.gentoo.org/wiki/Repository_format/metadata/layout.conf

Good point! Done, but not done Portage yet.
Comment 7 amano.kenji 2022-07-31 10:15:07 UTC
It seems it's better to not have `restrict-allowed` in layout.conf?

The document says `If unset, all tokens are permitted.`
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-31 10:22:11 UTC
(In reply to amano.kenji from comment #7)
> It seems it's better to not have `restrict-allowed` in layout.conf?
> 
> The document says `If unset, all tokens are permitted.`

Then how are we supposed to detect when someone commits garbage?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-31 10:23:16 UTC
(In reply to amano.kenji from comment #7)
> It seems it's better to not have `restrict-allowed` in layout.conf?
> 
> The document says `If unset, all tokens are permitted.`

I think this very much depends on your preference. For ::gentoo, absolutely not. I struggle to see where you'd really want it unset, tbh.
Comment 10 Larry the Git Cow gentoo-dev 2023-04-07 09:52:37 UTC
The bug has been referenced in the following commit(s):

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

commit 3eb9a842af0ffe2e73678f8815196633952fb1b6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-29 01:04:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-07 09:52:29 +0000

    portage.5: document restrict-allowed, properties-allowed
    
    Note that Portage doesn't really do anything with these
    right now AFAICT but it may in future (not planned though) decide
    to ignore non-acceptable tokens, etc.
    
    Bug: https://bugs.gentoo.org/861659
    Closes: https://github.com/gentoo/portage/pull/874
    Signed-off-by: Sam James <sam@gentoo.org>

 man/portage.5 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
Comment 11 Larry the Git Cow gentoo-dev 2023-04-07 10:06:57 UTC
The bug has been closed via the following commit(s):

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

commit 05f0b3b184011060c86787f93e16a29002bdc54a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-07 09:59:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-07 09:59:55 +0000

    sys-apps/portage: add 3.0.46
    
    Closes: https://bugs.gentoo.org/861659
    Closes: https://bugs.gentoo.org/877271
    Closes: https://bugs.gentoo.org/898224
    Closes: https://bugs.gentoo.org/899898
    Closes: https://bugs.gentoo.org/902189
    Closes: https://bugs.gentoo.org/903917
    Closes: https://bugs.gentoo.org/903926
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.46.ebuild | 285 +++++++++++++++++++++++++++++++++
 2 files changed, 286 insertions(+)