error: create archive failed on file /tmp/.../opt/wso2bam-2.0.1/repository/components/plugins/shindig_1.1.0.wso2v7.jar: cpio: Bad magic #335

Open
gioppoluca opened this Issue Jan 10, 2013 · 1 comment

Projects

None yet

2 participants

@gioppoluca

I'm trying to create a rpm from a wso2 product a java application in a directory in /opt

And get this result.
Any idea?

[root@yum-repo opt]# fpm -n wso2bam -v 2.0.1 -t rpm -s dir /opt/wso2bam-2.0.1/
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.hMVcuj
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.GALCcF
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.WsInV0
Processing files: wso2bam-2.0.1-1.x86_64
error: create archive failed on file /tmp/package-rpm-build20130110-341-j4rqgi/BUILD/opt/wso2bam-2.0.1/repository/components/plugins/shindig_1.1.0.wso2v7.jar: cpio: Bad magic

RPM build errors:
create archive failed on file /tmp/package-rpm-build20130110-341-j4rqgi/BUILD/opt/wso2bam-2.0.1/repository/components/plugins/shindig_1.1.0.wso2v7.jar: cpio: Bad magic
/usr/lib/ruby/gems/1.8/gems/fpm-0.4.26/lib/fpm/util.rb:33:in safesystem': rpmbuild failed (exit code 1). Full command was:["rpmbuild", "-bb", "--define", "buildroot /tmp/package-rpm-build20130110-341-j4rqgi/BUILD", "--define", "_topdir /tmp/package-rpm-build20130110-341-j4rqgi", "--define", "_sourcedir /tmp/package-rpm-build20130110-341-j4rqgi", "--define", "_rpmdir /tmp/package-rpm-build20130110-341-j4rqgi/RPMS", "/tmp/package-rpm-build20130110-341-j4rqgi/SPECS/wso2bam.spec"] (FPM::Util::ProcessFailed) from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.26/lib/fpm/package/rpm.rb:230:inoutput'
from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.26/lib/fpm/command.rb:408:in execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:64:inrun'
from /usr/lib/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:126:in run' from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.26/bin/fpm:8 from /usr/bin/fpm:19:inload'
from /usr/bin/fpm:19

@pearj
pearj commented Jan 16, 2015

For what it's worth I had a problem like this, I investigated it with strace, and it turned out I had run out of disk space because rpmbuild was writing the RPM to the /tmp directory which was really small on my machine. So I got around it by overriding _tmppath to a disk with more space. You can do it as a once off with --define '_tmppath /data/build/release-staging-14.10e-346-g3793486_develop/tmp' as a command line option to rpmbuild, or adding it to your ~/.rpmmacros file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment