diff options
| author | Diederik de Haas <didi.debian@cknow.org> | 2022-01-14 00:19:57 +0100 |
|---|---|---|
| committer | Diederik de Haas <didi.debian@cknow.org> | 2022-01-14 00:19:57 +0100 |
| commit | 1211f8af04999e59cdc52083d6f9fb5a448cb5e3 (patch) | |
| tree | 4b0618bf1b4f5c6f81d284e011be3e3846a4d78f | |
| parent | afe64f3b1f2ddae523b82d277f58ac79f3b0a78d (diff) | |
Add buildtime to raspi-image-id in the image itself
When the image was build also determines which package versions got
installed in the generated image and could help explain why a user has
problems with the downloaded image.
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
| -rwxr-xr-x | generate-recipe.py | 4 | ||||
| -rw-r--r-- | raspi_master.yaml | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/generate-recipe.py b/generate-recipe.py index 21e8972..fd536f6 100755 --- a/generate-recipe.py +++ b/generate-recipe.py @@ -130,6 +130,7 @@ else: systemd_timesyncd = 'systemd-timesyncd' gitcommit = subprocess.getoutput("git show -s --pretty='format:%C(auto)%h (%s, %ad)' --date=short ") +buildtime = subprocess.getoutput("date --utc +'%Y-%m-%d %H:%M'") ### Write results: @@ -167,7 +168,8 @@ with open('raspi_master.yaml', 'r') as in_file: .replace('__SERIAL_CONSOLE__', serial) \ .replace('__HOST__', hostname) \ .replace('__TOUCH_MACHINE_ID__', touch_machine_id) \ - .replace('__GITCOMMIT__', gitcommit) + .replace('__GITCOMMIT__', gitcommit) \ + .replace('__BUILDTIME__', buildtime) out_text = align_replace(out_text, '__FIX_FIRMWARE_PKG_NAME__', fix_firmware_cmds) out_text = align_replace(out_text, '__EXTRA_ROOT_SHELL_CMDS__', extra_root_shell_cmds) diff --git a/raspi_master.yaml b/raspi_master.yaml index fe817ac..cefe1de 100644 --- a/raspi_master.yaml +++ b/raspi_master.yaml @@ -175,4 +175,4 @@ steps: # Create /etc/raspi-image-id to know, from what commit the image was built - chroot: / shell: | - echo "image based on revision: __GITCOMMIT__ " > "/etc/raspi-image-id" + echo "image based on revision: __GITCOMMIT__ and build on __BUILDTIME__ (UTC)" > "/etc/raspi-image-id" |
