Open teatimeguest opened 1 year ago
I am currently considering incorporating @muzimuzhi's idea:
I think the delay between release and sync is the crux of this issue, but I have no idea of an effective workaround for it.
CTAN has a master host (https://ctan.org/mirrors, right column) and every mirror is set to sync with it. Perhaps in the first few days of a new texlive release, the master host can be used as a fallback, if the auto chosen CTAN mirror is not in sync yet.
Originally posted by @muzimuzhi in https://github.com/teatimeguest/setup-texlive-action/issues/248#issuecomment-1478937971
If CTAN can be queried to tell ages of each mirror, things will be easier and more flexible I think.
Originally posted by @muzimuzhi in https://github.com/teatimeguest/setup-texlive-action/issues/248#issuecomment-1487379739
Data can be retrieved from this page, but no API seems to be provided.
If CTAN can be queried to tell ages of each mirror, things will be easier and more flexible I think. Originally posted by @muzimuzhi in #248 (comment)
Data can be retrieved from this page, but no API seems to be provided.
Contact CTAN?
No. The public APIs are listed on this page and no such functionality is described. It is not known if there is a private API, but this seems unlikely as the monitoring page is statically generated by mirmon.
Another aspect: it's better to stick to a specific CTAN mirror once automatically redirected at the first time (when downloading install-tl.zip
or install-tl-unx.tar.gz
). I'm not sure if the redirected url is retrievable.
Once retrieved, the setting part is feasible. install-tl
has a -repository url|path
option and tlmgr
can be configured by tlmgr option repository url
.
Using this way, at least one won't encounter the problem that when installing TeX Live itself and installing packages, two different mirrors providing different TeX Live versions are redirected.
In preparation for TeX Live 2024, I have made some improvements in v3.0.2. The current behavior is as follows:
Fallback to master in the following cases:
install-tl
.texlive.tlpdb
.install-tl
and texlive.tlpdb
versions are inconsistent.Such fallbacks are likely to occur frequently in the first few days after the release, but should have little impact on CI execution time.
I monitored several mirrors and websites for TL2024. Below are the records, all times are in UTC:
16:40 – TL2023 appears on tug.org/historic
(historic master).
I did not check if it was in usable state, but at least
install-tl-unx.tar.gz
was there.
17:37 – TL2024 is released on dante.ctan.org
(master).
18:25 – tlpretest
is removed from ftp.math.utah.edu
.
Now removed from all mirrors.
19:53 – Some mirrors have been upgraded to TL2024.
In particular,
mirror.math.princeton.edu
was synchronized quickly, so it was changed to be used instead of master as a fallback andv3.2.0
was released.
22:18 – The homepage is updated.
22:20 – ctan.math.utah.edu
is upgraded.
03:10 – TL2023 appears on ftp.math.utah.edu
.
Now synced to all mirrors.
06:36 – CTAN is updated.
CTAN checks the mirrors each hour. I also have issues with mirrors, but I wonder why.
Here the status page: https://ctan.org/mirrors/mirmon
There is another approach to list active TeXlive mirrors. The resulting json is available at https://zauguin.github.io/texlive-mirrors/mirrors.json.
Beginning of the list:
"North America": {
"Costa Rica": {
"https://mirrors.ucr.ac.cr/CTAN/systems/texlive/tlnet/": {
"status": "Alive",
"texlive_version": 2024,
"revision": 70877
}
},
"USA": {
"https://us.mirrors.cicku.me/ctan/systems/texlive/tlnet/": {
"status": "Alive",
"texlive_version": 2024,
"revision": 70884
},
It is updated regularly via following workflow: https://github.com/zauguin/texlive-mirrors/blob/trunk/.github/workflows/pages.yaml
The source for https://github.com/zauguin/texlive-mirrors/pkgs/container/get-tl-mirror-status is available at https://github.com/zauguin/texlive-mirrors/tree/get-tl-mirror-status.
Maybe, this information can be used in this script, too?
Example code to use the data to select a good mirror is provided at https://github.com/zauguin/install-texlive/blob/085918ba6384a0243a7c785c1d42641a66c5c229/src/main.ts#L112.
@koppor Thanks for sharing the info!
There is another approach to list active TeXlive mirrors. The resulting json is available at https://zauguin.github.io/texlive-mirrors/mirrors.json.
I did not know this. I will consider using it for repository selection.
By the way, I found that the raw mirmon
data is available at rsync://dante.ctan.org/MirMon/mirmon.state
(sample here), but for some reasons it is not used in this action at the moment. I am also considering integrating this in the future.
@teatimeguest Thank you for sharing the links. I am thinking of rebuilding the mirrormon page using the json file. Mirrormon itself is unmaintained - and I like that the JSON contains the TeXLive revision (what mirrormon does not. Which could lead to package downgrades in some situation).
Hi guys,
It wasn't necessary to guess who gets the updates and when. You could have asked CTAN directly. I wasn't aware there was a problem with the TeXlive release. The Updates of the mirrors can be added to the mirroring script. This would still need a polling mechanism, but it could run more frequently than the rsyncs of individual mirrors. CTAN doesn't have direct control over their frequency.
When installing the latest TL, one of the CTAN mirrors is automatically selected and used, which can cause problems immediately after a new version of TL is released (see #248). So, it is desirable to have some workaround in place before the next version release.