From 21f035d4ec768a68afe13fa603e6822861c0ef9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Wed, 17 Sep 2025 14:21:37 +0200 Subject: [PATCH 1/2] feat(debos): Add image build information to /etc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a buildid variable that will be captured in /etc/buildinfo along with the variant/flavor (console or xfce) of the image. Fixes: #37 Signed-off-by: Loïc Minier --- debos-recipes/qualcomm-linux-debian-rootfs.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/debos-recipes/qualcomm-linux-debian-rootfs.yaml b/debos-recipes/qualcomm-linux-debian-rootfs.yaml index f0d68c82..9ab194a2 100644 --- a/debos-recipes/qualcomm-linux-debian-rootfs.yaml +++ b/debos-recipes/qualcomm-linux-debian-rootfs.yaml @@ -2,6 +2,7 @@ {{- $localdebs := or .localdebs "none" }} {{- $aptlocalrepo := or .aptlocalrepo "none" }} {{- $kernelpackage := or .kernelpackage "linux-image-arm64" }} +{{- $buildid := or .buildid "" }} architecture: arm64 @@ -246,6 +247,22 @@ actions: update-locale LANG=en_US.UTF-8 fi +{{- if ne $buildid "" }} + - action: run + description: Set build ID and flavor in /etc/buildinfo + chroot: true + command: | + set -eux + touch /etc/buildinfo + chmod 644 /etc/buildinfo + echo "BUILD_ID={{$buildid}}" >>/etc/buildinfo +{{- if eq $xfcedesktop "true" }} + echo "VARIANT_ID=xfce" >>/etc/buildinfo +{{- else }} + echo "VARIANT_ID=console" >>/etc/buildinfo +{{- end }} +{{- end }} + # usually these packages are pulled by Pre-Depends/Depends/Recommends of # Debian's linux-image, but kernel packages generated with the upstream # deb-pkg target don't have these dependencies, so install these before From 769d8562ab7014375dd7e83c56b313434f564ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Wed, 17 Sep 2025 14:24:06 +0200 Subject: [PATCH 2/2] feat(ci): Pass our build id to debos builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Minier --- .github/workflows/debos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/debos.yml b/.github/workflows/debos.yml index 84bcb903..1ad49ffd 100644 --- a/.github/workflows/debos.yml +++ b/.github/workflows/debos.yml @@ -94,6 +94,7 @@ jobs: -t xfcedesktop:true \ -t aptlocalrepo:${PWD}/local-apt-repo \ -t kernelpackage:'${{ inputs.kernelpackage }}' \ + -t "buildid:${BUILD_ID}" \ --print-recipe \ debos-recipes/qualcomm-linux-debian-rootfs.yaml