cpio: Bad magic on ARM
pmatilai at laiskiainen.org
Tue Oct 30 07:01:09 UTC 2012
On 10/19/2012 09:37 PM, david.hagood at gmail.com wrote:
> I am cross-compiling RPMs for an ARM target on an X86_64 machine. When I
> have successfully built my RPM for the target, and I try to install it, I
> error: unpacking of archive failed: cpio: Bad magic
> However, if I verify the package via
> rpm -K mypackage.rpm
> No errors are reported.
> I've tried rpm --nomd5 with no change.
> The RPM seems to be fine on my development machine, and if I convert it to
> a CPIO via rpm2cpio, the resulting cpio will unpack fine on the
> development machine. (the target, being an embedded system, is a little
> thin on what is installed, so it doesn't have a stand-alone cpio program
> to run).
> The host is running RPM 4.8.0, the target RPM 4.0.4.
> Can anybody give me any suggestions as to things to try to resolve this?
The first thing that comes to mind is payload compression which the
ancient rpm-4.0.4 doesn't support. That *should* cause dependency errors
on attempted install though - are you installing with --nodeps?
Upstream rpm defaults to backwards compatible settings, but eg RHEL 6
and derivates (which have rpm-4.8.0) ship with XZ compression and
SHA-256 file digests enabled, and you'll need to disable both at build
time to have the resulting packages work on rpm 4.0.4, eg in the spec:
%global _source_filedigest_algorithm 1
%global _binary_filedigest_algorithm 1
%global _binary_payload w9.gzdio
%global _source_payload w9.gzdio
- Panu -
More information about the Rpm-list