Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] is multi-core really worth it?
Date: Wed, 06 Dec 2017 15:40:33
Message-Id: a98b6467-c692-86ab-4759-d40cb04b21b4@gmail.com
In Reply to: Re: [gentoo-user] is multi-core really worth it? by Wols Lists
1 On 06/12/2017 15:29, Wols Lists wrote:
2 > On 05/12/17 21:56, Neil Bothwick wrote:
3 >> On Tue, 05 Dec 2017 10:09:56 +0000, Peter Humphrey wrote:
4 >>
5 >>> $ grep tmpfs /etc/fstab
6 >>> tmpfs /var/tmp/portage tmpfs
7 >>> noatime,uid=portage,gid=portage,mode=0775 0 0
8 >>> tmpfs /tmp tmpfs
9 >>> noatime,nosuid,nodev,noexec,mode=1777 0 0
10 >>
11 >> Or you could set PORTAGE_TMPDIR to /tmp to save the second mount.
12 >>
13 > Dunno why portage puts this stuff in /var/tmp, rather than /tmp, but do
14 > be aware of what the standard says ...
15 >
16 > Stuff in /tmp should be cleared at shutdown/boot.
17 >
18 > Stuff in /var/tmp should survive a shutdown/boot.
19 >
20 > Of course, if, like me you've put /var/tmp/portage as tmpfs, then of
21 > course it won't survive a reboot, contrary to spec ... :-)
22
23 Those guidelines you mention about what /tmp and /var/tmp are "for" are
24 probably from the FHS. On the whole, I tend to agree they are good ideas
25 but the proper wording is more like this (from memory, being far too
26 lazy after a day's work to actually look something up):
27
28 - contents of /tmp are not expected to survive the invocation of the
29 program that created them
30 - contents of /var/tmp are not expected to survive a reboot
31
32 Which is different from what you said. Not surprisingly, if you follow
33 that through, you can run rm -rf /tmp/* in a cron every minute and
34 nothing should ever break. Or, every file in /tmp can be anonymous (just
35 an inode without a dentry giving it a name)
36
37 The thing about standards, is that there are so many to choose from. And
38 the FHS has never been a standard that anyone paid much attention to.
39 It's also not a spec, it's a great example of a failed standard that few
40 if any distros ever bothered following.
41
42 Gentoo in particular never bothered following FHS explicitly; any
43 overlap is mostly accidental. And that is OK as Gentoo devs are
44 permitted to do whatever they feel like doing. Doubly so if they can
45 defend their decisions on technical merit.
46
47 On the whole, /var/tmp is a better place to put build files than /tmp
48 just in case someone does take FHS seriously - build files are
49 necessarily needed after the completion of the program that created them.
50
51 And just to round off a mostly pointless discussion with little real
52 merit, the really stupid thing about portage is why oh why are ports and
53 distfiles in /usr?
54
55 I'll tell you why, it's because that's where FreeBSD puts them, and
56 drobbins built Gentoo back in the day heavily borrowing from his
57 pleasant FreeBSD experience (he went there for 6 months recovering from
58 his departure from another distro, the one with the "toxic
59 personality"). And no-one ever bothered changing that initial decision -
60 a classic case of cargo cult
61
62
63 --
64 Alan McKinnon
65 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] is multi-core really worth it? Wols Lists <antlists@××××××××××××.uk>
Re: [gentoo-user] is multi-core really worth it? Wols Lists <antlists@××××××××××××.uk>
Re: [gentoo-user] is multi-core really worth it? Kai Peter <kp@×××××××××××××××.org>