Current rpm 3.0.4 does not work when specifying --root option. It adds it twice to the path and screws up all filenames. The following patch fixes the problem: With the patch below everything is OK because spec->buildRootURL already has spec->rootURL in the beginning. Vladislav --- /tmp/rpm-3.0.4/build/files.c Tue Feb 22 06:14:59 2000 +++ rpm-3.0.4/build/files.c Thu May 18 09:45:55 2000 @@ -1175,7 +1175,7 @@ /* Init the file list structure */ /* XXX spec->buildRootURL == NULL, then xstrdup("") is returned */ - fl.buildRootURL = rpmGenPath(spec->rootURL, spec->buildRootURL, NULL); + fl.buildRootURL = rpmGenPath(NULL, spec->buildRootURL, NULL); if (headerGetEntry(pkg->header, RPMTAG_DEFAULTPREFIX, NULL, (void **)&fl.prefix, NULL)) {
The semantics of --root on the build side of rpm are still under development. The intent is to permit a URL (and possible path) to be prepended to a buildroot, and to perform a remote chroot on the path specified in the --root URL. Hence the apparently double copy, which your patch undoes, but breaks other things.
Still under development, deferred yet again.
I'm including this problem with other --root problems. *** This bug has been marked as a duplicate of 19382 ***