From owner-svn-src-head@freebsd.org Sun Oct 25 23:55:46 2020 Return-Path: Delivered-To: svn-src-head@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 A97A845BDE4; Sun, 25 Oct 2020 23:55:46 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CKFGT6tL6z4hLZ; Sun, 25 Oct 2020 23:55:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 09PNtheM080261; Sun, 25 Oct 2020 16:55:43 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09PNthB5080260; Sun, 25 Oct 2020 16:55:43 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010252355.09PNthB5080260@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: <20201025055633.GA52119@ravenloft.kiev.ua> To: Alex Kozlov Date: Sun, 25 Oct 2020 16:55:43 -0700 (PDT) CC: Stefan Esser , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4CKFGT6tL6z4hLZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 23:55:46 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote: > > 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/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. > > 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. > The PREFIX != LOCALBASE and both != /usr/local configurations > are supported in the ports tree and the base for a long time, please see > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html Seems all that work for all them years is about to be tossed out the window as "an out dated concept". > > If after this commit you need to rebuild base to use non-default LOCALBASE/PREFIX > it is pretty big regression and POLA. I guess no one is paying attention to any of this... > > 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. > I think you made situation worse, there were two stray hardcoded > string and now there is official LOCALBASE define which likely will be > used by other people in the future. Yep, and now that propogation is about to occur. > > > 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. > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME > is a better name. > > > 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. > > > -- > Alex > -- Rod Grimes rgrimes@freebsd.org