mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

Make configuration files being ignored during verify #115

Closed OliverMatz closed 5 years ago

OliverMatz commented 5 years ago

We are facing essentially the same problem as described in https://stackoverflow.com/questions/38993603/rpm-verify-ignore-config-files: The pom.xml contains an entry like this:

<entry>
  <name>/opt/foo/configure-foo.properties</name>
  <file>${project.build.directory}/configure-foo.properties</file>
  <mode>0666</mode>
  <configuration>true</configuration>
</entry>

The rpm-maven-plugin creates an rpm file that contains a configuration file configure-foo.properties. After the user has edited that file and uses RPM's verification as described in https://www.linux.co.cr/distributions/review/2002/red-hat-8.0/maximum-rpm-1.0/ch-rpm-verify.html that tool treats this as a mismatch.

I would expect the file configure-foo.properties to be ignored, which should be possible with the spec file directive %verify(owner group) /opt/foo/configure-foo.properties. Basically, I see three ways to achieve this in our build process:

  1. No change to the pom.xml is needed and the rpm-maven-plugin adds a suitable %verify directive by default, or
  2. I add a nested element such as <verifyexclude>true</verifyexclude> to the respective entry in the pom.xml, or
  3. I write a separate nested such as <verifyparams>owner group</verifyparams> to the respective entry in the pom.xml

I slightly favour the first option.

OliverMatz commented 5 years ago

We do not actually use mojohaus/rpm-maven-plugin. I created this issue in the wrong repository. Sorry for the noise.