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: IN_PROGRESS
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:
Blocks: 835013
  Show dependency tree
 
Reported: 2022-07-28 07:38 UTC by amano.kenji
Modified: 2022-07-31 10: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 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.