
I've brought this up a dozen times. No one wants to rock the boat with regards to backwards compat, upgrading to a portage that changes the defautls and then downgrading again; problems with upgrades, rewriting tools, fixing screw ups.marcion wrote:New Elements:
/portage
/portage/distfiles - automatically downloaded files
/portage/fetch - manually downloaded files
/portage/tmp - portage working directory
/portage/tree - main portage tree
Deprecated Elements:
/usr/portage
/var/tmp/portage
Reasoning:
I was looking at Mac OS X and I noticed that instead of slavishly following the 15 year old 'Filesystem Hierarchy Standard' based on a 30 year old Unix, they have tweaked the layout to represent a 21st Century networked operating system.
I was also thinking about Gentoo, and I think we should be willing to consider having a filesystem layout that represents how Gentoo works rather than how System V once worked.
Here I am not actually arguing against the Filesystem Hierarchy Standard, only the Gentoo-specific extensions to it. The Gentoo default directories have been dumped onto the structure without enough due care and attention.
/usr is supposed to be for more static data such as program files. Therefore you can put the /usr directory on a partition or dedicated disk, safely away from frequently written parts of the disk such as /tmp or the swap partition.
So there is a contradiction within Gentoo's default filesystem as the portage tree, which changes quite a bit everytime that I sync, really wants to be away from my compiled programs.
Next problem is /var/tmp/portage. Ideally, at least on a production system, /tmp and /var/tmp should be isolated and restricted, such as using dedicated partitions with the noexec bit set. In normal use, it is very rare to envision a situation where you need 6GBs of space in /var/tmp. However, in Gentoo to some programs to compile you need a massive amount of space for /var/tmp (for the most extreme example, think OpenOffice).
In my opinion, the simpliest solution is to keep to the main portage specific directory within a new top-level directory called /portage
This simplification would allow partitioning to be more sensible, backups to be more focused and have a positive side effect of being easier for new users.
What do you think?

I was about to post the same observation so it's nice to see agreement from an authoritative (or at least, far more experienced) source. I vaguely recall that some of the variables (PORTDIR?) once carried moderately dire warnings in make.conf that it was unwise to change their values. Were the warnings due to bugs long since repaired, or merely a deterrent to meddling by careless/inexperienced hands?antarus wrote:I get the same answer every time:
"Those directories are already configurable, if you hate having stuff in /usr or whereever, just move it via the respective ENVVAR."
And I tend to agree actually. It matters not (to me anyway) where the default lives as long as I can change it.
That is a null point. Slavery was debated for a thousand years with the same conclusion, that slavery was ordained by God, before William Wilberforce came along.runningwithscissors wrote:This has been debated to death.
The Linux filesystem hierarchy is good, the Gentoo hack to it is not. I.e. the reasons for the Gentoo hacks are not 'good', but it is part of human psychology to justify failure. Windows has 90% market share for reasons (monopoly, illegal agreements with OEMs, first-mover advantage, etc) but not good ones. What are the reasons for putting the portage tree in /usr? Except for someone did it and we cannot be bothered to think about it now?runningwithscissors wrote:The filesystem hierarchy is the way it is for very good reasons.
You have contradicted yourself here, but I see what you mean. I am glad that you agree that the portage tree has no place in /usr.runningwithscissors wrote:I do however, think that the portage tree ought to be moved to /var/portage and distfiles to /var/portage/distfiles.
(Because you are smartantarus wrote:I've brought this up a dozen times.
This is Gentoo here, not RHEL. Gentoo is not really backwards compatible anyway, if you emerge world but do not etc-update then your system will die eventually, and the old versions are removed ('cleaned') from the tree very quickly.antarus wrote:No one wants to rock the boat with regards to backwards compat,

Good idea, there could be something like this but it would have to:Insanity5902 wrote:I don't see how upgrading would be hard at all, a simple script could copy the information over,
I agree 100%, anyone that says this is too hard does not realise how complicated some other Gentoo upgrades are.1clue wrote:This is not hard to implement given the existence of the portage-specific variables already mentioned. The next version of portage sets the variables explicitly to the old locations. Following that, the upgrades only set it if it has not already been set on this system. At that point, the directories on new systems go to the newer places, the old systems are not altered.

Maybe once or twice, but not a dozen times. And backwards compat isn't the biggest issue here IMO (should be mostly limited to cache regen), but invalidating a lot of information out there (think about how often people say "I don't have a /etc/portage", changing the $PORTDIR default would cause confusion on a similar scale). Well, that and people arguing what the new default should beantarus wrote: I've brought this up a dozen times. No one wants to rock the boat with regards to backwards compat, upgrading to a portage that changes the defautls and then downgrading again; problems with upgrades, rewriting tools, fixing screw ups.
By whom? Just curious.I get the same answer every time:
"Those directories are already configurable, if you hate having stuff in /usr or whereever, just move it via the respective ENVVAR."
Sometimes I think we should just remove the default completely and force everyone to set the locations themselvesAnd I tend to agree actually. It matters not (to me anyway) where the default lives as long as I can change it.
What about /media? That was added later and the world did not end. Anyway, the whole point is that, by definition, portage has no place in the FHS, and that /usr/portage is certainly against the plan.Genone wrote:@marcion: A new top level dir wouldn't be an option anyway (violates FHS)
...and 'the River Tiber foaming with much blood'?Conan wrote: irc support being overloaded for a few days, the forums being overloaded forever...
So in not so many words, /usr is meant for binaries, e.g. X, libraries, games and so on and so on./usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere. Large software packages must not use a direct subdirectory under the /usr hierarchy.
So /usr/src/linux taking on such as big role is a quirk, an exception, not a role model./usr/src ... Source code may be place placed in this subdirectory, only for reference purposes ... The only source code that should be placed in a specific location is the Linux kernel source code. It is located in /usr/src/linux
So according to the FHS, /var would be the more obvious place., a vast improvement over /usr/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.
Zac, Brian, SpanKY, and maybe solar? I don't have my IRC logs here.Genone wrote:Maybe once or twice, but not a dozen times. And backwards compat isn't the biggest issue here IMO (should be mostly limited to cache regen), but invalidating a lot of information out there (think about how often people say "I don't have a /etc/portage", changing the $PORTDIR default would cause confusion on a similar scale). Well, that and people arguing what the new default should beantarus wrote: I've brought this up a dozen times. No one wants to rock the boat with regards to backwards compat, upgrading to a portage that changes the defautls and then downgrading again; problems with upgrades, rewriting tools, fixing screw ups.![]()
Oh, and Infra might get quite upset (for causing massive mirror loads) if we'd just change the default without making sure that the old tree is copied over to the new location (which has its own set of issues).
By whom? Just curious.I get the same answer every time:
"Those directories are already configurable, if you hate having stuff in /usr or whereever, just move it via the respective ENVVAR."
Sometimes I think we should just remove the default completely and force everyone to set the locations themselvesAnd I tend to agree actually. It matters not (to me anyway) where the default lives as long as I can change it.But many people probably won't like that kind of education
@marcion: A new top level dir wouldn't be an option anyway (violates FHS), if we'd change things we'd move it most likely to somewhere in /var (technically it belongs in /var/cache, but that doesn't really fit IMO).
Code: Select all
Chapter 4. The /usr Hierarchy
Purpose
/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.

I doubt you will find many people who say that /usr is a good place to put the tree.marcion wrote:
I am glad that someone else can see that Gentoo's use of /usr is really odd.

Well, there is this wonderful invention of symlink on POSIX systems. So why not putting the tree on /var/portage and symlink to it from /usr in the next gentoo and portage release and remove to symlink in one or two years? That shouldnt hurt anybody ...antarus wrote:I doubt you will find many people who say that /usr is a good place to put the tree.marcion wrote:
I am glad that someone else can see that Gentoo's use of /usr is really odd.
I think you will find a lot (of developers) who just don't care enough.
It's a burden on us; we have to rewrite all our docs, any tools that are broken (due to relying on /usr/portage being hardcoded) and re-educate everyone on where the default path is; I don't think you will find many devs who think it's worth it.
If you hate it and want FHS conformance; change the location yourself.
yes indeed.bmichaelsen wrote: [smart stuff]