1 |
On 07/09/2014 09:38 AM, James wrote: |
2 |
> Hello, |
3 |
> |
4 |
> I use the stable portage tree for most everything. |
5 |
> I use and test quite a few overlays. |
6 |
> Both of these are great. |
7 |
> |
8 |
> But now, I'm hacking a small collection my own ebuilds that focus |
9 |
> on some specific needs and science, which I shall refer to collectively as |
10 |
> local ebuilds. I'm curious how other folks would suggest to keep them |
11 |
> separate from the main portage tree and the overlays, but easily |
12 |
> maintainable on my own workstation. |
13 |
> |
14 |
|
15 |
Create your own overlay. There isn't much to it, you just create a |
16 |
directory somewhere and start filling it with ebuilds. To tell portage |
17 |
about it, add the directory to PORTDIR_OVERLAY. |
18 |
|
19 |
Every overlay should have two files, profiles/repo_name which contains |
20 |
only the name of the repo, and metadata/layout.conf which contains |
21 |
something like, |
22 |
|
23 |
repo-name = your-overlay |
24 |
masters = gentoo |
25 |
eapis-deprecated = 0 1 2 3 4 |
26 |
|
27 |
(The profiles/repo_name file is being phased out IIRC, but stable |
28 |
portage will still complain if it's missing.) |
29 |
|
30 |
When you add ebuilds, place them under category/package-name just like |
31 |
they would appear in $PORTDIR. |
32 |
|
33 |
For bonus points, you can publish your overlay on e.g. github to get a |
34 |
better feel for what it's like committing to the tree. When you modify |
35 |
an ebuild, you should be running `repoman manifest` to generate the new |
36 |
manifest -- otherwise you won't be able to emerge it. After that, you |
37 |
should run `repoman full` to check for problems (e.g. typos, bad |
38 |
dependencies). Finally, if you're using a VCS, `repoman commit` to |
39 |
commit your changes. Those are essentially the steps used to commit to |
40 |
the main tree. |
41 |
|
42 |
You can even tell portage to sign Manifests using your GPG key: |
43 |
|
44 |
http://devmanual.gentoo.org/general-concepts/manifest/ |
45 |
|
46 |
The VCS/signing are optional, but give you a better feel for how things |
47 |
are really done. The knowledge you'll gain from running your own overlay |
48 |
is useful when you're contributing to other people's overlays, or even |
49 |
when filing bugs. |