From owner-freebsd-ports@FreeBSD.ORG Sat Jan 8 19:19:34 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49D7816A4CE for ; Sat, 8 Jan 2005 19:19:34 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 173DB43D2D for ; Sat, 8 Jan 2005 19:19:34 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j08JLZnf011794; Sat, 8 Jan 2005 11:21:35 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j08JLZ2t011793; Sat, 8 Jan 2005 11:21:35 -0800 Date: Sat, 8 Jan 2005 11:21:35 -0800 From: Brooks Davis To: Craig Rodrigues Message-ID: <20050108192135.GD8265@odin.ac.hmc.edu> References: <20050108071324.GA32371@crodrigues.org> <20050108034714.40f42462@dolphin.local.net> <20050108185044.GA57045@crodrigues.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bjuZg6miEcdLYP6q" Content-Disposition: inline In-Reply-To: <20050108185044.GA57045@crodrigues.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: "Conrad J. Sabatier" cc: freebsd-ports@freebsd.org cc: Kris Kennaway Subject: Re: Hack to sysctl kern.osreldate, for ports cluster X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jan 2005 19:19:34 -0000 --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 > > 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--