rpmnew and .rpmsave files are the result of a cautious upgrade policy in .RPM packages. When an upgrade includes changes to a default configuration file, instead of overwriting the configuration file on your system — and possibly nuking the changes you have made — the package will write one of these file types.
An .rpmnew file contains the new default configuration file and leaves your original configuration file untouched. By contrast, and .rpmsave file is a copy of your original configuration file, which has been replaced by the new default file.
- If a config file is the same between the old RPM and new RPM, the installed file is left as-is
- If there are changes between the old and new RPMs, and the file is marked 'noreplace' (usually true) then it leaves the local file as is and writes the new config file to .rpmnew
- If there are changes between the old and new RPMs, and the file is not marked 'noreplace' then it moves the local file to .rpmsave and replaces it with the one from the new RPM
Hence, when upgrading your JetPatch version, you must pay attention to the changes in the configuration files. If you ignore these files, your system may not be tuned to get the most out of your upgrades. It may also be less secure than it should be.
How to handle .rpmnew and .rpmsave files:
- After you perform the RPM upgrade, you must pay attention to the given output. Scan the output for mentions of *.rpmnew or *.rpmsave files.
- If they do not exist, you're all set.
- If you found those files after upgrade, you need to pay careful consideration for the differences between the old and new configuration files. Use the command diff file1 file2 to compare between the files. You might also consider using the
-y
option to display the two files in two columns, or-c
to print differences with surrounding lines so you can understand their context better. - After you have collected the list of differences, the next step would be to merge the config. files into a single files that includes the configurations that you need.
- After you have created a new config file / edited the in-use file, you can delete all irrelevant files.
- To catch the new configurations, a restart to the relevant services is needed (nginx, tomcat etc).
Please note:
- We highly recommend scanning the RPM output process after every RPM upgrade to the system
- If *.rpmnew or *.rpmsave files were found, the comparison process might take a while, but is crucially important for the installed version and for upcoming installations.
Comments
0 comments
Please sign in to leave a comment.