Safesync Resurrected - mirrorlist admin for experts - feedback is appreciated

Safesync wants to be yet another Archlinux Repositories Administrator, for more advanced usage, especially useful for experts.
Feedback from the first developer preview alpha(?) version, is appreciated.

Why Ressurected? Once upon a time, safesync was born, to overcome a distribution’s own utility, with which I had several disagreements on the functionality and usability. It was a personal bash self educating project, which served its purpose (at least for one user :smile: ). After being renamed to m1ms, it was left to silently disappear, while it helped me walk away from that other distribution :wink:

What can safesync do?

  • Initialize (create from nothing) a pacman mirrorlist
  • Prompts for countries selection, when available, using a rofi menu (for the time being, rofi is a dependency. To be changed in the future.)
  • Save the new mirrorlist file at the default system path (/etc/pacman.d/), or in the invoking user’s local respective folder ($HOME/.local/share/safesync/mirrorlists/), or in a custom path.
  • Rate the servers of a given mirrorlist file and sort them on speed.
  • Adds a file heading with info about the creation and modification time, as well as the command and parameters that were used to create/modify the list.

What can safesync do that is different or better than rankmirrors, or reflector?

  • Initializes (creates from nothing) and sorts any known repository. Currently, there is included information for EndeavourOS, Chaotic-AUR, Arcolinux, while it is easily extendable for other repositories.
  • Better speed ranking, as it downloads an as large as possible file from the given repository, using <$repo>.files by default or the selected $repo, in case the mirrorlist serves more than one repository (i.e. extra or community for Archlinux mirrorlist).
  • Better speed ranking, as it subtracts the connection time from the total download time, leading to a more accurate acual download speed, especially useful on secure protocols (HTTPS).
  • Can check remote repo timestamp and disable servers that are older than the local repository DB.
  • Saves activity logs and ranking info in temporary log files, that can be reviewed, for better understanding of servers behavior.
  • Can print normal, extra, or no activity information during runtime usage.
  • Is used with normal user privileges, no root usage is allowed. It uses sudo only when needed.
  • Can be used in scripted mode
  • When checking for safety, also checks Servers Include(d) inside pacman.conf :white_check_mark:
  • Is compatible with Arch Linux ARM :white_check_mark:

Known issues - TODOs

  • Add configuration file for user default preferences (almost ready)
  • Add rsync compatibility for servers with rsync protocol
  • Check, set, delete pacman DB lock, when saving at system path
  • :white_check_mark: Remove rofi dependency
  • Use a country selection method with bash/cli function

Install the latest version 0.2.2 using PKGBUILD:

pkgdesc="Yet another Archlinux Repositories Administrator, for more advanced usage, especially useful for experts"

package() {
	cd "$pkgname-$pkgver"
	install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname

Link shows page not found.

Is it possible to add archarm repos?

I don’t know why. It shows up when I click. Could it be private to me only?.. :fearful:

I only need a url to a raw mirrorlist file and the repo name (as in pacman.conf)

The way archlinuxarm mirrors work is a bit different.
The default mirror is a global load balancing mirror and the other mirrors are normal mirrors like in archlinux. I currently manually uncomment the mirrors that are geographically located closest to me.

## Geo-IP based mirror selection and load balancing
#Server =$arch/$repo

### Mirrors by country

### Australia (not Austria!)
## Sydney
# Server =$arch/$repo

### Brazil
## Sao Paulo
# Server =$arch/$repo

### Denmark
## Aalborg
# Server =$arch/$repo

### Germany
## Aachen
# Server =$arch/$repo
## Berlin
# Server =$arch/$repo
## Coburg
# Server =$arch/$repo
## Falkenstein
# Server =$arch/$repo
# Server =$arch/$repo

### Greece
## Athens
# Server =$arch/$repo

### Hungary
## Budapest
# Server =$arch/$repo

### Japan
## Tokyo
# Server =$arch/$repo

### Singapore
# Server =$arch/$repo

### South Africa
## Johannesburg
# Server =$arch/$repo

### Taiwan
## Hsinchu
# Server =$arch/$repo
## New Taipei City
# Server =$arch/$repo

### United Kingdom
## London
# Server =$arch/$repo

### United States
## California
#Server =$arch/$repo
## Florida
# Server =$arch/$repo
## Illinois
#Server =$arch/$repo
## New Jersey
#Server =$arch/$repo

Anything to help me choose the best mirrors for me would be great. Looking forward to your project!!

Yep, you need to set project to public

Settings → General → Visibility, project features, permissions

1 Like

:sob: How the … do I do that?
I hate smart tools!!!

1 Like

That’s OK. A URL to download this within the program, is one of the advanced features. Is there a public link for this file?

1 Like

Link works for me. :wink:

1 Like

After 11 days of no negative feedback, I am proud to pronounce safesync as a bug-free program, in par to pacman!!! :crown:

Just joking, of course. We all know pacman has some small bugs. :rofl:

Thankfully, we have one but excellent tester! Thanks a lot @sradjoker . I hope Arch-ARM make use of this (soon…).


Do you have instructions to use it for EndeavourOS repos?

Everything is in the help message.
In short,

  • Use --init to create a complete mirrorlist with a lot or all the servers:
safesync --all-countries -10 -t system -i endeavouros

If you have rofi installed, you can select countries:

safesync -10 -t system -i endeavouros

That’s all!

  • Only if you have download problems and suspect a server is down, you can run --safe to re-evaluate the current mirrorlist, without any speed test:
safesync -10 -t system -s endeavouros
  • Only if the top server looks like it has degraded its speed, you can run --rate to rate the current mirrorlist’s servers:
safesync -10 -t system -r endeavouros
  • Any time safesync modifies a system mirrorlist file (/etc/pacman.d/), it creates a backup of the pre-existing file, at the same directory.
  • Any time safesync modifies a local mirrorlist file (~/.local/share/safesync/mirrorlists), it creates a backup of the pre-existing file, at the same directory.