Thank you for the response. I need to clarify something. I do NOT want to use a BuildRoot. I simply want to unset it. I tried putting this line in ~/.rpmmacros: %buildroot In that case, rpmbuild ignores it and uses the default. I also tried setting it to "" like this: %buildroot "" That also results in an error. I also tried setting the buildroot to a directory that is symlinked to "/". That causes strange failures in the %install step. I'm trying to figure out why. Is there an easy way to unset BuildRoot so I don't have to deal with this ? Like I mentioned in my earlier post, our whole process was working just fine until this change to RPM. We never used a BuildRoot since we install into a dedicated directory for our tools. -----Original Message----- From: rpm-list-bounces@xxxxxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxxxxx] On Behalf Of Panu Matilainen Sent: Friday, May 04, 2012 1:24 AM To: rpm-list@xxxxxxxxxxxxx Subject: Re: Overriding default BuildRoot On 05/03/2012 11:16 PM, Wempa, Kristofer wrote: > I have been using RPM to build thousands of packages for various SuSE > and RedHat Linux distributions. We recently acquired Red Hat 6 > servers and I noticed that the RPM on that server sets a "BuildRoot" > by default. I need to override this since we already have a > well-defined structure for our tool chains. Modifying all of the spec > files is not an option since the packages all install in various ways. > I tried re-defining the %{buildroot} and %{_buildrootdir} macros in my > local macros file, but it looks like RPM ignores this. > How can I unset the BuildRoot so that my builds will behave as they > have with other operating systems ? Thanks in advance. rpm >= 4.6 simply ignores any BuildRoot directive in specs and there's no way to make it honor it. Overriding %_buildrootdir (and %buildroot for that matter) does work as expected though, eg putting this to ~/.rpmmacros makes the buildroot go to /var/tmp: %_buildrootdir /var/tmp/ Moving it to a "better" place (eg to avoid having the buildroot end up over NFS, have a large/fast local scratch area reserved for the purpose or such) is fine, the default of ending up in ~/rpmbuild/ is the way it is to avoid having to deal with multiuser clashes in eg /var/tmp. Beyond that, the exact location of buildroot is an internal implementation detail which does not matter at all, that it ever was spec defineable was nothing but somebody's mistake a long, long time ago. - Panu - _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list