The jail sees the version of the real kernel.

You can fake this version by doing:
export UNAME_r=13.1
before running portupgrade

You can also set OSRELEASE=13 in jail.conf.
From the top of my head, so exact syntax might be different.

Regards,
Ronald.
Van: ft <m...@ft-c.de>
Datum: 18 januari 2025 19:33
Aan: freebsd-sta...@freebsd.org
Onderwerp: jail portupgrade different OS Version?



Hello, last week I created new jails.
$ pkg update ; pkg install ...
works fine inside jails.

Now it is not possible to start portupgrade inside jails. Before I have done: portsnap fetch update

Here are the error-message:

on host:
$  freebsd-version
14.1-RELEASE-p3

$  uname -a
FreeBSD ftc 14.1-RELEASE-p3 FreeBSD 14.1-RELEASE-p3 GENERIC amd64

in jail:
$  freebsd-version
13.1-RELEASE

$  uname -a
FreeBSD jail_pg01 14.1-RELEASE FreeBSD 14.1-RELEASE-p3 GENERIC amd64

in jail I get an error: $ portupgrade -h
make: "/usr/ports/Mk/bsd.port.mk" line 1191: UNAME_r (14.1-RELEASE) and
OSVERSION (1301000) do not agree on major version number.
/usr/local/lib/ruby/site_ruby/3.2/pkgtools/portsdb.rb:237:in `join': no implicit
conversion of nil into String (TypeError)
@index_file = ENV['PORTS_INDEX'] || File.join(indexdir, indexfile || 'INDEX')
from /usr/local/lib/ruby/site_ruby/3.2/pkgtools/portsdb.rb:237:in `index_file'
from /usr/local/lib/ruby/site_ruby/3.2/pkgtools/portsdb.rb:247:in `db_dir='
from /usr/local/lib/ruby/site_ruby/3.2/pkgtools/portsdb.rb:167:in `setup'
from /usr/local/lib/ruby/site_ruby/3.2/pkgtools/pkgtools.rb:242:in
`init_pkgtools_global'
from /usr/local/sbin/portupgrade:531:in `block in main'
from /usr/local/lib/ruby/3.2/optparse.rb:1153:in `initialize'
from /usr/local/sbin/portupgrade:238:in `new'
from /usr/local/sbin/portupgrade:238:in `main'
from /usr/local/sbin/portupgrade:2380:in `'

What should I do?

Franz







Reply via email to