On Wednesday 23 March 2016, Michal Kubecek wrote:
On Wed, Mar 23, 2016 at 09:19:43PM +0100, Ruediger Meier wrote:
even I've realized that "uname -r" is broken on any openSUSE build repo.
It's because the post-build-checks package symlinks an uname.sh script which does not report the running kernel version anymore but a version string from arbitrary text files or installed kernel sources.
What is the reason why we have this dirty hack?
IMHO the reason is that while regular OBS builds use a full virtual machine for build now, it wasn't always so and even now, local builds use only a chroot.
The result would then depend on kernel version of the build host. For example, the system I'm doing most of my local osc builds on would report 3.12 kernel while the actual target systems range from 2.6.16 to 4.5.0.
Yes and this is correct and wanted behavior. For example a test-suite might skip (or include) certain tests depending on the _running_ kernel. The kernel version can be used to guess about kernel _runtime_ bugs or features.
If any package would need to know a kernel source version then it should certainly not use uname to get it. Thus we should rather fix that package instead of breaking uname.
That sounds like a nice goal but doing such cleanup globally sounds like quite a lot of work. Work someone should do first.
I guess there is almost no existing use case for this broken behavior. Even for packages which want to report the build host kernel version in their --version output, like $ xyz --version "xyz 1.2.3, built on Linux 3.2.1" are wrong, because it's simply not true that it was built on Linux 3.2.1. BTW the existing hack is incomplete anyways because uname(2) and /proc/version still don't lie. So what we have is a nonpredictable mix. cu, Rudi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org