View Full Version : SCv7 plugin packaging

2008-01-03, 13:15
Hi all,

I'm updating my Magnatune plugin for v7, and I've just been playing with the create-slimserver-plugin script to package it all up.

There seems to have been an awful lot of code included in the generated .par file - not just the plugin's code, but a whole bunch of server stuff as well. Something like 170 .pm files. Some of them I recognise as perhaps being prereqs for the Magnatune code, but there's things that should be quite unrelated: some of the bundled plugins, for example. I've attached the generated MANIFEST to this post.

Is this as it should be? Or is the Magnatune code accidentally relying upon more things than I realise? And is this safe for future compatibility? It all seems to work ok when installed, I'm just a bit surprised!


2008-01-03, 13:33
> Is this as it should be?

No. There should only be a couple of references to your own files. But
honestly - I'm not sure what's wrong. Could you upload a full log of what
you're doing, including the install.xml?


2008-01-03, 14:13
Thanks, Michael.

create-slimserver-plugin is launched with:

create-slimserver-plugin --slimserverdir /usr/share/squeezecenter --plugindir /tmp/Magnatune

The output is:

* Starting module packaging process..

- Created temp file [/tmp/cmltZlLdXL/NvXA0Zs43n] for module exclude list

- Generating module exclude list from the SqueezeCenter root directory

Can't stat /usr/share/squeezecenter/Slim: No such file or directory
at /usr/local/bin/create-slimserver-plugin line 105
- Fetching plugin metadata from /tmp/Magnatune/install.xml

- Generating .par file from Plugins::Magnatune::Plugin in /tmp/Magnatune

- Running: 'pp @/tmp/cmltZlLdXL/NvXA0Zs43n -p -o /tmp/Magnatune/lib/Plugins-Magnatune-Plugin.par -I /tmp/Magnatune/lib -M Plugins::Magnatune::Plugin -e 1'

- PAR file: [/tmp/Magnatune/lib/Plugins-Magnatune-Plugin.par] created ok!

- About to write out zipFile: [Plugins-Magnatune-Plugin.zip] from /tmp/Magnatune with destination folder [Magnatune]

* Packaged plugin ok! File: [Plugins-Magnatune-Plugin.zip] is ready for posting

I guess the error about /usr/share/squeezecenter/Slim not being found may be a clue - if I use /usr/share/perl5/ (which does contain the Slim directory) or /usr/share/perl5/Slim then it tells me to specify --slimserverdir. This is a Ubuntu system, with squeezecenter installed from the .deb.

You can see the install.xml at http://magnaslim.cvs.sourceforge.net/magnaslim/Magnatune/install.xml?revision=1.3&view=markup . Also, the wrapper script that I'm using is at http://magnaslim.cvs.sourceforge.net/magnaslim/scripts/buildmagnaslim.sh?revision=1.2&view=markup .

Thanks again,


2008-01-04, 00:17
> create-slimserver-plugin --slimserverdir /usr/share/squeezecenter
> --plugindir /tmp/Magnatune

What happens if you launch the command from the plugin folder? I'm using
the following command:

create-slimserver-plugin --slimserverdir=../../ --plugindir=.

As you can see my structure is simpler than yours. The plugin is right in
the Plugins folder beneath SC.

> Can't stat /usr/share/squeezecenter/Slim: No such file or directory
> at /usr/local/bin/create-slimserver-plugin line 105

I wonder whether the script wouldn't work with a default Linux install.
I'm working on SVN checkout, which puts everything in one folder tree.
Would you mind giving this a try? You won't have to run SC from that
folder, it would only be needed to build the package. This might give us a
pointer to cause of the issue.


2008-01-04, 00:18
> create-slimserver-plugin --slimserverdir /usr/share/squeezecenter
> --plugindir /tmp/Magnatune

As a minimum put the plugin into the SC Plugins folder.


2008-01-04, 00:43
I can see two possible issues:
The directory --slimserverdir points to doesn't contain the "CPAN", "Slim", "lib" and "Plugins" sub directories. In my setup I point it to a svn checkout of SqueezeCenter.

You are using an old version of the PAR tool. I had the exact behaviour you describe due to this on Ubuntu Dapper, see this thread for details:
The solution for me was to build it on a machine running a newer version of Ubuntu instead, but I suspect you also can update the par tool manually to a newer version.

2008-01-04, 05:39
Hi Michael, Erland,

It's working now, the key seems to be to point --slimserverdir at a SVN checkout of the server source as you suggested.

It doesn't seem to matter whether the plugin I'm building is already in the Plugins folder or not; I'm getting sensible results either way. Also I'm on Ubuntu Gutsy, so presumably have a recentish PAR.