system-config/playbooks/roles/mirror
Jeremy Stanley e61f584dbc Override DOCTYPE in wheel cache autoindex
As of pip 22.0, its HTML parser no longer accepts any page which
doesn't start with the string "<!DOCTYPE html>" and, unfortunately,
Apache's mod_autoindex declares a very specific HTML 3.2 doctype
instead, causing pip to break any time our wheel cache is added to
its indices. The main index we generate has been updated with
https://review.opendev.org/826969 but we need this change to address
Apache's dynamically generated file lists for that site.

Configure Apache to supply a custom header file for file indices
within the /wheel/ subtree of our mirror vhosts, and alias it from
outside the docroot in order to reduce clutter of the top-level
directory index. Also instruct mod_autoindex to omit its own
document preamble which would otherwise include the original doctype
declaration. Note that this omits the header title and H1 level
headings from the resulting pages, but as these are only meant for
machine parsing anyway and not humans, it's a compromise to keep the
solution as simple and straightforward as possible.

Change-Id: Id71174954b13b80483256d37f773b781f4956c21
2022-01-30 18:54:12 +00:00
..
defaults Create opendev mirrors 2019-05-21 11:08:25 +10:00
files Override DOCTYPE in wheel cache autoindex 2022-01-30 18:54:12 +00:00
handlers Create opendev mirrors 2019-05-21 11:08:25 +10:00
tasks Override DOCTYPE in wheel cache autoindex 2022-01-30 18:54:12 +00:00
templates Override DOCTYPE in wheel cache autoindex 2022-01-30 18:54:12 +00:00
README.rst Create opendev mirrors 2019-05-21 11:08:25 +10:00

Configure an opendev mirror

This role installs and configures a mirror node

Role Variables