-
Notifications
You must be signed in to change notification settings - Fork 23
Description
I've come across a bit of a frustration, and I'm hoping that I just don't know how to accomplish the goal of excluding pre-existing directory structures. To illustrate the issue, if I have the following super-simplified situation of a file "init" in the root of the project, and the following POM:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>no.t.real</groupId>
<artifactId>demonstration</artifactId>
<version>0.1-SNAPSHOT</version>
<licenses>
<license>
<name>none</name>
</license>
</licenses>
<build>
<plugins>
<plugin>
<groupId>no.arktekk.unix</groupId>
<artifactId>unix-maven-plugin</artifactId>
<version>1.0-alpha-7-SNAPSHOT</version>
<configuration>
<rpm>
<group>Example</group>
</rpm>
<assembly>
<copyFile>
<path>init</path>
<toFile>/etc/init.d/bogus</toFile>
<attributes>
<user>foo</user>
<group>bar</group>
<mode>500</mode>
</attributes>
</copyFile>
</assembly>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>no.arktekk.unix</groupId>
<artifactId>unix-maven-plugin</artifactId>
<version>1.0-alpha-7-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
When run to create an RPM, the result is the following RPM spec file:
Name: demonstration
Version: 0.1_20130212.174217
Release: 1
Summary: demonstration
License: none
Group: Example
BuildRoot: /Users/ncolton/tmp/packageTest/target/unix/root-rpm/assembly
BuildArch: noarch
%description
%files
%dir %attr(0755,root,root) /etc
%dir %attr(0755,root,root) /etc/init.d
%attr(0500,foo,bar) /etc/init.d/bogus
The desired result would be a spec file that does not have the line for /etc nor /etc/init.d as those are both pre-existing on a target system that would use RPMs. Similarly, when creating a Solaris package, I get the following prototype file:
i pkginfo=/Users/ncolton/tmp/packageTest/target/unix/root-sysvpkg/pkginfo
d none /etc ? ? ?
d none /etc/init.d 0755 nobody nogroup
f none /etc/init.d/bogus=/Users/ncolton/tmp/packageTest/init 0500 foo bar
For the prototype file, the user and group settings are more obviously conflicting as /etc/init.d should have user root and group sys. It would be preferable that, in this case, /etc/init.d also have the default values, just as /etc does.
If there is a means of causing the RPM spec to not include certains paths, and for the prototype file to have default values (? ? ?) set for certains paths, that would be a decent workaround, but I wasn't able to find such.