From 8428e4369b373a915c23510d0fe869af8690f6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= Date: Tue, 16 Apr 2024 10:18:37 +0200 Subject: [PATCH] Add checksum protection to script-generator --- seed/after.kaem | 2 +- seed/script-generator.amd64.checksums | 1 + seed/script-generator.riscv64.checksums | 1 + seed/script-generator.x86.checksums | 1 + seed/seed.kaem | 6 ++++++ 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 seed/script-generator.amd64.checksums create mode 100644 seed/script-generator.riscv64.checksums create mode 100644 seed/script-generator.x86.checksums diff --git a/seed/after.kaem b/seed/after.kaem index 79c6f613..a9ab9aa0 100755 --- a/seed/after.kaem +++ b/seed/after.kaem @@ -11,5 +11,5 @@ set -ex PATH=/${ARCH_DIR}/bin -catm seed-full.kaem /steps/env seed.kaem +catm seed-full.kaem /steps/bootstrap.cfg /steps/env seed.kaem kaem --file seed-full.kaem diff --git a/seed/script-generator.amd64.checksums b/seed/script-generator.amd64.checksums new file mode 100644 index 00000000..cb29e4bb --- /dev/null +++ b/seed/script-generator.amd64.checksums @@ -0,0 +1 @@ +1927a357c893d60952616146e788af25e637635b2862650914bf895d27f556a6 script-generator diff --git a/seed/script-generator.riscv64.checksums b/seed/script-generator.riscv64.checksums new file mode 100644 index 00000000..dbf6b243 --- /dev/null +++ b/seed/script-generator.riscv64.checksums @@ -0,0 +1 @@ +1aa31b29ce0999b6a9cace93bc584020ec78059b9ad37d9aa3da9ad6c3d9af59 script-generator diff --git a/seed/script-generator.x86.checksums b/seed/script-generator.x86.checksums new file mode 100644 index 00000000..4ee2e439 --- /dev/null +++ b/seed/script-generator.x86.checksums @@ -0,0 +1 @@ +dc6106dbc02839cdc9e3e2348432242eb6d33d840ab74badfd63c3c9997462b9 script-generator diff --git a/seed/seed.kaem b/seed/seed.kaem index 7f429d4d..04004200 100755 --- a/seed/seed.kaem +++ b/seed/seed.kaem @@ -65,5 +65,11 @@ MES_PREFIX=${SRCDIR}/${MES_PKG}/build/${MES_PKG} GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${SRCDIR}/${MES_PKG}/build/${NYACC_PKG}/module M2-Mesoplanet --architecture ${ARCH} -f script-generator.c -o script-generator +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o script-generator.${ARCH}.checksums script-generator +else + sha256sum -c script-generator.${ARCH}.checksums +fi ./script-generator /steps/manifest kaem --file /steps/0.sh