Show the train version instead of /etc/version
Sean has explained to me why /etc/version might not be correct, sometimes showing nightly for stable and vice versa, but the sequence is always correct.
This is an artifact of building multiple trains from the same branch.
This is displayed in the GUI under system -> information -> build as well as in the browser header.
#2 Updated by Sean Fagan over 5 years ago
- Status changed from Screened to Unscreened
The sequence name, not the train name. (Which is to get the System Manifest, and then the Sequence() function from it.)
We used to do this, I think, and changed, but I forget why.
The email I sent Josh:
One of the things I had to decide upon for the update mechanism is: a package file with version <x> for package <foo> is always going to be the same as any other package file with the same version and package name.
So base-os-1234.tgz is always package base-os, version 1234. If a later build is attempted, and it comes up with a different file with the same name, then the update system concludes it is the same, regardless of any checksums.
The stable and nightlies builds are having the same package versions. So the latest TrueNAS 9.3-STABLE build has base-os version 9.3-STABLE-1925468-a7c9e62-401b6ce-6ac7f7c. However, the etc/version file in that tarball indicates it is TrueNAS-9.3-Nightlies-201504011847. This is because base-os version 9.3-STABLE-1925468-a7c9e62-401b6ce-6ac7f7c was (I can conclude) built for a 9.3-Nightlies build.
In terms of identifying a version for us, this is correct.
#4 Updated by Sean Fagan over 5 years ago
Poo. I'd like it to be understood so I'll try again.
The nightlies build is done by checking out the TN-9.3-STABLE branches for everything, and does a build with TRAIN=TrueNAS-9.3-Nightlies.
The stable build was checked out from the same TN-9.3-STABLE branches, and the buidl was done with TRAIN=TrueNAS-93-STABLE.
Since the checkouts were done with the same versions (that is, there are no commits that would differentiate the two checkouts), the versions for each of the packages is the same. The file /etc/version file, however, is generated during the build.
But because it goes into the base-os package, and the update system decides that two package files are the same if they have the same name, the one that is built first is used. In this case, it was the Nightlies build.
The manifest file that is built for the update system is not placed into any package files.
Does that make it clearer?