Bug 674861

Summary: Mediatomb package update overwrites important configuration files
Product: [Fedora] Fedora Reporter: giulix <giulio.martinat>
Component: mediatombAssignee: Rich Mattes <richmattes>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: giulio.martinat, richmattes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-25 13:57:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Spec file that preserves the file
none
Spec file to %config(noreplace) the entire /usr/share/mediatomb/js dir none

Description giulix 2011-02-03 15:13:47 UTC
Description of problem: Updating from mediatomb-0.12.1-3.fc13.i686.rpm to mediatomb-0.12.1-4.fc14.i686.rpm overwrites important configuration file /usr/share/mediatomb/js/import.js

Version-Release number of selected component (if applicable): 0.12.1-4

How reproducible: Always

Steps to Reproduce:
1. Install version 0.12.1-3
2. Amend MT_INTERFACE in /etc/mediatomb.conf
3. Start and stop mediatomb service to create config files and DB
   in /etc/mediatomb
4. Configure <virtual-layout type="js"> in /etc/mediatomb/config.xml
5. Modify /usr/share/mediatomb/js/import.js
6. Update mediatomb to version 0.12.1-4
  
Actual results:

/usr/share/mediatomb/js/import.js gets overwritten

Expected results:

/usr/share/mediatomb/js/import.js is preserved if it has been modified by the system administrator, as it may contain the media objects import strategy for mediatomb

Additional info: http://mediatomb.cc/pages/scripting#id2758326
                 The above URL describes how mediatomb's import strategy works

Comment 1 giulix 2011-02-03 16:00:22 UTC
Created attachment 476812 [details]
Spec file that preserves the file

Comment 2 Rich Mattes 2011-02-09 02:46:18 UTC
Thanks for the report!

I've changed js/import.js to a %config(noreplace) file in Rawhide.  I will change it in F13/14 the next time I need to make an update.

Comment 3 giulix 2011-02-11 18:47:24 UTC
Thanks!

Actually, by R'ingTFM in more detail, I learned that _all_ files in /usr/share/mediatomb/js can be customized by the system administrator. So, it's probably more appropriate to add a $config(noreplace) clause for all of them (if there's not a specific clause to mark an entire directory). They are:
import.js
playlists.js
common.js

Comment 4 giulix 2011-02-15 08:26:04 UTC
Created attachment 478784 [details]
Spec file to %config(noreplace) the entire /usr/share/mediatomb/js dir

Tested and it works

Comment 5 Rich Mattes 2012-01-25 13:57:12 UTC
This has been fixed in F15+: import.js, playlists.js, and common.js are all marked as %config(norepalce).  Closing.