From owner-freebsd-hackers@freebsd.org Tue Jan 5 23:39:44 2021 Return-Path: Delivered-To: freebsd-hackers@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 EFA694D5BFB for ; Tue, 5 Jan 2021 23:39:44 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9TVm6NRRz3rvl; Tue, 5 Jan 2021 23:39:44 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f110800e50b83eaa3464b63.dip0.t-ipconnect.de [IPv6:2003:cd:5f11:800:e50b:83ea:a346:4b63]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1D23B3FA1; Tue, 5 Jan 2021 23:39:44 +0000 (UTC) (envelope-from se@freebsd.org) From: Stefan Esser Subject: Re: How does the time zone info get updated? To: Konstantin Belousov , Stefan Esser Cc: Andriy Gapon , Warner Losh , FreeBSD Hackers , Hal Murray References: <20210105075109.A412C40605C@ip-64-139-1-69.sjc.megapath.net> <4e6721bc-e593-76b6-90f8-03d96486dc28@freebsd.org> <47c37f75-e082-7a34-7eb6-3ee2a4ade395@freebsd.org> <02ebd386-a7fd-1816-72b6-3211f4bc69fb@freebsd.org> <358b8939-5ec9-e340-8b06-f362cae38fa0@FreeBSD.org> Message-ID: <0e0c7dbb-2036-ef7c-762a-f599cd8c18bc@freebsd.org> Date: Wed, 6 Jan 2021 00:39:43 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 23:39:45 -0000 Am 06.01.21 um 00:19 schrieb Konstantin Belousov: > On Wed, Jan 06, 2021 at 12:05:17AM +0100, Stefan Esser wrote: >> I'd rather think we should have the port install files into >> $PREFIX/share/zoneinfo and modify the file lookup to search at >> that location first, before falling back to the base system >> location. >> >> This might require changes to zic, zdump, tzsetup, etcupdate, >> and bsdconfig, which only expect a single path in TZDIR. >> >> This might be considered worse than the port that overwrites >> files in base. > This really requires changes to libc, which implies changed behavior > for all applications. A library routine can easily implement the logic to lookup the zone definitions in a specified sequence in several places. The biggest problem I see is that the /etc/localtime link would point to either a definition in /usr/share/zoneinfo or $LOCALBASE/share/zoneinfo and if a port did update the files below $LOCALBASE when previously files from base had been used, the link would need to be adjusted. I do not consider such a change of a link in /etc by a port to be acceptable behavior, though, and thus the port that overwrites files in /usr/share/zoneinfo actually appears to be the lesser evil ... Regards, STefan PS: Resent from freebsd mail address to have the message be accepted by the list server ...