Trouble update ports jail after 9.10 upgrade

Status
Not open for further replies.

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
Hi folks
After the 9.10 upgrade from 9.3 I have some trouble updating an existings ports jail.
portsnap fetch update works fine, but portmaster -a gives the following error

➜ / portmaster -a

===>>> The value of DISTDIR cannot be empty
===>>> Aborting update

and portupgrade

/ portupgrade
"Mk/bsd.port.mk", line 1162: UNAME_r (10.3-RC3) and OSVERSION (902001) do not agree on major version number.
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:237:in `join': no implicit conversion of nil into String (TypeError)
from /usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:237:in `index_file'
from /usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:247:in `db_dir='
from /usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:167:in `setup'
from /usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgtools.rb:242:in `init_pkgtools_global'
from /usr/local/sbin/portupgrade:531:in `block in main'
from /usr/local/lib/ruby/2.1/optparse.rb:880: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 `<main>'
➜ /

Any idea how to fix this?
 
D

dlavigne

Guest
Does rebuilding portmaster or portupgrade fix it? eg. cd /usr/ports/ports-mgmt portmaster && make reinstall
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
No
portmaster make reinstall
"/usr/ports/Mk/bsd.port.mk", line 1162: UNAME_r (10.3-RC3) and OSVERSION (902001) do not agree on major version number.
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
➜ pkg update
Updating FreeBSD repository catalogue...
pkg: Unable to upgrade "FreeBSD" repo schema version 2010 (target version 2012) -- change not found
pkg: need to re-create repo FreeBSD to upgrade schema version
[port] Fetching meta.txz: 100% 968 B 1.0kB/s 00:01
[port] Fetching packagesite.txz: 100% 5 MiB 2.8MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 24751 packages processed.

But portmaster -a and pkg update throw the same errors as before
 
D

dlavigne

Guest
Bummer, sounds like updating existing jails is no longer an option. While you could delete and recreate your jails dataset in order to get the updated template (as mentioned in the Release Notes), that's a bit extreme if you already have working jails.
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
Sorry to here that, but in my case this not so important, it was mainly hosting the plex server, so a reinstall should be easy.
 

SlyBlue

Cadet
Joined
Mar 13, 2015
Messages
2
I am having the same issue, also when I tried creating a new jail in 9.10 I get a new error: "pkg: wrong architecture: freebsd:9:x86:64 instead of FreeBSD:10:amd64"
 
D

dlavigne

Guest
Please create a bug report about that error and post the issue number here.
 

gladandong

Cadet
Joined
Feb 23, 2013
Messages
2
Hope the following procedure works for you too.
  1. edit /etc/login.conf, add the line in Bold

    default:\
    :setenv=UNAME_r=9.3-RELEASE:\
    :passwd_format=sha512:\

  2. run this command

    cap_mkdb /etc/login.conf

  3. quit, re-enter the jail and try again.

Frank
 

TerranPhil

Dabbler
Joined
Jan 17, 2015
Messages
19
Short of recreating my jails which I have yet to try nothing in this thread has worked for me.

Code:
root@rad:/ # cd /usr/ports/ports-mgmt/portupgrade/ && make install clean
"/usr/ports/Mk/bsd.port.mk", line 1166: UNAME_r (10.3-RELEASE) and OSVERSION (903000) do not agree on major version number.
 

sremick

Patron
Joined
Sep 24, 2014
Messages
323
I just got bit by this. I had been running 9.2, I "upgraded" to 9.10 by installing clean via ISO onto a new USB boot drive, then importing my config. Everything (including my jail) had been working since, including updating ports. But today I'm getting this error.
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
The following seems to work for me

In the jail

setenv UNAME_r 9.3-Release

and then as recommended in #2

now portmaster -a is working :smile:
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
According to those bug reports "Not To Be Fixed" Doesn't instill confidence in the 9.2 / 9.3 upgrade process to be honest.
 

sremick

Patron
Joined
Sep 24, 2014
Messages
323
The following seems to work for me

In the jail

setenv UNAME_r 9.3-Release

and then as recommended in #2

now portmaster -a is working :)

Thanks. That worked. Much easier than rebuilding the entire jail from scratch.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
I'm trying to update handbrake within a myth jail that I created on an older version of FreeNAS and I'm getting the same mismatch error:

Code:
root@mythtv:~ # cd /usr/ports/multimedia/handbrake/ && make install clean
"/usr/ports/Mk/bsd.port.mk", line 1148: UNAME_r (10.3-STABLE) and OSVERSION (903000) do not agree on major version number.


Unfortunately, I don't understand the solution recommended above.

Could someone please explain it a little more fully?

Thank you!

- nello
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
I will try ;-)
#enter your jail as usual, replace the one with your jail name oder number
sudo jexec 1
# in the jail set the environment variable
setenv UNAME_r 9.3-Release
# after that you can use the portage system as usual
portsnap fetch update
portmaster -adw
...
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
Status
Not open for further replies.
Top