From owner-freebsd-current@freebsd.org Fri May 4 21:39:07 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 3BE5EFB90E5 for ; Fri, 4 May 2018 21:39:07 +0000 (UTC) (envelope-from ian@freebsd.org) 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 B4048706A0 for ; Fri, 4 May 2018 21:39:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 71C5AFB90E3; Fri, 4 May 2018 21:39:06 +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 5DE1FFB90E2 for ; Fri, 4 May 2018 21:39:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F9670693 for ; Fri, 4 May 2018 21:39:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 8e82c035-4fe3-11e8-8e23-5bc9f169c8f5 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 8e82c035-4fe3-11e8-8e23-5bc9f169c8f5; Fri, 04 May 2018 21:39:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w44Ld0tk048524; Fri, 4 May 2018 15:39:00 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1525469940.57768.288.camel@freebsd.org> Subject: Re: OSVERSION From: Ian Lepore To: Alan Somers , Jeffrey Bouquet Cc: current Date: Fri, 04 May 2018 15:39:00 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Fri, 04 May 2018 21:39:07 -0000 On Fri, 2018-05-04 at 15:28 -0600, Alan Somers wrote: > On Fri, May 4, 2018 at 2:46 PM, Jeffrey Bouquet > wrote: > > > > > 12.0-CURRENT r332797 GENERIC amd64 > > .................. > > make: "/usr/ports/Mk/bsd.port.mk" line 1171: Unable to > > determine OS version. Either define OSVERSION, or > > install /usr/include/sys/param.h... > > .............................. > > then , with param.h in place > > > > .............................. > > port builds, pkgdb -u, and  portsdb -u all fail with: > > .............................. > > line 1200: UNAME_r (12.0-CURRENT) and OSVERSION (12.0-CURRENT) do not agree > > on major version number. > > .......................... > > Can I set that in sh or tcsh or zsh? > > ......................... > > > Looks like you're running ports in a jail.  The best way to do that is to > set OSVERSION in /etc/make.conf.  Some jail managers will even do that for > you.  It should look a little like this: > >  > cat /etc/make.conf > OSVERSION+=1100122 > UNAME_ENV+=     OSVERSION=${OSVERSION} > UNAME_ENV+=     UNAME_s=FreeBSD > UNAME_ENV+=     UNAME_r=11.0-RELEASE > UNAME_ENV+=     UNAME_v="${UNAME_s} ${UNAME_r}" > .MAKEFLAGS:     ${UNAME_ENV} > MAKE_ENV+=      ${UNAME_ENV} > CONFIGURE_ENV+= ${UNAME_ENV} > SCRIPTS_ENV+=   ${UNAME_ENV} 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.x userland you want the jail to implement. Then all the values returned by uname and various sysctls will be consistently correct within the jail. For example, on a 10.3 host I have a jail: fb8 {     host.hostname = "${name}.hippie.lan";     ip4.addr = 172.22.42.241;     persist = true;     devfs_ruleset = 100;     osrelease="8.4-STABLE";     osreldate= 804507; } -- Ian