Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
[How-To] Manually upgrade mono from 5.10 to 5.20 in a FreeNAS Jail

[How-To] Manually upgrade mono from 5.10 to 5.20 in a FreeNAS Jail

With the recent version of Lidarr (0.7.0.1347- Now resolved with 0.7.1.1381) older versions of mono were broken and I found out that "soonish" it would drop support from the current latest FreeBSD version of mono 5.10 (26 Feb 2018 ) for 5.18 (21 Dec 2018 ). Same with Sonarr and probably Radarr and Jackett as well. So if we don't get a newer version (6.0.0 is the latest) of mono "soonish" on FreeBSD then we could find ourselves in a situation where auto-updates to these apps will break them. That is if the below bug fix does not get implemented before these applications drop support for 5.10. So here is some preventative maintenance you can do to make sure this won't happen.

You have four options. Either run non-native code and virtualize the linux kernel trough a VM or Docker and deal with the overhead costs of that. Disable auto-updates to these apps and hope something does not break in the future. Hope mono gets updated before support is dropped. Or do the following as preventative maintenance.

Using https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238089 to upgrade mono to 5.20 (11 Apr 2019 ) on a FreeNAS 11.2 Jail isn't as straightforward as the comments suggest.

I have tested the following on FreeNAS-11.2-U5 with 11.2-RELEASE-p12 based jails. Tested and working for me this many times. Lidarr (x3 Jail), Sonarr (x2 Plug-in), Radarr (x2 Plug-in), Jackett (x1 Jail).


Stop all services running mono. Should be "sonarr", "radarr", "lidarr", and "jackett".

service lidarr stop

portsnap fetch extract

pkg update

pkg upgrade

----------------------------------------------
If you are running a plug-in and not a standard jail you will either need to unlock the repository or install nano manually. Or use whatever (awful/unintuitive) default text editor is availible. Here is how to install it manually.

cd /usr/ports/editors/nano

make -DBATCH install clean

---------------------------------------------

nano /tmp/mono-patch-5.20.1.34

Copy everything from https://bz-attachments.freebsd.org/attachment.cgi?id=205999 into that file, save and close

cd /usr/ports/lang/mono

patch -E < /tmp/mono-patch-5.20.1.34

nano Makefile

We need to change the 'PORTVERSION=' from 5.10.1.57 to 5.20.1.34 then save and exit. It is right at the top few lines of the file.

If you try 'make install clean' here you get "libepoxy-1.5.2 needs Python 3.3 at least, but 2.7 was specified." When you follow that rabbit hole you find bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233723 so we need to compile that from source first. But if you try to 'make install clean' for libepoxy you get a similar error for llvm80. So we need to compile llvm80 first then libepoxy, then finally mono.

cd /usr/ports/devel/llvm80

I have an E5-2680V2 and these took a good long while to compile (100% CPU Usage). Get some popcorn and watch a movie maybe. That is if your Plex isn't on the same box. Especially if you are on something low power. You could do multiple jails at once and just walk away if you have enough RAM to do that.

make -DBATCH install clean

cd /usr/ports/graphics/libepoxy

make -DBATCH install clean

cd /usr/ports/lang/mono

make -DBATCH install clean

make deinstall reinstall

Just press 'Enter' if given any promts with options

pkg update

pkg upgrade

Restart all services running mono

service lidarr start
Author
ChaosBlades
First release
Last update
Rating
0.00 star(s) 0 ratings
Top