How to install the conflicting package?

Collected two rpm file. The first collects openresty from source.
The second copied the custom configs in the directory where he installed openresty.
When you install the conflict:
Transaction check error:
 file /usr/local/openresty/nginx/conf/nginx.conf from install of openresty-cfg-1.0-1.el7.x86_64 conflicts with file from package openresty-1.15.8.2-7.el7.x86_64


How , exactly, correctly to fix this conflict?
April 7th 20 at 15:53
3 answers
April 7th 20 at 15:55
Solution
It was solved by renaming a file in the spec file, custom config before %install.
Then rename the file back if you delete this custom config. Also in the spec file.
April 7th 20 at 15:57
How , exactly, correctly to fix this conflict?

Remove before copying will not help, is to check the metadata.
To fix one of the trail. options:
to exclude nginx.conf file from the first package
to exclude nginx.conf from the file list of the first batch
- in the second batch to use something like conf.d/my-custom-nginx.conf

OFFTOPIC: IMHO, it is better to roll custom configuration using Ansible/Puppet/Chef/...
April 7th 20 at 15:59
The second copied the custom configs in the directory where he installed openresty.

Before copying odalite the problem file.
Yes, that makes sense) IN your SPEC file of the second (placed on top) is there a way to implement a deletion-substitution?

That would be yum, roughly speaking, did everything myself. - Keshawn_Bechtela commented on April 7th 20 at 16:02
@Anjali83, and God knows, I DEB was collected. - shyanne.VonRued commented on April 7th 20 at 16:05

Find more questions by tags CentOSLinux* nix-like systems