Am 24.10.20 um 09:48 schrieb Alex Kozlov:
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/366962Log: Add search of LOCALBASE/share/calendar for calendars supplied by a port.Calendar files in LOCALBASE override similarily named ones in the basesystem. 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 usesof /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.
This was a trivial change to get us going with calendars provided by a port (which has not been committed, yet - therefore there are no port-provided calendars, neither under /usr/local nor under any other PREFIX, as of now). I understand what you are asking for, but in such a case I'd rather think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in paths.h. And I have made this a single instance that needs to be changed. Before my change there were 2 instances of /usr/local hard-coded in _PATH_DEFPATH - now you have to only change the definition of _PATH_LOCALBASE to adjust all 3 locations that use it. If you can show me precedence of a LOCALBASE environment variable being used in the way you suggest, I'd be willing to make calendar use it. But then I think a CALENDAR_HOME variable would be even more useful, since it would allow to search an additional user selected directory (and not just share/calendar within what you provide as LOCALBASE). Regards, STefan PS: If you are a source committer, you might even commit such a change yourself. But I'd think it should be reviewed, and it might be a good idea to wait until other changes (e.g. the switch-over to port-supplied calendar files) have been worked out.
OpenPGP_signature
Description: OpenPGP digital signature