I have an RPM and the SPEC file. My application has a file (myfile.txt), which is installed in /mypath. So, when my RPM is installed we have /mypath/myfile.txt in the server.
The file /mypath/myfile.txt contains a single word: hello
What I want to achieve is: From a fresh installation or an upgrade, install myfile.txt only if the content did not change.
Use cases:
- If
/mypath/myfile.txtdoes not exist, install it. - If
/mypath/myfile.txtexists and it keeps the original value "hello", overwrite it. - If
/mypath/myfile.txtexists and the content changed to "whatever",/mypath/myfile.txtshould not be overwritten when the application is upgraded.
Thank you