Re: right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-11-07 Thread Todd C . Miller
On Thu, 07 Nov 2019 15:38:04 +, Stuart Henderson wrote:

> Now I've gone through mkr, here's the diff.
>
> base66 goes from 8100->6870 inodes as it avoids the duplicated copy
> of the standard files, as well as the leap-seconds files.

Fine with me.

 - todd



Re: right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-11-07 Thread Theo de Raadt
Fine with me.

Stuart Henderson  wrote:

> On 2019/10/26 15:32, Mark Kettenis wrote:
> > 
> > The fundamental problem with the "right" files is that the time_t
> > values end up being different from their POSIX values for the same UTC
> > time.  So whenever these are stored and compared between systems (or
> > environments that set the TZ environment variable) things get weird.
> > 
> > > I think so.  Unless there are programs that use these files directly
> > > I don't see a real use for them.
> > 
> > Agreed.  Software that really cares probably has its own leap-second
> > table and will actually rely on the POSIX definition of time_t to
> > convert times into human readable form.  That's at least what the
> > software I've seen and written does ;).
> 
> Now I've gone through mkr, here's the diff.
> 
> base66 goes from 8100->6870 inodes as it avoids the duplicated copy
> of the standard files, as well as the leap-seconds files.
> 
> OK?
> 
> Index: share/zoneinfo/Makefile
> ===
> RCS file: /cvs/src/share/zoneinfo/Makefile,v
> retrieving revision 1.13
> diff -u -p -r1.13 Makefile
> --- share/zoneinfo/Makefile   22 Jan 2019 05:44:40 -  1.13
> +++ share/zoneinfo/Makefile   7 Nov 2019 15:34:07 -
> @@ -36,7 +36,7 @@ TZDIR=  ${DESTDIR}/usr/share/zoneinfo
>  #REDO=   right_posix
>  # below.
>  
> -REDO=posix_right
> +REDO=posix_only
>  
>  # Since "." may not be in PATH...
>  YEARISTYPE=  ${.CURDIR}/datfiles/yearistype.sh
> Index: distrib/sets/lists/base/mi
> ===
> RCS file: /cvs/src/distrib/sets/lists/base/mi,v
> retrieving revision 1.966
> diff -u -p -r1.966 mi
> --- distrib/sets/lists/base/mi2 Nov 2019 13:54:04 -   1.966
> +++ distrib/sets/lists/base/mi7 Nov 2019 15:34:07 -
> @@ -6235,1237 +6235,7 @@
>  ./usr/share/zoneinfo/W-SU
>  ./usr/share/zoneinfo/WET
>  ./usr/share/zoneinfo/Zulu
> -./usr/share/zoneinfo/posix
> -./usr/share/zoneinfo/posix/Africa
> -./usr/share/zoneinfo/posix/Africa/Abidjan
> -./usr/share/zoneinfo/posix/Africa/Accra
> -./usr/share/zoneinfo/posix/Africa/Addis_Ababa
> -./usr/share/zoneinfo/posix/Africa/Algiers
> -./usr/share/zoneinfo/posix/Africa/Asmara
> -./usr/share/zoneinfo/posix/Africa/Asmera
> -./usr/share/zoneinfo/posix/Africa/Bamako
> -./usr/share/zoneinfo/posix/Africa/Bangui
> -./usr/share/zoneinfo/posix/Africa/Banjul
> -./usr/share/zoneinfo/posix/Africa/Bissau
> -./usr/share/zoneinfo/posix/Africa/Blantyre
> -./usr/share/zoneinfo/posix/Africa/Brazzaville
> -./usr/share/zoneinfo/posix/Africa/Bujumbura
> -./usr/share/zoneinfo/posix/Africa/Cairo
> -./usr/share/zoneinfo/posix/Africa/Casablanca
> -./usr/share/zoneinfo/posix/Africa/Ceuta
> -./usr/share/zoneinfo/posix/Africa/Conakry
> -./usr/share/zoneinfo/posix/Africa/Dakar
> -./usr/share/zoneinfo/posix/Africa/Dar_es_Salaam
> -./usr/share/zoneinfo/posix/Africa/Djibouti
> -./usr/share/zoneinfo/posix/Africa/Douala
> -./usr/share/zoneinfo/posix/Africa/El_Aaiun
> -./usr/share/zoneinfo/posix/Africa/Freetown
> -./usr/share/zoneinfo/posix/Africa/Gaborone
> -./usr/share/zoneinfo/posix/Africa/Harare
> -./usr/share/zoneinfo/posix/Africa/Johannesburg
> -./usr/share/zoneinfo/posix/Africa/Juba
> -./usr/share/zoneinfo/posix/Africa/Kampala
> -./usr/share/zoneinfo/posix/Africa/Khartoum
> -./usr/share/zoneinfo/posix/Africa/Kigali
> -./usr/share/zoneinfo/posix/Africa/Kinshasa
> -./usr/share/zoneinfo/posix/Africa/Lagos
> -./usr/share/zoneinfo/posix/Africa/Libreville
> -./usr/share/zoneinfo/posix/Africa/Lome
> -./usr/share/zoneinfo/posix/Africa/Luanda
> -./usr/share/zoneinfo/posix/Africa/Lubumbashi
> -./usr/share/zoneinfo/posix/Africa/Lusaka
> -./usr/share/zoneinfo/posix/Africa/Malabo
> -./usr/share/zoneinfo/posix/Africa/Maputo
> -./usr/share/zoneinfo/posix/Africa/Maseru
> -./usr/share/zoneinfo/posix/Africa/Mbabane
> -./usr/share/zoneinfo/posix/Africa/Mogadishu
> -./usr/share/zoneinfo/posix/Africa/Monrovia
> -./usr/share/zoneinfo/posix/Africa/Nairobi
> -./usr/share/zoneinfo/posix/Africa/Ndjamena
> -./usr/share/zoneinfo/posix/Africa/Niamey
> -./usr/share/zoneinfo/posix/Africa/Nouakchott
> -./usr/share/zoneinfo/posix/Africa/Ouagadougou
> -./usr/share/zoneinfo/posix/Africa/Porto-Novo
> -./usr/share/zoneinfo/posix/Africa/Sao_Tome
> -./usr/share/zoneinfo/posix/Africa/Timbuktu
> -./usr/share/zoneinfo/posix/Africa/Tripoli
> -./usr/share/zoneinfo/posix/Africa/Tunis
> -./usr/share/zoneinfo/posix/Africa/Windhoek
> -./usr/share/zoneinfo/posix/America
> -./usr/share/zoneinfo/posix/America/Adak
> -./usr/share/zoneinfo/posix/America/Anchorage
> -./usr/share/zoneinfo/posix/America/Anguilla
> -./usr/share/zoneinfo/posix/America/Antigua
> -./usr/share/zoneinfo/posix/America/Araguaina
> -./usr/share/zoneinfo/posix/America/Argentina
> -./usr/share/zoneinfo/posix/America/Argentina/Buenos_Aires
> -./usr/share/zoneinfo/posix/America/Argentina/Catamarca
> 

Re: right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-10-26 Thread Nick Holland
On 2019-10-26 09:32, Mark Kettenis wrote:
>> From: "Todd C. Miller" 
>> Date: Sat, 26 Oct 2019 06:55:02 -0600
>> 
>> On Sat, 26 Oct 2019 12:15:33 +0100, Stuart Henderson wrote:
>> 
>> > The way these files are supposed to work is that you set the system
>> > clock to the time with leap-seconds included (UTC+leap, or TAI-10) and
>> > copy the entire "right" set of files to the main zoneinfo directory
>> > (upstream provides them as parallel directories to encourage this).
>> >
>> > And everyone else sets the system clock to UTC and uses the "posix" files.
>> >
>> > https://data.iana.org/time-zones/theory.html#leapsec
>> >
>> > We don't have much support for a non-UTC system clock (e.g. openntpd only
>> > seems to copy the flag from the server and doesn't use it to adjust the
>> > clock), and the files definitely cause some confusion. Should we follow
>> > FreeBSD and Solaris and not install the leap-second files at all?
> 
> NTP leapsecond support isn't really related to the use of these files
> though.  In fact, it mostly exists to support the POSIX interpretation
> of time_t.
> 
> The fundamental problem with the "right" files is that the time_t
> values end up being different from their POSIX values for the same UTC
> time.  So whenever these are stored and compared between systems (or
> environments that set the TZ environment variable) things get weird.
> 
>> I think so.  Unless there are programs that use these files directly
>> I don't see a real use for them.
> 
> Agreed.  Software that really cares probably has its own leap-second
> table and will actually rely on the POSIX definition of time_t to
> convert times into human readable form.  That's at least what the
> software I've seen and written does ;).
> 

well...using the "normal" set seems to have done wonderful things
for my computer's problem.  So, yeah, I guess they probably fall under
the "more trouble than they are worth" category.

Nick.



Re: right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-10-26 Thread Mark Kettenis
> From: "Todd C. Miller" 
> Date: Sat, 26 Oct 2019 06:55:02 -0600
> 
> On Sat, 26 Oct 2019 12:15:33 +0100, Stuart Henderson wrote:
> 
> > The way these files are supposed to work is that you set the system
> > clock to the time with leap-seconds included (UTC+leap, or TAI-10) and
> > copy the entire "right" set of files to the main zoneinfo directory
> > (upstream provides them as parallel directories to encourage this).
> >
> > And everyone else sets the system clock to UTC and uses the "posix" files.
> >
> > https://data.iana.org/time-zones/theory.html#leapsec
> >
> > We don't have much support for a non-UTC system clock (e.g. openntpd only
> > seems to copy the flag from the server and doesn't use it to adjust the
> > clock), and the files definitely cause some confusion. Should we follow
> > FreeBSD and Solaris and not install the leap-second files at all?

NTP leapsecond support isn't really related to the use of these files
though.  In fact, it mostly exists to support the POSIX interpretation
of time_t.

The fundamental problem with the "right" files is that the time_t
values end up being different from their POSIX values for the same UTC
time.  So whenever these are stored and compared between systems (or
environments that set the TZ environment variable) things get weird.

> I think so.  Unless there are programs that use these files directly
> I don't see a real use for them.

Agreed.  Software that really cares probably has its own leap-second
table and will actually rely on the POSIX definition of time_t to
convert times into human readable form.  That's at least what the
software I've seen and written does ;).



Re: right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-10-26 Thread Todd C . Miller
On Sat, 26 Oct 2019 12:15:33 +0100, Stuart Henderson wrote:

> The way these files are supposed to work is that you set the system
> clock to the time with leap-seconds included (UTC+leap, or TAI-10) and
> copy the entire "right" set of files to the main zoneinfo directory
> (upstream provides them as parallel directories to encourage this).
>
> And everyone else sets the system clock to UTC and uses the "posix" files.
>
> https://data.iana.org/time-zones/theory.html#leapsec
>
> We don't have much support for a non-UTC system clock (e.g. openntpd only
> seems to copy the flag from the server and doesn't use it to adjust the
> clock), and the files definitely cause some confusion. Should we follow
> FreeBSD and Solaris and not install the leap-second files at all?

I think so.  Unless there are programs that use these files directly
I don't see a real use for them.

 - todd



right/ tzdata files (was ports@ Re: (Mozilla) Thunderbird time zone issue)

2019-10-26 Thread Stuart Henderson
Moving to tech:

On 2019/10/25 23:45, Christian Weisgerber wrote:
> Nick Holland:
> 
> > I live in EST5EDT. (actually, I normally use  
> >/usr/share/zoneinfo/right/US/Michigan )
>  ^
> I suspect this to be the trigger for your problem.  You have put
> yourself into a parallel universe whose time is offset by 27 seconds
> from our world.  Don't do that.

The way these files are supposed to work is that you set the system
clock to the time with leap-seconds included (UTC+leap, or TAI-10) and
copy the entire "right" set of files to the main zoneinfo directory
(upstream provides them as parallel directories to encourage this).

And everyone else sets the system clock to UTC and uses the "posix" files.

https://data.iana.org/time-zones/theory.html#leapsec

We don't have much support for a non-UTC system clock (e.g. openntpd only
seems to copy the flag from the server and doesn't use it to adjust the
clock), and the files definitely cause some confusion. Should we follow
FreeBSD and Solaris and not install the leap-second files at all?