% rpm --dbpath /tmp/rpm -i --relocate /usr=/tmp/ocaml /tmp/ocaml-3.04-7.rh7.2.i386.rpm --nodeps error: unpacking of archive failed on file /usr/bin/camlp4;3d9cefe2: cpio: open failed - Permission denied % rpm -qip /tmp/ocaml-3.04-7.rh7.2.i386.rpm Name : ocaml Relocations: /usr [...] % rpm -q rpm rpm-4.1-1.06 The exact same RPM installs fine with exact same command line on 7.2 using rpm-4.0.4-7x
With rpm-4.1, the command: rpm -i --relocate $OLDPATH=$NEWPATH --badreloc somepackage.rpm gives no error messages, but the relocation is ignored. The package is instaled in $OLDPATH ! With rpm-4.0, the same command works fine.
I have also run into this problem with rpm 4.1-1.06 on RedHat 8.0. Not only does it not relocate the package it never sets the RPM_INSTALL_PREFIXn environment values. This causes there use in the post script to fail. This did not happen in previous versions of rpm.
I also see the problem where $RPM_INSTALL_PREFIX is not being set during %post and %postun script processing. This is a major problem with installing rpm's with scripts. Should the Priority be bumped up on this one?
*** Bug 75550 has been marked as a duplicate of this bug. ***
*** Bug 78898 has been marked as a duplicate of this bug. ***
*** Bug 79331 has been marked as a duplicate of this bug. ***
Fixed in rpm-4.2-0.42. Be forewarned: rpm is switching to using posix mutexes from nptl at the moment, and I'm not at all sure whether the Raw Hide version will run on Red Hat 8.0.