From owner-svn-src-head@freebsd.org Sun Oct 25 03:46:34 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 20625441496; Sun, 25 Oct 2020 03:46:34 +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 4CJkRF2Lyjz4WH2; Sun, 25 Oct 2020 03:46:32 +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 09P3kTDF076746; Sat, 24 Oct 2020 20:46:29 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09P3kTVH076745; Sat, 24 Oct 2020 20:46:29 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010250346.09P3kTVH076745@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: To: Warner Losh Date: Sat, 24 Oct 2020 20:46:29 -0700 (PDT) CC: "Rodney W. Grimes" , =?UTF-8?Q?Stefan_E=C3=9Fer?= , src-committers , svn-src-all , svn-src-head 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: 4CJkRF2Lyjz4WH2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [-0.14 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-0.86)[-0.865]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.18)[-0.183]; NEURAL_SPAM_LONG(0.01)[0.010]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] 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 03:46:34 -0000 > On Sat, Oct 24, 2020 at 8:51 PM Rodney W. Grimes > wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > 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. > > > > > > 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 > > > > > > +#define _PATH_LOCALBASE "/usr/local" > > > + > > > > Something feels very wrong about this becoming a defined path in base, > > it is further dependence on /usr/local which in the early days we spent > > a great deal of time removing. > > > > I believe the whole ports system allows this to be something other > > than /usr/local. Package should also allow it to be some other place. > > > > This removes a couple of instances of /usr/local being hardcoded and > replaces with a define, so net it's better. No, its net worse as it now creates a define that is highly likely to propogate adding additional dependencies on this value. > > It could be even better, but this is slightly better than it was before. I disagree, as it is now easier for additional contamination of the base system. > Warner > > > > > /* 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" > > > /* All standard utilities path. */ > > > #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" > > > /* Locate system binaries. */ > > > > > > Modified: head/usr.bin/calendar/io.c > > > > > ============================================================================== > > > --- head/usr.bin/calendar/io.c Fri Oct 23 08:44:53 2020 > > (r366961) > > > +++ head/usr.bin/calendar/io.c Fri Oct 23 09:22:23 2020 > > (r366962) > > > @@ -71,7 +71,7 @@ enum { > > > }; > > > > > > const char *calendarFile = "calendar"; /* default calendar file */ > > > -static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* > > HOME */ > > > +static const char *calendarHomes[] = {".calendar", _PATH_INCLUDE_LOCAL, > > _PATH_INCLUDE}; /* HOME */ > > > static const char *calendarNoMail = "nomail";/* don't sent mail if file > > exist */ > > > > > > static char path[MAXPATHLEN]; > > > > > > Modified: head/usr.bin/calendar/pathnames.h > > > > > ============================================================================== > > > --- head/usr.bin/calendar/pathnames.h Fri Oct 23 08:44:53 2020 > > (r366961) > > > +++ head/usr.bin/calendar/pathnames.h Fri Oct 23 09:22:23 2020 > > (r366962) > > > @@ -35,3 +35,4 @@ > > > #include > > > > > > #define _PATH_INCLUDE "/usr/share/calendar" > > > +#define _PATH_INCLUDE_LOCAL _PATH_LOCALBASE "/share/calendar" > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org