Recompile source on jail upgrade?

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
I am using TrueNAS 12 but posting here because the TrueNAS forums do not have a dedicated forum on jails. I have upgraded from FreeNAS 11.3-U5 to TrueNAS 12 a few months ago, and running now U4.1 I am reasonably happy with the new version. The remaining thing to do is to upgrade my jails from FreeBSD 11.3 to FreeBSD 12.2. I understand the iocage upgrade command I need to use for that(, and I understand that spinning up a new jail may be faster). What I am unclear about is whether sources previously compiled under FreeBSD 11.3 have to be recompiled for FreeBSD 12.2. If someone has some insight here, please let me know.

Thank you in advance.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
You should do a pkg upgrade inside the jail after upgrading the jail itself to bring all installed packages to a current version for FreeBSD 12.2. If you are talking about software you compiled yourself - no, regularly not. FreeBSD 12.2 and hence TrueNAS 12 will run FreeBSD 11.3 binaries in jails just fine. There are some incompatibilities, though. Tools that access kernel memory and directly read and interpret kernel data structures like lsof, netstat, etc. might fail. So the answer depends on the kind of software you are referring to.

HTH,
Patrick
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
@Patrick M. Hausen Thank you for the feedback, and I noticed that I was not quite clear about the code in question. I understand the process of upgrading packages. I question was meant for self-compiled code. Specifically, I compiled and set up urbackup from scratch. The compilation and configuration took quite some time, and setting up a new jail may take me more time then running the iocage upgrade and just waiting it out. So I would prefer the upgrade route if possible. I do not know urbackup under the hood, but I do not see why it would need to access kernel memory, so per your response this approach may work if FreeBSD 11.3 executables will run under FreeBSD 12. I was not sure if the system libraries would be compatible.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
You might need to pkg install compat11x-amd64 inside the jail after upgrading.
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
Ah, I did not know that compat11x package existed. Thank you so much!
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
So I did it... And the verdict is that it worked for 2 out of 3 jails using just "iocage upgrade" and "pkg update." It failed for my mineos jail which was created using this resource. The resource has not been updated for TrueNAS 12 so it may not be compatible.
 
Top