Discussion:
OSVERSION
(too old to reply)
Jeffrey Bouquet
2018-05-04 20:46:23 UTC
Permalink
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?
.........................
Alan Somers
2018-05-04 21:28:53 UTC
Permalink
Post by Jeffrey Bouquet
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
..............................
..............................
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
Post by Jeffrey Bouquet
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}
Ian Lepore
2018-05-04 21:39:00 UTC
Permalink
On Fri, May 4, 2018 at 2:46 PM, Jeffrey Bouquet
Post by Jeffrey Bouquet
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
..............................
..............................
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
 > 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
Jeffrey Bouquet
2018-05-04 23:29:12 UTC
Permalink
Post by Alan Somers
Post by Jeffrey Bouquet
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
..............................
..............................
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
Post by Jeffrey Bouquet
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}
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
uname -K plugged into that template fixed the port error message.
Thanks!
Chris H
2018-05-05 06:08:08 UTC
Permalink
Post by Ian Lepore
On Fri, May 4, 2018 at 2:46 PM, Jeffrey Bouquet
Post by Jeffrey Bouquet
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
..............................
..............................
line 1200: UNAME_r (12.0-CURRENT) and OSVERSION (12.0-CURRENT) do not
agree
Post by Jeffrey Bouquet
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
 > 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
fb8 {
    host.hostname = "${name}.hippie.lan";
    ip4.addr = 172.22.42.241;
    persist = true;
    devfs_ruleset = 100;
    osrelease="8.4-STABLE";
    osreldate= 804507;
}
-- Ian
+1
I do exactly the same in my jails to better isolate them from the host.
In fact, you can even lie about what (os)version you're using, if you
need to. :-)

--Chris
Post by Ian Lepore
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
Continue reading on narkive:
Loading...