Mailing List Archive

rsync local mirror question
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.
Re: rsync local mirror question [ In reply to ]
On Wed, Oct 26, 2022 at 7:35 AM Walter Dnes <waltdnes@waltdnes.org> wrote:

> 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>."
Re: rsync local mirror question [ In reply to ]
On Tuesday, 25 October 2022 21:36:40 BST Walter Dnes wrote:
> 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

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
Re: rsync local mirror question [ In reply to ]
On Tue, Oct 25, 2022 at 11:07:14PM +0100, Michael wrote
>
> 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.
Re: rsync local mirror question [ In reply to ]
On Wednesday, 26 October 2022 03:06:19 BST Walter Dnes wrote:
> On Tue, Oct 25, 2022 at 11:07:14PM +0100, Michael wrote
>
> > 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.


> ...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.