Safesync wants to be yet another Archlinux Repositories Administrator, for more advanced usage, especially useful for experts. Edit (2022-07-09T21:00:00Z): I came to believe it is also good for not experts, but this has to be confirmed. A programmer never knows how others interact with their code… ![]()
Feedback, is appreciated.
Why Ressurected? - History (updated)
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
). After being renamed to m1ms, it was left to silently disappear, while it helped me walk away from that other distribution ![]()
In the end, after more experience, I realized that I was wrong on a critical part of how pacman updates and mirrors work. Nevertheless, I now know a lot more about this important subject, and I had a nice opportunity to learn more on bash programming, which was my primary goal. So, I won in the end ![]()
What can safesync do?
- Creates a pacman mirrorlist from known providers’ repositories
- Prompts for custom countries selection (with a menu, when
rofiis installed) - 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 by 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?
- It creates a new mirrorlist and sorts the servers, from known providers’ repositories, using the upstream published url, or a .pacnew file. Currently, there is information for Archlinux, Archlinux ARM, EndeavourOS, Chaotic-AUR, Arcolinux, while it is easily extendable for other repositories.
- It is compatible with Arch Linux ARM.
- It also checks any servers Included in pacman.conf
- NEW: Toggle individual servers enabled/disabled, selecting with rofi
- Better speed ranking, in cases where the mirrorlist serves more than one repository (i.e.
extraorcommunityfor Archlinux mirrorlist), as it can download a larger file, depending on the given repository, using<$repo>.filesof the selected$repo. - It does better speed ranking, as it subtracts the connection time from the total download time, leading to a more accurate actual download speed, especially useful on secure protocols (HTTPS).
- It can check remote repo timestamp and disable servers that are synced before the local repository DB timestamp.
- It saves activity logs and debug info in temporary log files, that can be reviewed, for better understanding of servers behavior, or for bug tracking investigation.
- It can print normal, extra, or no activity information during runtime usage.
- It uses normal user privileges, elevating them only if needed, to save at a system path.
- It can be used in scripted mode, where no check for user privileges is accomplished.
- It does not modify or save system mirrorlists, if pacman lock exists, saving in a user folder instead.
- It keeps backups from previous files, when they are modified.
Known issues - TODOs
- Create configuration file for custom defaults and settings.
- Use rsync for check and download, to make it rsync compatible.
Check pacman DB lock, when saving at system path
Remove rofi dependency
Use a country selection method with bash/cli function- Add parameters or configuration file options on --verbose, --prefer-secure-protocol, --max-timeout
- Add pacman sync functionality, that could replace the standard update command (pacman -Syu)
- Set a lock for system save actions, until exit.
- Set trap(s) for errors to clear temp folder and lock.
Install the latest version 0.2.6 using the included PKGBUILD.
git clone https://gitlab.com/petsam/safesync.git
cd safesync
makepkg -si

