In the spec file, % config and % config (noreplace) are easy to confuse. Choosing the former and the latter depends on the specific requirements.
% Config rpm-uvh if the original file a.txt is not changed, it will be replaced by the new file a.txt. If the original file a.txt is changed
Then, the new generation a.txt file is replaced by the original generation a.txt file, and the original generation a.txt is renamed to a.txt. rpmsave.
% Config (noreplace) rpm-uvh if the original text file a.txt is not changed, it will be replaced by the new text file a.txt; if the original text is
If the.txt file is changed, the original a.txt file will be retained, and the.txt file in the new version will be renamed to a.txt. rpmnew.
% Config (noreplace) rpm-e if the file a.txt is not modified, it will be deleted. If the file a.txt is changed, it will be generated.
A.txt. rpmsave.
In principle, all important configuration files must be written into % config (noreplace) to avoid any updates, and the new version of files will be modified by the customer.
Overwrite the file. For example, the customer generated hi. conf when installing the Hi-1.0.0.x86_64.rpm package, there is a configuration information IP = 1.2.3.4, because
The customer's own IP address is changed to IP address = 5.6.7.8. If the customer needs to upgrade to this RPM package, update to the Hi-1.2.0.x86_64.rpm, if
ProgramThe member did not write hi. conf into % config (noreplace) during the development process. The new version of hi. conf with IP = 1.2.3.4 is
The custom files with IP address = 5.6.7.8 will be overwritten.
Reference URL: http://www-uxsup.csx.cam.ac.uk /~ Listen 35/docs/rpm_config.html
If it is reprinted, please explain the source! Http://blog.csdn.net/xukunddp