Bug 826377 - mediatomb startup script hardcodes configuration values
mediatomb startup script hardcodes configuration values
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mediatomb (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Orphan Owner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 01:42 EDT by Kenny Root
Modified: 2012-12-20 10:54 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:54:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mediatomb unit that uses the environment file (491 bytes, text/plain)
2012-07-06 13:02 EDT, Jóhann B. Guðmundsson
no flags Details
mediatomb unit that uses the environment 2 (493 bytes, text/plain)
2012-10-13 14:40 EDT, Ryan W
no flags Details

  None (edit)
Description Kenny Root 2012-05-30 01:42:21 EDT
Description of problem:
The mediatomb startup script in /lib/systemd/system/mediatomb.service hardcodes all the values instead of reading them from /etc/mediatomb.conf

Version-Release number of selected component (if applicable):
0.12.1-fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install mediatomb
2. Look at /lib/systemd/system/mediatomb.service
3.
  
Actual results:
Port, interface, home directory, etc are hardcoded

Expected results:
Items should be loaded with:

EnvironmentFile=-/etc/mediatomb.conf

and referred to like ${MT_INTERFACE}

Additional info:
Comment 1 Ian Chapman 2012-07-06 11:25:10 EDT
This issue still applies to mediatomb-0.12.1-16.fc17.x86_64. The file /etc/mediatomb.conf is included in the RPM which misleading because it's not actually used.
Comment 2 Jóhann B. Guðmundsson 2012-07-06 13:02:55 EDT
Created attachment 596669 [details]
mediatomb unit that uses the environment file

Since mediatomb.conf is not stored under /etc/sysconfig/ directory I decide to submit unit file that uses the environment file which arguably is not needed since user can just copy the medatomb.service to /etc/systemd/systemd directory and adjust the parameters there.. 

In anycase to test this just copy/save this file under /etc/systemd/system directory and run systemctl daemon-reload and stop/start the service...
Comment 3 Ian Chapman 2012-07-07 07:38:37 EDT
(In reply to comment #2)
> Created attachment 596669 [details]
> mediatomb unit that uses the environment file
> 
> Since mediatomb.conf is not stored under /etc/sysconfig/ directory I decide
> to submit unit file that uses the environment file which arguably is not
> needed since user can just copy the medatomb.service to /etc/systemd/systemd
> directory and adjust the parameters there.. 

Yes it is arguable whether it's needed or not, but the configuration file shouldn't be there if one is expected to copy and edit the service file or at least it could contain a note saying I'm now deprecated. 

> In anycase to test this just copy/save this file under /etc/systemd/system
> directory and run systemctl daemon-reload and stop/start the service...

I have copied the mediatomb.service file to /etc/systemd/system and it works as expected. Thanks you very much.
Comment 4 Ding-Yi Chen 2012-10-11 03:16:48 EDT
Well, actually /etc/mediatomb.conf is still respected, but since command line options (which is hardcoded in mediatomb.service) have higher priority, thus option in mediatome is shadowed.

Mind removing the hardcoded options? :-)
Comment 5 Ryan W 2012-10-13 14:40:34 EDT
Created attachment 626613 [details]
mediatomb unit that uses the environment 2

A slight improvement on the other unit file which uses a specified PID file rather than the one from the config.
Comment 6 Fedora Update System 2012-10-30 10:57:09 EDT
mediatomb-0.12.1-20.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-20.fc18
Comment 7 Fedora Update System 2012-10-30 16:16:19 EDT
Package mediatomb-0.12.1-20.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mediatomb-0.12.1-20.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17263/mediatomb-0.12.1-20.fc18
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-12-20 10:54:06 EST
mediatomb-0.12.1-20.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.