Feature #5091
closedwe don't see the library versions of our osmo-*-master containers
100%
Description
while looking at the jenkins log file it is currently impossible to see which exact libosmo* was used for this test run.
If the given build job doesn't rebuld the osmo-pcu-master container, we will not see the log lines of package installation and hence not know what is installed.
I think it would be best to add some kind of step like "dpkg -l | grep osmo" (and a similar "rpm -qi" analogy) before starting the related container.
Adding a CMD/ENTRYPOINT for that doesn't really make a lot of sense to me. Maybe we can somehow generalize this int he jenkins.sh? First start the container once to obtain that information (and terminte), and then start a second time to actually run the IUT?
Another more controversial alternative would of course be to discover this at runtime from within the program (e.g. some "show" command, or printing it at start-up). That would have the advantage that it would also help our users (or us in debugging) in that they would have an easy, distribution/packaging independent way of reporting the exact version of all osmocom libraries and the application when sending bug reports. The problem is that there's no straight-forward way to do that latter part. We would either have to compile the version into the library, so it can be obtained as a global symbol, or we would have to do some extremly clumsy fork()+system() with a dpkg/rpm call, or one to "pkg-config --modversion libosmocore" etc.
If we'd go for any of those "runtime" approaches, then IIRC it would be best to include the version into the compiled library, similar to what we do in the actual application programs. The libraries could then in some constructor register themselves into a global linked list (maintained by libosmocore) containing library name + version number. That list could then be traversed by a "show" command.