Automate updating the manuals on docs.gap-system.org - #416
Conversation
Installing the manuals of a new release was a manual step at the end of the release process, easy to forget and easy to get wrong. Add a script that fetches any release whose manuals are not present yet, extracts them with extract_manuals.py and installs them, together with a systemd timer that runs it hourly on the docs host. Unlike download_manuals.sh, which it replaces, it verifies both downloads against the published checksums, installs the manuals with a single rename so that a half-built tree is never served, replaces the "latest" symlink without it ever being absent, and removes the release tarball and its unpacked copy when done rather than leaving close to two gigabytes behind until the next release. Also update docs.htaccess to match what is deployed: the copy on the server had gained a redirect from the bare domain to the manuals overview that was never brought back here. AI disclosure: prepared with Claude Code, which drafted the script, units and this commit message; reviewed by the commit author. Co-authored-by: Claude <noreply@anthropic.com>
The web hosting spans three virtual hosts driven by two repositories, but only the website itself was documented, and partly incorrectly: the path given for the archive server pointed at the wrong account, and the setup instructions created a symlink that does not exist on any of the three machines. Someone rebuilding this in a few years would have had to reverse engineer most of it. Split the per-site details into one document each and turn README.server.md into an overview: which site is served by which account and repository, the conventions they share, what to do to rebuild everything, and which parts cannot be recovered from GitHub if they are lost. Also name the manuals units after the host they run on, matching the units on the archive server. AI disclosure: prepared with Claude Code, which drafted these documents and this commit message; reviewed by the commit author. Co-authored-by: Claude <noreply@anthropic.com>
|
Added a second commit with the renaming and the documentation. Units renamed to Documentation is now split per site, since the hosting spans three virtual hosts driven by two repositories:
While writing this I found and fixed two pieces of wrong information that would have cost real time during a rebuild:
I also recorded the thing that seemed most important for a disaster: everything except the package archives can be rebuilt from GitHub, but |
Many German universities have a Rechenzentrum, and the abbreviation means nothing to anyone outside Germany. Name the department on first mention, explain where the "rz" in the hostname comes from, and refer to it in plain words after that. AI disclosure: prepared with Claude Code, which made this change and drafted this commit message; reviewed by the commit author. Co-authored-by: Claude <noreply@anthropic.com>
Installing the manuals of a new GAP release is currently the manual step
ssh gap-docs; ./download_manuals.sh X.Y.Z, described indev/releases/README.mdin the GAP repository. This adds
etc/mirror-manuals.pyplus a systemd timer thatruns it hourly on the docs host, so the manuals of a new release appear by
themselves once the release stops being a pre-release.
It reuses
extract_manuals.pyandutils.download_with_sha256()from thisdirectory, which is why it lives here.
Compared to
download_manuals.sh, which it replaces and which remains availableas a fallback, it also:
.sha256files published beside them,which the old script fetched but never checked;
served;
latestsymlink by renaming a new one over it, solatest--and the
docandpkgsymlinks that resolve through it -- is never brieflymissing;
run, so 1.9 GB from the 4.16.0 release has been sitting on the docs host since
June.
Verified on the docs host: a dry run against the live document root correctly
reports nothing to do, and a full build of 4.16.0 into a scratch directory
produced a tree identical to the live
v4.16.0-- same 10417 files, same312 MB,
diff -rreporting no differences -- in about 11 minutes, cleaning upits 2 GB work directory afterwards. The live site was not touched.
This also updates
etc/docs.htaccessto match the file actually deployed on thedocs host, which had gained a redirect from the bare domain to
https://www.gap-system.org/doc/that was never brought back here. Since thedeployed file is a hand-made copy, the two had silently drifted.
Once this is merged the timer still has to be enabled on the host:
AI disclosure: prepared with Claude Code, which drafted the script, units and
this description; reviewed by the pull request author.