Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#71617 - Add rsync-only lastupdate support to syncrepo script

Attached to Project: Arch Linux
Opened by Niklas Edmundsson (nikke) - Sunday, 25 July 2021, 22:16 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 27 July 2021, 20:36 GMT
Task Type Feature Request
Category Mirrors
Status Assigned
Assigned To Florian Pritz (bluewind)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Hi! currently requires a http/https URL to enable lastupdate awareness.

I would suggest to enhance the script to allow using rsync to check lastupdate freshness.

With a reasonably modern rsync, this is IMHO easiest done with something similar to:

needupd="$(rsync -n -R -t --no-motd --out-format='%n' --timeout=60 rsync:// /destination/dir/)"
if [ $? = 0 -a -z "$needupd" ]; then
echo "Up 2 date, only rsync lastsync"
echo "Need update, do full rsync"

Granted, it doesn't do the full compare of the lastupdate content, but it's good enough as a freshness check in the general use case.

With this addition, the script would work out of the box by only supplying it with an rsync URL making setup easier for mirror admins, and removes the requirement that the master site provides lastupdate via http/https. While the latter might not be stricly needed as the Arch Linux master provides it via http(s), it might help lastupdate/lastsync adoption by other projects which would be a Good Thing for us mirror admins.


This task depends upon