From owner-freebsd-current@freebsd.org Sat May 5 06:06:32 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 440BFFCB910 for ; Sat, 5 May 2018 06:06:32 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D0D436820A for ; Sat, 5 May 2018 06:06:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: by mailman.ysv.freebsd.org (Postfix) id 92C9AFCB90F; Sat, 5 May 2018 06:06:31 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F3FAFCB90E for ; Sat, 5 May 2018 06:06:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D355C681E4 for ; Sat, 5 May 2018 06:06:30 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id w45682t9004918; Fri, 4 May 2018 23:08:08 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: UDNSMS MIME-Version: 1.0 In-Reply-To: <1525469940.57768.288.camel@freebsd.org> From: "Chris H" Reply-To: bsd-lists@BSDforge.com To: "current" , "Jeffrey Bouquet" Subject: Re: OSVERSION Date: Fri, 04 May 2018 23:08:08 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2018 06:06:32 -0000 On Fri, 04 May 2018 15:39:00 -0600 "Ian Lepore" said > On Fri, 2018-05-04 at 15:28 -0600, Alan Somers wrote: > > On Fri, May 4, 2018 at 2:46 PM, Jeffrey Bouquet=20 > > wrote: > >=20 > > >=20 > > > 12=2E0-CURRENT r332797 GENERIC amd64 > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > > make: "/usr/ports/Mk/bsd=2Eport=2Emk" line 1171: Unable to > > > determine OS version=2E Either define OSVERSION, or > > > install /usr/include/sys/param=2Eh=2E=2E=2E > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > > then , with param=2Eh in place > > >=20 > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > > port builds, pkgdb -u, and=C2=A0=C2=A0portsdb -u all fail with: > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > > line 1200: UNAME_r (12=2E0-CURRENT) and OSVERSION (12=2E0-CURRENT) do not > > agree > > > on major version number=2E > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > > Can I set that in sh or tcsh or zsh? > > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E > > >=20 > > Looks like you're running ports in a jail=2E=C2=A0=C2=A0The best way to d= o that is to > > set OSVERSION in /etc/make=2Econf=2E=C2=A0=C2=A0Some jail managers will eve= n do that for > > you=2E=C2=A0=C2=A0It should look a little like this: > >=20 > > =C2=A0> cat /etc/make=2Econf > > OSVERSION+=3D1100122 > > UNAME_ENV+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0OSVERSION=3D${OSVERSION} > > UNAME_ENV+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0UNAME_s=3DFreeBSD > > UNAME_ENV+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0UNAME_r=3D11=2E0-RELEASE > > UNAME_ENV+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0UNAME_v=3D"${UNAME_s} ${UNAM= E_r}" > > =2EMAKEFLAGS:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0${UNAME_ENV} > > MAKE_ENV+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0${UNAME_ENV} > > CONFIGURE_ENV+=3D ${UNAME_ENV} > > SCRIPTS_ENV+=3D=C2=A0=C2=A0=C2=A0${UNAME_ENV} >=20 > If you're running a freebsd 11 jail on a freebsd 12 host, the best > solution is to set osrelease and osreldate in your jail config to > reflect the 11=2Ex userland you want the jail to implement=2E Then all the > values returned by uname and various sysctls will be consistently > correct within the jail=2E For example, on a 10=2E3 host I have a jail: >=20 > fb8 { > =C2=A0=C2=A0=C2=A0=C2=A0host=2Ehostname =3D "${name}=2Ehippie=2Elan"; > =C2=A0=C2=A0=C2=A0=C2=A0ip4=2Eaddr =3D 172=2E22=2E42=2E241; > =C2=A0=C2=A0=C2=A0=C2=A0persist =3D true; > =C2=A0=C2=A0=C2=A0=C2=A0devfs_ruleset =3D 100; > =C2=A0=C2=A0=C2=A0=C2=A0osrelease=3D"8=2E4-STABLE"; > =C2=A0=C2=A0=C2=A0=C2=A0osreldate=3D 804507; > } >=20 > -- Ian +1 I do exactly the same in my jails to better isolate them from the host=2E In fact, you can even lie about what (os)version you're using, if you need to=2E :-) --Chris > _______________________________________________ > freebsd-current@freebsd=2Eorg mailing list > https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd=2Eorg= "