Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lost local overlay
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2546
Location: Illinois, USA

PostPosted: Fri Apr 20, 2018 1:02 am    Post subject: lost local overlay Reply with quote

When I try to add it back, I get:
Code:
* Adding overlay...
 * Overlay "local" is not official. Continue installing? [y/n]: y
 * Running Rsync... # /usr/bin/rsync -rlptDvz --progress --delete --delete-after --timeout=180 --exclude=distfiles/* --exclude=local/* --exclude=packages/* rsync://127.0.0.1/usr/local/portage/ /var/lib/layman/local
@ERROR: Unknown module 'usr'
rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]
 * Failure result returned from Rsync
 * Deleting _empty_ directory "/var/lib/layman/local"
 * Adding repository "local" failed!

 * CLI: Errors occurred processing action add
 * Adding repository "local" failed!

I've had the overlay for years. Trying to get it back, I followed the directions at https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/CustomTree#Defining_a_custom_repository
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5137

PostPosted: Fri Apr 20, 2018 10:31 am    Post subject: Reply with quote

repos.conf should contain empty sync lines, or else it'll inherit the rsync from its parent (::gentoo):
Code:
[local]
location = /usr/local/portage
sync-type =
sync-uri =
Back to top
View user's profile Send private message
P.Kosunen
Apprentice
Apprentice


Joined: 21 Nov 2005
Posts: 278
Location: Finland

PostPosted: Fri Apr 20, 2018 1:09 pm    Post subject: Reply with quote

Code:
auto-sync = no


Apparently disabling auto-sync also does the trick.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2546
Location: Illinois, USA

PostPosted: Fri Apr 20, 2018 1:34 pm    Post subject: Reply with quote

Neither one seems to work. I changed the xml file back to 127.0.0.1 but the error message still says 192.168.0.104.
I stopped iptables but that didn't help, either.

Is there a problem with the xml?
Code:
MSI ~ # cat /etc/layman/overlays/local.xml
<?xml version='1.0' encoding='UTF-8'?>
<repositories encoding="UTF-8" version="1.1">
  <repo priority="50" quality="experimental">
    <name>local</name>
    <description>local /usr/local/portage</description>
    <owner>
      <email>me@nowhere.com</email>
      <name>me</name>
    </owner>
    <source type="rsync">rsync://127.0.0.1/usr/local/portage</source>
  </repo>
</repositories>


EDIT:
Code:
MSI overlays # cat *.xml|grep source
    <source type="rsync">rsync://127.0.0.1/usr/local/portage</source>
    <source type="rsync">rsync://192.168.0.102/nosystemd-overlay</source>
    <source type="rsync">rsync://192.168.0.102/oldgentoo</source>
    <source type="rsync">rsync://192.168.0.102/redhat-free</source>
The other (working) overlays are located at /usr/local/... on the server. This seems to be a clue.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5952
Location: Room 101

PostPosted: Fri Apr 20, 2018 2:35 pm    Post subject: Reply with quote

Tony0945 ...

is there a reason for you to sync from one part of the filesystem to another? I don't see why are you using layman, you can simply use repos.conf to point to that repo:

/etc/portage/repos.conf/local.conf:
[local]
location = /usr/local/portage
masters = gentoo
auto-sync = no
priority = 10000

... am I missing something?

best ... khay
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2546
Location: Illinois, USA

PostPosted: Fri Apr 20, 2018 5:32 pm    Post subject: Reply with quote

Khay,
That didn't work either.

What finally worked (yes, I stumbled into it):

First, forget layman-overlay-maker.

KEY STEP
Locate files named /var/lib/layman/cache_* that include your overlay name.
Code:
 grep local /var/lib/layman/cache_*
/var/lib/layman/cache_37add14c828b4d6230f9957914554dfe.xml:    <name>local</name>
/var/lib/layman/cache_37add14c828b4d6230f9957914554dfe.xml:    <description>locally defined ebuilds</description>
/var/lib/layman/cache_37add14c828b4d6230f9957914554dfe.xml:    <source type="rsync">rsync://127.0.0.1/mylocal</source>

Unless you do this, your other changes won't be noticed by layman.

Create or edit /etc/layman/overlays/local.xml
Use other overlay xml files as a template.
Code:
<?xml version='1.0' encoding='UTF-8'?>
<repositories encoding="UTF-8" version="1.1">
  <repo priority="9999" quality="experimental">
    <name>local</name>
    <description>locally defined ebuilds</description>
    <owner>
      <email>me@me.com</email>
      <name>me</name>
    </owner>
    <source type="rsync">rsync://127.0.0.1/mylocal</source>
  </repo>
</repositories>

Edit /etc/rsyncd.conf
Add the follwing:
Code:


[mylocal]
path=/usr/local/portage
comment=Local Portage tree
exclude= /distfiles /packages /temp

Execute the following
Code:
layman -a local
layman -S
eix-sync

I hope I haven't omitted a step because I've been messing with this for two and half hours.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5952
Location: Room 101

PostPosted: Fri Apr 20, 2018 6:04 pm    Post subject: Reply with quote

Tony0945 wrote:
Khay, That didn't work either.

Tony0945 ... well, it seems you're still using layman, and so you not only have it duplicated, but are going to have the potential conflict of both layman and repos.conf expecting they are handling that repo ... and I expect your problem lies there.

As for it "working" or not, it does work, other than 'path=/usr/local/portage' the above is from my own install, and works fine ... but I'm not also trying to have layman sync it from one part of the filesystem to another ... which leads me to my initial question, why do you need to use layman for a local overlay?

best ... khay
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2546
Location: Illinois, USA

PostPosted: Fri Apr 20, 2018 8:17 pm    Post subject: Reply with quote

khayyam wrote:
[ which leads me to my initial question, why do you need to use layman for a local overlay?

best ... khay

Well, really because that's what the wiki says is the standard way. We used to do PORTDIR_OVERLAY, but my understanding is that that's deprecated.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 5952
Location: Room 101

PostPosted: Fri Apr 20, 2018 9:08 pm    Post subject: Reply with quote

khayyam wrote:
[ which leads me to my initial question, why do you need to use layman for a local overlay?

Tony0945 wrote:
Well, really because that's what the wiki says is the standard way. We used to do PORTDIR_OVERLAY, but my understanding is that that's deprecated.

Tony0945 ... I see, I haven't read what the wiki suggests, but the only thing depreciated is the entry in make.conf (and/or the layman supplied /var/lib/layman/make.conf). This has been replaced by repos.conf, so you need only use that.

... and BTW, PORTDIR_OVERLAY is still in use:

Code:
% eix --print PORTDIR_OVERLAY
/var/db/repositories/foo-overlay
/var/db/repositories/local
/var/db/repositories/mv
/var/db/repositories/octopus
/var/db/repositories/weuxel
% print -rl /etc/portage/repos.conf/*(.)
/etc/portage/repos.conf/foo.overlay.conf
/etc/portage/repos.conf/gentoo.conf
/etc/portage/repos.conf/local.conf
/etc/portage/repos.conf/mv.conf
/etc/portage/repos.conf/octopus.conf
/etc/portage/repos.conf/weuxel.conf

So, layman is superfluous ... useful perhaps if you want a quick way to add/remove overlays, but portage functions just as well without it.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum