Tuesday, February 1, 2011

Using github and layman for my own gentoo overlay

Since I almost always have a local portage overlay in any gentoo machine I create, I've started to maintain in github.

Now, originally I just pulled the repository to /usr/local/portage.git on each machine and added the dir to PORTDIR_OVERLAY in make.conf.

But since I already have other third party overlays and maintain them using layman, I though why not use that for my own overlay as well?

So all is required is to create a custom repositories xml file and point to it from the layman config.

The repostiories xml (this one is using https since I can't access git from work - the down side is that it ask for password on every layman sync, but git://github.com/asssaf/portage.git or git@github.com:asssaf/portage.git can be used where this is not a problem):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE repositories SYSTEM "/dtd/repositories.dtd">
<repositories xmlns="" version="1.0">
<repo quality="experimental" status="unofficial">
<name><![CDATA[mygithub]]></name>
<description><![CDATA[mygithub]]></description>
<homepage>https://github.com/asssaf/portage</homepage>
<owner>
<email></email>
<name><![CDATA[Assaf]]></name>
</owner>
<source type="git">https://asssaf@github.com/asssaf/portage.git</source>
<feed></feed>
</repo>
</repositories>

And in /etc/layman/layman.cfg, add the line in bold:

overlays : http://www.gentoo.org/proj/en/overlays/repositories.xml
file:///etc/layman/localrepositories.xml


The overlay will be available for addition using 'layman -a mygithub' and pulled into (by default) /var/lib/layman/mygithub.

No comments:

Post a Comment