If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to: Installing LMS 7.9 nightly in a FreeBSD jail on FreeNAS 9.3

I have successfully built and am running the latest 7.9 nightly (1438870722) in a FreeBSD jail on FreeNAS FreeNAS-9.3-STABLE-201506292332 on an HP Microserver Gen8 with 10GB RAM, a 16GB flash drive, a 120GB Samsung SSD and 4 x 4TB WD Red HDs.

My goal was to have 10TB+ of lz4 storage for media and run LMS on the SSD. FreeNAS boots from the flash drive installed in the internal USB port, the SSD uses the ODD bay and SATA connector and the WD Reds are in the 4 drive trays.

I struggled with getting LMS to build working from the information in this thread and tried at least a half dozen times before I found the path. The following commands are exactly what I used as I went through the process successfully. You will have to adapt them to your directory/storage structures as appropriate. The key to getting it working was making sure the symbolic links to perl/perl5 were done/redone in both jails.

Create two jails: one to build LMS and one to run it. Use Advanced mode, enter the IPv4 default gateway and check VIMAGE.

It seems you are overwriting the system perl, which could result in a number of problems (both in operation and when the system perl is upgraded)
You could have a look at the howto mentioned in my signature for a different approach (just don't build your own perl, use the one in /usr/local)

While I have no clue about FreeBSD, I'm not convinced this is a good idea:

It seems you are overwriting the system perl, which could result in a number of problems (both in operation and when the system perl is upgraded)
You could have a look at the howto mentioned in my signature for a different approach (just don't build your own perl, use the one in /usr/local)

Probably a real concern if it were the actual system perl. But everything is in a self-contained, virtualized environment ("jail" in FreeNAS), and there's won't be any updates. The whole jail exists for the sole purpose of running LMS completely isolated from FreeNAS.

Thanks get.amped, I used your method and all is working well. My library is mostly FLAC but I did have to install the FAAD port to get any m4a tracks to transcode and play.

It runs fast and smooth - so much better than trying to run in a virtualbox jail.

What will be required to keep LMS updated?

I have had that same question

It should be a reduced set of the same instructions. First take a snapshot of your jails so you can revert back to them if everything goes horribly wrong. Then, in the build jail, wget the nightly, git the source, run buildme.sh, clean up the unneeded versions, tar it, cp it to the LMS jail, untar it and mv the files into usr/local/lms.

At least that's what I'm going to try when I want to get a more recent nightly. Anyone with more Linux skills than I please chime in if there's a better/easier way.

And I didn't even think about the FAAD port for m4a tracks. I don't have many (and almost never play them anyway) but I should probably go ahead and do that as well.

It should be a reduced set of the same instructions. First take a snapshot of your jails so you can revert back to them if everything goes horribly wrong. Then, in the build jail, wget the nightly, git the source, run buildme.sh, clean up the unneeded versions, tar it, cp it to the LMS jail, untar it and mv the files into usr/local/lms.

You only need to do the build step if the version of one of the binary CPAN modules changes, which happens very rarely (< once a year), so you can nearly always skip this step
Getting the nightly and checking out is also unnecessary, one of the two is enough. Keeping the checked out version locally (not in /tmp) and only updating (git pull) is a lot more efficient the downloading everything every time.
The most convenient way is to run LMS directly from the checked out repository (which should exclude Bin/ and CPAN/arch, where you will have your own binaries instead), then a simple git pull will bring you up to date

You only need to do the build step if the version of one of the binary CPAN modules changes, which happens very rarely (< once a year), so you can nearly always skip this step
Getting the nightly and checking out is also unnecessary, one of the two is enough. Keeping the checked out version locally (not in /tmp) and only updating (git pull) is a lot more efficient the downloading everything every time.
The most convenient way is to run LMS directly from the checked out repository (which should exclude Bin/ and CPAN/arch, where you will have your own binaries instead), then a simple git pull will bring you up to date

Thanks for the tips. I'm slowly developing some small proficiency with this stuff. For example, I only just discovered that the directories for the group ".38 Special" wasn't getting scanned because they start with a "." which makes them hidden. Not sure if there's any way to keep the leading "." and not have it hidden, so I'm just removing the "." and moving on. Interestingly enough, the directory for the group "...And You Will Know Us By The Trail Of Dead" is not hidden.

Ultimately all the problems I had making this work had to do with making sure that I was building with the right/consistent version of Perl. It's the reason for removing and recreating the symbolic links in the jails. However, I can't say that I saw error specifically like those as I fumbled my way through the process.

There's some chance that I could make my .tar of the LMS build available and it could be copied into the run jail and just work...