From owner-freebsd-questions@freebsd.org Wed May 6 17:41:32 2020 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 AAF2C2DACD4 for ; Wed, 6 May 2020 17:41:32 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49HP633kHgz3xbn for ; Wed, 6 May 2020 17:41:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.27.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1M2w4S-1jZgtX3NaG-003K3v; Wed, 06 May 2020 19:41:19 +0200 Date: Wed, 6 May 2020 19:41:18 +0200 From: Polytropon To: Ottavio Caruso Cc: malaizhichun@tom.com, freebsd-questions@freebsd.org Subject: Re: On a serious note, what I'd change about FreeBSD hier(7) Message-Id: <20200506194118.1135658d.freebsd@edvax.de> In-Reply-To: References: <83788746a7d8a802d8af4b582e00827166febd1a.camel@tom.com> <20200506172115.cb3b572b.freebsd@edvax.de> 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:Iw5TazpdzPbA56bPP9kb67YXXiyMpGpsp0fKzpHbfwdcTKiDMvI 5Cue0lMqas9ZJYFHeFGZmPebeZuJxSR8FafAjHOE/nZwTFPn/Ps9eSrWc5uUFBuBNN6+pjc 9j7RObgjArOMF8Gj6L1GbPdUgqFP5vJOM1XmEOuSX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org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.131) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.66 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; RECEIVED_SPAMHAUS_PBL(0.00)[16.27.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.89)[0.887,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[131.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[131.126.227.212.rep.mailspike.net : 127.0.0.17]; FREEMAIL_CC(0.00)[tom.com]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.38)[ip: (1.10), ipnet: 212.227.0.0/16(-1.20), asn: 8560(2.03), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 17:41:32 -0000 On Wed, 6 May 2020 18:21:59 +0100, Ottavio Caruso wrote: > On Wed, 6 May 2020 at 16:21, Polytropon wrote: > > > > FreeBSD's general organisation keeps all non-OS stuff stored > > in /usr/local; the directories owned by the OS have a specific > > purpose which is reflected by their name and location > > > I'd pretty much want to have all non-base stuff into somewhere else > than /usr/local. I like NetBSD installing ports in /usr/pkg (or > whenever you want set your $PREFIX to). I'd rather have /usr/local for > my own personal software and avoid it messing up with official ports. That exactly is what lots of people use /opt for. Historically coming from Solaris, it is used to install software that is not maintained by pkg (which defaults to /usr/local). There are several approaches of how /opt should be laid out, and in fact, you can usually combine them. One is to have /opt contain a set of subtrees like /usr/local; another one is to have subdirectories for every custom program, which is either called from its location, or via symlink into /opt/bin which is then set to be in $PATH. Personally, I often have something like this: /opt/bin -> user scripts and symlinks /opt/libexec -> scripts like print filters /opt/src -> local sources /opt/ -> local software installs There are several /opt/ directories, and they do not have much in common: in some, there's a bin/, in others a program/, and in others nothing (the binary is in /opt/, symlinked to /opt/bin if it should be called without full path). If I should need /opt/etc, I would probably add it, but for the few cases I have encountered so far, the programs kept their configuration inside their /opt/, and it was not human-serviceable. This is of course only one out of many possibilities... ;-) The /usr/local, beneath /usr, suggests that the ports (!) installed there have a certain relationship to the OS. This is true. They are maintained via pkg, their presence, dependencies and versions are recorded in databases of the OS. But /opt typically is entirely out of scope, so much that you can actually use a different name for it. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...