Re: How do I change the tmppath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or, perhaps better, in ~/.rpmmacros put this lines

%_topdir      %(echo $HOME)/rpmbuild
%_tmppath  %{_topdir}/tmp
%_buildroot  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%_rpmfilename  %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
#
# the latter it is creating all the rpm type(arch,noarch) under %{_topdir}/RPMS (e.g. the
default exansion of the rpm macros %{_rpmdir} : look at
rpm --eval '%{_rpmdir}' after you have done the above modificatiion on ~/.rpmmacros )


Then

mkdir -p  $HOME/rpmbuild/{SRPMS,RPMS,BUILD,SPECS,tmp}

hth
On Wed, Apr 16, 2008 at 11:25 PM, Panu Matilainen <pmatilai@xxxxxxxxxxxxxxx> wrote:
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 -

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux