PURPOSE: standardize ebuild installs in all of Gentoo. FHS is preferred most of the time, but it is by no means the law. GOALS: / - stay small /var - all variable data /etc - all configuration files /opt - all binary-only packages /usr - mount it read only (and that's ok!) /{bin,sbin,lib}/ - only things that are required for booting/basic recovery may be installed here - static libraries may never be installed here /etc/ - all configuration related files should be placed here - if a package utilizes more than one config file it may use a subdirectory /boot/ - only files required for basic booting of the system may be installed here - good rule: if the file is not used until after init starts, it probably shouldnt be installed here /tmp/ /mnt/ /root/ /home/ /usr/local/ /var/local/ /dev/ - no ebuild may ever install files in these locations (baselayout does not count, stop asking) - for /tmp/ and /dev/, packages cannot rely on files being preserved across reboots (see /var/tmp/) /opt/ - tree for binary-only packages since binary-only packages are not allowed in /usr/ - packages install into subdirectories of /opt/ /opt/bin/ - packages that contain single executable files may install them here - wrapper scripts for binary only packages go here /usr/ - nothing may install into this directory, everything goes into subdirectories - exceptions: X, KDE, QT, toolchain, portage (cant we move KDE/QT ?) (move portage to /var/ somewhere ?) /usr/share/{man,info}/ - all man/info pages must be located in these directories /usr/share/doc/ - packages should install into a subdirectory named after the ebuild (${PF}) - if a package installs into this directory but not into ${PF}, the ebuild should move the files - compression is not required but uncompressed files are highly discouraged /usr/{man,info,doc}/ - these symlinks exist for backwards support; ebuilds must install into the /usr/share/ equivalent above /usr/{bin,sbin,lib}/ - ... /usr/lib/misc/ - often times used to store executables that packages use but the user themselves will never directly invoke /usr/libexec/ - do not use this directory; use /usr/lib/misc/ instead /usr/games/{bin,lib}/ - keep all games here possible future work: /usr/games/lib/ -> /usr/lib/games/ /usr/games/bin/ -> /usr/games/ /var/ - nothing may install into this directory, everything goes into subdirectories - exceptions: qmail, cvsup (cant we move cvsup ?) /var/cache/ - cache data for applications - all data stored here can be expired at any time, applications have to be able to cache it again in that case /var/games/ - variable state data for games /var/lib/ - variable state info - state will be maintained across program restarts and reboots - if a package generates more than one file, or if the permissions need to get locked down, use a subdirectory /var/lib/misc/ - if a package generates just one file, store it here /var/lock/ - lock files /var/log/ - log files only - if a package generates more than one file, use a subdir /var/opt/ - variable data for packages in /opt/ /var/run/ - data that describes the system since it was booted - directory will be cleaned between reboots /var/tmp/ - storage location for temporary files that will be preserved across reboots - cleaning intervals is site-specific