Reputation: 60
I would like to know how to specify in rpm spec that some files and directories must not be removed during uninstall even if there are not been modified?
I have some directories that contain configuration files. These files are installed with rpm -ivh. Some of installed files are not always modified and should not be remove at uninstall.
Upvotes: 2
Views: 1227
Reputation: 6758
I don't think there is a native way to do it. I don't see why you would if they were unmodified; the end user can always rpm2cpio
or re-install if they wanted the originals.
However, to do it, you could do something like package all the files into /etc/yourapp/orig/
and then in your %post
do something like cp /etc/yourapp/orig/*.conf /etc/yourapp
. You'd have to do more advanced stuff to keep it from stomping on previously installed and modified config files, but it's a hackish idea to run with.
Upvotes: 1