Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Multiple SYNC sources in make.conf

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
kipibenkipod
n00b
n00b
User avatar
Posts: 53
Joined: Thu Apr 15, 2010 8:05 am
Location: Israel

Multiple SYNC sources in make.conf

  • Quote

Post by kipibenkipod » Thu Apr 15, 2010 8:16 am

Hi,
I would like to use two sync sources in make.conf like this:

Code: Select all

SYNC="rsync://MYLOCASERVER/gentoo-portage rsync://PUBLICSERVER/gentoo-portage/" 
This setup don't work if MYLOCALSERVER is down. It will just abort after 3 tries, and will not try to use PUBLICSERVER.
Why there is no support for redundant SYNC mirrors?

Regards,
Kfir
Top
John R. Graham
Administrator
Administrator
User avatar
Posts: 10897
Joined: Tue Mar 08, 2005 3:39 pm
Location: Somewhere over Winder, Georgia, USA

  • Quote

Post by John R. Graham » Thu Apr 15, 2010 10:41 am

It's true that Portage doesn't support fallback sync servers. I don't know why. However, if you're not averse to a little scripting, this is trivial to correct:

Code: Select all

#!/bin/bash

if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then
    SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync
fi
- John
I can confirm that I have received between 0 and 499 National Security Letters.
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Thu Apr 15, 2010 12:08 pm

Indeed, I found that one too lately.
Top
kipibenkipod
n00b
n00b
User avatar
Posts: 53
Joined: Thu Apr 15, 2010 8:05 am
Location: Israel

  • Quote

Post by kipibenkipod » Thu Apr 15, 2010 12:20 pm

John R. Graham wrote:It's true that Portage doesn't support fallback sync servers. I don't know why. However, if you're not averse to a little scripting, this is trivial to correct:

Code: Select all

#!/bin/bash

if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then
    SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync
fi
- John
Ok thanks,
I did this in my sync script:

Code: Select all

SYNC_SERVERS="rsync://HOME/gentoo-portage rsync://FIRST_INTERNET_SERVER/gentoo-portage/ rsync://SECOND_INTERNET_SERVER/gentoo-portage/"

for server in $SYNC_SERVERS
do
        SYNC="$server" eix-sync -q && break
done
Thanks for your help.
Now I would like to know, why there are no redundant sync servers in make.conf

Thanks,
Kfir
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Thu Apr 15, 2010 2:37 pm

Because so far noone had a need for it, most people are happy with the round-robin DNS solution.
Top
kipibenkipod
n00b
n00b
User avatar
Posts: 53
Joined: Thu Apr 15, 2010 8:05 am
Location: Israel

  • Quote

Post by kipibenkipod » Thu Apr 15, 2010 6:31 pm

Genone wrote:Because so far noone had a need for it, most people are happy with the round-robin DNS solution.
How does the DNS solution work?
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Thu Apr 15, 2010 10:18 pm

The rsync.*.gentoo.org entries are actually groups of servers, so if one goes down you're just redirected to another one transparently. Of course that doesn't work if you want to use a private mirror as primary source.
Top
Timmer
Guru
Guru
Posts: 373
Joined: Tue Aug 24, 2004 2:51 am
Location: Duluth, MN, USA

  • Quote

Post by Timmer » Wed Aug 11, 2010 10:44 pm

Is there a bug for this yet to vote for?

I have my desktop set up as a private rsync for my laptop, but then if I'm not home (on vacation, for example), i can't sync to my home server. It's got a different address in the outside world. This would be a useful feature.
Top
cappellaiomatto
n00b
n00b
Posts: 11
Joined: Sat Sep 04, 2010 5:44 pm

  • Quote

Post by cappellaiomatto » Sat Sep 04, 2010 5:59 pm

Actually there are two bug reports: the first is about the documentation that incorrectly reported that was possible to specify multiple servers in the SYNC variable (maybe in the beginning it was allowed) [bug=43778]bug 43778[/bug]

The second is more relevant, but the poster missed the point, and it was closed as invalid: [bug=159740]bug 159740[/bug]

There are other places where this idea is stressed: http://gentoo-what-did-you-say.blogspot ... rvers.html.

Gentoo users are encouraged to set up their own rsync mirror, but there isn't a trivial way to specify a fall-back for sync mirrors...
Top
someone19
n00b
n00b
Posts: 51
Joined: Tue Sep 26, 2006 6:22 pm

  • Quote

Post by someone19 » Sun Sep 05, 2010 2:25 am

Timmer wrote:Is there a bug for this yet to vote for?

I have my desktop set up as a private rsync for my laptop, but then if I'm not home (on vacation, for example), i can't sync to my home server. It's got a different address in the outside world. This would be a useful feature.
My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.

The laptop make.conf is set to rsync.us.gentoo.org, and dnsmasq.conf has

Code: Select all

address=/rsync.gentoo.org/192.168.9.1
When I'm home all the gentoo machines hit the local mirror for the tree, when I'm remote it hits the normal round-robbin list of servers.

Similar can be done with a re-direct depending on your home network setup.
Top
cappellaiomatto
n00b
n00b
Posts: 11
Joined: Sat Sep 04, 2010 5:44 pm

  • Quote

Post by cappellaiomatto » Sun Sep 05, 2010 9:15 am

someone19 wrote:
My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.

The laptop make.conf is set to rsync.us.gentoo.org, and dnsmasq.conf has

Code: Select all

address=/rsync.gentoo.org/192.168.9.1
When I'm home all the gentoo machines hit the local mirror for the tree, when I'm remote it hits the normal round-robbin list of servers.

Similar can be done with a re-direct depending on your home network setup.
This solution is really neat, no rsync errors, no actual fall-back.
It is really far better than a client-side script, everything is managed server-side in a transparent way.

I'm already testing it! :)

BTW IIUC it should be

Code: Select all

address=/us.gentoo.org/192.168.9.1
or

Code: Select all

address=/rsync.us.gentoo.org/192.168.9.1
otherwise the client requests won't be intercepted.
Top
Bober2000
n00b
n00b
Posts: 2
Joined: Sun Jun 07, 2015 8:11 pm

  • Quote

Post by Bober2000 » Sun Jun 07, 2015 8:14 pm

Any updates here? Can I do a rollback to official SYNC server if my local is not aviable using new /etc/portage/repo.conf system?
Top
Apheus
Guru
Guru
Posts: 422
Joined: Sat Jul 12, 2008 7:16 pm

  • Quote

Post by Apheus » Mon Jun 08, 2015 7:02 am

Th sync type is in repos.conf nowadays, but I think portage honors make.conf's GENTOO_MIRRORS anyway. Regardless of sync-type. So you should be able to use GENTOO_MIRRORS for fallbacks.
Top
Bober2000
n00b
n00b
Posts: 2
Joined: Sun Jun 07, 2015 8:11 pm

  • Quote

Post by Bober2000 » Wed Jun 10, 2015 8:38 am

No portage says that GENTOO_MIRRORS is deprecated, and didn't respect any setting in it.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Wed Jun 10, 2015 9:20 am

i think every sync define in repos.conf are run
so you could sync two time, if first fail, it will certainly try the second, and if first has work, it will bail out the tree is already sync.
try copying your gentoo.conf to some alt.conf and setup your sync uri in it, enable auto-sync and it should do what you wish.

[alt-sync]
location = /usr/portage
sync-uri = the alt uri
auto-sync = yes

give it a try.
Top
Apheus
Guru
Guru
Posts: 422
Joined: Sat Jul 12, 2008 7:16 pm

  • Quote

Post by Apheus » Wed Jun 10, 2015 10:31 am

Bober2000 wrote:No portage says that GENTOO_MIRRORS is deprecated
Where does it say that? I have portage 2.2.20 here, and have not seen any message reagarding GENTOO_MIRRORS. And emerge --info lists it.
Top
Post Reply

16 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy