Skip to content

Commit

Permalink
buildworker,buildmaster: Use venv for Pip
Browse files Browse the repository at this point in the history
Debian 12 complains if using Pip without a virtualenv since it could
break the system.

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Sep 26, 2024
1 parent c0a50aa commit 4cb3229
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docker/buildmaster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ RUN \
locales \
pv \
pwgen \
python3-venv \
python3-pip \
signify-openbsd \
wget && \
apt-get clean && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip3 install -U pip
RUN \
pip3 install \
Expand All @@ -63,15 +66,16 @@ RUN \
"buildbot-worker==$BUILDBOT_VERSION" \
pyOpenSSL \
service_identity

RUN \
sed -i \
's/Welcome to buildbot/Welcome to OpenWrt buildbot/' \
/usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
/opt/venv/lib/python*/site-packages/buildbot_www/static/scripts.js

RUN \
sed -i \
"s;\"col-sm-12\"><ul><li ng-repeat;\"col-sm-12\"><ul><li>OpenWrt version: <a href=\"https://git.openwrt.org/$OPENWRT_VERSION\">$OPENWRT_VERSION</a></li><li ng-repeat;" \
/usr/local/lib/python*/dist-packages/buildbot_www/static/scripts.js
/opt/venv/lib/python*/site-packages/buildbot_www/static/scripts.js

ENV LANG=en_US.utf8

Expand Down

0 comments on commit 4cb3229

Please sign in to comment.