Opened 19 years ago
Closed 19 years ago
#1656 closed enhancement (fixed)
Redundancy in Chapter 6 "Creating Directories"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | lowest | Milestone: | 6.2 |
Component: | Book | Version: | SVN |
Severity: | trivial | Keywords: | |
Cc: |
Description (last modified by )
From Randy McMurphy:
Not sure if this is intentional or not, but if it isn't then perhaps y'all may want to do something about it.
There is some redundancy in the Chapter 6 "Creating Directories" section. The following lines could be changed as follows:
install -dv /{sbin,srv,usr/local,var,opt} to install -dv /{sbin,srv} (in fact, the sbin and srv dirs could simply be placed on the previous line)
install -dv /usr/share/{doc,info,locale,man} to install -dv /usr/share/{doc,info,locale}
install -dv /usr/local/{bin,etc,include,lib,sbin,share,src} to install -dv /usr/local/{bin,etc,include,lib,sbin,src}
install -dv /usr/local/share/{doc,info,locale,man} to install -dv /usr/local/share/{doc,info,locale}
Attachments (1)
Change History (16)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 6.2 |
Severity: | normal → trivial |
comment:3 by , 19 years ago
Somewhat related to this is the purpose of that section. There are several directories created in chapters 6 & 8, which may be better placed in creatingdirs.xml:
chapter06/grub.xml: mkdir -v /boot/grub
chapter06/linux-libc-headers.xml: install -d /usr/include/asm
chapter06/shadow.xml: mkdir -v /etc/default
chapter06/util-linux.xml: mkdir -p /var/lib/hwclock
chapter08/grub.xml: mkdir -v /etc/grub
comment:4 by , 19 years ago
Those dirs aren't created until the package installations because they're not needed until then. The list of dirs in the "Creating Directories" section is (or should be) the dirs that are likely to be needed by *most* packages.
I do have a few comments on that page too...
I think the "FHS Compliance Notes" at the bottom could have an addition. Mention that the /usr/{doc,info,man} -> /usr/share symlinks are technically not FHS-compliant but exist because a lot of packages install man and info pages to /usr/{man,info} rather than /usr/share. We could remove them entirely, but it would be a bit of extra work (I have already checked all the LFS packages and have a list of what options to add to force all of them to install docs in /usr/share, but the same would have to be done with every package in BLFS). /usr/doc could probably be removed easily though since I don't remember seeing *any* packages in LFS that try to install anything there.
comment:5 by , 19 years ago
Perhaps /usr/local could also be removed from this section, and add a link to the BLFS "/usr vs. /usr/local" page to the "FHS Compliance Notes". I know I never use /usr/local myself...
comment:6 by , 19 years ago
Owner: | changed from | to
---|
Here's what I've got, having read through the FHS:
install -dv /{bin,boot,dev,etc/opt,home,lib,media/{cdrom,floppy},mnt} install -dv /{opt,sbin,srv} install -dv /root -m0750 install -dv /tmp /var/tmp -m 1777 install -dv /var/{cache,lib/misc,local,lock,log,opt,run,spool} install -dv /usr/{bin,include,lib,sbin} install -dv /usr/local/{bin,etc,games,include,lib,sbin,src} install -dv /usr/local/share/{doc,info,locale,man/man{1..8},misc,terminfo,zoneinfo} ln -sv /usr/local/share/man /usr/local install -dv /usr/share/{doc,info,locale,man/man{1..8},misc,terminfo,zoneinfo} install -dv /var/{cache,lib/misc,local,lock,log,opt,run,spool,tmp}
Chris, if you could pass on information regarding what packages need additional flags passed to them to get their man-pages in FHS-standard locations, I'd be greatful. If folks could also review the above commands against their interpretation of the FHS to see if I've missed anything I'd appreciate it.
comment:7 by , 19 years ago
Uggh, nasty WikiFormatting broke the layout, sorry :-( Here's a more sane list of commands:
install -dv /{bin,boot,dev,etc/opt,home,lib,media/{cdrom,floppy},mnt}
install -dv /{opt,sbin,srv}
install -dv /root -m0750
install -dv /tmp /var/tmp -m 1777
install -dv /var/{cache,lib/misc,local,lock,log,opt,run,spool}
install -dv /usr/{bin,include,lib,sbin}
install -dv /usr/local/{bin,etc,games,include,lib,sbin,src}
install -dv /usr/local/share/{doc,info,locale,man/man{1..8},misc,terminfo,zoneinfo}
ln -sv /usr/local/share/man /usr/local
install -dv /usr/share/{doc,info,locale,man/man{1..8},misc,terminfo,zoneinfo}
install -dv /var/{cache,lib/misc,local,lock,log,opt,run,spool,tmp}
comment:8 by , 19 years ago
Here's the list of additional configure switches needed for each package - http://linuxfromscratch.org/~chris/manpaths.txt - whenever it says that a package needs "both" it refers to both --infodir and --mandir switches.
comment:9 by , 19 years ago
Here is another way to look at the install commands. Note that "install" doesn't need to be passed on every command, though backslashes would be required:
install -v -d \
/{bin,boot,dev,etc/opt,home,lib,mnt,sbin,srv} \ /media/{floppy,cdrom} /usr/local/etc \ /usr/{,local/}{bin,include,lib,sbin,src} \ /usr/{,local/}share/{doc,info,locale,misc,terminfo,zoneinfo} \ /usr/{,local/}share/man/man{1..8} \ /var/{lock,log,mail,run,spool} \ /var/{opt,cache,lib/{misc,locate},local} \ /opt/{bin,doc,include,info} \ /opt/{lib,man/man{1,2,3,4,5,6,7,8}}
ln -sv share/{man,doc,info} /usr ln -sv share/{man,doc,info} /usr/local install -dv /root -m 0750 install -dv /tmp /var/tmp -m 1777
by , 19 years ago
Attachment: | doclocations.patch added |
---|
patch to update packages with options to place all documentation into /usr/share
comment:10 by , 19 years ago
Type: | defect → enhancement |
---|
comment:11 by , 19 years ago
Here was my proposal that removes unrequired/unused stuff in the /opt heirarchy (/opt is still created, just not the full heirarchy) and implements various constructs for educational purposes: http://linuxfromscratch.org/pipermail/lfs-dev/2006-April/056816.html
So far we have one guy who doesn't think mkdir is a valid command, 2 guys who disagree with him, and unanimous agreement from the 2 who responded to the part about removing the unneeded dirs inside /opt.
comment:12 by , 19 years ago
Owner: | changed from | to
---|
comment:13 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:14 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
Archaic has the fix to drop in.
You probably could remove all references to "/usr/local" entirely and simply replace every instance of "/usr" with "/usr{/local}". But then I know that a certain part of the LFS book is education and making it clear how things are done, which may not always necessarily be the best technical way to get things done.