Shiny-mirrors - A alternative to pacman-mirrors made in Rust Lang 🦀

Hey fellow Manjaro users :wave:

I basically rewrote pacman-mirrors in Rust, but it’s not just rewrite for the sake of it. :crazy_face:
shiny-mirrors is more user oriented compared to pacman-mirrors.
I tried to make it more user-friendly not sure if i succeeded, haven’t got much of input so far so I am not 100% how should I shape it further.

The English grammar may be very very bad so… if you want to you can improve that, feel free to create PR.
My mother language is not English.

I added bunch of useful features as IPv filtering, measure method(total - includes DNS query, establishing a connection, transfer - only download itself), option to choose file size to measure with and much more.
It should be able to handle more possible errors, it shouldn’t bail on you as much as pacman-mirrors, therefore you having more chance at getting mirrors, for example with pacman-mirrors it’s happening often it can’t find any mirrors, that shouldn’t happen almost at all with shiny-mirrors, if there is mirror in the selected or gotten country from IP endpoint then it finds in what continent the country is and tries to get mirrors from that continent.
I kinda went the way by default to find the most quality mirrors and not the most recently updated as pacman-mirrors but if you want to do that you can add after refresh subcommand arg flag -u.

It’s pacman-mirrors with bunch of additional features, better error handling, type safety and much more thanks to it being written in Rust Lang.

It has autocompletion for Zsh, Fish and of course Bash.
It comes with systemd service, timer which you can enable to refresh mirrors weekly in the background. (if using shiny-mirrors service I recommend disabling the pamac-mirrorlist.timer,service)
When running first time it will find your branch from current mirrorlist, if it can’t find the branch in the mirrorlist it will ask the person with an interactive text menu.
There is also manual page man shiny-mirrors
and much more…

If you encounter any issue or have an idea for improvement don’t worry to create a ticket on the repo.

In the last commits(Already in all branches) I reworked the CLI part because Clap as of 3.0 version there become available new type based construction of the “CLI” and I decided it would be nice to make a post about shiny-mirrors on the forum because it feels much more robust with the type based CLI construction.

Examples:

My favorite command: sudo shiny-mirrors refresh -f medium -M transfer

shiny-mirrors status / shiny-mirrors – Show the status of mirrors you are using

sudo shiny-mirrors config --branch – Open TUI to change the branch

sudo shiny-mirrors refresh – Generate a mirror list for Manjaro Linux with the default behavior

shiny-mirrors config / shiny-mirrors config show – Show the settings it was able to parse from the settings file

On every subcommand you can use --help

WARNING: Don’t use the shiny-mirrors from AUR, that version is made for distros that are using Arch mirrors, so it will retrieve Arch mirrors and if you try to system update with that mirrors in local mirrorlist it can potentially break your system.

Repository: Arisa Snowbell / Shiny Mirrors · GitLab :crab:

9 Likes

Thanks for the hard work!
I tried shiny-mirrors and it feels simpler and runs faster than pacman-mirrors . But I have a little question, can I skip the TUI branch setting? Something like sudo shiny-mirrors config --branch unstable, without having to choose branch manually.

2 Likes

Thank you,
there is the possibility of it but I hidden it from --help as it should be used in scripts only really.
this way it’s in package thats in current repos its sudo shiny-mirrors config --branch_value Stable|Testing|Unstable and in the latest commits it changed to sudo shiny-mirrors config --branch-value Stable|Testing|Unstable

1 Like

I actually read the help document before and tried that command. At that time it didn’t work, but it works now. Thank you so much!

1 Like

Groundless accusations

That is not true

That is not true

Don’t spread FUD to promote your own work.

For the first: Thanks to Rust type safety shiny-mirrors is able to handle more cases, pacman-mirrors as I reported on the repo some problems with status and so on, thanks to rust it didn’t happen in my case

For the second: I am sorry for that, I got the understanding that there is issue finding new maintainer that it’s like not main priority, I will edit the post, I genuinely misunderstood

1 Like

What got me off was the leading senctences - pacman-mirrors is filled with bugs and unmaintained - and that is simply not true. It becomes apparent whrn you look at the repo.

It is bad manners to do self-promoting by critiziing other solutions - it is simply bad taste.

Your app is great - it serves a different purpose - to those interested.

pacman-mirrors provides the core mirror list just like pacman-mirrors on Arch.

The whole mirrorshopping thing has always been a decision - maintenance wise.

You get a far more stable system by sticking to one primary mirror which is stable and reliable. (mask pamac-mirrorlist.timer or create a custom pool with one mirror - which is my recommendation)

1 Like

I am interested in seeing which bugs you fixed. Could you provide a side by side comparison?

1 Like

I am apologize for saying pacman-mirrors is unmaintained, its the way I understood it from the issue on git, It was not my intention to degrade pacman-mirrors. I genuinely thought it was that way.
My understanding is that shiny-mirrors is more focusing on user and pacman-mirrors is core mirrorlist, mirrorlist control and for sys admins.

With the bugs, I as far I know pacman-mirrors has already some age, time to mature and when developing shiny-mirrors and comparing output, pacman-mirrors returned often weird information that were wrong, from that I got the feeling there are some bugs for very long time, I will edit the post further to try avoid people getting wrong image of pacman-mirrors. I exaggerated it.

1 Like

I haven’t keep record of that, the some I documented were about pacman-mirrors showing wrong update status and last sync but after that I stopped documenting because I was focusing on the development itself, it was on start of development of shiny-mirrors. As I understood it was fixed in newest pacman-mirrors.
I stopped documenting it because I thought pacman-mirrors is unmaintained, there wasn’t much of activity in the repo at the time.
When I noticed there was some activity I reported these two I kept images and data for.

1 Like

Hello
i have two questions;
is this going to replace Pacman-mirrors?
what is the equivalent of pacman-mirrors --interactive --default && sudo pacman -Syyu ?

1 Like

First: I don’t have an answer, I don’t decide these things or have any information on it and pacman-mirrors is more than enough sufficient and also I found out now that it is actually maintained so

Second: There is this option sudo shiny-mirrors refresh --interactive but its simpler, it doesn’t show the country or last sync, just the address of the mirror, I haven’t worked much on that one, I will probably improve that in future (You can use vim keys or arrows to navigate and spacebar to select and enter to continue)

2 Likes

Yes it is. :wink:

4 Likes

It sounds interesting, because Rust should help system/driver developers reduce memory errors that lead to security vulnerabilities. It is more safe than C/C++, especially at handling memory errors.

In benchmark programs, Rust is similarly fast as C/C++. :+1:

2 Likes

i’ve used this from manjaro repos since someone recommended. and find it atleast faster than pacman-mirrors, specially when i’m in a hurry and running into mirror issues, have no idea which is better over the other though.

would it possible for you to give us all options available, other than the basic help given

1 Like

There is a man page which you can open with this command “man shiny-mirrors”(Args when used with long names need two dashes, in the manual page it shows one) or
you can do shiny-mirrors --help, shiny-mirrors <subcommand> --help, eg.: shiny-mirrors refresh --help, shiny-mirrors config --help, etc…

2 Likes