Skip to content

Commit

Permalink
Merge pull request #393 from flathub/bookworm
Browse files Browse the repository at this point in the history
Update container image to Bookworm
  • Loading branch information
wjt authored Nov 8, 2023
2 parents f65ec1a + 59eebc8 commit 3843512
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Run tests in container
run: |
docker run -v $PWD:$PWD -w $PWD --entrypoint bash ${{ env.DOCKER_IMAGE }}:build -c \
"pip3 install coverage && python3 -m coverage run -m unittest discover --verbose --buffer"
"apt-get install python3-coverage && python3 -m coverage run -m unittest discover --verbose --buffer"
- name: Submit code coverage to Coveralls.io
env:
Expand Down
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM debian:bullseye
FROM debian:bookworm

ENV DEBIAN_FRONTEND=noninteractive

ADD dependencies.apt.txt ./

RUN printf "deb-src http://deb.debian.org/debian bullseye main\ndeb-src http://deb.debian.org/debian-security/ bullseye-security main\ndeb-src http://deb.debian.org/debian bullseye-updates main" >> /etc/apt/sources.list

RUN apt-get update && \
RUN sed -i "s/Types: deb/Types: deb deb-src/" /etc/apt/sources.list.d/debian.sources && \
apt-get update && \
xargs apt-get install --no-install-recommends -y < dependencies.apt.txt && \
apt-get --no-install-recommends -y build-dep python3-apt && \
apt-get clean && \
rmdir /var/cache/apt/archives/partial

# All requirements should be satisfied by dependencies.apt.txt. Feed
# requirements.txt through pip to check it is in synch, without installing
# anything.
#
# The 'sed' invocation is required because pip doesn't know that the tarball
# listed in that file is the Debian package.
ADD requirements.txt ./

RUN python3 -m pip install -r requirements.txt && \
RUN sed -i 's/python-apt @ .*/python-apt/' requirements.txt && \
pip install --dry-run --report report.json --break-system-packages -r requirements.txt && \
cat report.json && \
jq -e '.install == []' report.json >/dev/null && \
rm report.json && \
rm -rf $HOME/.cache/pip

# Creating the user is required because jenkins runs he container
# with the same user as the host (with '-u <uid>:<gid>')
# but without the user existing 'git' fails with 'No user exists for uid ...'.
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g $GROUP_ID user && \
useradd -u $USER_ID -s /bin/sh -m -g user user

COPY src /app/src
COPY flatpak-external-data-checker /app/
COPY canonicalize-manifest /app/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can use the `run-in-container.sh` helper script to set up needed CLI
options for you and run the image using `podman`:

```bash
~/src/endlessm/flatpak-external-data-checker/run-in-container.sh \
./run-in-container.sh \
[ARGS …] \
~/src/flathub/com.example.App/com.example.App.json
```
Expand Down
28 changes: 14 additions & 14 deletions dependencies.apt.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
bubblewrap
git
gir1.2-glib-2.0
gir1.2-json-1.0
python3-apt
python3-aiohttp
python3-chardet
git
jq
python3-aiodns
python3-aiohttp
python3-apt
python3-brotli
python3-gi
python3-cairo
python3-requests
python3-chardet
python3-editorconfig
python3-gi
python3-github
python3-jsonschema
python3-lxml
python3-magic
python3-packaging
python3-pip
python3-pyelftools
python3-requests
python3-ruamel.yaml
python3-semver
python3-setuptools
python3-toml
python3-pyelftools
python3-semver
python3-jsonschema
python3-editorconfig
python3-lxml
python3-packaging
python3-magic
squashfs-tools
ssh-client
jq
14 changes: 7 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
python-apt @ http://deb.debian.org/debian/pool/main/p/python-apt/python-apt_2.6.0.tar.xz
PyGObject
requests
PyGithub
ruamel.yaml
toml
pyelftools
aiohttp
semver
jsonschema
editorconfig
jsonschema
lxml
packaging
pyelftools
python-apt @ http://deb.debian.org/debian/pool/main/p/python-apt/python-apt_2.6.0.tar.xz
python-magic
requests
ruamel.yaml
semver
toml

0 comments on commit 3843512

Please sign in to comment.