From 83b720b0b5ef9158a79f052dbf8f5cf21a811bec Mon Sep 17 00:00:00 2001 From: Archaic Date: Mon, 8 May 2006 06:52:28 +0000 Subject: [PATCH] Made the directory tree creation more concise and removed the extraneous /opt/* hierarchy (it is not required by FHS). Closes ticket #1656. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7593 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 11 ++++++++ chapter06/creatingdirs.xml | 57 +++++++++++++++++--------------------- general.ent | 4 +-- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index b91d92cfb..2a198ada5 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -36,6 +36,17 @@ --> + + May 8, 2006 + + + [archaic] - Made the directory tree creation more concise and + removed the extraneous /opt/* hierarchy (it is not required by + FHS). Closes ticket #1656. + + + + May 7, 2006 diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml index 4e602b356..20e0e6f1d 100644 --- a/chapter06/creatingdirs.xml +++ b/chapter06/creatingdirs.xml @@ -13,25 +13,19 @@ It is time to create some structure in the LFS file system. Create a standard directory tree by issuing the following commands: -install -dv /{bin,boot,etc/opt,home,lib,mnt} -install -dv /{sbin,srv,usr/local,var,opt} -install -dv /root -m 0750 -install -dv /tmp /var/tmp -m 1777 -install -dv /media/{floppy,cdrom} -install -dv /usr/{bin,include,lib,sbin,share,src} -ln -sv share/{man,doc,info} /usr -install -dv /usr/share/{doc,info,locale,man} -install -dv /usr/share/{misc,terminfo,zoneinfo} -install -dv /usr/share/man/man{1..8} -install -dv /usr/local/{bin,etc,include,lib,sbin,share,src} -ln -sv share/{man,doc,info} /usr/local -install -dv /usr/local/share/{doc,info,locale,man} -install -dv /usr/local/share/{misc,terminfo,zoneinfo} -install -dv /usr/local/share/man/man{1,2,3,4,5,6,7,8} -install -dv /var/{lock,log,mail,run,spool} -install -dv /var/{opt,cache,lib/{misc,locate},local} -install -dv /opt/{bin,doc,include,info} -install -dv /opt/{lib,man/man{1,2,3,4,5,6,7,8}} +mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt} +mkdir -pv /{media/{floppy,cdrom},sbin,srv,var} +install -dv -m 0750 /root +install -dv -m 1777 /tmp /var/tmp +mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} +mkdir -pv /usr/{,local/}share/{doc,info,locale,man} +mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo} +mkdir -pv /usr/{,local/}share/man/man{1..8} +for dir in /usr /usr/local; do + ln -sv share/{man,doc,info} $dir +done +mkdir -v /var/{lock,log,mail,run,spool} +mkdir -pv /var/{opt,cache,lib/{misc,locate},local} Directories are, by default, created with permission mode 755, but this is not desirable for all directories. In the commands above, two @@ -48,21 +42,22 @@ install -dv /opt/{lib,man/man{1,2,3,4,5,6,7,8}} another user's files from them. The latter is prohibited by the so-called sticky bit, the highest bit (1) in the 1777 bit mask. - - Notice the two different constructions above for creating multiple - man directories: install -d /usr/share/man/man{1..8} and - install -d /usr/local/share/man/man{1,2,3,4,5,6,7,8}. The - first one is new since Bash 3.0. This new feature will help make repetitive - commands easier to type. - - FHS Compliance Note - The directory tree is based on the Filesystem Hierarchy Standard - (FHS) (available at ). In - addition to the tree created above, this standard stipulates the existence - of /usr/local/games and The directory tree is based on the Filesystem Hierarchy Standard (FHS) + (available at ). In addition to + the FHS, we create compatibility symlinks for the man, doc, and info directories since many packages still try + to install their documentation into /usr/<directory> or /usr/local/<directory> as opposed to + /usr/share/<directory> or + /usr/local/share/<directory>. + The FHS also stipulates the existence of /usr/local/games and /usr/share/games. The FHS is not precise as to the structure of the /usr/local/share subdirectory, so we create only the directories that are needed. However, diff --git a/general.ent b/general.ent index 921602a43..5b8e8dbcd 100644 --- a/general.ent +++ b/general.ent @@ -1,6 +1,6 @@ - - + +