Re: How do I change the tmppath
Panu Matilainen <[email protected]> Thu, 17 Apr 2008 00:25:52 +0300 (EEST)
| Newsgroups | gmane.linux.redhat.rpm.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 11 Apr 2008, Linux wrote:
> How do I change the tmp path that RPM uses? I am trying to build the RPM
> in my local user account but bases it off of root ('/'). With my own
> macros, I change the tmp path, during the build process, I can echo the
> tmp path and see that I changed it but it always adds '/' in the front.
> For example, if I set the path to ./my_temp, it becomes /./my_temp.
>
> One reason for the change, is I did a build and it put it in /tmp (not
> ./tmp). Well it failed and left the structure in /tmp/package-1.0.3. A
> co-worker started a build on the same computer but was prevented from
> doing the build since I owned /tmp/package-1.0.3. He had to wait until I
> deleted the directory tree in /tmp
Yup, the commonly used "BuildRoot: %{_tmppath}/%{name}-%{version}"
and variants dont work very well in multiuser environment.
Just put something like this into ~/.rpmmacros to make your builds
private:
%_tmppath %(echo $HOME)/tmp/
- Panu -