Home | History | Annotate | Download | only in gen
History log of /src/lib/libc/gen/grab-version.sh
RevisionDateAuthorComments
 1.3  10-Jul-2026  kre Redo the sysctl user.osrevision (etc) impl method

This is not intended to affect the results, but is a different
method of getting there, without ephemeral generated include files.

It is unlikely that this is the final version, but it seems better
for now (update builds probably don't do what I'd intended for now,
but that's a minor concern - they should still work).
 1.2  10-Jul-2026  kre Add new user.* nodes to sysctl

This adds the nodes (and documentation for them):

user.ostype = NetBSD
user.osrevision = 1199000600
user.osrelease = 11.99.6
user.built = 2026-07-10 02:46:18 UTC

to the sysctl mib (the values shown there just what happened for a test build).
The first three are more or less identical to the kern.* mib variables of the
same names - the difference is that these reflect userland, or at least, libc
so do not alter just because a new updated kernel is booted without updating
the rest of the system. The fourth gives either the date when libc was
built (as shown) or if the value contains a trailing "!" (after a space
after UTC) the value is the MKREPERO_TIMESTAMP for the build (keep building
with the same value and the date/time there won't alter). The date/time
are always in UTC.

None of these (like all the other user.* mib variables) are writeable.

It would be nice to get this into -11, but I am not going to request a
pullup for a few days, to allow people to experiment a little.

Someone please check the fragment added to libc/gen/Makefile.inc
I'm sure there's a much better way that could be done.

No symbol added/deleted, or API/ABI changes to libc, no version bumps required.

XXX pullup -11
 1.1  10-Jul-2026  kre Adding src/lib/libc/gen/grab-version.sh

A simple script that gets current system version information and
builds a header file containing it. To be used in a following commit.

RSS XML Feed