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

2014-11-28 Thread Hector Oron
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


signature.asc
Description: Digital signature


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

2014-11-12 Thread Patrick Häcker
Package: mediatomb
Version: 0.12.1-7
Severity: grave
Tags: patch
Justification: renders package unusable

Dear Maintainer,

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.

Mediatomb had working systemd support before these changes had been applied.
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

Kind regards
Patrick


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable'), (500, 
'testing-proposed-updates'), (400, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-3-amd64 (SMP w/6 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mediatomb depends on:
ii  chromium [www-browser]   38.0.2125.101-3
ii  iceweasel [www-browser]  31.2.0esr-3
ii  konqueror [www-browser]  4:4.14.2-1
ii  mediatomb-daemon 0.12.1-7
ii  rekonq [www-browser] 2.4.2-0ubuntu2
ii  w3m [www-browser]0.5.3-19

mediatomb recommends no packages.

mediatomb suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org