Latest News:
2019-02-05: XigmaNAS 12.0.0.4.6412 - BETA released!
2019-01-22: XigmaNAS 11.2.0.4.6400 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS cost money, please consider a donation to our project so we can continue to offer you the best.
We need your support! eg: PAYPAL

SlimNAS on NAS4Free

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
jistme
Status: Offline

Re: SlimNAS on NAS4Free

#181

Post by jistme » 25 Nov 2018 13:35

@Stuarty,

I hope you could be so kind to give me a helping hand. (again)

I have clean-installed XigmaNAS, and now I will try to get slimnas up and running again.
For myself I have concocted a step by step tutorial which worked fine on my previous Nas4Free installation.
It contains pretty much the exact steps that you have published in this thread earlier.
I only made a change so it uses the most recent LMS that I could find. (7.9.2)

As expected, these steps and commands don't work anymore for the most recent XigmaNAS version.

So I'll need to modify it using the commands that you provided in your latest post. (#178)
But I don't know at what moment these new commands should be performed in the sequence of my write-up.
I am also not sure if they are complementary, or if they replace existing commands.

If you look at my step-by-step write-up, could you please explain at what moment these new commands should be performed, and what commands I should remove?

TIA!


My write-up:

1.
install TheBrig (by means of OneButtonInstaller)

2.
create a jail (e.g. named 'slimnas')
- add tarballs through TheBrig 'Maintenance'
- start and stop the jail to see if it works
- go to Advanced > File manager and create a (virtual) audio folder inside the slimnas jail. (name it the same as the actual audio folder)
- go to the configuration settings of the jail (Edit)
- click on 'more' (somewhere at the bottom)
- in the pane "Fstab for current jail", enter:
/mnt/WD30Red/Audio /mnt/WD30Red/OBI/thebrig/slimnas/Audio nullfs ro 0 0
(change the paths according to your actual setup)

3.
In XigmaNAS, under 'Services' enable SSH, check 'Permit Root Login'.

4.
- start console access (by means of Putty or a similar tool)
- use the ip adres of your jail
- login: root
- password: your XigmaNAS password

5. commands to perform in the console

Enter:

jexec slimnas csh


portsnap fetch extract


mkdir -p /usr/local/etc/pkg/repos


ee /usr/local/etc/pkg/repos/FreeBSD.conf

Paste:

FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}

- press [Esc]+[Enter]
- save? Yes

Enter:

pkg


y


rm /usr/local/etc/pkg.conf


pkg update -f && pkg upgrade


pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 libgd p5-Cpanel-JSON-XS p5-DBI screen gcc49


rehash


mkdir /usr/local/lms


cd /usr/local/lms


git clone https://github.com/Logitech/slimserver-vendor.git


cd slimserver-vendor


ls -al


cd CPAN


ls -al


cp buildme.sh buildme.sh.original


nano buildme.sh


Use the cursor keys to navigate to: 'RUN_TESTS=1'
Change it to: 'RUN_TESTS=0'.
(use the 0 key at the top of your keyboard, not the one in the numeric keypad!)

[Ctrl]+[X] (exit)
[Y] (for save)
[Enter]


ln -s /usr/local/bin/gcc49 /usr/bin/gcc


ln -s /usr/local/bin/g++49 /usr/bin/g++


ln -s -f /usr/local/bin/perl5.24.1 /usr/bin/perl


ln -s -f /usr/local/bin/perl5.24.1 /usr/bin/perl5


./buildme.sh | tee /usr/local/lms/buildme.sh.log

(this can take about an hour)


cd /usr/local/lms/slimserver-vendor/CPAN/build


tar cf /usr/local/lms/arch.tar arch/


cd /usr/local/lms/slimserver-vendor/CPAN/build/5.24/lib/perl5/amd64-freebsd-thread-multi/Image


tar cf /usr/local/lms/Scale11.tar *


cd /usr/local/lms


fetch http://downloads-origin.slimdevices.com ... noCPAN.tgz

this forum truncates the url, it is intended to say: downloads-origin.slimdevices.com/nightly/7.9/sc/81275414b6a26d6bb36898d833605b5a6d707421/logitechmediaserver-7.9.2-1542807489-noCPAN.tgz
(you can check for newer versions, be sure to change subsequential commands accordingly)


tar xzf logitechmediaserver-7.9.2-1542807489-noCPAN.tgz


mv logitechmediaserver-7.9.2-1542807489-noCPAN/* .


tar xf arch.tar -C /usr/local/lms/CPAN/


mv /usr/local/lms/CPAN/Image/Scale.pm /usr/local/lms/CPAN/Image/_Scale.pm


cd /usr/local/lms/


tar xf Scale11.tar -C /usr/local/lms/CPAN/Image/


pw groupadd -n lms -g 30001


pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent


nano /usr/local/etc/rc.d/lms


Paste this whole block:

Code: Select all

#!/bin/sh

# This script is a modified version of:
# $FreeBSD: branches/RELENG_9_2_0/audio/squeezeboxserver/files/squeezeboxserver.in 302141 2012-08-05 23:19:36Z dougb $

# PROVIDE: lms
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable lms on startup:
# lms_enable="YES"

# Optional configuration parameters:
# Directory where lms writes it's logs to.
# lms_logdir="/var/log/lms"
#
# Directory where lms stores it's cache files.
# lms_cachedir="/var/db/lms/cache"
#
# Directory where lms stores it's configuration.
# lms_prefsdir="/var/db/lms/prefs"
#
# Directory where lms stores the playlists. THIS NEEDS TO BE CONFIGURED THROUGH THE UI.
# lms_playlistdir="/var/db/lms/playlists"
#
# Additional parameters, e.g. "--noimage --novideo"
# lms_flags=""
#
# The charset lms uses.
# lms_charset="UTF-8"
#
# The LC_CTYPE envvar which is necessary to get rid of the warning
# """
# Your locale was detected as C, you may have problems with non-Latin filenames.
# Consider changing your LANG variable to the correct locale, i.e. en_US.utf8.
# """
# See https://forums.freenas.org/index.php?threads/logitech-media-server-for-freenas-9-2-1-1.19044/page-3#post-132872 
# lms_lc_ctype="en_US.UTF.8"

. /etc/rc.subr

name=lms
rcvar=lms_enable

pidfile=/var/run/${name}/${name}.pid
lms_user=lms
lms_group=lms

load_rc_config ${name}

: ${lms_enable="NO"}
: ${lms_logdir="/var/log/${name}"}
: ${lms_cachedir="/var/db/${name}/cache"}
: ${lms_prefsdir="/var/db/${name}/prefs"}
: ${lms_playlistdir="/var/db/${name}/playlists"}
: ${lms_flags=""}
: ${lms_charset="UTF-8"}
: ${lms_lc_ctype="en_US.UTF-8"}

command_interpreter=/usr/bin/perl
command=/usr/local/lms/slimserver.pl
command_args="\
--daemon \
--pidfile=${pidfile} \
--logdir=${lms_logdir} \
--cachedir=${lms_cachedir} \
--prefsdir=${lms_prefsdir} \
--charset=${lms_charset} \
${lms_flags}"

start_precmd="lms_start_precmd"
stop_postcmd="lms_stop_postcmd"

lms_start_precmd()
{
	export LC_CTYPE="${lms_lc_ctype}"

	if [ ! -d "${pidfile%/*}" ]; then	
		install -d -o ${lms_user} -g ${lms_group} ${pidfile%/*};
	fi

	if [ ! -d "${lms_logdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_logdir}";
	fi

	if [ ! -d "${lms_cachedir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_cachedir}";
	fi

	if [ ! -d "${lms_prefsdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_prefsdir}";
	fi

	if [ ! -d "${lms_playlistdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_playlistdir}";
	fi
}

lms_stop_postcmd()
{
	pids=`pgrep -u ${lms_user}`
	if [ -n "${pids}" ]; then
		sleep 1
		kill $pids > /dev/null 2>&1
	fi
	pids=`pgrep -u ${lms_user}`
	if [ -n "${pids}" ]; then
		wait_for_pids $pids
	fi
}

run_rc_command "$1"
[Ctrl]-[O] (write)
[Enter]
[Ctrl]-[X] (exit and save)


chown -R lms:lms /usr/local/lms


chown root:wheel /usr/local/etc/rc.d/lms


chmod 555 /usr/local/etc/rc.d/lms


echo 'lms_enable="YES"' >> /etc/rc.conf


service lms onestart


/bin/sh /etc/rc


Done! You can exit the console.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4724
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: SlimNAS on NAS4Free

#182

Post by raulfg3 » 25 Nov 2018 22:48

superb.

great manual.

PD: perhaps FsBruba or others code gurus can add it to OBI so user can install on a simple click
12.0.0.4 - BETA (revision 6412)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes
Old Wiki

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#183

Post by jistme » 25 Nov 2018 23:06

Thanks raulfg3!

But to put the credit where the credit is due: it's just a dumbed-down distillation of Stuarty's great work and support.
(I hardly understand what I copied and pasted ;-)

And what's more important to know for other users stumbling upon this post: this will only work for older NAS4Free installations. It doesn't work for current XigmaNAS versions.
Hopefully to be continued....

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#184

Post by jistme » 04 Dec 2018 15:32

Is there perhaps another member with insight in this matter than give some guidance here?

(it looks like Stuarty is m.i.a./preoccupied)

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#185

Post by cookiemonster » 05 Dec 2018 09:34

What's the question?

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#186

Post by jistme » 05 Dec 2018 11:12

Hi!

The question is perhaps a little buried in my post #181
It contains a step-by-step guide I created for myself in the past that will not work anymore for the latest XigmaNAS releases.
Stuarty posted new steps that should work in his post #178, but I am not sure at what moment (in relation to my own guide) they should be performed, and what commands from my guide they possibly replace, and thus can be removed from my guide.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#187

Post by cookiemonster » 05 Dec 2018 12:33

Use the same process and when you get stuck post the specific question. I imagine few would have the time to step through for you to see if it works.
I expect all we'll need is to alter the urls as they were written some time ago.

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#188

Post by jistme » 05 Dec 2018 13:26

This is not about getting stuck somewhere.

The prior steps as I described worked perfectly with Nas4FREE.
I can still perform them on XigmaNAS without 'getting stuck'.
But after completing them, Slimnas just won't work.
So something will need to be changed, and Stuarty has posted some commands for that.

So all that I am asking is at what stage they should be performed.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#189

Post by cookiemonster » 05 Dec 2018 14:43

Ah ok. Good luck.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#190

Post by cookiemonster » 14 Dec 2018 13:07

Again, I had to rebuild the system from scratch. Total data loss. This time I replaced the hardware except the HDDs.
As a result I had to rebuild LMS, so the need to test this presented itself.
I ended with a working LMS installation by following post #171 with only the following adjustments:
1. Personally I don't do the first part of installing all those packages. Why? Because the post entry includes sox, faad2 and other packages that will come from the slimserver-vendor directory from logitech with their required patches and modifications. If I installed them first they could conflict.
The packages I install are the ones required by lms to build their CPAN modules as perhttps://github.com/Logitech/slimserver- ... c/7.9/CPAN.
1.1. For perl I chose perl 5.26 because it is the highest appearing on the url above, so I presume although there are higher versions in the pkg or port repos, logitech have only made lms work up to 5.26.
2. The links to download for I got from their respective sources but a higher, more current version.
Only thing to do again is to build the decoders binaries from CPAN in slimserver-vendor, but that's just for me to play certain files. Most users won't need that.

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#191

Post by Stuarty » 14 Dec 2018 19:39

@jistme

Post #178 basically replaces the previous method (post #171) because it installs a port from the ports tree. This is the most straightforward install if you can live with the reported libsndfile vulnerability (I can live with it). I get a working LMS which can play almost all my files. I can't play alac and some .wma files and I can't make the C-3PO plugin work but this is not a big problem for me as most of my files are .flac.

@Cookiemonster

It would be helpful if you could list the packages you installed when you rebuilt (as described in #190). I don't really understand how to combine a nightly build with packages reliably. I saw your thread over at the slimdevices forum but could not quite follow the steps that you had used to get a working sox.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#192

Post by cookiemonster » 14 Dec 2018 20:42

Hi @Stuarty.
Sure no problem. Those packages are:
devel/nasm
shells/bash
devel/gmake
net/rsync
lang/perl5 (or perl5.22 or perl5.26), I chose perl5.26 being the highest.

So essentially after jail creation I:
1. I bootstrap the package manager with

Code: Select all

pkg
2. For each of the listed packages above I install it with pkg install <package> i.e.:

Code: Select all

pkg install devel/nasm
until perl which is a little different, you have to find the exact name i.e.
2.1

Code: Select all

pkg search perl 
this will give you the available perl versions and a few others. Look for the ones with the name beginning with perl5. Then you can use pkg install with the full name i.e.:

Code: Select all

pkg install perl5-5.26.2
or whichever is right at the time. So in my case I chose that one because as you can see lms supports it as the highest current version and is available from the repository.

This only replaces the string of packages you put at the start of your installation. As I said is because for instance when you install sox and faad2 from packages, you get the standard builds for those binaries. I want to instead build the ones that logitech provides as sources. Those are found in the slimserver-vendor directory that you download afterwards. Makes sense?
I still have to create the links to perl as your post so essentially your post works for me with just the changes for the decoder binaries.
Reading your post by the way makes me think that's the reason you can't play some of these files. I know alac ones for sure need the lms patched version of faad, which building it from vendor gives you.
The post you saw there was due to me not being able to build it last time, but a) I missed it was tarred up and b) the developer made a build available for me -he's super kind-.

I also installed the package p5-IO-Socket-SSL-2.059 to prevent ssl sockets errors.

Happy to give you a hand if you want building them in your system.

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#193

Post by Stuarty » 15 Dec 2018 21:02

@Cookiemonster

I have made a new jail, installed packages, fetched slimserver-vendor and a nightly. When I call the buildme.sh script it completes without a problem but I don't know what to do next. I know I need the newly built 'amd64-freebsd-thread-multi' from 'slimserver-vendor-public-7.9/CPAN/build/arch/5.26/amd64-freebsd-thread-multi' and I know where to add it to the nightly but I don't understand which binaries I need from the build, where to find them and where to put them.

Any help appreciated.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#194

Post by cookiemonster » 15 Dec 2018 22:16

Hi, just did those last night. I had to cheat, I still seem unable to build sox but the rest do.
Jus cd into each of the directories one by one. They appear once you untar the "vendor"For example:
/slimserver-vendor-public/alac_decoder
once there just run the build me script i.e.: ./buildme-freebsd.sh
I find it useful to send to file the output of the build so I do: ./buildme-freebsd.sh | tee > output.alac.txt
At the end and after some warnings I could ignore, you end up with the binary called alac in the same directory.
Others like flac don't leave the binary in the same directory but in a compressed bundle. My flac was inside a bundle called flac-build--.tgz so I had to uncompressed afterwards and there it was my newly built binary called flac, alongside another called metaflac.
For faad the content of the directory sends you to a place that has overtaken the maintenance (README.md). So we'd need to go there, download the sources from there and build.
Instead I grabbed the precompiled ones that Ralphy has made availble from https://sourceforge.net/projects/lmscli ... s/utility/. In fact that's the place I got my sox from. I got it from the sox-opus directory. You'll need to rename it to just sox after download and adjust the mode to be executable. I changed the ownership also to lms for any downloaded files.

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#195

Post by Stuarty » 18 Dec 2018 00:00

@cookiemonster

Okay, I can see how to build flac and wavpack from slimserver-vendor and I can see where to move them. And I can see how to download Ralph Irving's compiled files from Sourceforge. But I can't see how to build alac_decoder. When I go to 'slimserver-vendor-public-7.9/alac_decoder' there is no 'buildme-freebsd.sh' only a 'build-freebsd.sh' file and if I try to run this gmake complains that it needs an option. This is what I see in directory 'slimserver-vendor-public-7.9/alac_decoder':

Code: Select all

-rw-r--r--  1 root  wheel  alac.c
-rwxr-xr-x  1 root  wheel  build-freebsd.sh
-rw-r--r--  1 root  wheel  build.sh
-rw-r--r--  1 root  wheel  buildme-crosstool.sh
-rw-r--r--  1 root  wheel  decomp.h
-rw-r--r--  1 root  wheel  demux.c
-rw-r--r--  1 root  wheel  demux.h
-rw-r--r--  1 root  wheel  main.c
-rw-r--r--  1 root  wheel  Makefile
-rw-r--r--  1 root  wheel  Makefile.crosstool
-rw-r--r--  1 root  wheel  Makefile.freebsd
-rw-r--r--  1 root  wheel  Makefile.osx
-rw-r--r--  1 root  wheel  README
-rw-r--r--  1 root  wheel  stream.c
-rw-r--r--  1 root  wheel  stream.h
-rw-r--r--  1 root  wheel  wavwriter.c
-rw-r--r--  1 root  wheel  wavwriter.h
How do I get the build-freebsd.sh to work?

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#196

Post by Stuarty » 18 Dec 2018 01:22

So, there are (at least) two ways to install LMS at present. Post # 178 describes installing from ports but we can also install and build from (various) sources. It's this second method I will describe here. It begins in the familiar way. Make a jail and become root in the jail. Install some packages then download a LMS nightly and the 'slimserver-vendor-public' files from GitHub. We want the 'Unix Tarball (i386, x86_64, i386 FreeBSD, ARM EABI, PowerPC)' nightly build.

Do the following one line at a time (you will need to change the name of the nightly to suit whatever is available when you do this):

Code: Select all

pkg
pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.26.2
cd /tmp
curl -L -O http://downloads.slimdevices.com/nightly/7.9/sc/aa181d4a4f367cbb14f9cc05b252ff4db58be7c9/logitechmediaserver-7.9.2-1545026161.tgz
curl -L -O https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
I'm using curl because later I'll need it to download from Sourceforge (and I don't know how to download from Sourceforge with fetch).

Now we build the files in 'slimserver-vendor-public'

Code: Select all

unzip 7*
tar xjf l*
cd slimserver-vendor-public-7.9/CPAN
./buildme.sh -t | tee /tmp/build.log
Now we move from 'slimserver-vendor-public' where we have just built files to the nightly and remove existing perl modules. When this is done we can add the newly built perl modules from 'slimserver-vendor-public':

Code: Select all

cd /tmp/logitechmediaserver-7.9.2-1545026161/CPAN/arch
rm -rf 5.1* && rm -rf 5.8 && rm -rf 5.22 && rm -rf 5.20 && rm -rf 5.24 && rm -rf 5.28
cd 5.26
cp -Rp /tmp/slimserver-vendor-public-7.9/CPAN/build/arch/5.26/amd64-freebsd-thread-multi .
rm -rf x*
mkdir /usr/local/lms
mv /tmp/logitechmediaserver-7.9.2-1545026161 /usr/local/lms/
cd /usr/local/lms
mv logitechmediaserver-7.9.2-1545026161/* /usr/local/lms
rmdir logitechmediaserver-7.9.2-1545026161
Now comes the new part. We can choose to build decoders from the 'slimserver-vendor-public' files or download some from Ralph Irving's files on Sourceforge. I'll show how to build flac and wavepack below. Once they are built copy them to '/usr/local/lms/Bin':

Code: Select all

cd /tmp/slimserver-vendor-public-7.9/flac
sh buildme-freebsd.sh
tar xjf flac-build--.tgz
cd /tmp/slimserver-vendor-public-7.9/flac/tmp/slimserver-vendor-public-7.9/flac/flac-build--/bin
mkdir amd64-freebsd-thread-multi
cp /tmp/slimserver-vendor-public-7.9/flac/tmp/slimserver-vendor-public-7.9/flac/flac-build--/bin/flac /usr/local/lms/Bin/amd64-freebsd-thread-multi/
cd /tmp/slimserver-vendor-public-7.9/wavpack
./build.sh
cp /tmp/slimserver-vendor-public-7.9/wavpack/wvunpack /usr/local/lms/Bin/amd64-freebsd-thread-multi/
We can also download files from Sourceforge. The files will need to be renamed and have their permissions set:

Code: Select all

cd /usr/local/lms/Bin/amd64-freebsd-thread-multi/
curl -L -O https://sourceforge.net/projects/lmsclients/files/utility/faad/20170831-383f2b0/faad-freebsd
curl -l -o https://sourceforge.net/projects/lmsclients/files/utility/sox-opus/20181010-9da8441/sox-freebsd
mv faad-freebsd faad
mv sox-freebsd sox
chmod -R 755 /usr/local/lms/Bin/amd64-freebsd-thread-multi
And now we are back to doing the usual setting up of user and groups and so on.

Code: Select all

pw groupadd -n lms -g 20000
pw useradd -n lms -u 20000 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
chown -R lms:lms /usr/local/lms
mkdir /var/log/lms
mkdir /var/db/lms
mkdir /var/db/lms/cache
mkdir /var/db/lms/prefs
mkdir /var/db/lms/playlists
chown -R lms:lms /var/db/lms
chown -R lms:lms /var/log/lms
cd /etc/rc.d
curl -L -O https://audiodigitale.eu/repo/freebsd/lms
chmod 555 lms
echo 'lms_enable="YES"' >> /etc/rc.conf && echo 'lms_logdir="/var/log/lms"' >> /etc/rc.conf && echo 'lms_cachedir="/var/db/lms/cache"' >> /etc/rc.conf && echo 'lms_prefsdir="/var/db/lms/prefs"' >> /etc/rc.conf && echo 'lms_playlistdir="/var/db/lms/playlists"' >> /etc/rc.conf
The Perl links are still needed (these will need to change if you install a different Perl):

Code: Select all

ln -s -f /usr/local/bin/perl5.26.2 /usr/bin/perl
ln -s -f /usr/local/bin/perl5.26.2 /usr/bin/perl5
With this combination I can play ALAC files and skip backwards and forwards in them. If you want Monkey's audio you can install the package. This is more complicated than installing the port but it takes less time and you can use Ralph's up-to-date binaries.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#197

Post by cookiemonster » 19 Dec 2018 22:58

@Stuarty, just to add a little clarification based on my experience.
Case 1. Yes one can install lms from ports. I prefer not to because the port doesn't have the binaries I want. Mine is an edge case I suppose. I have some apple ALAC mp4 files I wanted to play on various slim players with different native files support.
As from your experience if I read a previous post correctly, that is not a problem for you and will be o for many others.
Case 2. One wants to build from sources. That is what you documented here, in which case these binary decoders are contained in slim-vendor and need to be built and some can be got from Ralph Irving's, so not all of them need building.
I hope it helps.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#198

Post by cookiemonster » 19 Dec 2018 23:04

@Stuarty, just noticed your question.
Did you get alac to build? That was the one that was most straight forward for me.
Can you re-attempt to build and pipe the output to file and attach? Maybe it shows the what's expecting. I didn't give it any options, I'm almost sure. I'll have another go in the next few days to double check. My server is off, I'm trying to mod it to reduce the noise.
Edit:
I just checked a local copy of the download. Try this:
Change to the alac_decoder directory and from there give the relevant makefile to the build script, thus:
./build-freebsd.sh Makefile.freebsd

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#199

Post by jistme » 04 Jan 2019 16:21

Thanks a million Stuarty for trying to make this doable for 'people like me'.

When trying to digest your much appreciated spoon feeding (post #196) I get stuck at performing the command: tar xjf l*

Image

Is there some pre-requisite I am missing?

(I believe I followed your write up to the letter, I only changed the 'logitechmediaserver' part to the most recent version 7.9.2-1545144292.tgz
I don't think that should be a problem, but mentioning it anyway)

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#200

Post by cookiemonster » 04 Jan 2019 17:04

@jistme - Is that a letter l or a number 1? It needs to be a not-caps "L" as in the first letter in lemon
And for reference, what is doing is saying "untar (uncompress) any (the asterisk) compressed bundles in the current directory, with a name beginning with l.

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#201

Post by jistme » 04 Jan 2019 18:26

Yes, it's the letter, not the number.
I copied/pasted exactly what's in Stuarty's post #196.

Two things I noticed:

The very first command (pkg) runs o.k.
But when I scroll back in Putty I notice two error messages in the long list of performed actions:
- pkg: not enough arguments
- pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory

Perhaps they are not relevant here, but I thought to mention them.

Secondly, if I understand you correctly, there should be a compressed file(s) in the temp directory beginning with the letter 'l' that should be uncompressed after performong this command.
I am guessing in this case it should be: logitechmediaserver-7.9.2-1545144292.tgz

Well, that file is present in the tmp folder. (see screenshot)
But I am noticing a small green arrow in the icon in front, and optional actions at the right.

Image

Should some additional action be performed that is not in post #196?

edit:
After noticing the file in question was only 392b, I manually downloaded the original file from the web (192MB) on my PC, copied it to the slimnas tmp folder, and now the 'tar xjf l*' works.
On tho the next step...

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#202

Post by cookiemonster » 04 Jan 2019 18:45

yes you should try to find out what failed in pkg. What I would do is do one pkg installation at the time. You'd get a notification if is already installed, so no need to worry to re-install unnecessarily.
Yes also your understanding is correct. The size looks wrong. It should be about 180 MB in size. Try re-downloading it.
Send me a PM or find me on freenode so I can help you better.

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#203

Post by jistme » 04 Jan 2019 20:25

cookiemonster wrote:
04 Jan 2019 18:45
Send me a PM or find me on freenode so I can help you better.
I much appreciate that offer cookiemonster.
But if I can't make this work using the info and support on the forum, it is probably time for me to concede and admit that for the purposes I am using a NAS, buying something like a Synology/Qnap/Netgear would better fit my capabilities and (lack of) perseverance in this matter.

I stranded again some twenty commands further down the road. Maybe I'll give it a new shot in a week or so.
Enjoy the weekend!

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#204

Post by Stuarty » 08 Jan 2019 15:01

@jistme
In a new jail if pkg is not already installed then you get the error massage that you mention:

Code: Select all

 pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
If I remember correctly, the next line says that pkg is creating the file. So, this message is nothing to worry about (I think it is the system telling you 'pkg has not already been used, I will create the files that pkg needs').

In your screenshot it looks like there was a problem downloading the nightly build but it sounds as though you have fixed this. Where did you get stuck after unzipping and untarring the downloaded files?

Installing the port is an easier job. If I was more knowledgeable then I would know how to build and share the versions that I build for myself but I'm not sure how to build an instance of LMS that would be self-contained and so transferable between systems.

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#205

Post by jistme » 12 Jan 2019 15:08

Thanks Stuarty.

I believe that the problem with the file size was my own mistake somewhere in the process, and it's not an issue anymore.

Today I tried installing slimnas again from a clean slate, following the steps you wrote down in post #196 as detailed as possible.
There were a few things I had to change to make it to the finish line, but at the end it looked like everything had went well.

But.... LMS won't start.

The jail is working, I can ping it's IP, but neither my web browser nor my Squeezeboxes can connect to LMS.

There were a few commands in your tutorial that posed problems c.q. failed to work, so I altered them to be able to proceed.
Perhaps the problem lies in what I changed, so here follows a detailed report of what I did.
Maybe you or somebody else can spot a problem there?

To keep things together a bit and making it perhaps easier to spot issues, I copied all the commands from the seven code blocks from your post #196, and added the ones I have changed. (in red and right below the original command that it replaces)

code block #1

pkg
pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.26.2
pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.28.1
(If I recall correctly trying 5.26.2 simply failed, so I changed it to what I believe is the most recent stable version)
cd /tmp
curl -L -O http://downloads.slimdevices.com/nightl ... 026161.tgz
curl -L -O http://downloads.slimdevices.com/nightl ... 151505.tgz
(changed it so to use the most recent LMS version)
curl -L -O https://github.com/Logitech/slimserver- ... ic/7.9.zip

code block #2

unzip 7*
tar xjf l*
cd slimserver-vendor-public-7.9/CPAN
./buildme.sh -t | tee /tmp/build.log

code block #3

cd /tmp/logitechmediaserver-7.9.2-1545026161/CPAN/arch
rm -rf 5.1* && rm -rf 5.8 && rm -rf 5.22 && rm -rf 5.20 && rm -rf 5.24 && rm -rf 5.28
cd 5.26
(Question: is having this 5.26 folder still correct, since I chose 5.28 instead of 5.26?)
cp -Rp /tmp/slimserver-vendor-public-7.9/CPAN/build/arch/5.26/amd64-freebsd-thread-multi .
cp -Rp /tmp/slimserver-vendor-public-7.9/CPAN/build/arch/5.28/amd64-freebsd-thread-multi .
(changed it to 5.28 since there is no 5.26 folder in that location, only a 5.28 folder)

rm -rf x*
mkdir /usr/local/lms
mv /tmp/logitechmediaserver-7.9.2-1545026161 /usr/local/lms/
mv /tmp/logitechmediaserver-7.9.2-1547151505 /usr/local/lms/

cd /usr/local/lms
mv logitechmediaserver-7.9.2-1545026161/* /usr/local/lms
mv logitechmediaserver-7.9.2-1547151505/* /usr/local/lms
rmdir logitechmediaserver-7.9.2-1545026161
rmdir logitechmediaserver-7.9.2-1547151505

code block #4

cd /tmp/slimserver-vendor-public-7.9/flac
sh buildme-freebsd.sh
This command performs and finishes, but I notice some error messages.
It starts with:
- buildme-freebsd.sh: git: not found
It will proceed though, unpacking lots of stuff, and it finishes.
But somewhere in the middle there is this block of error messages:
- mv: configure.in No such file or directory
- buildme-freebsd.sh: autoreconf: not found
- Using symlinks to autotool files (use --no-symlinks to copy instead) .
- Missing program 'autoconf'
- Missing program 'automake'
- Missing program 'libtool'
- Missing program 'pkg-config'
(perhaps this is to be expected and not 'fatal', but I thought to mention it)

tar xjf flac-build--.tgz
cd /tmp/slimserver-vendor-public-7.9/flac/tmp/slimserver-vendor-public-7.9/flac/flac-build--/bin
mkdir amd64-freebsd-thread-multi
cp /tmp/slimserver-vendor-public-7.9/flac/tmp/slimserver-vendor-public-7.9/flac/flac-build--/bin/flac /usr/local/lms/Bin/amd64-freebsd-thread-multi/
This one is problematic.
It returns that that directory 'does not exist'. Checking the location I see that "amd64-freebsd-thread-multi" is indeed not present in that "Bin" folder.
Searching for it, I locate it at: tmp/slimserver-vendor-public-7.9/CPAN/build/arch/5.28/amd64-freebsd-thread-multi
So I use filemanager to copy 'amd64-freebsd-thread-multi' from there to the mentioned 'Bin' folder.
Now the command succeeds.
cd /tmp/slimserver-vendor-public-7.9/wavpack
./build.sh
cp /tmp/slimserver-vendor-public-7.9/wavpack/wvunpack /usr/local/lms/Bin/amd64-freebsd-thread-multi/

code block #5

cd /usr/local/lms/Bin/amd64-freebsd-thread-multi/
curl -L -O https://sourceforge.net/projects/lmscli ... ad-freebsd
curl -l -o https://sourceforge.net/projects/lmscli ... ox-freebsd
curl -L -O https://sourceforge.net/projects/lmscli ... ox-freebsd
(the command didn't perform at all, I am guessing because of the lowercase L and O)
mv faad-freebsd faad
mv sox-freebsd sox
chmod -R 755 /usr/local/lms/Bin/amd64-freebsd-thread-multi

code block #6

pw groupadd -n lms -g 20000
pw useradd -n lms -u 20000 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
chown -R lms:lms /usr/local/lms
mkdir /var/log/lms
mkdir /var/db/lms
mkdir /var/db/lms/cache
mkdir /var/db/lms/prefs
mkdir /var/db/lms/playlists
chown -R lms:lms /var/db/lms
chown -R lms:lms /var/log/lms
cd /etc/rc.d
curl -L -O https://audiodigitale.eu/repo/freebsd/lms
chmod 555 lms
echo 'lms_enable="YES"' >> /etc/rc.conf && echo 'lms_logdir="/var/log/lms"' >> /etc/rc.conf && echo 'lms_cachedir="/var/db/lms/cache"' >> /etc/rc.conf && echo 'lms_prefsdir="/var/db/lms/prefs"' >> /etc/rc.conf && echo 'lms_playlistdir="/var/db/lms/playlists"' >> /etc/rc.conf

code block #7

ln -s -f /usr/local/bin/perl5.26.2 /usr/bin/perl
ln -s -f /usr/local/bin/perl5.28.1 /usr/bin/perl
ln -s -f /usr/local/bin/perl5.26.2 /usr/bin/perl5
ln -s -f /usr/local/bin/perl5.28.1 /usr/bin/perl5

After this I exit, restart XigmaNAS and the jail, but as I said, it seems that LMS will just not run.

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#206

Post by cookiemonster » 13 Jan 2019 00:24

I'd say is 50%-50% if it'd work. On block 1 you say you installed perl 5.28 on your jail so when you built your perl modules, they would have been built for that version of perl. As I wrote before, the developers list in their page support to perl 5.26 but not 5.28, so even if you went at it to solve installation problems, it might not work due to an usuported/tested perl version.
Having said that, in the half chance it works, we'd need to see logs of the server start attempt to see where/why it fails.
My suggestion is to try to keep this thread a little cleaner and having your own thread for your problem.
My offer is still there, post in your thread and I'll help you there and also freenode.
ps.s perl 5.26 is there in the collection:

Code: Select all

pkg search perl
About the end where the major versions are you'll see as of now perl5.26-5.26.3

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#207

Post by jistme » 13 Jan 2019 11:14

Of course my intentions are not to derail this thread, nor looking for some special treatment.
I was only trying to follow the steps that stuarty posted to get a working slimnas installation.

But if I understand you correctly, my efforts to get it working by deviating from the posted steps are confusing or complicating things.
I can understand if that is the case, so I will now just do exactly what is in post #196 and report where it goes wrong without trying to become creative myself.

Which is already after the second command in the tutorial:
(pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.26.2)

login as: root
root@192.168.2.101's password:
Last login: Sun Jan 13 09:25:23 2019
Welcome to XigmaNAS!
xigmanas: ~# jexec slimnas csh
root@slimnas:/ # pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[slimnas.local] Installing pkg-1.10.5_5...
[slimnas.local] Extracting pkg-1.10.5_5: 100%
pkg: not enough arguments
Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>|-r <rootdir>] [-C <configuration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>]

For more information on available commands and options see 'pkg help'.
root@slimnas:/ # pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.26.2
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
[slimnas.local] Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
[slimnas.local] Fetching packagesite.txz: 100% 6 MiB 1.4MB/s 00:05
Processing entries: 100%
FreeBSD repository update completed. 32369 packages processed.
All repositories are up to date.
Updating database digests format: 100%
pkg: No packages available to install matching 'perl5-5.26.2' have been found in the repositories
root@slimnas:/ #


So without doing any improvising at all it looks like the installation is already broken at this point.

Of course I do appreciate your offer for more help.
And if this thread is not appropriate for that, do you have a suggestion for a new thread I should create for this?
What should the topic be?
Creating one too similar to this one would probably be even more confusing.

(and I am a bit reluctant to use PM for this, since I believe in fora and sharing knowledge that more than one person can benefit from)


edit:
After reading your reply again, and extracting the gist of it:
It looks like you are saying that I should just replace
pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5-5.26.2
with
pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5.26-5.26.3

I am gonna try that next.

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#208

Post by jistme » 13 Jan 2019 14:28

So I tried it again, now using

Code: Select all

pkg install devel/nasm shells/bash devel/gmake net/rsync curl perl5.26-5.26.3
That seemed to go well, but now installation fails again at a later moment when performing:

Code: Select all

./buildme.sh -t | tee /tmp/build.log
This is the log of that part:

root@slimnas:/tmp # cd slimserver-vendor-public-7.9/CPAN
root@slimnas:/tmp/slimserver-vendor-public-7.9/CPAN # ./buildme.sh -t | tee /tmp/build.log
RUN_TESTS:0 CLEAN:1 USE_HINTS:1 target all
Looks like your compiler is cc
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0 )
Target: x86_64-unknown-freebsd11.2
Thread model: posix
InstalledDir: /usr/bin
./buildme.sh: line 463: perl: command not found
Failed to find supported Perl version for ''
root@slimnas:/tmp/slimserver-vendor-public-7.9/CPAN #

cookiemonster
experienced User
experienced User
Posts: 91
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#209

Post by cookiemonster » 13 Jan 2019 16:18

The thread was to document how to install SlimNAS on NAS4Free, now Xigmanas. It can be done and works as documented, at least two users have done.
What we need to do is help you but that is to work around your particular installation and skill level.
That is the reason I'm suggesting your own thread. This is not my forum and can't or wouldn't even if I could, force anyone where to post. Having said that I don't like contributing to thread pollution.
I'm not trying to patronise or sound unhelpful, just sharing my thinking and why it might look like I'm not helping when I can.

Could it be there's no link to perl after the installation of 5.26?
What are the results of both "ls -l /usr/bin/per*" and "which perl"

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#210

Post by jistme » 13 Jan 2019 16:51

It's great that at least two people have SlimNAS working on their XigmaNAS.
And if my efforts in reporting back, and giving detailed feedback on problems or issues with following exact suggested steps as posted in this very thread are not appreciated and even considered 'polluting', it's probably better I call it a day.
Apart from it being a big challenge for me, it also should be some fun. And the way this is going is no fun.

Post Reply

Return to “Extensions / Add-ons”