From owner-svn-src-all@freebsd.org Sun Oct 25 02:51:03 2020 Return-Path: Delivered-To: svn-src-all@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 33C0B43F922; Sun, 25 Oct 2020 02:51:03 +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 4CJjCB0XsBz4SYh; Sun, 25 Oct 2020 02:51:01 +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 09P2oxkZ076550; Sat, 24 Oct 2020 19:50:59 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 09P2oxbs076549; Sat, 24 Oct 2020 19:50:59 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar In-Reply-To: <202010230922.09N9MNZu040921@repo.freebsd.org> To: =?UTF-8?Q?Stefan_E=C3=9Fer?= Date: Sat, 24 Oct 2020 19:50:59 -0700 (PDT) CC: 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: 4CJjCB0XsBz4SYh 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 [1.22 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.01)[0.010]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(0.16)[0.164]; NEURAL_SPAM_LONG(0.14)[0.145]; 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-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2020 02:51:03 -0000 [ 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. > /* 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