djsmal
October 23, 2023, 8:21am
1
There is a new API fix but I don’t fully understand how to use it.
In https://github.com/balena-io/open-balena-api/blob/9fd9697f37423c891aea9faa92e45a9ca0db2137/src/lib/config.ts#L87C48-L87C48 the comment mentions
/**
* null: include all device type and device contract slugs
* "x;y;z": include only the specified device type and contract slugs - note that you MUST list
* all dependent slugs as well so for hw.device-type/asus-tinker-board-s you would need:
* `arch.sw/armv7hf;hw.device-manufacturer/asus;hw.device-family/tinkerboard;hw.device-type/asus-tinker-board-s`
* For something like hw.device-type/iot-gate-imx8 you would need:
* `arch.sw/aarch64;hw.device-type/iot-gate-imx8`
* (the order of the slugs in this variable does not matter)
*/
How does one figure out all dependent slugs given device type?
For example, we use:
raspberrypi4-64
raspberrypi3
asus-tinker-board
asus-tinker-board-s
What should CONTRACT_ALLOWLIST look like?
djsmal
October 23, 2023, 12:06pm
2
My best guess is that in our case CONTRACT_ALLOWLIST should look like this:
export OPENBALENA_CONTRACT_ALLOWLIST="arch.sw/armv7hf;arch.sw/aarch64;hw.device-manufacturer/asus;hw.device-family/tinkerboard;hw.device-type/asus-tinker-board-s;hw.device-type/asus-tinker-board;hw.device-type/raspberrypi3;hw.device-type/raspberrypi4-64;sw.os+hw.device-type/ubuntu@lunar+raspberrypi3;sw.os+hw.device-type/ubuntu@jammy+raspberrypi3;sw.os+hw.device-type/alpine+raspberrypi3;sw.os+hw.device-type/debian@sid+raspberrypi3;sw.os+hw.device-type/debian+raspberrypi3;sw.os+hw.device-type/ubuntu@focal+raspberrypi3;sw.os+hw.device-type/ubuntu@focal+raspberrypi4-64;sw.os+hw.device-type/debian@sid+raspberrypi4-64;sw.os+hw.device-type/alpine+raspberrypi4-64;sw.os+hw.device-type/debian+raspberrypi4-64;sw.os+hw.device-type/ubuntu@lunar+raspberrypi4-64;sw.os+hw.device-type/ubuntu@jammy+raspberrypi4-64;sw.os+hw.device-type/debian@bookworm+raspberrypi4-64"
Here is the same but with an explanation of why it’s there.
arch.sw/armv7hf; # asus-tinker-board, asus-tinker-board-s, raspberrypi3
arch.sw/aarch64; # raspberrypi4-64
hw.device-manufacturer/asus; # asus-tinker-board, asus-tinker-board-s
hw.device-family/tinkerboard; # asus-tinker-board, asus-tinker-board-s
hw.device-type/asus-tinker-board-s; # asus-tinker-board-s
hw.device-type/asus-tinker-board; # asus-tinker-board
hw.device-type/raspberrypi3; # raspberrypi3
hw.device-type/raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/ubuntu@lunar+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/ubuntu@jammy+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/alpine+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/debian@sid+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/debian+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/ubuntu@focal+raspberrypi3; # raspberrypi3
sw.os+hw.device-type/ubuntu@focal+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/debian@sid+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/alpine+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/debian+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/ubuntu@lunar+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/ubuntu@jammy+raspberrypi4-64; # raspberrypi4-64
sw.os+hw.device-type/debian@bookworm+raspberrypi4-64 # raspberrypi4-64
I got this from GitHub - balena-io/contracts: Balena.io Base Contracts .
If anybody can confirm that this is right or correct it if it is wrong that would be great