fbca0ee885a9c343e160f7ab7d584d44fa1cf8a5
mspeir
  Thu Sep 3 18:36:22 2026 -0700
trackLists: emit the page in the standard static-page style, refs #37781

Drops the hand-rolled stylesheet and uses the house shape instead: the
gbPageStart/gbPageEnd SSI includes for the menu bar and footer, h2 per section
with an h6 contents list, and bare tables, which gbStatic.css already styles
through the .gbsPage wrapper. Source is ASCII-only, lowercase tags, and no line
over 100 characters, per the QA conventions; long cells wrap rather than run
off.

The deploy step now chmods the page to 775. Apache runs the SSI includes on a
.html file only when its execute bit is set (XBitHack), so without it the page
is served verbatim and the reader gets bare content with no menu bar and no
stylesheets. allTips.html is in that state on the RR today, which is how the
behaviour came to light.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git src/hg/utils/otto/trackLists/trackLists.sh src/hg/utils/otto/trackLists/trackLists.sh
index 4963cceea3b..c42d4719777 100755
--- src/hg/utils/otto/trackLists/trackLists.sh
+++ src/hg/utils/otto/trackLists/trackLists.sh
@@ -1,39 +1,44 @@
 #!/bin/bash
 #
 # trackLists.sh - build the mirror-facing page listing tracks we cannot
 # redistribute, tracks that update themselves, and contributed tracks. RM #37781
 #
 # Cron (otto): once a week is plenty; none of these lists move daily.
 #     32 6 * * 4 /hive/data/outside/otto/trackLists/trackLists.sh
 #
 # Writes the public page to htdocs on hgwdev. Getting it to the RR needs a
 # /root/<name>AutoPush entry in /etc/crontab, which only cluster-admin can add
 # (same pattern as the daily tips and the session thumbnails, which are likewise
 # generated into htdocs and are not tracked in git).
 #
 # Output behaviour: quiet on success, except that a restricted file found to be
 # reachable on hgdownload always prints, so cron mails it.
 
 set -o errexit -o pipefail
 umask 002
 
 DIR=${RTDIR:-/hive/data/outside/otto/trackLists}
 HTDOCS=${HTDOCS:-/usr/local/apache/htdocs}   # override for testing
 PAGE=trackLists.html
 
 cd "$DIR"
 
 # --refresh-contrib is implicit: the crawl re-runs itself when the cache ages out
 ./collect.py --cache "$DIR/cache" -o "$DIR/collected.json"
 
 # public page: no list of reachable restricted files
 ./mkPage.py -i "$DIR/collected.json" -o "$DIR/$PAGE"
 
 # internal copy, keeps the hgdownload cross-check, stays on hgwdev
 ./mkPage.py -i "$DIR/collected.json" -o "$DIR/internal.html" --internal
 
 # only replace the live page if it actually changed
 if ! cmp -s "$DIR/$PAGE" "$HTDOCS/$PAGE"; then
-    cp -p "$DIR/$PAGE" "$HTDOCS/$PAGE"
+    cp "$DIR/$PAGE" "$HTDOCS/$PAGE"
+    # The execute bit is what makes apache run the SSI includes on a .html file
+    # (XBitHack). Without it the page is served verbatim and the reader gets the
+    # bare content with no menu bar and no stylesheets, which is the state
+    # allTips.html is in. Do not drop this chmod.
+    chmod 775 "$HTDOCS/$PAGE"
     echo "trackLists: updated $HTDOCS/$PAGE"
 fi