Skip to content

Commit 975a76c

Browse files
committed
feat: Add image build information to os-release
Add a buildid variable that will be appended to etc/os-release along with the variant/flavor (console or xfce) of the image. Signed-off-by: Loïc Minier <[email protected]>
1 parent d504ecc commit 975a76c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 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,20 @@ 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/os-release
253+
chroot: true
254+
command: |
255+
set -eux
256+
echo "BUILD_ID={{$buildid}}" >> /etc/os-release
257+
{{- if eq $xfcedesktop "true" }}
258+
echo "VARIANT_ID=xfce" >> /etc/os-release
259+
{{- else }}
260+
echo "VARIANT_ID=console" >> /etc/os-release
261+
{{- end }}
262+
{{- end }}
263+
249264
# usually these packages are pulled by Pre-Depends/Depends/Recommends of
250265
# Debian's linux-image, but kernel packages generated with the upstream
251266
# deb-pkg target don't have these dependencies, so install these before

0 commit comments

Comments
 (0)