Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PORTAGE_TMPDIR = /tmp: controindicazioni?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
pingoo
Guru
Guru


Joined: 11 Jul 2006
Posts: 324

PostPosted: Sun Mar 04, 2012 9:00 am    Post subject: PORTAGE_TMPDIR = /tmp: controindicazioni? Reply with quote

Ciao,
mi accingo ad installare gentoo su un portatile nuovo. Pensavo di creare partizioni dedicate per /boot, /home, /root e /tmp. In particolare per tmp pensavo ad un ext4 senza journal e di utilizzarla anche come eventuale directory di compilazione quando non dovessi compilare in ram. A tal proposito non penso di compilare libreoffice o pacchetti altrettanto "invadenti", nel mio vecchio sistema usavo /var che era su partizione dedicata di 2.5 GB.
Pensate ci possa essere qualche controindicazione, ad es. di sicurezza, visti i diritti/l'uso di /tmp? Altre considerazioni?
Back to top
View user's profile Send private message
ago
Developer
Developer


Joined: 01 Mar 2008
Posts: 1527
Location: Milan, Italy

PostPosted: Sun Mar 04, 2012 10:22 am    Post subject: Reply with quote

Io monto /tmp in ram e ho spostato PORTAGE_TMPDIR in /tmp, tutto ok
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Sun Mar 04, 2012 1:46 pm    Post subject: Reply with quote

ls -ld /tmp wrote:
drwxrwxrwt 8 root root 114 4 mar 03.10 /tmp
ls -ld /var/tmp wrote:
drwxrwxrwt 15 root root 4096 19 feb 17.30 /var/tmp
:roll:
    non è consigliato o proposto apertamente come alternativa perchè:
  • il wipe al boot azzera /tmp, se hai lanciato un
    Code:
    emerge xxx ; shutdown -h now
    o qualcosa del genere o se qualcosa ha causato un crash non sai cosa ti è successo;
  • sui sistemi "hard" (in senso lato: grsec, selinux, rsbac, tomyo etc.), nelle impostazioni più paranoidi, c'è una differenza nei permessi;
  • il wipe potrebbe operare anche al cambio di runlevel.
Non è una pratica desueta fondere /tmp e /var/tmp se sai quel che stai facendo.
Tenendo conto di quanto sopra non vedo dove sia il problema.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
pingoo
Guru
Guru


Joined: 11 Jul 2006
Posts: 324

PostPosted: Sun Mar 04, 2012 2:50 pm    Post subject: Reply with quote

Ok, allora valuto seriamente la cosa, l'unico difetto della soluzione mi pareva nello spazio da dare a /tmp per i pacchetti un po' più corposi, ma in realtà potrei cambiare la PORTAGE_TMPDIR in questi casi eccezionali.
Ammetto che nella mia magna ignoranza, e non avendo al momento gentoo dato che la macchina vecchia m'ha abbandonato, pensavo che /var/tmp avesse dei permessi diversi. Poi avevo la sensazione che /tmp con quei permessi non fosse il posto più indicato. Un esempio, sicuramente non possibile, che m'era venuto in mente è che compilando un programma qualcuno potesse sostituire in /tmp l'eseguibile prodotto con un altro prima dell''installazione.

Vediamo di cominciare con l'installazione va, grazie
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Mar 05, 2012 11:37 am    Post subject: Reply with quote

Guarda che ho detto il contrario. I casi eccezionali te li ho riportati (nel caso in fase di installazione previeni il wipe di tmp asl boot)..
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Mon Mar 05, 2012 2:28 pm    Post subject: Reply with quote

Se hai tanta ram (almeno 4gb) puoi mettere una riga del genere in fstab:
Code:
portagetmp   /var/tmp_portage/   tmpfs   mode=1775,size=1500m

creare ad hoc una directory /var/tmp_portage ed impostare PORTAGE_TMPDIR="/var/tmp_portage"

In questo modo fai tutto in tmpfs e salvi spazio e tempo. Se installi openoffice dai sorgenti devi avere MOOLTO più spazio, per il resto vai tranquillo.
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
pingoo
Guru
Guru


Joined: 11 Jul 2006
Posts: 324

PostPosted: Mon Mar 05, 2012 9:25 pm    Post subject: Reply with quote

@cazzantonio: ottimo grazie, in effetti al momento ho i 4GB "standard". Una volta installata gentoo valuterò anche quanto hai accennato nell'altra discussione riguardo a /tmp che non c'avevo pensato
Back to top
View user's profile Send private message
Realnot
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2007
Posts: 120
Location: Ferrara

PostPosted: Mon Mar 05, 2012 10:24 pm    Post subject: Reply with quote

Sono interessato a questa discussione. djinnZ ha elencato alcuni problemi che potrebbero sorgere in casi particoli di configurazioni. Possiamo parlare anche dei benefici?
_________________
I'm not stupid, only mentally free...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum