From time to time I need to modify a file that the package creator didn't expect (maybe correctly) users to modify, so it is not marked as a config file in a package. Often I want my modifications to be preserved on upgrades, but currently there is no way to tell RPM about that (other then rebuilding my own packages, which is obviously an overkill). This RFE is for a mechanism for being able (say, a-la netsharedpath) to specify that a certain file should be treated as a config file, no matter how it was packaged.
You can already mark files not to be overwritten by adding to %_netsharedpath and or installing with --excludepath. Devising a general means to merge file markers from system configuration and the command line would be a nightmare to diagnose, and seems at odds with "package management". Why not just rebuild the package with your fiddles included?
OK, let me be a little more specific - I am messging with Mozilla a lot and I want to have my own /usr/bin/mozilla shell script, however I still want to keep using Blizzard's latest "nightly" RPMs. Rebuilding Mozilla myself takes a few hour on my machine and kind of defeats the idea...
You have the following choices: 1) Add the files you don't want changed to a %_netsharedpath in /etc/rpm/macros 2) Copy the file you want into place immediately after your nightly upgrade. I3) Open a bug in bugzilla against Mozilla to try to get the file marked with %config(noreplace) to preserve your locally modified /usr/bin/mozilla script. Otherwisie, I see no reason to add functionality to rpm, rebuilding (yes that's hard with Mozilla) the package is the right thing to do.