gradle-ospackage-plugin icon indicating copy to clipboard operation
gradle-ospackage-plugin copied to clipboard

RPM fails to be installed after plugin upgrade from 2.2.6 to 4.4.0

Open sbelikov opened this issue 7 years ago • 5 comments

Hello,

I have used quite old version of plugin '2.2.6' for very long time. Our team decided to refresh it and we tried to use version 4.4.0. There were no problems building our RPMs.

However when we tried to install them the process failed with the following message: error: unpacking of archive failed: cpio: Archive file not in header error: user-portal-0:8.2-8.2.SNAPSHOT.noarch: install failed

There were no other changes to our gradle script except plugin version. I could not find any documentation that would help me to fix the issue.

here is the task that we are using:

task dist(type: Rpm) {

packageName baseName
version project.version
os LINUX
into "/var/www/html/user-portal"
createDirectoryEntry true

from("$projectDir") {
    exclude "build"
    exclude "**/*.gradle"
    exclude "pom.xml"
    exclude "user-portal.xml"
}

}

sbelikov avatar Apr 21 '17 15:04 sbelikov

Same here, but without any updates.

janekolszak avatar Oct 10 '17 10:10 janekolszak

I get this issue with ospackage 4.4.0, and later (up to 4.5.1), but not with 4.3.0.

tst-ppenev avatar Oct 17 '17 20:10 tst-ppenev

Nice to know what is the last working version. Thanks tst-ppenev.

sbelikov avatar Oct 18 '17 16:10 sbelikov

My problem was that I added links as files in RPM. RPM installation failed with some unrelated error message.

janekolszak avatar Oct 19 '17 09:10 janekolszak

Run into the same issue, reverting back to 4.3.0 like @tst-ppenev suggested worked (thanks!).

For me the root cause was that I had a clause like:

from('/some/path/that/is/a/symlink') {
  include '...'
}

This seemed to work up to version 4.3.0. Previously it seemed to resolve the symlink and now it seems to try to include the symlink itself? I resolved it by pointing to the original file, rather than the symlink.

lwe avatar Nov 21 '17 12:11 lwe