Skip to content

Commit 5f36aeb

Browse files
committed
feat: Add image build information to /etc/buildinfo
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 <[email protected]>
1 parent d504ecc commit 5f36aeb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{- $localdebs := or .localdebs "none" }}
33
{{- $aptlocalrepo := or .aptlocalrepo "none" }}
44
{{- $kernelpackage := or .kernelpackage "linux-image-arm64" }}
5+
{{- $buildid := or .buildid "" }}
56

67
architecture: arm64
78

@@ -246,6 +247,22 @@ actions:
246247
update-locale LANG=en_US.UTF-8
247248
fi
248249
250+
{{- if ne $buildid "" }}
251+
- action: run
252+
description: Set build ID and flavor in /etc/buildinfo
253+
chroot: true
254+
command: |
255+
set -eux
256+
touch /etc/buildinfo
257+
chmod 644 /etc/buildinfo
258+
echo "BUILD_ID={{$buildid}}" >>/etc/buildinfo
259+
{{- if eq $xfcedesktop "true" }}
260+
echo "VARIANT_ID=xfce" >>/etc/buildinfo
261+
{{- else }}
262+
echo "VARIANT_ID=console" >>/etc/buildinfo
263+
{{- end }}
264+
{{- end }}
265+
249266
# usually these packages are pulled by Pre-Depends/Depends/Recommends of
250267
# Debian's linux-image, but kernel packages generated with the upstream
251268
# deb-pkg target don't have these dependencies, so install these before

0 commit comments

Comments
 (0)