From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4380 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCHv2] Add support for leap seconds in zoneinfo files Date: Fri, 06 Dec 2013 10:48:23 +0000 Message-ID: <52A1AB77.3060100@skarnet.org> References: <529588D8.3020006@skarnet.org> <20131127184307.GN1685@port70.net> <52965735.9070409@skarnet.org> <529FD33A.8000509@skarnet.org> <20131205144311.GG24286@brightrain.aerifal.cx> <52A0AA6A.60608@skarnet.org> <20131205164022.GK24286@brightrain.aerifal.cx> <52A11C0D.1080705@skarnet.org> <20131206004535.GT24286@brightrain.aerifal.cx> <52A12548.80508@skarnet.org> <20131206053146.GC1685@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1386326887 5131 80.91.229.3 (6 Dec 2013 10:48:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2013 10:48:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4384-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 06 11:48:13 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VosxA-0001N5-Jq for gllmg-musl@plane.gmane.org; Fri, 06 Dec 2013 11:48:12 +0100 Original-Received: (qmail 24062 invoked by uid 550); 6 Dec 2013 10:48:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24054 invoked from network); 6 Dec 2013 10:48:11 -0000 X-SourceIP: 89.100.252.69 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <20131206053146.GC1685@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:4380 Archived-At: > - musl should not have configuration options that change > the behaviour of an api (otherwise maintaining the code > becomes much harder) so making leapseconds a libc build > time config option does not work Also, that would break musl's policy of "compile once, run everywhere". Leap second usage should be a system-wide setting, not a binary-wide setting. > - hardcoding leapsecond tables into libc does not work either > requires recompilations and restarts Of course. Leap second tables should be read either from the timezone files, as glibc does, or from a separate file. > - if the clock source is a kernel level setting then the > information should come from the kernel (eg in the aux > vector or /proc) > - if the clock source setting is an external setting (eg the > configured time server uses GPS or TAI time scale) then the > admin should provide the information through the filesystem, musl shouldn't try to autodetect settings from the kernel. The admin should be the authoritative source of information. > but an update is still an operational hazard, and we need > to invent a file format and provide tools to get it from the > distributed tzdata files That's the easy part. I'm already doing that for skalibs. I'm willing to provide the format and the tools. > - during the life-time of a process adding leapseconds may > cause problems so the data should be cached at startup or > on demand at the first gmtime call, but then there might be > problems across processes if they don't have the same cached > leapsecond list Again, leap second announcements are a rare event and there's plenty of time for admins to restart their processes. I don't think that's something musl should care about. -- Laurent