[SOLVED] rate-arch-mirrors: client-side map-aware tool

A place to share tips, guides, application configurations and scripts about all elements of ArcoLinux, all of your personal configurations to make ArcoLinux awesome
Post Reply
westandskif
recruit crewman
Posts: 2
Joined: Sun Apr 04, 2021 10:19 pm

[SOLVED] rate-arch-mirrors: client-side map-aware tool

Post by westandskif »

Hello everyone!

I've built an alternative to Reflector, which:
- knows something about internet infrastructure (submarine cables and at least numbers of internet exchanges per country)
- doesn't spend eternity on trying to load a file of a fixed size from a half-dead mirror
- knows when the speed has stabilized and is able to stop a speed test
- tests concurrently during the phase #1, where dirty checks occur
- re-tests top N mirrors - phase #2
- is ok to run before each system update.

Links:
- https://github.com/westandskif/rate-arch-mirrors
- AUR rate-arch-mirrors-bin - pre-built binary with statically linked musl
- AUR rate-arch-mirrors - needs rust, dynamically links glibc

This is an example of output: github gist

Any feedback is much appreciated!

User avatar
erikdubois
Captain
Posts: 4678
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: rate-arch-mirrors: client-side map-aware tool

Post by erikdubois »

Well I have a question

Can we have a switch (might be there already) to just write (-w) the result to /etc/pacman.d/mirrorlist?
Having a config file somewhere is most of the time very helpful to read and adjust all the options.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

User avatar
erikdubois
Captain
Posts: 4678
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [TO TEST OUT] rate-arch-mirrors: client-side map-aware tool

Post by erikdubois »

We created an alias to test it out.

Code: Select all

sudo pacman -S rate-arch-mirrors-bin
alias mirrorr="rate-arch-mirrors | sudo tee /etc/pacman.d/mirrorlist"

Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

westandskif
recruit crewman
Posts: 2
Joined: Sun Apr 04, 2021 10:19 pm

Re: rate-arch-mirrors: client-side map-aware tool

Post by westandskif »

Hi!
Thank you very much for recording the video on this! :)
erikdubois wrote:
Mon Apr 05, 2021 7:33 am
Can we have a switch (might be there already) to just write (-w) the result to /etc/pacman.d/mirrorlist?
Having a config file somewhere is most of the time very helpful to read and adjust all the options.
Sure, I'll add ``--save`` option and let you guys know - https://github.com/westandskif/rate-arc ... s/issues/2

User avatar
TomInTheDungeon
Crewman
Posts: 63
Joined: Thu Dec 13, 2018 2:39 pm
Location: Paul, Idaho, USA

Re: [TO TEST OUT] rate-arch-mirrors: client-side map-aware tool

Post by TomInTheDungeon »

Tried it, LOVED IT! :D :D :D Much faster than "mirror", finds available and fast sites. Thanks to both of you for making this available!
From "The Orville": Humans - The hillbillies of the universe!

User avatar
TomInTheDungeon
Crewman
Posts: 63
Joined: Thu Dec 13, 2018 2:39 pm
Location: Paul, Idaho, USA

Re: [TO TEST OUT] rate-arch-mirrors: client-side map-aware tool

Post by TomInTheDungeon »

I had to reinstall ArcoLinuxS...what happened to mirrorr??? I even reinstalled rate-mirrors-bin, put the alias in .bash-personal AND .bashrc, and source ./.bashrc to refresh. When I type "mirrorr" into the terminal, it replies with bash: rate-arch-mirrors: command not found. :cry:
***Erik: Also a request...PLEASE put "mirrorr" in .bashrc permanently.***

Code: Select all

[tom@Big ~]$ yay -S rate-mirrors-bin
[sudo] password for tom: 
warning: rate-mirrors-bin-0.9.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)                             Old Version  New Version  Net Change  Download Size

arcolinux_repo_3party/rate-mirrors-bin  0.9.0-1      0.9.0-1        0.00 MiB       3.08 MiB

Total Download Size:   3.08 MiB
Total Installed Size:  7.68 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 rate-mirrors-bin-0.9.0-1-x86_64
(1/1) checking keys in keyring 
(1/1) checking package integrity
(1/1) loading package files
(1/1) checking for file conflicts 
(1/1) checking available disk space 
:: Processing package changes...
(1/1) reinstalling rate-mirrors-bin
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[tom@Big ~]$ rate-mirrors-bin
bash: rate-mirrors-bin: command not found
[tom@Big ~]$ rate-arch-mirrors-bin
bash: rate-arch-mirrors-bin: command not found
[tom@Big ~]$ mirrorr
bash: mirrorr: command not found
[tom@Big ~]$ rate-mirrors-bin-0.9.0-1
bash: rate-mirrors-bin-0.9.0-1: command not found
From "The Orville": Humans - The hillbillies of the universe!

User avatar
erikdubois
Captain
Posts: 4678
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [TO TEST OUT] rate-arch-mirrors: client-side map-aware tool

Post by erikdubois »

We have added an alias to our OS some months ago

Code: Select all

alias ram='rate-mirrors --allow-root arch | sudo tee /etc/pacman.d/mirrorlist'
Install the correct application

Code: Select all

sudo pacman -S rate-mirrors-bin
Ps we never had mirrorr - must be you alias

Ps the correct command is "rate-mirrors"
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

User avatar
TomInTheDungeon
Crewman
Posts: 63
Joined: Thu Dec 13, 2018 2:39 pm
Location: Paul, Idaho, USA

Re: [SOLVED] rate-arch-mirrors: client-side map-aware tool

Post by TomInTheDungeon »

Thanks Erik. I got the alias from the section just above your video in this post. Might be a good time for an edit, so as not to mislead others who appreciate this addition to Arco, which actually, you just did!
From "The Orville": Humans - The hillbillies of the universe!

User avatar
erikdubois
Captain
Posts: 4678
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [SOLVED] rate-arch-mirrors: client-side map-aware tool

Post by erikdubois »

There will be always changes over time.
Going back to all things published and changing them is not possible.
Name changes are that uncommon and with common sense people will make the association.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

Post Reply

Return to “Configs, Scripts”