TrigonicSolutions / gradle-rpm-plugin

Gradle plugin for constructing RPM packages.
Apache License 2.0
38 stars 19 forks source link

Exclude creation of parent directory from base "into" #58

Closed ankitkothana closed 5 years ago

ankitkothana commented 5 years ago

I am trying to install my rpm under "/usr/local/share/myapp".

`

packageName = 'myapp'
release = rootProject.tasks.gitBuildId.output()
arch = 'NOARCH'
os = LINUX
user = 'myapp'
group = 'myapp' 
version = version.substring(0, version.indexOf('-'))
preInstall = file('deploy/preInstall.sh')
postInstall = file('deploy/postInstall.sh')
preUninstall = file('deploy/preUninstall.sh')
postUninstall = file('deploy/postUninstall.sh')

requires('jdk', '1.8.0_25', GREATER | EQUAL)

into '/usr/local/share/myapp'
from(jar.outputs.files) {
    into 'lib'
}

from(configurations.runtime) {
    exclude '**/*.yml', '*.yml', '**/*.properties', '*.properties', '*.xml', '**/*.xml', 'jmxremote.*', '*.xsd', '**/*.xsd'
    into 'lib'
}`

However when I try to install this rpm on CentOS 7, I get a conflict with filesystem :

file /usr/local/share from install of myapp-0:2.3.0-20180726082342.5a44e80.noarch conflicts with file from package filesystem-3.2-25.el7.x86_64.

How can exclude "/usr/local/share" from files list of spec file with this plugin?

AlanKrueger commented 5 years ago

Can you do rpm -qlp on the resulting rpm file and attach what it reports?

ankitkothana commented 5 years ago

Sorry for delayed response. We moved on to different plugin, hence closing issue.