From owner-svn-src-head@freebsd.org Sun Oct 25 03:08:26 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 EDCF044068A for ; Sun, 25 Oct 2020 03:08:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJjbG0h3nz4V17 for ; Sun, 25 Oct 2020 03:08:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id b18so1665852qkc.9 for ; Sat, 24 Oct 2020 20:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N9wQbBxQOA4txTRFnRs3kRB5FitJEPdOdzUEE64X7WE=; b=xXwX66q7zPzdYxJWdNE5iJeaZv75KhzBo5oo2MOxwHPfXc4+/fpOwumA1r14liQ1RG 0D9tL7B2x/A1xW7Xkov8ek3adN3L40ykXe2qvvu6JiOaaB46fTtcJjmZuvf9/BaWNI7W KaG5awCbROJL6ZlFusbxMF/n8+gLungdKpd3DWVEtHmSS+Loa0+5nQxQP7uUfBLMdVmg cd6PlSjTiwrC1xuCkv84JD1WhiQSfiSItdDYnnXfzW17LudxcpaA3CuT0khG4PHg3cfy bBVL2NB/h7QgMGH6zl8DwLGoB2kJJ/ezupgqv91CUdA9m0UkBi6WljvTBGYNZ0FYIxlr Ai8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N9wQbBxQOA4txTRFnRs3kRB5FitJEPdOdzUEE64X7WE=; b=cyUksodPWWmeyVToz/ULERlDpXkOL61BEBu9if9DHqY8kOYUqsSE0XYElm1gHZSN27 soxQmd0TuD6/UAYQyxe9NzAdozugUVBUHuWH50ApBTmlgOqdF05hb0AoMfRJIKkY86SM Dtc5zQHv/ep8mg3MKt+xx5wJHTtH6NCshQ512XL558kwl6xOKb1WI7U/2VKpRC24nChT oN3YhdCVw0emfUAAYeLYy4RDJaqU6zwVw2NZ4gXCzejHGGa/KbjiBWRqssg/6W2K2vF3 46+meVFgiJMqV0mWj8O0xpESlHgi9lAfKaV6yQemKGo4nVwdG4rTlMRPt86IwgrIyeSX nEJA== X-Gm-Message-State: AOAM531JYrOHrUrjcEhGez17wIFuCJJK7v+vJZISN8sF6FAcWXxDXutq e4CQtDi10QwEp5y0pBFkv5WIOdZ6oOVsLLahB+Ul7A== X-Google-Smtp-Source: ABdhPJxDILvyp8Jy1D3DTX934B5JCvOa/0DMY3EOnah/vlqtGnDm89jC8EYcJSG/JYkAdby4Wr2BlG3EiFyGoS3POlw= X-Received: by 2002:a37:478c:: with SMTP id u134mr10875126qka.206.1603595304961; Sat, 24 Oct 2020 20:08:24 -0700 (PDT) MIME-Version: 1.0 References: <202010230922.09N9MNZu040921@repo.freebsd.org> <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> In-Reply-To: <202010250250.09P2oxbs076549@gndrsh.dnsmgr.net> From: Warner Losh Date: Sat, 24 Oct 2020 21:08:14 -0600 Message-ID: Subject: Re: svn commit: r366962 - in head: include usr.bin/calendar To: "Rodney W. Grimes" Cc: =?UTF-8?B?U3RlZmFuIEXDn2Vy?= , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CJjbG0h3nz4V17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=xXwX66q7; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.79 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.04)[-1.038]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.79)[-0.793]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72e:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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:08:27 -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. It could be even better, but this is slightly better than it was before. 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 >