LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-28-2005, 02:38 PM   #1
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
control where rpm is installed


Is there any way u can control where an rpm is installed. I know with sources u can control it.
 
Old 06-28-2005, 03:21 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
man rpm

Under the install-options section:

Code:
   install-options
        [--aid] [--allfiles] [--badreloc] [--excludepath OLDPATH]
        [--excludedocs] [--force] [-h,--hash]
        [--ignoresize] [--ignorearch] [--ignoreos]
        [--includedocs] [--justdb] [--nodeps]
        [--nodigest] [--nosignature] [--nosuggest]
        [--noorder] [--noscripts] [--notriggers]
        [--oldpackage] [--percent] [--prefix NEWPATH]
        [--relocate OLDPATH=NEWPATH]
        [--repackage] [--replacefiles] [--replacepkgs]
        [--test]
 
Old 06-28-2005, 06:56 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
A more succinct answer might be: get the .src.rpm, and compile your own binary for your system. That will get you your systems defaults for rpm installation.

However, before compiling the binary, edit the .spec file in /usr/src/<kernel version>/SPECS, or /usr/src/packages/SPECS in SuSE, or /usr/src/redhat/SPECS in RH. Change the defaults there, and try to compile and install a binary. If it works, you've added a milestone to your Linux experience. It it doesn't work, go to the RH website, and download a copy of RedHat's Maximum-rpm (700+ pages - all you could ever want to know about rpm). Study, learn how the spec file works, edit some more, then try again.

A couple of years ago, using another rpm based system, with webmin, I wanted to upgrade webmin, but I could only find tarballs for the version I wanted. So, since a .src.rpm is just a tarball and a spec file, I copied the spec file for the existing installation, added the tarball for the newer version, and fiddled for a couple of days until I had a version which worked if I did 'rpm -U'. It never installed correctly with 'rpm -i' if I removed the existing version first, but it worked perfectly if I did 'rpm -U' with the existing installation in place.

Damn near dislocated a shoulder patting myself on the back over that one.
 
Old 06-29-2005, 03:32 AM   #4
wipe
Member
 
Registered: Jun 2004
Location: High Green
Distribution: Fedora Core 4
Posts: 180

Rep: Reputation: 30
If the installation options don't work or you want full control, binary RPM's can be extracted with this command:

rpm2cpio foobar-1.0-1.i386.rpm | cpio -dimv

It creates the whole directory structure stored in the package to the directory where you type the command. It's best to create a temporary directory for this. You have to have "cpio" installed. When you have extracted, move the files anywhere you like but remember that packages depending on this one won't necessarily find the files they need. You can fool rpm to think the package has been installed with --justdb (I haven't tried this).

If you want only the cpio package (usually not very useful) try this:

rpm2cpio foobar-1.0-1.i386.rpm > foobar.cpio

Simon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installed Mandrake 10.1 but cant' access control center? bsurfn99 Linux - Laptop and Netbook 1 02-05-2005 10:31 AM
rpm -ivh says installed rpm -e says not installed ??? skog Fedora 3 12-22-2004 03:52 PM
rpm -q not shows installed rpm mla Linux - Software 4 10-31-2004 02:49 PM
RPM is saying installed packages aren't installed ticky87 Linux - Newbie 4 07-26-2004 01:17 AM
Reinstalling Mandrake Control Centre RPM Maurice Arthur Mandriva 4 04-14-2004 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration