Discussion:
[gentoo-user] rsync local mirror question
(too old to reply)
Walter Dnes
2022-10-25 20:40:01 UTC
Permalink
I followed https://wiki.gentoo.org/wiki/Local_Mirror instructions for
doing a local rsync mirror. I ran commented the rsync mirrors line in
the client's make.conf and ran "emerge --sync". The client still
synced from a server on the internet. Do I need to manually force
rsync to go local, e.g...

[thimk][root][~] rsync 192.168.1.252::
gentoo-portage Gentoo ebuild repository
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Adam Carter
2022-10-25 22:10:01 UTC
Permalink
Post by Walter Dnes
I followed https://wiki.gentoo.org/wiki/Local_Mirror instructions for
doing a local rsync mirror. I ran commented the rsync mirrors line in
the client's make.conf and ran "emerge --sync". The client still
synced from a server on the internet. Do I need to manually force
rsync to go local, e.g...
Maybe you missed this
"Now, make the other computers use the local rsync mirror instead of a
public one, by changing the *sync-uri* entry in the appropriate file in
/etc/portage/repos.conf/
<https://wiki.gentoo.org/wiki/Project:Portage/Sync#Portage_configuration>."
Michael
2022-10-25 22:10:01 UTC
Permalink
Post by Walter Dnes
I followed https://wiki.gentoo.org/wiki/Local_Mirror instructions for
doing a local rsync mirror. I ran commented the rsync mirrors line in
the client's make.conf and ran "emerge --sync". The client still
synced from a server on the internet. Do I need to manually force
rsync to go local, e.g...
gentoo-portage Gentoo ebuild repository
No, you shouldn't have to do any such thing. Just make sure you have set up
in your '/etc/portage/repos.conf/gentoo.conf' the correct rsync mirror and
commented out the server on the Internet; e.g.:

[snip ...]

sync-type = rsync
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-uri = rsync://192.168.1.252/gentoo-portage
Walter Dnes
2022-10-26 02:10:01 UTC
Permalink
Post by Michael
sync-type = rsync
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-uri = rsync://192.168.1.252/gentoo-portage
Thanks Michael (and Adam). I did indeed forget to update sync-uri.
I subscribe to Netflix, which requires Google-Chrome. It nags for
security updates every few days, so I'll soon find out how well the
corrected mirror setup works.

Question: Can I leave "GENTOO_MIRRORS" uncommented in make.conf? The
minimal change for my laptop would be...

...when at home on my LAN...

#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-uri = rsync://192.168.1.252/gentoo-portage

...when taking the laptop out of my apartment...

sync-uri = rsync://rsync.gentoo.org/gentoo-portage
#sync-uri = rsync://192.168.1.252/gentoo-portage
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Michael
2022-10-26 09:00:01 UTC
Permalink
Post by Walter Dnes
Post by Michael
sync-type = rsync
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-uri = rsync://192.168.1.252/gentoo-portage
Thanks Michael (and Adam). I did indeed forget to update sync-uri.
I subscribe to Netflix, which requires Google-Chrome. It nags for
security updates every few days, so I'll soon find out how well the
corrected mirror setup works.
Question: Can I leave "GENTOO_MIRRORS" uncommented in make.conf? The
minimal change for my laptop would be...
Yes, you may leave your GENTOO_MIRRORS URIs as you have it, unless you don't
want to be downloading the same source files more than once for machines in
your LAN.

If downloading chrome source files many times a week separately for multiple
machines is no fun, you can set up a local http proxy caching server with its
webroot pointing to its distfiles directory. Then in your clients'
GENTOO_MIRRORS directive add as the first mirror your LAN Gentoo address/port.
The only drawback is you will have to sync and then emerge --fetchonly, or --
fetch-all-uri, on the local mirror before you start emerging the various
client PCs. A cron job can ensure this is all done by the time you're ready
to run sync & emerge on the rest of your clients.

You can use any number of available webservers with small footprint; e.g.
nginx, lighttpd, boa, etc. The http-replicator is no longer available.
Post by Walter Dnes
...when at home on my LAN...
#sync-uri = rsync://rsync.gentoo.org/gentoo-portage
sync-uri = rsync://192.168.1.252/gentoo-portage
...when taking the laptop out of my apartment...
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
#sync-uri = rsync://192.168.1.252/gentoo-portage
I don't know if you can set more than one sync server, so if the first is not
available it will try the next and so on. When the sync URI was defined in
make.conf this was the case. I suppose you can try it. If it works it'll
save you having to manually edit the file each time you move your laptop away
from your LAN.
Walter Dnes
2022-10-26 15:50:01 UTC
Permalink
Post by Michael
No, you shouldn't have to do any such thing. Just make sure you
have set up in your '/etc/portage/repos.conf/gentoo.conf' the correct
OK, I tried it on my other used Lenovo laptop (thimk2) and it works.
But "inquiring minds want to know"...

* In your instructions '/etc/portage/repos.conf/gentoo.conf' is the file
to change sync-uri in (and it works).

* In https://wiki.gentoo.org/wiki/Local_Mirror the file to change is
given as /etc/portage/repos.conf/gentoo-mirror.conf There is no such
file on my system. Should I file a documentation bug?
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Michael
2022-10-26 16:50:01 UTC
Permalink
Post by Walter Dnes
Post by Michael
No, you shouldn't have to do any such thing. Just make sure you
have set up in your '/etc/portage/repos.conf/gentoo.conf' the correct
OK, I tried it on my other used Lenovo laptop (thimk2) and it works.
But "inquiring minds want to know"...
* In your instructions '/etc/portage/repos.conf/gentoo.conf' is the file
to change sync-uri in (and it works).
* In https://wiki.gentoo.org/wiki/Local_Mirror the file to change is
given as /etc/portage/repos.conf/gentoo-mirror.conf There is no such
file on my system. Should I file a documentation bug?
Yes, I think it should be updated. This wiki page states what's currently the
convention:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/
Files#Gentoo_ebuild_repository

However, *.conf files can be nested and portage will parse them all the same.
Walter Dnes
2022-10-27 00:30:02 UTC
Permalink
Post by Michael
Post by Walter Dnes
* In https://wiki.gentoo.org/wiki/Local_Mirror the file to change is
given as /etc/portage/repos.conf/gentoo-mirror.conf There is no such
file on my system. Should I file a documentation bug?
Yes, I think it should be updated.
Problem; "https://bugs.gentoo.org/enter_bug.cgi" specifically says
"Documentation: Documentation other than Wiki and translations."
The documentation problem is on the wiki page. Now what?
--
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars. Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer. All
those moments, will be lost in time like tears in rain... time to die.
Michael
2022-10-27 08:00:01 UTC
Permalink
Post by Walter Dnes
Post by Michael
Post by Walter Dnes
* In https://wiki.gentoo.org/wiki/Local_Mirror the file to change is
given as /etc/portage/repos.conf/gentoo-mirror.conf There is no such
file on my system. Should I file a documentation bug?
Yes, I think it should be updated.
Problem; "https://bugs.gentoo.org/enter_bug.cgi" specifically says
"Documentation: Documentation other than Wiki and translations."
The documentation problem is on the wiki page. Now what?
I suppose you create an account and edit it? Or see if you can reach out to
the last contributor and perhaps he will correct it:

https://wiki.gentoo.org/wiki/User:Ris

Loading...