Hello, Because SuSE it seems no hurry in updating some rpms, I'm trying to convert RedHat rpms sources to SuSE. I mean small packages as vorbis-tools. My question is: How can I extract rpm spec file from a src.rpm without installing it? The basic idea, I don't know whether it can run, is to reuse SUSE source rpm spec files with new 'updated_source.tar.gz' and then recompile a new rpm 'ala SuSE' Thanks. Guillermo. -- Guillermo Ballester Valor gbv@oxixares.com Ogijares, Granada SPAIN
Op donderdag 29 augustus 2002 00:14, schreef Guillermo Ballester Valor:
Because SuSE it seems no hurry in updating some rpms, I'm trying to convert RedHat rpms sources to SuSE. I mean small packages as vorbis-tools. My question is: How can I extract rpm spec file from a src.rpm without installing it?
cd <tmpdir> rpm2cpio <pkg> | cpio -i -- Richard Bos Without a home the journey is endless
On Thu, 29 Aug 2002 00:14:43 +0200 Guillermo Ballester Valor <gbv@oxixares.com> wrote:
Hello,
Because SuSE it seems no hurry in updating some rpms, I'm trying to convert RedHat rpms sources to SuSE. I mean small packages as vorbis-tools. My question is: How can I extract rpm spec file from a src.rpm without installing it?
The basic idea, I don't know whether it can run, is to reuse SUSE source rpm spec files with new 'updated_source.tar.gz' and then recompile a new rpm 'ala SuSE'
You might find this little perlscript handy. It will open up any rpm or spm in the current directory. ##################################################### #!/usr/bin/perl use warnings; use strict; use Cwd; use File::Path; if ($#ARGV < 0){print<<'EOT'; Usage: rpmrip 1.rpm 2.rpm 3.rpm....... Will install the given rpm (or spm) into the current directory. EOT exit; } my $td=cwd(); ## make fake rpm database in current directory print "Creating rpm db directory $td/var/lib/rpm\n"; #system('mkdir','-p','var/lib/rpm'); mkpath ('var/lib/rpm'); print "Initializing rpm db\n"; system ('rpm','--root',$td,'--dbpath','/var/lib/rpm','--initdb'); foreach (@ARGV){ system ('rpm','--notriggers','--noscripts','--nodeps','--force', '--ignorearch','--ignoreos', '--relocate',"/=/$td",'--badreloc', '--define',"_dbpath $td/var/lib/rpm", '--define',"_topdir $td", '-Uvh', $_)} rmtree ('var',0,0); print 'Source spm\'s are in SOURCE, binary rpms are in dirs',"\n\n"; ###################################################### -- use Perl; #powerful programmable prestidigitation
Alien is another useful tool alien -t <rpm> But if you only want to rip out one file, why not enter the rpm with Midnight Commander (mc). Hit enter when you file is selected and off you go.... Pretty nifty... Guillermo Ballester Valor wrote:
Hello,
Because SuSE it seems no hurry in updating some rpms, I'm trying to convert RedHat rpms sources to SuSE. I mean small packages as vorbis-tools. My question is: How can I extract rpm spec file from a src.rpm without installing it?
The basic idea, I don't know whether it can run, is to reuse SUSE source rpm spec files with new 'updated_source.tar.gz' and then recompile a new rpm 'ala SuSE'
Thanks.
Guillermo.
Guillermo Ballester Valor wrote:
Hello,
Because SuSE it seems no hurry in updating some rpms, I'm trying to convert RedHat rpms sources to SuSE. I mean small packages as vorbis-tools. My question is: How can I extract rpm spec file from a src.rpm without installing it?
The src rpm usually is just a spec file and a tarball of the sources. Just install it. The specfile will be put in /usr/src/packages/SPECS and the tar ball will be in /usr/src/packages/SOURCES. If it's really a redhat rpm make a link from /usr/src/redhat to /usr/src/packages before. I don't even think these src rpms even show up in the rpm database. Mark
participants (5)
-
Guillermo Ballester Valor
-
Magnus Hagebris
-
Mark Hounschell
-
Richard Bos
-
zentara