Finally made some decisions and have LMS installed from custom Alpine
packages on my new Dell/Wyse 5070. So far so good.
I went with an /opt setup following the FHS, at least so far as I can
decipher it. I ended up having four packages:
lms
lms-utils
lms-modules
lms-nocpan
The lms package is sort of a meta-package that has all the dependency
info for the package manager to pull in the other 3 lms-* packages and
perl etc. It also creates the openrc init.d/conf.d scripts, creates an
lms user and group, and creates a few folders and sets ownership and
permissions. This is the only package you would install, so "sudo apk
add lms" installs everything, then you just need to start it.
lms-utils are the helper programs under /opt/lms/Bin (flaac, faad,
etc.). lms-modules are the compiled CPAN modules from slimserver-vendor
and lms-nocpan is just the repackaged tar.gz from the nightly download
page.
I guess my thinking is that I can just frequently update the lms-nocpan
package separately and leave the other three alone mostly until a Perl
upgrade or something forces a change. Comments welcome!
Here's the Custom.pm I'm using which is also contained in the main lms
package:
Code:
--------------------
# This file contains a custom OS package to provide information on the
# installation structure on Alpine.
package Slim::Utils::OS::Custom;
use strict;
use base qw(Slim::Utils::OS::Linux);
sub initDetails {
my $class = shift;
$class->{osDetails}->{os} = 'Linux';
$class->{osDetails}->{osName} = 'Alpine Linux';
# Ensure we find manually installed plugin files.
push @INC, '/var/opt/lms';
push @INC, '/var/opt/lms/Plugins';
return $class->{osDetails};
}
=head2 dirsFor( $dir )
Return OS Specific directories.
Argument $dir is a string to indicate which of the Logitech Media Server
directories we need information for.
=cut
sub dirsFor {
my ($class, $dir) = @_;
my @dirs = ();
# Overrides for specific directories.
if ($dir eq 'Plugins') {
# Look in the normal places.
push @dirs, $class->SUPER::dirsFor($dir);
# User-installed plugins are in a different place, so add it.
push @dirs, '/var/opt/lms/Plugins';
} elsif ($dir eq 'ClientPlaylists') {
# LMS would normally try to put client playlists in the prefs
# directory, but they aren't really prefs since they're dynamic
# state of the clients. Effectively, they're the same as the
# database cache, so we move these under /var/lib.
push @dirs, '/var/opt/lms/ClientPlaylists';
} elsif ($dir =~ /^(?:prefs)$/) {
# Server and plugin preferences are in a different place.
push @dirs, $::prefsdir || '/etc/opt/lms/prefs';
} elsif ($dir eq 'log') {
push @dirs, $::logdir || "/var/opt/lms/log";
} elsif ($dir eq 'cache') {
push @dirs, $::cachedir || "/var/opt/lms/cache";
} else {
# Use the default behaviour to locate the directory.
push @dirs, $class->SUPER::dirsFor($dir);
}
return wantarray() ? @dirs : $dirs[0];
}
sub ignoredItems {
return (
'bin' => '/',
'boot' => '/',
'dev' => '/',
'etc' => '/',
'lib' => '/',
'opt' => '/',
'proc' => '/',
'root' => '/',
'run' => '/',
'sbin' => '/',
'swap' => '/',
'sys' => '/',
'tmp' => '/',
'usr' => '/',
'var' => '/',
'lost+found'=> 1,
);
}
1;
__END__
--------------------
------------------------------------------------------------------------
sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057
View this thread: http://forums.slimdevices.com/showthread.php?t=111401
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix