On Mon, 6 Dec 2021 at 17:40, Henrik Riomar <henrik.riomar@...> wrote:
We set the BUILDNAME (via local.conf) variable to the output of "git
describe --long --always" so this info ends up in /etc/version instead
of a date. (i.e to know the exact source version of the code
deployed on a target)
This has worked fine for us up until 3.1.12, but now we just get a
date (201803...) in /etc/version.
Note that since switching to Dunfell we were forced to set
BUILD_REPRODUCIBLE_BINARIES to 0, so the build system would not "mess
up" /etc/version, but not even that helps now.
What's the official way to get something more useful than a date (in
the long past) in /etc/version?
We use build image-buildinfo class:https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#ref-classes-image-buildinfo
Just add INHERIT += "image-buildinfo" to your local.conf to get the build info.