2 ms·
For building packages you want to distribute I would generally recommend an environment well isolated, well defined and reset to a known immutable state every t
by dathinab 3y ago
For building packages you want to distribute I would generally recommend an environment well isolated, well defined and reset to a known immutable state every time before you build anything _independent/additionally of any isolation a build system provided_ (except if the build system provides exactly this kind of isolation).
A common way to archive this is to run the steps in OCI containers (e.g. docker, CI systems like github actions, etc.). Through systems like nix can archive similar results.
Be aware that just using an OCI image isn't separating the "build software for packaging" and "process of packaging software" steps, any decent packaging system should provide a reasonable version of this and not doing so is "a mayor wtf. it's 2023 get your shit together" moment. Through weather it's with multi stage docker containers or dependent CI jobs there are many ways to work around it.
EDIT: To be clear I'm speaking about system packages and similar. Constraints for pure source code packages are similar but not quite the same and what is/isn't needed is also a lot language dependent.