Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force RPM to install files in a single directory, Is it possible? [closed]

rpm install command, installs files all over the place like: /usr/bin, /usr/sbin, /etc/, /usr/share

This way it's hard to figure out all the contents of the installation. Is it possible to force rpm to install everything in a single directory?

like image 293
Jasper Avatar asked Dec 06 '12 07:12

Jasper


People also ask

How do you force an RPM?

To convert revolutions per minute (RPM) to relative centrifugal force (RCF), or g force, use the following formula: RCF = (RPM)2 × 1.118 × 10-5 × r. Relative centrifugal force is dependent on the speed of rotation in RPM and the distance of the particles from the center of rotation.

How force RPM install without dependencies?

How to Install a RPM Package Without Dependencies. If you know that all needed packages are already installed and RPM is just being stupid, you can ignore those dependencies by using the option –nodeps (no dependencies check) before installing the package.

How do I install a package in a specific directory in Linux?

You can use dpkg instead of apt-get which will give you more options. One of the option is to specify an installation directory. You can execute sudo dpkg -i file. deb --instdir=destdir where destdir is your desired installation directory.

How force RPM install in Linux?

In this example, we verify the new package name with the ls command. Then we will run an RPM query to see if the package we want to install exists in the RPM database, rpm -q <package name> . Next, we execute the RPM installation with the following command: rpm -Uvh <package name> .


2 Answers

you can use the --relocate to change 1 directory of the install process

rpm -i --relocate /usr/sbin=/some/other/path/sbin packagename.rpm

or use --prefix for the whole installation process

rpm  -i --prefix=/some/other/path/ packagename.rpm
like image 185
phschoen Avatar answered Oct 04 '22 03:10

phschoen


As noted elsewhere, don't do that.

However, if you want to see what files will be installed where:

rpm -qlp packagename.rpm

If you want to extract them to a different root to examine them (e.g. look at configuration files, etc), from a temporary directory:

rpm2cpio /path/to/rpm/packagename.rpm | cpio -div
like image 41
Aaron D. Marasco Avatar answered Oct 04 '22 03:10

Aaron D. Marasco