[BusyBox] Re: "rpm" fails with SIGSEGV

Laurence Anderson l.d.anderson at warwick.ac.uk
Wed Nov 12 10:56:55 UTC 2003


>   so i renamed it simply to apache.rpm.  even with that name,
> i could "rpm -qpi" and "rpm -qpl".  but when i tried to install, i
> immediately got SIGSEGV.

Just testing rpm for myself, the extraction code doesn't seem to work too
well...

First problem I have identified is that the new read_gz code won't
necessarly return the requested amount of data; archive_xread_all &
archive_xread_all_eof don't handle this, unlike bb_xread_all which does.
Attched some kind of solution. This works a bit better, but fails after a
few files complaining about invalid magic... however the cpio applet works
fine (which uses exactly the same code)... maybe something todo with the
file being compressed?

Also while valgrinding, the get_header_xxx functions don't seem to free the
filename or link_name when they have finished with that header, causing a
memory leak.

As for the crash, can't see too much on valgrind at the moment, see when I
get it working properly again on my computer!

>   the RPM files i downloaded to test on are theoretically compatible
> with this board.  so, any thoughts here?  at the moment, there is
> no RPM infrastructure on the board -- /var/lib/rpm does not exist,
> that sort of thing.  do i have to do some preliminary setup before i
> can install my first rpm?

For the time being you can use rpm2cpio file.rpm | cpio -id

Laurence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox_archive.diff
Type: text/x-diff
Size: 1189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20031112/8cad4a96/attachment.bin 


More information about the busybox mailing list