Sunday, June 20, 2010

Slimserver on Solaris. Upgrade squeezeboxserver-7.5.0-30464 -> squeezeboxserver-7.5.1-30836

I had to scratch my head over this one due to a mismatched perl module. Details below;

First of all disable the current server;
svcadm disable slimserver

Then download and uncompress the new tarball;
gzcat *tgz | gtar xvf -
cp -r /tank/tmp/751/squeezeboxserver-7.5.1-30836 .
cp -r squeezeboxserver-7.5.0-30464/prefs squeezeboxserver-7.5.1-30836

Refer to modules listed in squeezeboxserver-7.5.0-30464/modules and compare with previous versions.
The only updated module was Audio::Scan.
Download new Audio::Scan from http://svn.slimdevices.com/repos/slim/7.5/trunk/vendor/CPAN/
unzip and then;
/opt/csw/bin/perl Makefile.PL
make

Copy over previously compiled modules;
cp -r /usr/local/squeezeboxserver-7.5.0-30464/CPAN/arch/5.8.8 /usr/local/squeezeboxserver-7.5.1-30836/CPAN/arch

Then move any changed modules sideways and put the new versions in their place.
cd /usr/local/squeezeboxserver-7.5.1-30836/CPAN/arch/5.8.8/i86pc-solaris-thread-multi/auto
mv Audio Audio.old
cd /tank/tmp/751/modules/Audio-Scan-0.82/blib/arch/auto
cp -r Audio /usr/local/squeezeboxserver-7.5.1-30836/CPAN/arch/5.8.8/i86pc-solaris-thread-multi/auto

Now change all *.pl scripts under /usr/local/squeezeboxserver-7.5.1-30836 to use /opt/csw/bin/perl
Copy over previous errmsg.* files from the old MySQL dir to the new.
cp squeezeboxserver-7.5.0-30464/MySQL/errmsg.txt squeezeboxserver-7.5.1-30836/MySQL/
cp squeezeboxserver-7.5.0-30464/MySQL/errmsg.sys squeezeboxserver-7.5.1-30836/MySQL/
mkdir squeezeboxserver-7.5.1-30836/Logs
chown -R slim:apps squeezeboxserver-7.5.1-30836/

Now we should be in a position to test the new server, so;
su - slim
/usr/local/squeezeboxserver-7.5.1-30836/slimserver.pl --perfmon --cliaddr=192.168.0.1 --playeraddr=192.168.0.1 --daemon --logdir=/usr/local/slimserver/Logs --pr--prefsdir=/usr/local/slimserver/prefs
This failed with;
Undefined subroutine &Class::XSAccessor::Array::newxs_getter called at /usr/local/squeezeboxserver-7.5.1-30836/CPAN/Class/XSAccessor/Array.pm line 64.

Looking in /usr/local/squeezeboxserver-7.5.1-30836/CPAN/Class/XSAccessor/Array.pm, this module appears to be Version 1.05
Strings on /usr/local/squeezeboxserver-7.5.1-30836/CPAN/arch/5.8.8/i86pc-solaris-thread-multi/auto/Class/XSAccessor/Array/Array.so indicates Version 1.04 so is this a version mismatch?

If we find the Array.pm that belongs to http://svn.slimdevices.com/repos/slim/7.5/trunk/vendor/CPAN/Class-XSAccessor-Array-1.04.tar.gz and copy this into place maybe it will work?
cd /tank/tmp/751/modules/Class-XSAccessor-Array-1.04
cp ./lib/Class/XSAccessor/Array.pm /usr/local/squeezeboxserver-7.5.1-30836/CPAN/Class/XSAccessor/Array.pm
Test again;
su - slim
/usr/local/squeezeboxserver-7.5.1-30836/slimserver.pl --perfmon --cliaddr=192.168.0.1 --playeraddr=192.168.0.1 --daemon --logdir=/usr/local/slimserver/Logs --pr--prefsdir=/usr/local/slimserver/prefs
NOTE: Class::XSAccessor 1.05+ not found, install it for better performance
[10-06-20 12:14:23.2332] main::init (323) Starting Squeezebox Server (v7.5.1, r30836, Tue Jun 1 06:59:24 MDT 2010) perl 5.008008

OK, so it grumbled but at least we're in business.

So to make this the default instance and run under SMF, kill the process we've just started and;
cd /usr/local
rm slimserver
ln -s squeezeboxserver-7.5.1-30836 slimserver
svcadm enable slimserver


Update: An alternative is to upgrade to 1.05, as suggested here - http://forums.slimdevices.com/showthread.php?p=556726#post556726

No comments:

Post a Comment