Description of Problem: If the --relocate option is specified when installing an rpm, it is ignored. (Although it does still do syntax checking on it.) The rpm contents end up being installed in the default place. Also, the RPM_INSTALL_PREFIX and RPM_INSTALL_PREFIXn environment variables are left undefined, regardless of whether or not --relocate was specified. This actually is worse for those of us rpm writers packagers who use that variable in the target of a symlink. The symlink ends up pointing into the weeds. Version-Release number of selected component (if applicable): 4.1-1.06 How Reproducible: every time Steps to Reproduce: 1. Get the Makefile and it.spec that I'll put in attachments. 2. make 3. rpm -ivh --relocate /usr/opt=/elsewhere it-1.0-1.i386.rpm 4. rpm -ql it Actual Results: The "rpm -ivh" command will dump any RPM-related environment variables. There will be none. The "rpm -ql" command will show that the files are installed in /usr/opt and not /elsewhere. Expected Results: The "rpm -ivh" command should dump: RPM_INSTALL_PREFIX=/elsewhere RPM_INSTALL_PREFIX0=/elsewhere The "rpm -ql" command should report: /elsewhere/smurf/it /elsewhere/it/it Additional Information: This works with 4.0.4 (from 7.3) and 4.1-0.81 (from 7.3.94/null). Furthermore, an rpm built with 4.1-1.06 can be installed properly on a system with 4.1-0.81. So, it appears to be a bug in the rpm command doing the installation, as opposed to the rpmbuild building it.
Created attachment 79705 [details] Makefile
Created attachment 79706 [details] "it" rpm spec
*** Bug 76326 has been marked as a duplicate of this bug. ***
*** Bug 77967 has been marked as a duplicate of this bug. ***
*** Bug 77433 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 75057 ***
--relocate is/was broken in rpm-4.1. This is now fixed in rpm-4.2 Added for folks linking here from ActiveState download pages
hi This is my spec file which i used to create rpm---- %define VCS ashish Provides: /%{VCS} Prefix: /etc%{provides} %files %{prefix}/conf/sample_WebSphere5/main.cf %{prefix}/conf/sample_WebSphere5/WebSphere5Types.cf /opt%{provides}/bin/WebSphere5/monitor /opt%{provides}/bin/WebSphere5/WebSphere5.pm /opt%{provides}/bin/WebSphere5/WebSphere5.xml ------------------- i had problem for using multiple prefix and in relocations in my file list i had directory structure such as follows /etc/ashish/conf/sample_WebSphere5/main.cf /etc/ashish/conf/sample_WebSphere5/WebSphere5Types.cf /opt/ashish/bin/WebSphere5/monitor /opt/ashish/bin/WebSphere5/WebSphere5.pm /opt/ashish/bin/WebSphere5/WebSphere5.xml so i had the problem of multiple relocations i wanted to relocate /etc/ashish/* to /etc/gandhi/* and /opt/ashish/* to /opt/gandhi/*. with the rpm -install time i had problem in using multiple prefixes so with above solution it worked well i typed the commands as rpm -i --relocate /opt/ashish=/opt/gandhi --relocate /etc/ashish=/etc/gandhi <pkgname>.rpm it worked as wll as rpm -i <pkgname>.rpm worked thankx ashish gandhi