gradle-ospackage-plugin
gradle-ospackage-plugin copied to clipboard
RPM fails to be installed after plugin upgrade from 2.2.6 to 4.4.0
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"
}
}
Same here, but without any updates.
I get this issue with ospackage 4.4.0, and later (up to 4.5.1), but not with 4.3.0.
Nice to know what is the last working version. Thanks tst-ppenev.
My problem was that I added links as files in RPM. RPM installation failed with some unrelated error message.
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.