The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Creating Your Own Overlay"
m (add portage category and priority value) |
|||
Line 1: | Line 1: | ||
This page intends to get your local overlay going | This page intends to get your local overlay going. | ||
==Using overlay with Funtoo's kits system== | |||
For the overlays we will use a minor change for the main meta-repo described in Funtoo kits: https://github.com/funtoo/meta-repo/blob/master/README.rst | |||
{{console|body= | |||
###i## install -d /var/git | |||
###i## cd /var/git | |||
###i## git clone https://github.com/funtoo/meta-repo.git | |||
###i## cd meta-repo | |||
###i## git submodule init | |||
###i## git submodule update | |||
###i## rm /usr/share/portage/config/repos.conf | |||
###i## ln -s /var/git/meta-repo/repos.conf/funtoo /etc/portage/repos.conf | |||
###i## chown -R portage:portage /var/git/meta-repo | |||
}} | |||
In above shown commands we created the "funtoo" symlink to the regular portage tree. This allows to add any configuration files of any names you prefer for any custom repositories you like, such as overlays, and will not interfere with the meta-repo. | |||
==Creating the overlay== | |||
We will use <code>/var/git/overlay</code> as primary location directory for the overlay. The location can be anywhere on your system, below is an example location tied with <code>/var/git/</code>, is where regular tree located too. | |||
{{console|body=###i## | {{console|body= | ||
###i## mkdir /var/git/overlay | |||
}} | |||
{{file|name=/etc/portage/repos.conf/ | Clone the [http://git.funtoo.org/skeleton-overlay skeleton overlay] from github. Change the repository's name from ''skeleton'' to a name as it will appear when emerging. Here we use <code>myoverlayname</code> as an example, choose your name accordingly. | ||
{{console|body=###i## cd /var/git/overlay | |||
###i## git clone http://git.funtoo.org/skeleton-overlay.git | |||
###i## mv skeleton-overlay myoverlayname | |||
}} | |||
==Configure the overlay== | |||
We will enable portage settings required for the overlay to be functional. | |||
{{console|body= | |||
###i## echo "myoverlayname" > /var/git/overlay/myoverlayname/profiles/repo_name | |||
###i## echo "masters = core-kit" >> /var/git/overlay/myoverlayname/metadata/layout.conf}} | |||
{{file|name=/etc/portage/repos.conf/myoverlayname.conf|lang=|desc=Add your overlay to portage|body= | |||
[myoverlayname] | [myoverlayname] | ||
location = /var/overlay/ | location = /var/git/overlay/myoverlayname | ||
masters = | masters = core-kit | ||
auto-sync = no | auto-sync = no | ||
priority = 10 | priority = 10 | ||
}} | }} | ||
{{tip|The <code>priority</code> key is needed to ensure, that your overlay has higher priority | {{tip|The <code>priority</code> key is needed to ensure, that your overlay has higher priority to the kit's overlays, which are default priority 1}} | ||
You're ready to | This would be starting point for your own overlay. You're ready to add new ebuilds that are not present in portage tree or fix the ebuilds from portage tree you are no satisfied with, updating of old versions or removing of new ebuild versions. | ||
[[Category:Portage]] | [[Category:Portage]] |
Revision as of 05:25, August 31, 2017
This page intends to get your local overlay going.
Using overlay with Funtoo's kits system
For the overlays we will use a minor change for the main meta-repo described in Funtoo kits: https://github.com/funtoo/meta-repo/blob/master/README.rst
root # install -d /var/git root # cd /var/git root # git clone https://github.com/funtoo/meta-repo.git root # cd meta-repo root # git submodule init root # git submodule update root # rm /usr/share/portage/config/repos.conf root # ln -s /var/git/meta-repo/repos.conf/funtoo /etc/portage/repos.conf root # chown -R portage:portage /var/git/meta-repo
In above shown commands we created the "funtoo" symlink to the regular portage tree. This allows to add any configuration files of any names you prefer for any custom repositories you like, such as overlays, and will not interfere with the meta-repo.
Creating the overlay
We will use /var/git/overlay
as primary location directory for the overlay. The location can be anywhere on your system, below is an example location tied with /var/git/
, is where regular tree located too.
root # mkdir /var/git/overlay
Clone the skeleton overlay from github. Change the repository's name from skeleton to a name as it will appear when emerging. Here we use myoverlayname
as an example, choose your name accordingly.
root # cd /var/git/overlay root # git clone http://git.funtoo.org/skeleton-overlay.git root # mv skeleton-overlay myoverlayname
Configure the overlay
We will enable portage settings required for the overlay to be functional.
root # echo "myoverlayname" > /var/git/overlay/myoverlayname/profiles/repo_name root # echo "masters = core-kit" >> /var/git/overlay/myoverlayname/metadata/layout.conf
/etc/portage/repos.conf/myoverlayname.conf
- Add your overlay to portage[myoverlayname] location = /var/git/overlay/myoverlayname masters = core-kit auto-sync = no priority = 10
The priority
key is needed to ensure, that your overlay has higher priority to the kit's overlays, which are default priority 1
This would be starting point for your own overlay. You're ready to add new ebuilds that are not present in portage tree or fix the ebuilds from portage tree you are no satisfied with, updating of old versions or removing of new ebuild versions.