NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60810: /usr/src/sys/conf/osrelease.h -s behavior does not match description



The following reply was made to PR kern/60810; it has been noted by GNATS.

From: Rob Whitlock <rwhitlock22%gmail.com@localhost>
To: Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%netbsd.org@localhost,
 kern-bug-people%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/60810: /usr/src/sys/conf/osrelease.h -s behavior does not
 match description
Date: Tue, 29 Sep 2026 14:44:01 -0400

 > On Sep 29, 2026, at 2:10 PM, Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
 >=20
 >    Date:        Tue, 29 Sep 2026 01:29:56 -0400
 >    From:        Rob Whitlock <rwhitlock22%gmail.com@localhost>
 >    Message-ID:  <AB6D15AA-921B-4E1B-9F62-5B54693C95B0%gmail.com@localhost>
 >=20
 >  | but if there were a script that already
 >  | did that parsing for you, then why wouldn't you use it?
 >=20
 > But it doesn't, you only believe it does as you've apparently
 > only tested in on HEAD.   On the -10 branch currently, osrelease.sh -s
 > produces 102_STABLE  on the -11 branch it gives 110_STABLE (that one I =
 haven't
 > cvs up'd recently, it might have been updated beyond that since I last =
 did).
 >=20
 > On a 10.2 release version it says 102  (I don't have 11.0 release =
 kernel
 > sources handy to check it).   On the final -9 branch release it =
 produces 95
 
 Yes, that is my point. If you just look at the comments which describe
 the output as MMmmpp, then you can easily get the wrong idea.
 
 >  | (This is, of course, assuming that this person wouldn't be aware of
 >  | corner case differences between the two formats)
 >=20
 > It is more than corner case differences.   The script has a purpose to
 > exist, and making version numbers for pkgsrc is not it.
 >=20
 > You'd be better starting with uname -r from the system you want to
 > build for (the same as pkgsrc does for the native os version) and
 > convert that (which is trivial) to the correct format.
 
 Sure, but when cross-building you can't run uname -r on the target
 machine. Running uname -r on the build machine would get you the
 OS information for the build machine, not the target machine. This
 is why CROSS_OPSYS_VERSION must be derived from the sources that
 you have for the target machine. Either that or run the target
 machine under qemu or something, but that's a whole other can of
 worms and way too heavyweight to just get the output of uname -r.
 
 >  | Very well, I can drop the request to change it. However I still
 >  | think it would be a good idea to more precisely document the
 >  | given format in the comments,
 >=20
 > I can do that I suppose, including a comment telling people who want
 > to use it for purposes other than that for which it is designed, to
 > go away and leave that script in peace.
 
 Excellent, thank you!
 
 > kre
 >=20
 



Home | Main Index | Thread Index | Old Index