Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

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!
Tasklist

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

Details

Hi!

https://gitlab.archlinux.org/archlinux/infrastructure/-/blob/master/roles/syncrepo/files/syncrepo-template.sh 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://source.site/lastupdate /destination/dir/)"
if [ $? = 0 -a -z "$needupd" ]; then
echo "Up 2 date, only rsync lastsync"
else
echo "Need update, do full rsync"
fi

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.

Cheers,
/Nikke

This task depends upon

Loading...