Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382603 - Automated checks for overlays repo_name and layout.conf files
Summary: Automated checks for overlays repo_name and layout.conf files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Gentoo Overlays (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Overlays Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-11 16:07 UTC by Michał Górny
Modified: 2015-09-10 19:14 UTC (History)
2 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-09-11 16:07:33 UTC
I think it'd be better for users if overlay names on the layman list were consistent with repo_name files in these repositories. If one syncs 'foo' overlay, he/she could assume he/she could refer to it through '::foo' (rather than '::foo_local_overlay' or '::bar').
Comment 1 Sebastian Pipping gentoo-dev 2011-09-11 23:18:57 UTC
In case of a mismatch, updating repo_name causes less trouble.

I'll forward you a mail titled

  "Issues with your overlay (out of sync repo_name)"

that I sent out two years ago on this very issue.
Feel free to use that mail as a template.
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2011-09-14 17:44:54 UTC
Done, enjoy
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-09-18 08:47:59 UTC
Do we have some infra to run regular checks on overlays? It would be awesome to check profiles/categories consistency as well as that puts pkgcore to a lot of pain.
Comment 4 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-06-27 16:06:18 UTC
I'll work on it, I plan to run some QA scripts in repositories.xml
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-06-28 20:06:05 UTC
(In reply to comment #4)
> I'll work on it, I plan to run some QA scripts in repositories.xml

While at it, could you also work on ensuring that overlays have layout.conf with masters specified? pkgcore complains about that a lot.
Comment 6 Sebastian Pipping gentoo-dev 2012-06-29 22:31:30 UTC
(In reply to comment #5)
> While at it, could you also work on ensuring that overlays have layout.conf
> with masters specified? pkgcore complains about that a lot.

Can you point documentation on what that file is, what its format is and who relies on it and for what?  Thanks!
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-06-30 07:02:30 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > While at it, could you also work on ensuring that overlays have layout.conf
> > with masters specified? pkgcore complains about that a lot.
> 
> Can you point documentation on what that file is, what its format is and who
> relies on it and for what?  Thanks!

hmm, the current doc seems to be 'man 5 portage'.

As for the format, it's the simple 'key = value' (with no sections), comments start with '#'.

The most common case:

	masters = gentoo

which means that the repository requires eclasses or dependencies from gentoo repository. Portage & pkgcore support that; none of them require it right now (they just assume overlays with the missing entry have implicit 'masters = <portdir>') but pkgcore is loudly complaining about it.

The other case:

	masters =

means that the repository is stand-alone and all eclasses and dependencies need to be satisfied within it. That should probably be added to gx86's layout.conf.
Comment 8 Sebastian Pipping gentoo-dev 2012-07-01 12:53:58 UTC
(In reply to comment #7)
> hmm, the current doc seems to be 'man 5 portage'.
> 
> [..]
> 
> 	masters = gentoo

I see, thanks for the details.  It seems like a solution to what bug #385439 still is about, despite being closed as wontfix recently.

I suggest to comment on #385439, prepare a good mail template and then mass-mail overlay maintainers.  I'm unsure if one bug per overlay (plus a tracker bug) makes sense.  The mail templates of the overlay's team will need extension, too.
In any case, I believe we need to get off this bug :-)
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-03 08:28:28 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > hmm, the current doc seems to be 'man 5 portage'.
> > 
> > [..]
> > 
> > 	masters = gentoo
> 
> I see, thanks for the details.  It seems like a solution to what bug #385439
> still is about, despite being closed as wontfix recently.

I think the bug specifically mentions that, and Brian is probably right. Portage should finally start fetching repositories...

> I suggest to comment on #385439, prepare a good mail template and then
> mass-mail overlay maintainers.  I'm unsure if one bug per overlay (plus a
> tracker bug) makes sense.  The mail templates of the overlay's team will
> need extension, too.
> In any case, I believe we need to get off this bug :-)

Well, I'll start by working on the template. I have the repo_name template somewhere; I'll modify it and send to overlays@g.o for review.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-03 13:48:36 UTC
The template:

Subject: Issues with your overlay (incomplete layout.conf)

Hello overlay contact! :-)


A script of mine has detected that in your overlay, the file

  metadata/layout.conf

either does not exist or does not list the repository's masters. This
is the new requirement of modern portage & pkgcore versions which
allows to clearly understand the structure of repositories
and the cross-repository dependencies.

In the most likely case, where your overlay depends on eclasses
from the gentoo repository and dependencies being satisfied by it, your
metadata/layout.conf should look like:

  masters = gentoo

You can specify more than one repository there. For example, if one
of your packages does depend on a package in sunrise overlay, and you
don't want to hold a copy of it, you could write:

  masters = gentoo sunrise

Hopefully, at some point layman or portage will be able to
automatically add sunrise to satisfy the masters of your repository[1].

The last case I'd like to mention which is really unlikely for Gentoo
overlays, is a stand-alone repository. Such a repository has to have
all eclasses and package dependencies satisfiable on its own, and has
empty 'masters' entry:

  masters =

Please consider adding the metadata/layout.conf file to your overlay
and filling the 'masters' entry within it. For more information
on the file format, please take a look at 'man 5 portage'
(in the /usr/portage/metadata/ section).


Thanks for reading, best regards,

Gentoo Overlays team

[1] https://bugs.gentoo.org/show_bug.cgi?id=385439
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-03 14:51:52 UTC
I've created a Gentoo-Wiki article on this:

http://wiki.gentoo.org/wiki/Repository_format/metadata/layout.conf#masters
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-14 17:54:22 UTC
Oh, my bug! So I'm slowly working on tools for scanning overlays for issues [1] but I don't expect anything really automatically-deployable anytime soon ;).

[1]:https://bitbucket.org/mgorny/overlay-qa-tools
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-23 18:03:00 UTC
Pretty much working. Working on bug filing right now.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-09-10 19:14:10 UTC
It's all handled officially by repo-mirror-ci project.