Skip to content

Commit 28826de

Browse files
authored
Merge pull request #146 from lool/image-build-info
Add image build info
2 parents d504ecc + 769d856 commit 28826de

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/debos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
-t xfcedesktop:true \
9595
-t aptlocalrepo:${PWD}/local-apt-repo \
9696
-t kernelpackage:'${{ inputs.kernelpackage }}' \
97+
-t "buildid:${BUILD_ID}" \
9798
--print-recipe \
9899
debos-recipes/qualcomm-linux-debian-rootfs.yaml
99100

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)