Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/86681?usp=email )
Change subject: util/docker: Update the script that updates the website ......................................................................
util/docker: Update the script that updates the website
- Update the base system (alpine 3.8 -> 3.21) - Update sphinx and its modules (and from pip-install to alpine-install) - Remove unused features that increase maintenance overhead (autobuild/livehtml and ditaa) - Use the build system to generate docs (instead of calling sphinx in its own, custom ways)
Change-Id: I844e4ea84b94444c96f29325fee205b0deb972da Signed-off-by: Patrick Georgi patrick@georgi-clan.de --- M util/docker/flashrom.org/Dockerfile M util/docker/flashrom.org/makeSphinx.sh 2 files changed, 12 insertions(+), 33 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/81/86681/1
diff --git a/util/docker/flashrom.org/Dockerfile b/util/docker/flashrom.org/Dockerfile index 23f5f50..2fc9e9f 100644 --- a/util/docker/flashrom.org/Dockerfile +++ b/util/docker/flashrom.org/Dockerfile @@ -1,29 +1,12 @@ -FROM alpine:3.8 +FROM alpine:3.21
-COPY makeSphinx.sh /makeSphinx.sh - -ADD https://sourceforge.net/projects/ditaa/files/ditaa/0.9/ditaa0_9.zip/download /tmp/ditaa.zip - -RUN apk add --no-cache python3 make bash git openjdk8-jre ttf-dejavu fontconfig \ - && pip3 install --upgrade --no-cache-dir pip \ - && pip3 install --no-cache-dir \ - sphinx===1.8.3 \ - sphinx_rtd_theme===0.4.2 \ - recommonmark===0.5.0 \ - sphinx_autobuild===0.7.1 \ - sphinxcontrib-ditaa===0.6 \ - && chmod 755 /makeSphinx.sh -RUN cd /tmp \ - && unzip ditaa.zip \ - && mv ditaa0_9.jar /usr/lib -ADD ditaa.sh /usr/bin/ditaa +RUN apk add --no-cache sphinx py3-sphinx_rtd_theme bash git meson ninja gcc musl-dev pkgconf
VOLUME /data-in /data-out
-# For Sphinx-autobuild -# Port 8000 - HTTP server -# Port 35729 - websockets connection to allow automatic browser reloads after each build -EXPOSE 8000 35729 +COPY makeSphinx.sh /makeSphinx.sh + +ENV MESON_PACKAGE_CACHE_DIR /tmp/meson-pkgcache/
ENTRYPOINT ["/bin/bash", "/makeSphinx.sh"] CMD [] diff --git a/util/docker/flashrom.org/makeSphinx.sh b/util/docker/flashrom.org/makeSphinx.sh index 5b6ea03..51ff771 100755 --- a/util/docker/flashrom.org/makeSphinx.sh +++ b/util/docker/flashrom.org/makeSphinx.sh @@ -1,12 +1,8 @@ #!/usr/bin/env bash - -if [ "$1" == "livehtml" ]; then - echo "Starting live documentation build" - cd /data-in/ && sphinx-autobuild -b html doc /tmp/build/html -else - echo "Starting production documentation build" - cd /data-in/ \ - && sphinx-build -b html doc /tmp/build/html \ - && rm -rf /data-out/* \ - && mv /tmp/build/html/* /data-out/ -fi +set -e +cd /data-in/ +meson setup /tmp/build -Ddocumentation=enabled -Dgenerate_authors_list=enabled +ninja -C /tmp/build doc/html +rm -rf /data-out/* +mv /tmp/build/doc/html/* /data-out/ +rm -rf /tmp/build