Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#33444 closed defect (worksforme)

Couldn't get rpm2cpio to work

Reported by: dave@… Owned by: afb@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: n3npq@…
Port: rpm2cpio

Description (last modified by n3npq@…)

I didn't try very hard to diagnose this, but:

http://www.iagora.com/~espel/rpm2cpio ended up working in its place

If all you/want need is rpm2cpio, either the perl version at the URI, or the shell version I've just attached, work fine.

Attachments (2)

rpm2cpio (1.4 KB) - added by n3npq@… 13 years ago.
rpm2cpio written in shell
dummy-1-1.noarch.rpm (1.6 KB) - added by afb@… 13 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: n3npq@… added
Owner: changed from macports-tickets@… to afb@…
Port: rpm2cpio added

Changed 13 years ago by n3npq@…

Attachment: rpm2cpio added

rpm2cpio written in shell

comment:2 Changed 13 years ago by n3npq@…

Description: modified (diff)

comment:3 Changed 13 years ago by dave@…

OK... well there's an rpm2cpio port. Don't you think it should use one of the two scripty implementations rather than build-from-source and then be broken?

comment:4 Changed 13 years ago by n3npq@…

Yes scripts instead of build-from-source (imho). rpm is a complex build and mostly useless if all one needs/wants is rpm2cpio functionality.

comment:5 Changed 13 years ago by afb@…

Resolution: worksforme
Status: newclosed

The "built" version is *identical* to the attached version:

        xinstall ${worksrcpath}/scripts/rpm2cpio \
                 ${destroot}${prefix}/bin/

There must be something else failing, in the 0install test.

Changed 13 years ago by afb@…

Attachment: dummy-1-1.noarch.rpm added

comment:6 Changed 13 years ago by afb@…

Here was the test:

$ sh -x rpm2cpio dummy-1-1.noarch.rpm | cpio -it
+ pkg=dummy-1-1.noarch.rpm
+ '[' dummy-1-1.noarch.rpm = '' -o '!' -e dummy-1-1.noarch.rpm ']'
+ leadsize=96
++ expr 96 + 8
+ o=104
++ od -j 104 -N 8 -t u1 dummy-1-1.noarch.rpm
+ set 0000150 0 0 0 4 0 0 0 80 0000160
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 4
+ il=4
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 80
+ dl=80
++ expr 8 + 16 '*' 4 + 80
+ sigsize=152
++ expr 104 + 152 + '(' 8 - '(' 152 % 8 ')' ')' % 8 + 8
+ o=264
++ od -j 264 -N 8 -t u1 dummy-1-1.noarch.rpm
+ set 0000410 0 0 0 49 0 0 1 239 0000420
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 0 ')' + 49
+ il=49
++ expr 256 '*' '(' 256 '*' '(' 256 '*' 0 + 0 ')' + 1 ')' + 239
+ dl=495
++ expr 8 + 16 '*' 49 + 495
+ hdrsize=1287
++ expr 264 + 1287
+ o=1551
+ EXTRACTOR='dd if=dummy-1-1.noarch.rpm ibs=1551 skip=1'
+ COMPRESSION='/dev/stdin: gzip compressed data, from Unix'
+ echo /dev/stdin: gzip compressed data, from Unix
+ grep -q gzip
+ DECOMPRESSOR=gunzip
+ gunzip
+ dd if=dummy-1-1.noarch.rpm ibs=1551 skip=1
./Hello
1 block

comment:7 Changed 13 years ago by afb@…

By the way, the perl script at http://www.iagora.com/~espel/rpm2cpio doesn't handle LZMA/XZ compression. There's an improved version available at http://www.freebsd.org/cgi/cvsweb.cgi/ports/archivers/rpm2cpio/.

comment:8 Changed 13 years ago by afb@…

The shell version doesn't work with rpm2cpio - < dummy-1-1.noarch.rpm (that the zeroinstall unpack* is using), only with rpm2cpio dummy-1-1.noarch.rpm. That is, the shell script requires the input to be an actual file (not a stream).

Note: See TracTickets for help on using tickets.