From owner-freebsd-questions@freebsd.org Sun Jan 24 15:30:13 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72F284FF48F for ; Sun, 24 Jan 2021 15:30:13 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DNxl82rPKz3R2v for ; Sun, 24 Jan 2021 15:30:11 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.5.94.3]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1Mzhf5-1lyXBr1ujJ-00vhbS for ; Sun, 24 Jan 2021 16:30:10 +0100 Date: Sun, 24 Jan 2021 16:30:10 +0100 From: Polytropon To: freebsd-questions@freebsd.org Subject: Re: Files in /usr/share/misc Message-Id: <20210124163010.4a8d45d1.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:hrGHKZyJemwJwq4hjWleA6Tq/1xFvtM9bMNy4XAc/v6P6eGg7Ik f4g11KWP5mSocFje4sv/QkyB/hahbTKOk588O76Klz9VBICnyd+Afzadur+AHuSfgAETMHa 1CeTtY6RD5QwhjQeC1lkkcfZdkMNB4ayWHxK/iNQPnXvzy5YuTXW03PM9nejJEER0Dk1ODO ElKBIHTyGFVW/kgIcNjGQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:q1W2HHH2qIs=:QXPaV6xTZ/Z90QavboVTyo PTG7+daOKxSqSD40BRhRwgms5flKRKemB9xwu5gV59dq89ANVPELz5b3QRudNEXtLvNW6XxEw qDqbQbpbwlElseDPA3xlaUwEBY5uW+E273M8k7DsRbOUXfvKvl9Kjo552WmQouGRgRTVwVH0r EEcj9WtKugCwpj5E/XeHv/CDlAdJRf9Zl+zxSpIGGXPVjCsySoyoxeJJnPhtkVCT95v9wJuZ7 qh/UYco2lASNzgRTdaGpbpaazjZn0mvbEq50F5W48xuq0HUgF18gwRc2pLZg+K/KwIF04ejua /m/hj32IDN/pcUK33DOOabwsXnLLTxDRz9FFe8XQVRX9keoKDfQgwAGelC31FE3mbCZHItsrZ C8j7SHPDX/VjEQxNlCeZAM3SLCJLsM36jmxnUFADat5/5lJUNrbo3oXXv7/dz X-Rspamd-Queue-Id: 4DNxl82rPKz3R2v X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.17.24) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [-0.60 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.17.24:from]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; R_DKIM_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[178.5.94.3:received]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[212.227.17.24:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.17.24:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.17.24:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2021 15:30:13 -0000 On Sun, 24 Jan 2021 14:35:40 +0100, mj-mailinglist@gmx.de wrote: > While browsing the filesystem, i found the folder /usr/share/misc > and now i am curious, what kind of files and why they were put there. The files in that directory (!) are files shared for applications that belong to the FreeBSD operating system. Some of them even have a manpage you can consult, for example "man ascii". Just a few comments: > The list on "13.0-ALPHA2 stable/13-f76393a63" looks like this: > -r--r--r-- 1 root wheel 3170 Jan 24 09:18 ascii ASCII character set. > -r--r--r-- 1 root wheel 5265 Jun 25 2020 bc.library Library for the arbitrary precision calculator, see "man bc". > -r--r--r-- 1 root wheel 43643 Jan 24 09:18 bsd-family-tree The BSD family tree. :-) > drwxr-xr-x 2 root wheel 2 Jun 25 2020 fonts Fonts to be used by the console subsystem, if supplied by the sysadmin; the preinstalled fonts at /usr/share/vt/fonts (vt) and /usr/share/syscons/fonts (sc) are provided by FreeBSD. > -r--r--r-- 1 root wheel 1177518 Jan 24 09:18 magic > -r--r--r-- 1 root wheel 6653320 Jan 24 09:18 magic.mgc File recognition magic, see "man file". > -r--r--r-- 1 root wheel 582 Jan 24 09:18 operator C language operator precedence. > -r--r--r-- 1 root wheel 1246724 Jan 24 09:18 pci_vendors Brand and model codes. > -r--r--r-- 1 root wheel 212427 Jan 24 09:18 termcap > -r--r--r-- 1 root wheel 1343488 Jan 24 09:18 termcap.db Terminal capabilities database, see "man 5 termcap". > There are > - some more, some less technical "lookup" files, like: > ascii, birthtoken, flowers, iso3166, iso639, latin1,... Correct - there are programs that use them. > - some FreeBSD project related files, like: > bsd-family-tree.dot, committers-*.dot, organization.dot > These would better be part of the documentation. Maybe. Those files however are maintained directly within the FreeBSD OS distribution. The switch to "base pkg" could move them into some documentation package. > - some configuration an scripting examples, like: > init.ee, gprof.callg, gprof.flat,... > IMHO better placed in .../examples Not sure if they are examples or presets / defaults (in which case they probably could be in a defaults/ subdirectory at some other location). > - development(?) related files, like: > pci_vendors, scsi_modes, usb_hid_usages, usbdevs, windrv_stub.c > I don't know if these files are used during build-/runtime Maybe they are produced for reference by the release building process, or consumed by it? Not sure. :-) > - some files which are used during (build-?/)runtime: > magic, magic.mgc, termcap, termcap.db > Shouldn't these be in a more specific place? They are pretty static, > so the "var" part in /var/db does not fit, > but services.db is located there, too. In the past, /etc/termcap was a real file, now it is a symlink to that misc/ subdirectory. Maybe /usr/share/db would be a possible location for "non-variable" databases? > - is the fonts folder in base, or did some port create it? I'm not sure. Whatever is _not_ in /usr/local belongs to the OS (minus a few obvious exceptions). As mentioned, this directory is to be used by the console subsystem if the sysadmin chose to install them, but see "man 1 vidcontrol" that this is _not_ a default location so the full path would have to be provided if the sysadmin wants to use such a ("nonstandard") font. > What is the history behind /usr/share/misc? More or less, it's a place for miscellaneous files, those that should not "pollute" /etc or /var/db, but somehow _have_ to reside somewhere. There are historical reasons, as you can see from some of the headers, such as @(#)flowers 8.1 (Berkeley) 6/8/93 which makes the file almost 30 years old. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...