Bug#769325: mediatomb: Mediatomb does not work with systemd

Hector Oron zumbi at debian.org
Fri Nov 28 15:22:35 UTC 2014


severity 769325 important
thanks


Hello,

On Wed, Nov 12, 2014 at 09:43:21PM +0100, Patrick Häcker wrote:

> version 0.12.1-7 does not start when using systemd without a useable error
> message:
> > Process: 2788 ExecStart=/usr/bin/mediatomb -d -u $MT_USER -g $MT_GROUP -P /run/mediatomb.pid -l $MT_LOGFILE -m $MT_HOME -f $MT_CFGDIR -p $MT_PORT -e $MT_INTERFACE (code=exited, status=0/SUCCESS)
> > Process: 2785 ExecStartPre=/sbin/ifconfig $MT_INTERFACE allmulti (code=exited, status=0/SUCCESS)
> > Process: 2782 ExecStartPre=/sbin/route add -net 239.0.0.0 netmask 255.0.0.0 $MT_INTERFACE (code=exited, status=0/SUCCESS)
> > Process: 2779 ExecStartPre=/bin/grep -q MT_USER /etc/default/mediatomb (code=exited, status=0/SUCCESS)
> > Main PID: 2789 (code=exited, status=1/FAILURE)
> 
> Even if it started, it wouldn't work, as it does not read the configuration
> file /etc/mediatomb/config.xml, which can be seen in
> /lib/systemd/system/mediatomb.service:
> > ExecStart=/usr/bin/mediatomb -d -u $MT_USER -g $MT_GROUP -P /run/mediatomb.pid -l $MT_LOGFILE -m $MT_HOME -f $MT_CFGDIR -p $MT_PORT -e $MT_INTERFACE
> 
> Additionally, it does not seem to make sense to have /etc/default/mediatomb,
> as nearly all options are duplicates of options in
> /etc/mediatomb/config.xml. It is completely unclear to a normal user which
> value is used, if the values of both files differ.

/etc/default/mediatomb is a file for daemon configuration (network card to attach to, user/group to run under, location of config.xml, etc...)), while /etc/mediatomb/config.xml is for mediatomb configuration (see upstream documentation http://mediatomb.cc/pages/documentation#id2856319). You are right and some optional values can be set at config.xml, but Debian mediatomb older releases have been configuring the daemon, even other distros, as Fedora, configure the daemon. It is not our fault the upstream provides two different ways to configure the daemon, via CLI or via config.xml. We picked to configure it via CLI with environment file, it has been that way for several releases now.

> Mediatomb had working systemd support before these changes had been applied.

Sorry, there was no systemd unit file before, you might had been using the old init script which also sets up the daemon.

> These changes should thus probably be reverted. Alternatively,
> /etc/default/mediatomb should be deleted and
> /lib/systemd/system/mediatomb.service should be changed into
> > [Unit]
> > Description=UPnP MediaServer
> > After=NetworkManager-wait-online.service network.target
> > 
> > [Service]
> > Type=forking
> > PIDFile=/run/mediatomb.pid
> > ExecStart=/usr/bin/mediatomb -d -c /etc/mediatomb/config.xml -P /run/mediatomb.pid
> > 
> > [Install]
> > WantedBy=multi-user.target

Sorry, I disagree to do those changes at this stage in the release, we are frozen.
I do not think it's good idea to run the daemon as root, but instead use the mediatomb user/group.
Also you seem to drop network settings for UPnP to work properly on some systems, why is that?

I do not agree on the severity reported, as the package works for me with that setup, and it might work for you, if you configure it properly. Therefore I am downgrading severity to at most important as I do not think it should be removed from jessie release, but I am further interested to hear about your proposed changes and find a common area that works for all.

Regards,
-- 
  Hector Oron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20141128/58dcdf83/attachment-0001.sig>


More information about the pkg-multimedia-maintainers mailing list