Skip to content

Commit 06cb8cf

Browse files
Merge pull request #4 from qualcomm-linux/wip
Added resolute, trixie and sid distros
2 parents 33a6e06 + 12c1fc8 commit 06cb8cf

21 files changed

+464
-420
lines changed

.github/actions/build_container/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,21 @@ runs:
2828

2929
- name: Build noble and questing containers
3030
shell: bash
31-
run: ./docker_deb_build.py --rebuild
31+
run: ./docker_deb_build.py --rebuild --no-update-check
3232

3333
- name: Push to GHCR
3434
if: ${{inputs.push-to-ghcr}} == 'true'
3535
shell: bash
3636
run: |
3737
echo ${{inputs.token}} | docker login ghcr.io -u ${{inputs.username}} --password-stdin
38+
39+
# UBUNTU IMAGES
3840
docker push ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:${{inputs.arch}}-noble
3941
docker push ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:${{inputs.arch}}-questing
42+
docker push ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:${{inputs.arch}}-resolute
43+
44+
# DEBIAN IMAGES
45+
docker push ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:${{inputs.arch}}-trixie
4046
docker push ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:${{inputs.arch}}-sid
4147
4248

.github/workflows/qcom-container-build-and-upload.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ on:
1515
- main
1616
paths:
1717
- '.github/workflows/qcom-container-build-and-upload.yml'
18-
- 'docker/**'
18+
- '.github/actions/build_container/action.yml'
19+
- 'Dockerfiles/**'
1920

2021
push:
2122
branches:
2223
- main
2324
paths:
2425
- '.github/workflows/qcom-container-build-and-upload.yml'
25-
- 'docker/**'
26+
- '.github/actions/build_container/action.yml'
27+
- 'Dockerfiles/**'
2628

2729
workflow_dispatch:
2830

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
2-
# syntax=docker/dockerfile:1.6
3-
41
# Debian sid (unstable) base image
52
FROM debian:sid
63

74
# Avoid interactive prompts during apt operations
85
ENV DEBIAN_FRONTEND=noninteractive
96

10-
# Base tooling for Debian packaging + chroot creation
11-
# (eatmydata/ccache are nice QoL additions; remove if you prefer)
12-
RUN apt-get update && apt-get install -y \
13-
ca-certificates gnupg \
14-
curl git jq tree gh \
15-
sbuild schroot debootstrap \
16-
git-buildpackage devscripts \
17-
build-essential debhelper \
18-
abigail-tools \
19-
eatmydata ccache \
20-
&& rm -rf /var/lib/apt/lists/*
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
2113

2214
# Force sbuild to use the schroot backend.
2315
# sbuild-createchroot is for schroot-managed chroots; this avoids the "unshare" warning.
@@ -27,18 +19,12 @@ RUN mkdir -p /root/.config/sbuild && \
2719
'$schroot = "schroot";' \
2820
> /root/.config/sbuild/config.pl
2921

30-
# Optional list of extra packages to seed into the chroot during creation.
31-
COPY extra-packages.txt /tmp/extra-packages.txt
32-
3322
# Create a Debian sid sbuild chroot and prepare it for cross-building to arm64.
3423
RUN set -eux; \
35-
EXTRA_PACKAGES="$(tr -s '[:space:]' ',' < /tmp/extra-packages.txt || true)"; \
36-
\
3724
# Create the chroot from Debian mirrors (NOT Ubuntu) with Debian components.
3825
sbuild-createchroot \
3926
--arch=amd64 \
4027
--components=main,contrib,non-free,non-free-firmware \
41-
${EXTRA_PACKAGES:+--include="$EXTRA_PACKAGES"} \
4228
sid /srv/chroot/sid http://deb.debian.org/debian; \
4329
\
4430
# Configure the chroot's apt sources + enable multi-arch + install cross toolchain.
@@ -72,4 +58,4 @@ RUN set -eux; \
7258
WORKDIR /workspace
7359

7460
# Default shell
75-
CMD ["bash"]
61+
CMD ["bash"]
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Debian trixie base image
2+
FROM debian:trixie
3+
4+
# Avoid interactive prompts during apt operations
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
# Force sbuild to use the schroot backend.
15+
# sbuild-createchroot is for schroot-managed chroots; this avoids the "unshare" warning.
16+
RUN mkdir -p /root/.config/sbuild && \
17+
printf '%s\n' \
18+
'$chroot_mode = "schroot";' \
19+
'$schroot = "schroot";' \
20+
> /root/.config/sbuild/config.pl
21+
22+
# Create a Debian trixie sbuild chroot and prepare it for cross-building to arm64.
23+
RUN set -eux; \
24+
# Create the chroot from Debian mirrors (NOT Ubuntu) with Debian components.
25+
sbuild-createchroot \
26+
--arch=amd64 \
27+
--components=main,contrib,non-free,non-free-firmware \
28+
trixie /srv/chroot/trixie http://deb.debian.org/debian; \
29+
\
30+
# Configure the chroot's apt sources + enable multi-arch + install cross toolchain.
31+
chroot /srv/chroot/trixie /bin/bash -lc '\
32+
set -eux; \
33+
# Minimal, correct sources for Debian trixie. Add contrib/non-free only if needed.
34+
printf "%s\n" \
35+
"deb http://deb.debian.org/debian trixie main" \
36+
"# deb http://deb.debian.org/debian trixie contrib non-free non-free-firmware" \
37+
> /etc/apt/sources.list; \
38+
\
39+
# Enable arm64 multi-arch so sbuild can satisfy Build-Depends for the host arch.
40+
dpkg --add-architecture arm64; \
41+
apt-get update; \
42+
apt-get -y upgrade; \
43+
\
44+
# Cross toolchain for arm64 + a small baseline of arm64 libs.
45+
# sbuild will install package-specific B-Ds later (often :arm64 automatically).
46+
apt-get install -y --no-install-recommends \
47+
crossbuild-essential-arm64 \
48+
pkg-config \
49+
libc6:arm64 libc6-dev:arm64 linux-libc-dev:arm64 \
50+
libstdc++6:arm64 \
51+
lintian:amd64; \
52+
\
53+
# Keep the chroot lean
54+
apt-get clean; rm -rf /var/lib/apt/lists/* \
55+
'
56+
57+
# Workspace for mounting sources/outputs (your script already bind-mounts /workspace)
58+
WORKDIR /workspace
59+
60+
# Default shell
61+
CMD ["bash"]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Use an official Ubuntu base image
2+
FROM ubuntu:noble
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
# Update package list and install dependencies
10+
RUN apt-get update && \
11+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Build the noble chroot
16+
RUN sbuild-createchroot --arch=amd64 --components=main,universe noble /srv/chroot/noble http://archive.ubuntu.com/ubuntu && \
17+
chroot /srv/chroot/noble /bin/bash -c "\
18+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse' > /etc/apt/sources.list && \
19+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse' >> /etc/apt/sources.list && \
20+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-security main restricted universe multiverse' >> /etc/apt/sources.list && \
21+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse' > /etc/apt/sources.list.d/arm64-ports.list && \
22+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
23+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
24+
dpkg --add-architecture arm64 && \
25+
apt-get update && \
26+
apt-get upgrade -y && \
27+
apt-get install -y crossbuild-essential-arm64"
28+
29+
# Set working directory
30+
WORKDIR /workspace
31+
32+
# Default command
33+
CMD [ "bash" ]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Use an official Ubuntu base image
2+
FROM ubuntu:questing
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
# Update package list and install dependencies
10+
RUN apt-get update && \
11+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Build the questing chroot
16+
RUN sbuild-createchroot --arch=amd64 --components=main,universe questing /srv/chroot/questing http://archive.ubuntu.com/ubuntu && \
17+
chroot /srv/chroot/questing /bin/bash -c "\
18+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu questing main restricted universe multiverse' > /etc/apt/sources.list && \
19+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu questing-updates main restricted universe multiverse' >> /etc/apt/sources.list && \
20+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu questing-security main restricted universe multiverse' >> /etc/apt/sources.list && \
21+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports questing main restricted universe multiverse' > /etc/apt/sources.list.d/arm64-ports.list && \
22+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports questing-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
23+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports questing-security main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
24+
dpkg --add-architecture arm64 && \
25+
apt-get update && \
26+
apt-get upgrade -y && \
27+
apt-get install -y crossbuild-essential-arm64"
28+
29+
# Set working directory
30+
WORKDIR /workspace
31+
32+
# Default command
33+
CMD [ "bash" ]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Use an official Ubuntu base image
2+
FROM ubuntu:resolute
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
# Update package list and install dependencies
10+
RUN apt-get update && \
11+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
12+
apt-get clean && \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Force sbuild to use the schroot backend.
16+
# On resolute, the default backend (systemd-nspawn) fails to build the chroot unless we do this
17+
RUN mkdir -p /root/.config/sbuild && \
18+
printf '%s\n' \
19+
'$chroot_mode = "schroot";' \
20+
> /root/.config/sbuild/config.pl
21+
22+
# Build the resolute chroot
23+
RUN sbuild-createchroot --arch=amd64 --components=main,universe resolute /srv/chroot/resolute http://archive.ubuntu.com/ubuntu && \
24+
chroot /srv/chroot/resolute /bin/bash -c "\
25+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu resolute main restricted universe multiverse' > /etc/apt/sources.list && \
26+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu resolute-updates main restricted universe multiverse' >> /etc/apt/sources.list && \
27+
echo 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu resolute-security main restricted universe multiverse' >> /etc/apt/sources.list && \
28+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports resolute main restricted universe multiverse' > /etc/apt/sources.list.d/arm64-ports.list && \
29+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports resolute-updates main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
30+
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports resolute-security main restricted universe multiverse' >> /etc/apt/sources.list.d/arm64-ports.list && \
31+
dpkg --add-architecture arm64 && \
32+
apt-get update && \
33+
apt-get upgrade -y && \
34+
apt-get install -y crossbuild-essential-arm64"
35+
36+
# Set working directory
37+
WORKDIR /workspace
38+
39+
# Default command
40+
CMD [ "bash" ]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Debian sid (unstable) base image
2+
FROM debian:sid
3+
4+
# Avoid interactive prompts during apt operations
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
# Force sbuild to use the schroot backend.
15+
# On sid, the default backend (systemd-nspawn) fails to build the chroot unless we do this
16+
RUN mkdir -p /root/.config/sbuild && \
17+
printf '%s\n' \
18+
'$chroot_mode = "schroot";' \
19+
> /root/.config/sbuild/config.pl
20+
21+
COPY extra-packages.txt /tmp/extra-packages.txt
22+
23+
RUN EXTRA_PACKAGES=$(tr -s '[:space:]' ',' < /tmp/extra-packages.txt) && \
24+
sbuild-createchroot --include="$EXTRA_PACKAGES" \
25+
--arch=arm64 \
26+
--components=main,contrib,non-free,non-free-firmware \
27+
sid \
28+
/srv/chroot/sid \
29+
http://deb.debian.org/debian
30+
31+
# Workspace for mounting sources/outputs (your script already bind-mounts /workspace)
32+
WORKDIR /workspace
33+
34+
# Default shell
35+
CMD ["bash"]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Use an official Ubuntu base image
2+
FROM debian:trixie
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
# Force sbuild to use the schroot backend.
15+
# sbuild-createchroot is for schroot-managed chroots; this avoids the "unshare" warning.
16+
#RUN mkdir -p /root/.config/sbuild && \
17+
# printf '%s\n' \
18+
# '$chroot_mode = "schroot";' \
19+
# '$schroot = "schroot";' \
20+
# > /root/.config/sbuild/config.pl
21+
22+
COPY extra-packages.txt /tmp/extra-packages.txt
23+
24+
RUN EXTRA_PACKAGES=$(tr -s '[:space:]' ',' < /tmp/extra-packages.txt) && \
25+
sbuild-createchroot --include="$EXTRA_PACKAGES" \
26+
--arch=arm64 \
27+
--components=main,contrib,non-free,non-free-firmware \
28+
trixie \
29+
/srv/chroot/trixie \
30+
http://deb.debian.org/debian
31+
32+
# Set working directory
33+
WORKDIR /workspace
34+
35+
# Default command
36+
CMD [ "bash" ]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use an official Ubuntu base image
2+
FROM ubuntu:noble
3+
4+
# Prevent interactive prompts during package installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
COPY base-packages.txt /tmp/base-packages.txt
8+
9+
RUN apt-get update && \
10+
apt-get install -y $(cat /tmp/base-packages.txt | tr '\n' ' ') && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
COPY extra-packages.txt /tmp/extra-packages.txt
15+
16+
RUN EXTRA_PACKAGES=$(tr -s '[:space:]' ',' < /tmp/extra-packages.txt) && \
17+
sbuild-createchroot --include="$EXTRA_PACKAGES" \
18+
--arch=arm64 \
19+
--components=main,universe \
20+
noble \
21+
/srv/chroot/noble \
22+
http://ports.ubuntu.com
23+
24+
# Set working directory
25+
WORKDIR /workspace
26+
27+
# Default command
28+
CMD [ "bash" ]

0 commit comments

Comments
 (0)