Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2005 11:21:35 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Hack to sysctl kern.osreldate, for ports cluster
Message-ID:  <20050108192135.GD8265@odin.ac.hmc.edu>
In-Reply-To: <20050108185044.GA57045@crodrigues.org>
References:  <20050108071324.GA32371@crodrigues.org> <20050108034714.40f42462@dolphin.local.net> <20050108185044.GA57045@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--bjuZg6miEcdLYP6q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment
Content-Transfer-Encoding: quoted-printable

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@crodrigues.org> wrote:
> >=20
> > > Hi,
> > >=20
> > >=20
> > > 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.
> > >=20
> > > While a valid thing to do, this is another detail
> > > for port maintainers to keep track of.
> > >=20
> > >=20
> > > 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?
> >=20
> > 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?
>=20
> The scenario which you are describing is exactly how the
> ports are built now.  From,  http://pointyhat.freebsd.org/errorlogs/
>=20
>    "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."
>=20
> 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.

-- Brooks

--=20
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

--bjuZg6miEcdLYP6q
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFB4DK/XY6L6fI4GtQRAqy3AKCoDSfMewsgEaMzMib//Fn734pV8QCg5LK3
Do0vxElX+jwWq6baE1rfgN0=
=DXkZ
-----END PGP SIGNATURE-----

--bjuZg6miEcdLYP6q--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050108192135.GD8265>