About rpmnew and rpmsave In the RPM package

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.