As mentioned in T164609, libvmod-re2 provides the functionality required to efficiently match the value of the Host request header with a long list of hostnames. Such functionality is required to choose which VCL to load (text vs misc) depending on the incoming host header.
We should package libvmod-re2 and upload it to apt.wikimedia.org.
Initial observations:
- libvmod-re2 supports multiple varnish versions, we need to use the 5.1 branch
- The library depends on libre2-dev, which does not ship a pkg-config metadata file (Debian bug filed). We'll likely need to set RE2_LIBS and RE2_CFLAGS manually
- varnishtest is needed to automatically run the post-build checks, we'll need to add varnish to the list of build-dependencies