Maybe make sure you are running python2?

It would be good if you would cut'n'paste your exeriences so it's clear what the 
sequence of commands and responses is.

Ger


On Sun, 10 Apr 2016, rhubarbpieguy at gmail.com wrote:

>
> Gerry,
>
> Thank you.  I appreciate/admire your detail on this.  I had tried rpm2cpio.py 
> after failure with rpm2cpio.prl.  I'd actually prefer a Python solution. 
> However, I received:
>
>   raise IOError, 'the input is not a RPM package'
>
> What command did you use?  Mine was "python rpm2cpio.py < viv*rpm | cpio 
> -it."  As I had failures with both the Perl and Python scripts I assumed the 
> problem was with the RPM.  I have xz on my box.
>
> ----------------------------------------------------------
>
> On 04/10/2016 12:28 PM, gerry wrote:
>> rhubarbguy,
>> 
>> I got a hold of rpm2cpio.pl and got the same error you did.
>> wget 
>> 'http://lkml.iu.edu/hypermail/linux/kernel/0210.2/att-0093/01-rpm2cpio'
>> 
>> You might consider getting this little python script that does the same 
>> thing.
>> https://github.com/ruda/rpm2cpio
>>      Lightweight implementation of rpm2cpio written in Python.
>>   The script:
>>     wget https://raw.githubusercontent.com/ruda/rpm2cpio/master/rpm2cpio.py
>> 
>> I see it includes the xz compression which MIGHT be the issue with the 
>> vivaldi rpm.
>> .....
>> 
>> While looking into this, I discovered that the 7zip program can read rpm 
>> files!
>> Cool.
>> 
>> http://manutechie.blogspot.com/2013/08/extract-rpmjartariso-in-windows-7.html 
>> 
>> /tmp> 7z l vivaldi-stable-1.0.435.42-1.x86_64.rpm
>> 
>> 7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
>> p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
>> 
>> Listing archive: vivaldi-stable-1.0.435.42-1.x86_64.rpm
>> 
>> -- 
>> Path = vivaldi-stable-1.0.435.42-1.x86_64.rpm
>> Type = Rpm
>> ----
>> Size = 45061100
>> -- 
>> Path = vivaldi-stable-1.0.435.42-1.x86_64.cpio.lzma
>> Type = xz
>> Method = LZMA2:26 SHA256
>>
>>    Date      Time    Attr         Size   Compressed  Name
>> ------------------- ----- ------------ ------------ 
>> ------------------------
>>                     .....    170081620     45061100 
>> vivaldi-stable-1.0.435.42-1.x86_64.cpio
>> ------------------- ----- ------------ ------------ 
>> ------------------------
>>                              170081620     45061100  1 files, 0 folders
>> 
>> And sure enough, it's an xz file with LZMA and an SHA256 signature.
>> 
>> Reading the python and perl and the shell (from
>> http://stackoverflow.com/questions/18787375/how-do-i-extract-the-contents-of-an-rpm
>> )  are enlightening about the contents of the RPM file.
>> 
>> 
>> Fun times... :-)
>> Ger
>> 
>> 
>> 
>> On Sat, 9 Apr 2016, rhubarbpieguy at gmail.com wrote:
>> 
>>> 
>>> I run compiled Linux From Scratch so use neither an RPM nor DEB 
>>> distribution package manager.  I got rpm2cpio.prl for Perl years ago and 
>>> use it only for OpenOffice RPM files.  I just tried it on an OpenOffice 
>>> language pack RPM file successfully.
>>> 
>>> I saw no MD5 values on their site but my md5sum matches yours. If you can 
>>> unpack it using rpm2cpio I'll chalk it up to a mystery as I can process 
>>> the DEB file with ar.
>>> 
>>> ----------------------------------------------------------
>>> 
>>> On 04/09/2016 09:44 AM, gerry wrote:
>>>> Where did you get rpm2cpio from if you don't use a distribution with an 
>>>> rpm extractor? (rpm2cpio is an rpm extractor)
>>>> What tool did you use to download the rpm file? (is it corrupted?)
>>>> 
>>>> /tmp/v> rpm2cpio ../vivaldi-stable-1.0.435.42-1.x86_64.rpm| cpio -id
>>>> 332191 blocks
>>>> /tmp/v> dpkg -l rpm2cpio
>>>> [snip]
>>>> ii  rpm2cpio                   4.12.0.1+dfsg1-3bu amd64              tool 
>>>> to convert RPM package to CPIO archive
>>>> 
>>>> /tmp/v> md5sum ../vivaldi-stable-1.0.435.42-1.x86_64.rpm
>>>> 848368665107cb1670c15639843ad58e 
>>>> ../vivaldi-stable-1.0.435.42-1.x86_64.rpm
>>>> 
>>>> 
>>>> Nope; no problem here extracting it.
>>>> 
>>>> HTH,
>>>> Ger
>>>> On Sat, 9 Apr 2016, rhubarbpieguy at gmail.com wrote:
>>>> 
>>>>> 
>>>>> I'm receive "Error: header not recognized" and "cpio: premature end of 
>>>>> archive" when attempting to process the following using rpm2cpio:
>>>>> 
>>>>> https://download.vivaldi.com/stable/vivaldi-stable-1.0.435.42-1.x86_64.rpm 
>>>>> I commonly use rpm2cpio to process rpm files and have had the issue with 
>>>>> all Vivaldi's betas.  I see nothing about such a problem on their site 
>>>>> so assume it's unique to rpm2cpio.  I don't use a distribution with an 
>>>>> rpm extractor.
>>>>> 
>>>>> Can others successfully process the file?
>>>>> 
>> _______________________________________________
>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
>> tclug-list at mn-linux.org
>> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>> .
>> 
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>