FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > RPM Package Manager

 
 
LinkBack Thread Tools
 
Old 04-11-2008, 06:42 PM
Linux
 
Default How do I change the tmppath

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


Kyle


_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-16-2008, 09:25 PM
Panu Matilainen
 
Default How do I change the tmppath

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@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-17-2008, 05:34 AM
Valery Reznic
 
Default How do I change the tmppath

--- Panu Matilainen <pmatilai@laiskiainen.org> 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/
In my specfiles I use
Buildroot: %{_builddir}/%{_buildsubdir}-install-root
So it can be built in the multiuser environment
without
changing anyones ~/.rpmmacros

Valery.


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



__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-17-2008, 09:08 AM
devzero2000
 
Default How do I change the tmppath

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@laiskiainen.org> 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@redhat.com

https://www.redhat.com/mailman/listinfo/rpm-list



_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-17-2008, 04:12 PM
Michael Jennings
 
Default How do I change the tmppath

On Thursday, 17 April 2008, at 11:08:00 (+0200),
devzero2000 wrote:

> Or, perhaps better, in ~/.rpmmacros put this lines
>
> %_topdir %(echo $HOME)/rpmbuild
> %_tmppath %{_topdir}/tmp
> %_buildroot %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
^^^^^^^^^^^^^^^^

Do not use this. Despite its proliferation in Fedora, it is not
portable. It is also completely unnecessary in the above example
(since %{_tmppath} is already user- and build-specific) or in any
properly-written build tool.

Michael

--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <mej@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"Kyrie eleison down the road that I must travel. Kyrie eleison
through the darkness of the night. Kyrie eleison; where I'm going,
will you follow?" -- Mr. Mister, "Kyrie"

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-17-2008, 04:50 PM
devzero2000
 
Default How do I change the tmppath

Right

was a bad cut-and-paste,* in effect* in my .rpmmacros* the buildroot is prefixed by a #.

Sorry for the error.

Regards

On Thu, Apr 17, 2008 at 6:12 PM, Michael Jennings <mej@kainx.org> wrote:

On Thursday, 17 April 2008, at 11:08:00 (+0200),

devzero2000 wrote:



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

>

> %_topdir * * *%(echo $HOME)/rpmbuild

> %_tmppath *%{_topdir}/tmp

> %_buildroot *%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ^^^^^^^^^^^^^^^^



Do not use this. *Despite its proliferation in Fedora, it is not

portable. *It is also completely unnecessary in the above example

(since %{_tmppath} is already user- and build-specific) or in any

properly-written build tool.



Michael



--

Michael Jennings (a.k.a. KainX) *http://www.kainx.org/ *<mej@kainx.org>

Linux Server/Cluster Admin, LBL.gov * * * Author, Eterm (www.eterm.org)

-----------------------------------------------------------------------

*"Kyrie eleison down the road that I must travel. *Kyrie eleison

*through the darkness of the night. *Kyrie eleison; where I'm going,

*will you follow?" * * * * * * * * * * * * * * -- Mr. Mister, "Kyrie"



_______________________________________________

Rpm-list mailing list

Rpm-list@redhat.com

https://www.redhat.com/mailman/listinfo/rpm-list



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

Thread Tools




All times are GMT. The time now is 11:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org