Bug 255017 - /usr/local/shared should be /usr/local/share in the handbook
Summary: /usr/local/shared should be /usr/local/share in the handbook
Status: In Progress
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
Keywords: easy, needs-patch
Depends on:
Reported: 2021-04-12 20:12 UTC by Jens Schweikhardt
Modified: 2021-04-23 17:34 UTC (History)
2 users (show)

See Also:

Changes /usr/local/shared/ to /usr/local/share/ (162.62 KB, patch)
2021-04-13 14:20 UTC, Jens Schweikhardt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Schweikhardt 2021-04-12 20:12:53 UTC
I checked out the handbook today via git, changed to doc/documentation/content/en and performed a recursive fgrep for "/usr/local/shared".
This directory does not exist and is not created by ports; it's a typo.

    find . -type f -print0|xargs -0 fgrep /usr/local/shared/

Most (maybe all) of the following are also in the other languages. I believe a mechanical replacement with "/usr/local/share/" is the way to fix it.

./articles/fonts/_index.adoc:% mkdir -p /usr/local/shared/fonts/type1
./articles/fonts/_index.adoc:% cd /usr/local/shared/fonts/type1
./articles/fonts/_index.adoc:% ln -s /usr/local/shared/fonts/type1/showboat.pfb .
./articles/fonts/_index.adoc:% cd /usr/local/shared/ghostscript/fonts
./articles/fonts/_index.adoc:% ln -s /usr/local/shared/fonts/type1/showboat.pfb .
./articles/fonts/_index.adoc:% cd /usr/local/shared/ghostscript/4.01
./articles/fonts/_index.adoc:Loading Times-Roman font from /usr/local/shared/ghostscript/fonts/tir_____.pfb...
./articles/fonts/_index.adoc:Loading Showboat font from /usr/local/shared/ghostscript/fonts/showboat.pfb...
./articles/fonts/_index.adoc:% cat /usr/local/shared/fonts/type1/showboat.afm |
./articles/fonts/_index.adoc:% pfbtops /usr/local/shared/fonts/type1/showboat.pfb >showboat.pfa
./articles/fonts/_index.adoc:You also may want to have these installed to [.filename]#/usr/local/shared/groff_font/devps#(?).
./books/developers-handbook/tools/_index.adoc:and install them by copying them into the Emacs site Lisp directory. On FreeBSD, this is [.filename]#/usr/local/shared/emacs/site-lisp#.
./books/developers-handbook/tools/_index.adoc:# cp /usr/ports/lang/whizbang/work/misc/whizbang.el /usr/local/shared/emacs/site-lisp
./books/developers-handbook/l10n/_index.adoc:Using the catalog files is simple. To use the related functions, [.filename]#nl_types.h# must be included. Before using a catalog, it has to be opened with man:catopen[3]. The function takes two arguments. The first parameter is the name of the installed and compiled catalog. Usually, the name of the program is used, such as grep. This name will be used when looking for the compiled catalog file. The man:catopen[3] call looks for this file in [.filename]#/usr/shared/nls/locale/catname# and in [.filename]#/usr/local/shared/nls/locale/catname#, where `locale` is the locale set and `catname` is the catalog name being discussed. The second parameter is a constant, which can have two values:
./books/fdp-primer/editor-config/_index.adoc:  typeId id="DocBook" uri="/usr/local/shared/xml/docbook/5.0/rng/docbook.rnc"
./books/fdp-primer/editor-config/_index.adoc:% cp /usr/local/shared/nano/xml.nanorc ~/.nanorc
./books/handbook/dtrace/_index.adoc:# cd /usr/local/shared/dtrace-toolkit
./books/handbook/virtualization/_index.adoc:HAL users should create the following [.filename]#/usr/local/etc/hal/fdi/policy/90-vboxguest.fdi# or copy it from [.filename]#/usr/local/shared/hal/fdi/policy/10osvendor/90-vboxguest.fdi#:
./books/handbook/virtualization/_index.adoc:-l bootrom,/usr/local/shared/uefi-firmware/BHYVE_UEFI.fd \
./books/handbook/virtualization/_index.adoc:-l bootrom,/usr/local/shared/uefi-firmware/BHYVE_UEFI_CSM.fd \
./books/handbook/virtualization/_index.adoc:-l bootrom,/usr/local/shared/uefi-firmware/BHYVE_UEFI.fd \
./books/handbook/virtualization/_index.adoc:libxl: debug: libxl_dom.c:988:libxl__load_hvm_firmware_module: Loading BIOS: /usr/local/shared/seabios/bios.bin
./books/handbook/ports/_index.adoc:* Applications which provide documentation will install it into [.filename]#/usr/local/shared/doc# and many applications also install manual pages. This documentation should be consulted before continuing.
./books/handbook/x11/_index.adoc:FontPath "/usr/local/shared/fonts/urwfonts/"
./books/handbook/x11/_index.adoc:% xset fp+ /usr/local/shared/fonts/urwfonts
./books/handbook/x11/_index.adoc:Now make a directory for the TrueType(R) fonts (for example, [.filename]#/usr/local/shared/fonts/TrueType#) and copy all of the TrueType(R) fonts into this directory. Keep in mind that TrueType(R) fonts cannot be directly taken from an Apple(R) Mac(R); they must be in UNIX(R)/MS-DOS(R)/Windows(R) format for use by Xorg. Once the files have been copied into this directory, use mkfontscale to create a [.filename]#fonts.dir#, so that the X font renderer knows that these new files have been installed. `mkfontscale` can be installed as a package:
./books/handbook/x11/_index.adoc:# cd /usr/local/shared/fonts/TrueType
./books/handbook/x11/_index.adoc:% xset fp+ /usr/local/shared/fonts/TrueType
./books/handbook/x11/_index.adoc:All fonts in Xorg that are found in [.filename]#/usr/local/shared/fonts/# and [.filename]#~/.fonts/# are automatically made available for anti-aliasing to Xft-aware applications. Most recent applications are Xft-aware, including KDE, GNOME, and Firefox.
./books/handbook/x11/_index.adoc:As previously stated, all fonts in [.filename]#/usr/local/shared/fonts/# as well as [.filename]#~/.fonts/# are already made available to Xft-aware applications. To add another directory outside of these two directory trees, add a line like this to [.filename]#/usr/local/etc/fonts/local.conf#:
./books/handbook/x11/_index.adoc:[.filename]#/usr/local/shared/X11/xkb/rules/base.lst# lists the various keyboard, layouts and options available.
./books/handbook/introduction/_index.adoc:All supported FreeBSD versions provide an option in the installer to install additional documentation under [.filename]#/usr/local/shared/doc/freebsd# during the initial system setup. Documentation may also be installed at any later time using packages as described in crossref:cutting-edge[doc-ports-install-package,“Updating Documentation from Ports”]. You may view the locally installed manuals with any HTML capable browser using the following URLs:
./books/handbook/multimedia/_index.adoc:# mysql -uroot -p < /usr/local/shared/mythtv/database/mc.sql
Comment 1 Daniel Ebdrup Jensen freebsd_committer 2021-04-13 13:24:29 UTC
Let's mark this as something that most people can get their feet wet with, if they want to contribute their first patch.

Careful use of a regular expression should be enough, and I'm sure it won't be a problem getting it commited if it passes muster. :)
Comment 2 Jens Schweikhardt 2021-04-13 14:20:06 UTC
Created attachment 224082 [details]
Changes /usr/local/shared/ to /usr/local/share/

Here's the "git diff" after
find . -type f -print0|xargs -0 sed -i "" -e s,/usr/local/shared/,/usr/local/share/,g
Comment 3 Fernando Apesteguía freebsd_committer 2021-04-23 17:34:32 UTC
There are also instances of /usr/shared