rpm2tgz – web interface and web service
February 23rd, 2008
My favorite site to convert rpm’s to tar gzip files appears to have shut down. As such, I wrote my own tool. It has a web interface: Convert a RPM to a tgz and (keeping inline with my thoughts on software) can be used from the command line.
Five usage examples:
$ wget -q "http://bashcurescancer.com/rpm2tgz.ws?url=http://bashcurescancer.com/media/rpm2tgz/telnet-0.17-39.el5.i386.rpm" $ ls -l telnet-0.17-39.el5.i386.tgz -rw-r--r-- 1 noland noland 49804 Feb 23 17:09 telnet-0.17-39.el5.i386.tgz
$ curl -s -F "rpm=@telnet-0.17-39.el5.i386.rpm" \ "http://bashcurescancer.com/rpm2tgz.ws" >telnet-0.17-39.el5.i386.tgz.1
$ curl -s -F "url=http://bashcurescancer.com/media/rpm2tgz/telnet-0.17-39.el5.i386.rpm" \ http://bashcurescancer.com/rpm2tgz.ws > telnet-0.17-39.el5.i386.tgz.2
$ curl -s "http://bashcurescancer.com/rpm2tgz.ws?url=ttp://bashcurescancer.com/media/rpm2tgz/telnet-0.17-39.el5.i386.rpm" \ > telnet-0.17-39.el5.i386.tgz.3
$ wget -q -O telnet-0.17-39.el5.i386.tgz.4 \ "http://bashcurescancer.com/rpm2tgz.ws?url=http://bashcurescancer.com/media/rpm2tgz/telnet-0.17-39.el5.i386.rpm"
Needless to say, if you abuse this, I will block your ip address from accessing the service. If there is an error the script will either return 404 File Not Found or 500 Internal Server Error and an empty body. As such, you should be able to the -s expression of test, [, and [[ to check the validity of the file.
February 25th, 2008 at 8:53 pm
aw, c’mon, cpio is awesome!
( cd / ; rpm2cpio telnet.rpm | cpio -d -i )
rpm2cpio telnet.rpm | ssh nonrpmhost ‘( cd / ; cpio -d -i )’
it’s even good enough for your initrd!
$ sudo cat /boot/initrd-2.6.23.15-137.fc8.img | gunzip > i.cpio
$ file i.cpio
i.cpio: ASCII cpio archive (SVR4 with no CRC)
February 25th, 2008 at 9:03 pm
I agree! I only convert an rpm to tgz when I am on a Windows host… which happens too often!
February 26th, 2008 at 6:07 pm
If you’re not fixed on a web services for some reason, the alien command should satisfy most of your package conversion needs.
For Debian -
http://packages.debian.org/unstable/admin/alien
For others – not sure
February 26th, 2008 at 6:11 pm
Liam,
Thanks for the tip!
I agree, cpio or alien is a better solution for most people. However, I often just want to see the contents of an RPM from my work windows
laptop. As such a simple web based rpm2tgz converter makes my life easier.
February 28th, 2008 at 7:04 am
In addition to cpio and alien, SUSE provides a nifty bash wrapper script to cpio/rpm2cpio which is about the easiest way to unpack an rpm into a current directory with the directory structures all in place.
April 30th, 2009 at 2:28 am
humm…. I am not having any luck with your web interface.
I am trying to turn Nessus 4 RPM into tgz so that I can install it on SLAX
I’m a bit of a noob to this.. but I had no luck with doing it using your web site. I tried both the upload and the url method. Neither resulted in a successful conversion. The upload just hung there and never asked me to download/save the file. The url method asked me to download a file that was empty.
The url I was using is:
http://downloads.nessus.org/nessus3dl.php?file=Nessus-4.0.0-fc10.i386.rpm&licence_accept=yes&t=54c4c5795e15e7aa69479c6e61e280ed
BTW… I tried using rpm2tgz http://packages.slackware.it/package.php?q=current/rpm2tgz-1.0-i486-1
but it gave me an error asking me if I was sure that the file was an rpm. Apparently a lot of people get this same error (http://www.justlinux.com/forum/showthread.php?p=674943)
I see all the posting about alien, but can’t figure out how to install it on SLAX because it is deb.
Boy, I would love it if your website worked.
Can ya help a guy out ?
REgards
July 9th, 2009 at 8:33 am
I wish cpio on suse 10.x could unrpm postgresql-server-8.3:
http://linux.derkeiler.com/Mailing-Lists/SuSE/2008-11/msg00301.html
http://download.opensuse.org/repositories/server:/database:/postgresql/openSUSE_11.1/x86_64/postgresql-server-8.3.7-7.2.x86_64.rpm
unfortunately, rpm2tgz ws throws an ISE
any idea why?
Milan