Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1026 - rpm: Setting buildroot via rpmrc and --buildroot does not work
Summary: rpm: Setting buildroot via rpmrc and --buildroot does not work
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-02-02 15:54 UTC by moh
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-12-16 19:29:28 UTC

Attachments (Terms of Use)

Description moh 1999-02-02 15:54:12 UTC
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


--- 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 @@
+    if (!buildRoot)
+       buildRoot = rpmGetVar(RPMVAR_BUILDROOT);
+    if (buildRoot)
+       buildRoot = strdup(cleanFileName(buildRoot));

 #define        _anyarch(_f)    \

Comment 1 Jeff Johnson 1999-12-16 19:29:59 UTC
Fixed in rpm-3.0.4-0.16 (with apologies for the long delay).

Note You need to log in before you can comment on or make changes to this bug.