View previous topic :: View next topic |
Author |
Message |
Efo Guru
Joined: 23 Jun 2005 Posts: 498
|
Posted: Sat Dec 02, 2017 6:56 pm Post subject: local overlay without repository [SOLVED] |
|
|
Hi all,
I would like to create an overlay where I can install obsolete package and do other experiments. I have layman installed, but I am not sure how to create my personal overlay without having to add a repository (i.e. everything contained in my overlay directory). Is layman a good approach to what I want to do? If yes, can anyone point me to some example where this has been done? It seems that wiki shows how to add a repository, but not how to do what I want.
Thanks!
Efo
Last edited by Efo on Sun Dec 03, 2017 11:10 pm; edited 1 time in total |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1186
|
Posted: Sat Dec 02, 2017 11:14 pm Post subject: |
|
|
From the Handbook:
Quote: | Finally, enable the repository on the local system by creating a repository configuration file inside /etc/portage/repos.conf, informing Portage where the local repository can be found:
FILE /etc/portage/repos.conf/localrepo.conf
[localrepo]
location = /usr/local/portage
|
It is further documented here https://wiki.gentoo.org/wiki/Custom_repository
EDIT:
Hey, I'm not sure if you don't know already the difference between an overlay and a repo, is actually that overlay is far more complex tool than what is needed to do this, which unless you plan to make it available to the public (i.e. host to others via the internet) just the route of a local repo is enough and it is well explained in the wiki in several places!
Following the description from the Handbook, should provide you with a place to store local ebuilds that will not sync to anywhere but where you can store them "locally" in. |
|
Back to top |
|
|
Efo Guru
Joined: 23 Jun 2005 Posts: 498
|
Posted: Sun Dec 03, 2017 4:07 am Post subject: |
|
|
Hi LIsLinuxIsSogood and thank you for the reply,
I am trying to switch my "layman" from make.conf to repos.conf, because it seems that make.conf will be obsolete. With make.conf I would add the local overlay to make.conf in /var/lib/layman: Code: | $ cat make.conf
PORTDIR_OVERLAY="
/var/lib/layman/mystuff
$PORTDIR_OVERLAY
" |
Now I want to switch to repos.conf, so I ran "layman-overlay-maker". Everything was successful and "mystuff.xml" was created in "/etc/layman/overlays". I generated it with minimal info: Code: | $ cat /etc/layman/overlays/mystuff.xml
<repositories encoding="unicode" version="1.1">
<repo priority="100" quality="experimental">
<name>mystuff</name>
<description>bla bla bla</description>
</repo>
</repositories> |
After that I ran "layman-updater -R" successfully.
Now I try to add the new overlay with "layman -a mystuff" and I get Code: | * Adding overlay...
* Exception: Overlay "mystuff" does not exist.
* CLI: Errors occurred processing action add
* Exception: Overlay "mystuff" does not exist. |
If I go by the naming (i.e. repos.conf), it makes sense that there may be an error because I am not really providing a repo; however, if make.conf will be obsolete you would expect the old capabilities to be included in in new method. On the other hand, "layman-overlay-maker" didnt complain about anything and the issue may reside elsewhere. Perhaps I am mistaken and make.conf will not be obsolete and layman design includes hybrid repos.conf and make.conf? In this case what should "conf_type :" in "/etc/layman/layman.cfg" read?
As always, any idea/suggestion is more than welcome.
Edit:
More info
Code: | $ layman -L
...
* zx2c4 [Git ] (git://git.zx2c4.com/portage, http...)
* zyrenth [Git ] (https://github.com/kabili207/zyre...)
* CLI: Errors occurred processing action list
* Failed to fetch overlay list!
* Original Error was:
* Failed to parse the overlays list fetched from file:///etc/layman/overlays/mystuff.xml
* This means that the downloaded file is somehow corrupt or there was a problem with the webserver. Check the content of the file. Error was:
* unsupported format character '"' (0x22) at index 28 |
|
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 758 Location: /home
|
Posted: Sun Dec 03, 2017 7:21 am Post subject: |
|
|
I dont really understand what make.conf being obsolete means. You can just pretty much get a working local overlay by doing this:
Quote: |
mkdir -p /var/lib/overlays/localhost
cd /var/lib/overlays/localhost
mkdir metadata profiles
|
Then make a file /var/lib/overlays/localhost/metadata/layout.conf that contains
and a 2nd file /var/lib/overlays/localhost/profiles/repo_name that has the repo name,
Next move into /etc/portage/repos.conf/ and make a file called localhost.conf there that has following in it,
Code: |
[localhost]
location = /var/lib/overlays/localhost/
masters = gentoo
auto-sync = no
|
Obviously you can change the directory as you like it. Should work like that. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
|
Back to top |
|
|
Efo Guru
Joined: 23 Jun 2005 Posts: 498
|
Posted: Sun Dec 03, 2017 11:09 pm Post subject: |
|
|
Hi Charles17,
that's exactly what I was looking for. I dropped layman and moved to eselect. Thanks for the links, I feel a little out of touch for not knowing it existed.
Thanks again to all for the help!
Cheers,
Efo |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1186
|
Posted: Mon Dec 04, 2017 6:10 am Post subject: |
|
|
Quote: | Thanks for the links, I feel a little out of touch for not knowing |
The links that Charles17 posted are good, I would just add this one to the mix:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/CustomTree#Defining_a_custom_repository
This description is more succint the most direct description with all the information in one short piece of a page, and it also tells you the options for working with multiple repos. Lo and behold, eselect-repository is listed in there along with overlay. Beats me, I've only used one of them, and only to install some printer drivers and an overlay of Gnome with openrc. Other than rare examples of packages not being available in the main tree, I don't know why anyone would opt for a more complicated system for managing the repos than the one that is above. Which it will also provide you far more control and at less of a cost of having to learn a new tool. If that is something that Gentoo does to improve the situation it is probably for the more complicated situations than this one or others, when they provide 2 or 3 ways of doing something that other systems only have 1 option for. So go drive yourself crazy with eselect repositories if you want, just know there is nothing that either of these tools (layman or eselect) can do that can't work with some basic knowledge and following the very simple instructions. |
|
Back to top |
|
|
|