FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 05-31-2010, 04:00 PM
Harry Rickards
 
Default cpio: Bad magic

Hi,

When building my package with rpmbuild, I'm getting the following error:

error: create archive failed on file
/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3/AUTHORS:
cpio: Bad magic

I've tried reinstalling cpio and glibc, and I've got enough space
left. I can view AUTHORS fine with cat, and even compress it with
cpio. The strange part is, this error also occurs when using koji -
see the build log at
http://koji.fedoraproject.org/koji/getfile?taskID=2220058&name=build.log.

The source rpm is at
http://hotfile.com/dl/45779573/83852f4/lives-1.3.3-1.fc13.src.rpm.html.

Any help is appreciated!

Thanks

--
Harry Rickards - harry@linux.com
Vote Lib Dem - Building a fairer Britain - http://libdems.org.uk
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 05-31-2010, 05:49 PM
Panu Matilainen
 
Default cpio: Bad magic

On Mon, 31 May 2010, Harry Rickards wrote:

> Hi,
>
> When building my package with rpmbuild, I'm getting the following error:
>
> error: create archive failed on file
> /builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3/AUTHORS:
> cpio: Bad magic
>
> I've tried reinstalling cpio and glibc, and I've got enough space
> left. I can view AUTHORS fine with cat, and even compress it with
> cpio. The strange part is, this error also occurs when using koji -
> see the build log at
> http://koji.fedoraproject.org/koji/getfile?taskID=2220058&name=build.log.
>
> The source rpm is at
> http://hotfile.com/dl/45779573/83852f4/lives-1.3.3-1.fc13.src.rpm.html.
>
> Any help is appreciated!

The error message is wonderfully obscure, but the actual problem is here:

Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.XGPmZR
+ umask 022
+ cd /builddir/build/BUILD
+ cd lives-1.3.3
+
DOCDIR=/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
+ export DOCDIR
+ rm -rf
/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
+ /bin/mkdir -p
/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
+ cp -pr avi_encoder.py.1 build-lives-rfx-plugin.1
build-lives-rfx-plugin-multi.1 dirac_encoder.py.1 gif_encoder.py.1 lives.1
mkv_encoder.py.1 mng_encoder.py.1 ogm_encoder.py.1 smogrify.1
theora_encoder.py.1
/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
+ exit 0

%doc wipes out anything else in the doc directory, in this case AUTHORS
and probably something else too, so when rpm tries to put the files into
the cpio archive it fails because the files don't exist. You need to use
either %doc or manual directory ownership of the doc directory, you can't
mix them.

And of course the whole thing is just stupid behavior from rpm, the only
excuse for this is "it's always been like that"...

- Panu -
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 05-31-2010, 05:57 PM
Harry Rickards
 
Default cpio: Bad magic

On 31 May 2010 18:49, Panu Matilainen <pmatilai@laiskiainen.org> wrote:
> On Mon, 31 May 2010, Harry Rickards wrote:
>
>> Hi,
>>
>> When building my package with rpmbuild, I'm getting the following error:
>>
>> error: create archive failed on file
>> /builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3/AUTHORS:
>> cpio: Bad magic
>>
>> I've tried reinstalling cpio and glibc, and I've got enough space
>> left. I can view AUTHORS fine with cat, and even compress it with
>> cpio. The strange part is, this error also occurs when using koji -
>> see the build log at
>> http://koji.fedoraproject.org/koji/getfile?taskID=2220058&name=build.log.
>>
>> The source rpm is at
>> http://hotfile.com/dl/45779573/83852f4/lives-1.3.3-1.fc13.src.rpm.html.
>>
>> Any help is appreciated!
>
> The error message is wonderfully obscure, but the actual problem is here:
>
> Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.XGPmZR
> + umask 022
> + cd /builddir/build/BUILD
> + cd lives-1.3.3
> +
> DOCDIR=/builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
> + export DOCDIR
> + rm -rf
> /builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
> + /bin/mkdir -p
> /builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
> + cp -pr avi_encoder.py.1 build-lives-rfx-plugin.1
> build-lives-rfx-plugin-multi.1 dirac_encoder.py.1 gif_encoder.py.1 lives.1
> mkv_encoder.py.1 mng_encoder.py.1 ogm_encoder.py.1 smogrify.1
> theora_encoder.py.1
> /builddir/build/BUILDROOT/lives-1.3.3-1.fc13.x86_64/usr/share/doc/lives-1.3.3
> + exit 0
>
> %doc wipes out anything else in the doc directory, in this case AUTHORS
> and probably something else too, so when rpm tries to put the files into
> the cpio archive it fails because the files don't exist. You need to use
> either %doc or manual directory ownership of the doc directory, you can't
> mix them.
>
> And of course the whole thing is just stupid behavior from rpm, the only
> excuse for this is "it's always been like that"...
>


Thanks for finding the problem! In the wiki, at
http://fedoraproject.org/wiki/How_to_create_an_RPM_package#.25files_prefixes,
it does talk about this problem but doesn't anywhere say that it comes
up with this error. I'm very new to Fedora packaging so probably not
the best person to do it, but would someone be able to update the wiki
to say that this 'gotcha' creates a cpio bad magic error?

Thanks


--
Harry Rickards - harry@linux.com
Vote Lib Dem - Building a fairer Britain - http://libdems.org.uk
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 07:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org