Check whether our mirror packages are up to date.
Go to file
Raymond Li 90bde5a754 Merge pull request 'Fixed slackware checker' (#12) from jtoft-rt-4117-slackware into master
Reviewed-on: #12
Reviewed-by: Raymond Li <raymo@csclub.uwaterloo.ca>
2022-07-30 20:30:07 -04:00
projects Fixed slackware checker 2022-07-30 19:29:53 -04:00
.gitignore Rename distro to project 2021-10-03 15:44:08 -04:00
README.md adjusted requirements.txt 2021-10-17 21:23:31 -07:00
data.json Fixed 6 broken mirror checkers (#11) 2022-07-30 01:14:45 -04:00
example.in Add Artix 2021-12-28 21:28:23 -05:00
main.py main: display how long a mirror has been out-of-sync 2022-03-26 21:06:23 -04:00
project.py error on 404 and fix artix checker 2022-02-02 22:12:13 -05:00
requirements.txt adjusted requirements.txt 2021-10-17 21:23:31 -07:00
shared.py Fixed 6 broken mirror checkers (#11) 2022-07-30 01:14:45 -04:00
test.py changed linuxmint, ubuntu_ports_releases, xubuntu_releases 2021-10-17 22:23:55 -07:00

README.md

Mirror Checker

This mirror status checker determines whether CSC mirror is up-to-date with upstream.

How To Run

A configuration file may be provided through standard input. Without a configuration file, execute python main.py. By default, all the available distributions will be checked. With a configuration file, execute python main.py < name_of_config_file.in, for example, python main.py < example.in. In this case, only the distributions listed in the configuration file will be checked.

Dev Notes

How the program works: We first have a general mirror check class called project.py which checks whether the timestamp in the directory of the mirror is in-sync with the upstream. Then, for each CSC mirror, a class is built which inherits from the general project.py class but often overrides the original check function with a check function specific to the mirror. A few big themes are: some check a mirror status tracker provided by the project mirrored; some check all the Release files for each version in a distro etc. website information which all the mirror checker classes need is stored in the data.json file.

Future notes: Because many of the mirror checkers are built very specific to each mirror. A slight change in the way the project manages their mirror-related websites, public repos etc. can drastically influence whether the mirror checker works correctly or not. These problems are also unfortunately very hard to detect, so it's important that CSC actively maintain the mirror checker so that it works as intended in the long term.

Extra notes: A test client for individual mirror checker classes is provided as test.py. To use it, simply change all occurrences of the imported project class

Resources

if we can just view their repo online, we only have to remember the link for their repo and then check the latest timestamp in their repo the same way we check ours

even if the date relies on a specific file in their repo, we can still find the right link for it

to find repos of the mirrored projects to check, just search "projectName mirrors"

Checker Information