Bug 682827

Summary: Feature Request: support custom installation directory
Product: [Fedora] Fedora Reporter: sgovindachar
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: ffesti, james.antill, maxamillion, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-07 17:49:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sgovindachar 2011-03-07 17:33:18 UTC
Description of problem:

yum does not have support for custom installation directory (--installroot is for something else);  most other installation tools, such as InstallSheild on Windows and GNU's "./configure; make; make install;" procedure support custom installation directory.

Version-Release number of selected component (if applicable):

N/A

How reproducible:

As per discussion in bug-report https://bugzilla.redhat.com/show_bug.cgi?id=682396 , yum's --installroot feature is _not_ for performing custom installations.  

GNU's build and installation procedure, viz., "configure ; make; make install" supports installation in a custom directory via the --prefix option to configure:

    > By default, `make install' will install all the files in
    > `/usr/local/bin', `/usr/local/lib' etc.  You can specify
    > an installation prefix other than `/usr/local' using
    > `--prefix', for instance `--prefix=$HOME'.

Almost all graphical installation tools on Windows, such as those based on install sheild, offer the user to choose a custom installation location.

It would be good if yum supported a similar feature.  

Additional info:

Comment 1 seth vidal 2011-03-07 17:49:24 UTC
yum isn't the same kind of tool as those other tools.

It doesn't handle local/specific locations for file installs. It uses rpm to install them in the location given in the rpm spec file.
;

Comment 2 James Antill 2011-03-07 17:53:18 UTC
To expand: A long time ago rpm create a feature called --relocate ... which kind of does what you want, but there are problems:

1. The packages have to support it, and basically zero rpm packages do so.

2. Nothing can _depend_ on any package that supports relocation, if one were to be created. For example if pkgFOO depends on bash, so it can run /bin/bash, but bash is installed to /opt/bash then pkgFOO will install fine but not work.

...for both of these reasons yum doesn't support relocate, and it is deprecated from rpm as well.

Comment 3 sgovindachar 2011-03-07 18:38:20 UTC
Thanks for presenting RedHat's views;  I think I understand it.  Regarding (2), after using configure's --prefix option, and after using InstallSheild's installation directory feature, the user is expected to update his PATH and LD_LIBRARY_PATH environment variable.  

As a specific example, after installing gcc with yum's --installroot option, I modified the softlinks associated with ld and updated my PATH and LD_LIBRARY_PATH in .bashrc (I had also installed kernel-headers and kernel-devel with yum's --installroot option) -- and was able to compile Broadcom's sources for wireless driver -- and the wireless network worked with the newly build drivers -- on Fedora14 on LiveUSB of size 1G and Dell laptop;  all the steps are listed here:  http://lists.fedoraproject.org/pipermail/users/2011-March/393281.html 

As a specific example on Windows, ActiveState allows uses to install perl in any directory, and they update the environment variables at the end of the installation process.