osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/43966?usp=email )
Change subject: pysim-build: split out from debian-trixie-build ......................................................................
pysim-build: split out from debian-trixie-build
Installing pysim dependencies via pip --break-system-packages into the debian-trixie-build image now causes a conflict that aborts building the image:
+ pip3 install --break-system-packages git+https://github.com/eriwen/lcov-to-cobertura-xml.git@028da3798355d0260c6c6491... git+https://github.com/osmocom/sphinx-argparse@inside-classes#egg=sphinx-argpars... git+https://github.com/podshumok/python-smpplib.git ruff sphinx sphinxcontrib-napoleon -r /tmp/pysim_requirements.txt
Attempting uninstall: Pygments Found existing installation: Pygments 2.18.0 error: uninstall-no-record-file
× Cannot uninstall Pygments 2.18.0 ╰─> The package's contents are unknown: no RECORD file was found for Pygments.
hint: The package was installed by debian. You should check if it can uninstall the package.
We don't explicitly install pygments via apt beforehand, the conflicting version of it is apparently needed by another package we install. Resolve this by splitting everything pysim related into a separate container.
The more weird dependencies in there are needed for building manuals.
Related: OS#7111 Change-Id: I2da5fb928d20c27f373606a8aa7bccefa40c09ce --- M debian-trixie-build/Dockerfile A pysim-build/Dockerfile A pysim-build/Makefile 3 files changed, 61 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/66/43966/1
diff --git a/debian-trixie-build/Dockerfile b/debian-trixie-build/Dockerfile index 58cd9c1..a562d31 100644 --- a/debian-trixie-build/Dockerfile +++ b/debian-trixie-build/Dockerfile @@ -189,19 +189,8 @@
# Install pip dependencies (alphabetic order) # break-system-packages: inside docker it's fine to install pkgs system-wide -# lcov-to-cobertura-xml: use this commit as the latest version fails: -# https://github.com/eriwen/lcov-to-cobertura-xml/issues/63 -ADD https://gitea.osmocom.org/sim-card/pysim/raw/branch/master/requirements.txt /tmp/pysim_requirements.txt -RUN set -x && \ - cat /tmp/pysim_requirements.txt && \ - pip3 install --break-system-packages \ - 'git+https://github.com/eriwen/lcov-to-cobertura-xml.git@028da3798355d0260c6c6491...' \ - 'git+https://github.com/osmocom/sphinx-argparse@inside-classes#egg=sphinx-argpars...' \ - 'git+https://github.com/podshumok/python-smpplib.git' \ - 'ruff' \ - 'sphinx' \ - 'sphinxcontrib-napoleon' \ - -r /tmp/pysim_requirements.txt +RUN pip3 install --break-system-packages \ + 'ruff'
# Install osmo-python-tests ADD https://gerrit.osmocom.org/plugins/gitiles/python/osmo-python-tests/+/master... /tmp/osmo-python-tests-commit diff --git a/pysim-build/Dockerfile b/pysim-build/Dockerfile new file mode 100644 index 0000000..2951c2f --- /dev/null +++ b/pysim-build/Dockerfile @@ -0,0 +1,56 @@ +# Used by pysim master and gerrit jobs +ARG REGISTRY=docker.io +ARG UPSTREAM_DISTRO=debian:trixie +FROM ${REGISTRY}/${UPSTREAM_DISTRO} + +# Arguments used after FROM must be specified again +ARG UID + +# Configure build user +RUN useradd --uid=${UID} -d /build -m build + +# Install packages from Debian repositories (alphabetic order) +RUN set -x && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + gcc \ + ghostscript \ + git \ + latexmk \ + libpcsclite-dev \ + make \ + openssh-client \ + pylint \ + python3-dev \ + python3-pip \ + python3-virtualenv \ + rsync \ + tex-gyre \ + texlive-latex-extra \ + texlive-latex-recommended \ + tshark \ + && \ + apt-get clean + +# Install osmo-ci.git/scripts to /usr/local/bin +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ci/+/master?format=TEXT /tmp/osmo-ci-commit +RUN set -x && \ + git clone --depth=1 https://gerrit.osmocom.org/osmo-ci osmo-ci && \ + cp -v osmo-ci/scripts/*.* /usr/local/bin && \ + rm -rf osmo-ci + +# Install pip dependencies (alphabetic order) +# break-system-packages: inside docker it's fine to install pkgs system-wide +# lcov-to-cobertura-xml: use this commit as the latest version fails: +# https://github.com/eriwen/lcov-to-cobertura-xml/issues/63 +ADD https://gitea.osmocom.org/sim-card/pysim/raw/branch/master/requirements.txt /tmp/pysim_requirements.txt +RUN set -x && \ + cat /tmp/pysim_requirements.txt && \ + pip3 install --break-system-packages \ + 'git+https://github.com/eriwen/lcov-to-cobertura-xml.git@028da3798355d0260c6c6491...' \ + 'git+https://github.com/osmocom/sphinx-argparse@inside-classes#egg=sphinx-argpars...' \ + 'git+https://github.com/podshumok/python-smpplib.git' \ + 'sphinx' \ + 'sphinxcontrib-napoleon' \ + -r /tmp/pysim_requirements.txt diff --git a/pysim-build/Makefile b/pysim-build/Makefile new file mode 100644 index 0000000..bbbc0f3 --- /dev/null +++ b/pysim-build/Makefile @@ -0,0 +1,3 @@ +UPSTREAM_DISTRO=debian:trixie +DISTRO=debian-trixie +include ../make/Makefile