Closed mandree closed 4 months ago
it does not check the kernel but the userland because of jail support which might report a newer kernel, what matters is the ABI of the userland you are running not the kernel. so yeah I should probably s/kernel/userland here.
But how can the jail - if it just executing applications under tighter reins but still uses the host's kernel - possibly report a newer kernel?
Of course the userland is also important, if my libc is too old, apparently the build toolchain has some "incompatible OSVERSION and rebuild" figures which I have not fully grokked yet.
But how can the jail - if it just executing applications under tighter reins but still uses the host's kernel - possibly report a newer kernel?
Presumably @bapt means report a newer kernel than the binaries in the jail, not a newer kernel than the host.
That said I agree it's reasonable to check the userland (/usr/bin/uname, /bin/sh) for compatibility, but we should not report the version found there as the "running kernel" version.
In a situation, where the OSVERSION got bumped from 1400092 to 1400093 in both my host (buildworld buildkernel installkernel, reboot, etcupdate, installworld, etcupdate, reboot) and also my poudriere jail, I receive packages that are marked as though they had been built for 1400093.
However, pkg misdetermines the "running kernel" as 1400092.
The cause appears to be that:
pkg_get_myarch()
andpkg_get_myarch_elfparse()
){g,S,}crt[1i].o
,crtbrand.o
, which are part of the/usr/src/lib/csu
build, see also https://www.netbsd.org/Documentation/kernel/elf-notes.html - we're doing the same thing with different tag, and also through these C startup files.WITH_CCACHE_BUILD=yes WITHOUT_CLEAN=yes
in /usr/src.I am currently testing my buildworld script that will "make clean -C /usr/src/lib/csu" first when rebuilding, but is there a reason why pkg is not calling into
int getosreldate(void);
from libc to figure the running kernel? And it probably also needs to wait for the next OSVERSION update to ...94 or ...100 so that I can really test it.I can prove with "grep" or "strings" that the running kernel is indeed already 1400093 and no longer 1400092, and this bogus
- running kernel: 1400092
when the actual check was performed would suggest- FreeBSD ABI tag of /usr/bin/uname or /bin/sh: 1400092
is what was checked is EXTREMELY CONFUSING and should be fixed.At the very least, fix the printed text, so that people do not get sent to rebuild their kernels which are fine and up to date, but actually, fix pkg.