Setting the buildroot path via command line option --buildroot or rpmrc file does not work as expected. As far as I can see the entry in the rpmrc file is completely ignored. When using the --buildroot switch together with badly formatted directory names (/x//y/z/) the first characters from filenames found in the resulting rpm package are removed. (usr/bin/xx instead of /usr/bin/xx) This happens when directories are specified in the %files section. Fix: --- rpm-2.5.5/build.c Thu Sep 24 22:23:16 1998 +++ rpm-2.5.5_mod/build.c Tue Feb 2 15:59:45 1999 @@ -18,6 +18,7 @@ #include "build/build.h" #include "build/parse.h" #include "build/spec.h" +#include "build/misc.h" int build(char *arg, int buildAmount, char *passPhrase, char *buildRoot, int fromTarball, int test, char *cookie) { @@ -135,6 +136,11 @@ } s++; } + + if (!buildRoot) + buildRoot = rpmGetVar(RPMVAR_BUILDROOT); + if (buildRoot) + buildRoot = strdup(cleanFileName(buildRoot)); #define _anyarch(_f) \ (((_f)&(RPMBUILD_PACKAGESOURCE|RPMBUILD_PACKAGEBINARY)) == RPMBUILD_PACKAGESOURCE)
Fixed in rpm-3.0.4-0.16 (with apologies for the long delay).