Hack to sysctl kern.osreldate, for ports cluster
brooks at one-eyed-alien.net
Sat Jan 8 11:19:34 PST 2005
On Sat, Jan 08, 2005 at 01:50:44PM -0500, Craig Rodrigues wrote:
> On Sat, Jan 08, 2005 at 03:47:14AM -0600, Conrad J. Sabatier wrote:
> > On Sat, 8 Jan 2005 02:13:24 -0500, Craig Rodrigues
> > <rodrigc at crodrigues.org> wrote:
> > > Hi,
> > >
> > >
> > > On http://pointyhat.freebsd.org/errorlogs/ it states
> > > that sysctl should not be used to determine the
> > > version of FreeBSD, and that uname(1) or the OSVERSION
> > > variable should be used instead.
> > >
> > > While a valid thing to do, this is another detail
> > > for port maintainers to keep track of.
> > >
> > >
> > > What do you think of this hack to sysctl,
> > > which cats /usr/include/sys/param.h to get the
> > > value of kern.osreldate, instead of going to
> > > the true kernel sysctl variable?
> > Well, while it's certainly a "doable" thing, don't you think it's just a
> > little bit dangerous? What about when the source tree is not in sync
> > with the currently running kernel?
> The scenario which you are describing is exactly how the
> ports are built now. From, http://pointyhat.freebsd.org/errorlogs/
> "The ports are built on 6.x-current machines. Some of the 5.x-stable
> and 4.x-stable failures may be because of that. If your port depends
> on the result of uname(3) or sysctl to determine the running version
> of FreeBSD, change it to use uname(1) instead (the builds use a
> dummy uname(1) that reports the target version of FreeBSD), or
> change it to use the value of the OSVERSION variable that can be
> passed in from the port makefile."
> This hack to sysctl which I provided is not for general use
> and should only be used in Kris's chroot'd environment which
> he uses to build the ports.
The problem I see with this is that you're forcing other users of
chroot's to install the same ugly hack.
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050108/b495d83d/attachment.bin
More information about the freebsd-ports