Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2020 09:48:40 +0200
From:      Alex Kozlov <ak@FreeBSD.org>
To:        Stefan =?iso-8859-1?Q?E=DFer?= <se@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r366962 - in head: include usr.bin/calendar
Message-ID:  <20201024074840.GA26119@ravenloft.kiev.ua>
In-Reply-To: <202010230922.09N9MNZu040921@repo.freebsd.org>
References:  <202010230922.09N9MNZu040921@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 23, 2020 at 09:22:23AM +0000, Stefan Eßer wrote:
> Author: se
> Date: Fri Oct 23 09:22:23 2020
> New Revision: 366962
> URL: https://svnweb.freebsd.org/changeset/base/366962
> 
> Log:
>   Add search of LOCALBASE/share/calendar for calendars supplied by a port.
>   
>   Calendar files in LOCALBASE override similarily named ones in the base
>   system. This could easily be changed if the base system calendars should
>   have precedence, but it could lead to a violation of POLA since then the
>   port's files were ignored unless those in base have been deleted.
>   
>   There was no definition of _PATH_LOCALBASE in paths.h, but verbatim uses
>   of /usr/local existed for _PATH_DEFPATH. Use _PATH_LOCALBASE here to ease
>   a consistent modification of this prefix.
You are hardcoding assumption that LOCALBASE = /usr/local. Please make it
overridable with LOCALBASE environment variable.

>   Reviewed by:	imp, pfg
>   Differential Revision:	https://reviews.freebsd.org/D26882
> 
> Modified:
>   head/include/paths.h
>   head/usr.bin/calendar/io.c
>   head/usr.bin/calendar/pathnames.h
> 
> Modified: head/include/paths.h
> ==============================================================================
> --- head/include/paths.h	Fri Oct 23 08:44:53 2020	(r366961)
> +++ head/include/paths.h	Fri Oct 23 09:22:23 2020	(r366962)
> @@ -37,8 +37,11 @@
>  
>  #include <sys/cdefs.h>
>  
> +#define	_PATH_LOCALBASE	"/usr/local"
> +
>  /* Default search path. */
> -#define	_PATH_DEFPATH	"/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
> +#define	_PATH_DEFPATH	"/sbin:/bin:/usr/sbin:/usr/bin:" \
> +  			_PATH_LOCALBASE "/sbin:" _PATH_LOCALBASE "/bin"


-- 
Alex



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