Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2017 21:12:08 +0100
From:      Bob Eager <rde@tavi.co.uk>
To:        freebsd-ports@freebsd.org
Subject:   Re: standard locations for port files
Message-ID:  <20170831211208.30cdc328@raksha.tavi.co.uk>
In-Reply-To: <76pgqcptlcrvhuavu1bquknbbdfr8n0cdf@4ax.com>
References:  <59A82622.4030502@gmail.com> <729F1CC6-9A65-4CDF-B7E5-FB520779FD15@adamw.org> <dolgqcpv4ihqsjbas28v0bglrboat4po5c@4ax.com> <CA%2BtpaK2wFBV3-aUEYXQ3eVqMjxS2kE67G5uLVni=OEjiVe8MyA@mail.gmail.com> <76pgqcptlcrvhuavu1bquknbbdfr8n0cdf@4ax.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Aug 2017 15:54:09 -0400
<scratch65535@att.net> wrote:

> [Default] On Thu, 31 Aug 2017 13:53:27 -0500, Adam Vande More
> <amvandemore@gmail.com> wrote:
> 
> >On Thu, Aug 31, 2017 at 1:41 PM, <scratch65535@att.net> wrote:
> >  
> >> Why wouldn't  logs be in /usr/local/var/...?  Given that all
> >> other port "stuff" is under /usr/local, what advantage is there
> >> in making logs an exception?
> >>  
> >
> >Because logs shouldn't be under /usr.  
> 
> Why not?  The current location wasn't determined by natural law,
> it was just someone's decision, almost certainly made without
> much thought at all.  It could be re-decided just as easily.  

The current hierarchy has had a lot of thought put into it. Files
in /usr generally don't constantly change (although if /home is
symlinked to /usr/home they might, I guess. Files in /var *do* change a
lot, hence its name. It's also the reason that the root file system is
separate; if it isn't written to much, it's less likely to sustain
damage.

/var is designed for files that *change* - that's why logs go there. If
you want to, by all means create /var/local and put your logs there.

A compelling reason, already mentioned, is that there are a lot of
systems that have /usr mounted read only (e.g. net booted systems, or
those that are booted from a USB stick). Such systems usually put /var
in a RAM disk, so that logs can be kept. Even if /var is on an actual
disk, it means that other parts of the file system can be kept read
only. This improves reliability and integrity, and makes recovery after
a crash a lot quicker.

All in all, /var is the *right* place.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170831211208.30cdc328>