From 695a52c4dcf9caf0cf0f87534e6ba7938ca9ad2d Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 22 Sep 2023 18:52:08 +0100 Subject: [PATCH] Verify that the downloaded `busybox` binary runs Signed-off-by: Pedro Algarvio --- golden-state-tree/download/busybox.sls | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/golden-state-tree/download/busybox.sls b/golden-state-tree/download/busybox.sls index 06a61cd95..8ac3f4178 100644 --- a/golden-state-tree/download/busybox.sls +++ b/golden-state-tree/download/busybox.sls @@ -1,10 +1,17 @@ /usr/bin/busybox: file.managed: - {%- if grains['osarch'] == 'arm64' %} - - source: https://github.com/saltstack/salt-jenkins/files/8031454/busybox.zip - - source_hash: sha256=d270442b2fff1c8ebbd076afaf2f6739abc5790526acfafd8fcdba3eab80ed73 - {%- else %} + {%- if grains['osarch'] == 'aarch64' %} - source: https://github.com/saltstack/salt-jenkins/files/12686271/busybox.arch64.zip - source_hash: f6c93120cec5f4a6414ae7e7725ef20dd51f07b93f5f69961c1ce2c3ab13b446 + {%- else %} + - source: https://github.com/saltstack/salt-jenkins/files/8031454/busybox.zip + - source_hash: sha256=d270442b2fff1c8ebbd076afaf2f6739abc5790526acfafd8fcdba3eab80ed73 {%- endif %} - mode: 0755 + + +run-busybox: + cmd.run: + - name: /usr/bin/busybox pwd && exit 0 || exit 1 + - require: + - /usr/bin/busybox