[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#813226: tzdata config script ignores /etc/timezone on non-interactive configuration

On Mon, 1 Feb 2016 08:43:32 +0100
Aurelien Jarno <aurelien@aurel32.net> wrote:

> ...
> I don't think it is a bug. The correct way to configure the timezone has
> always been to change /etc/localtime symlink, ie in your case by doing
> "ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime". This is what
> desktop environments do when changing the timezone and it is what
> systemd expects.

But after dpkg-reconfigure tzdata, content of this symlink was written
into /etc/timezone and the symlink was turned into real file.
Subsequent runs of dpkg-reconfigure have seen /etc/localtime real file,
thus behaving as if /etc/timezone is the source of authority here,
and /etc/localtime symlink is some obsure state which needs to be
transformed into /etc/timezone authority and /etc/localtime real file,
driven by /etc/timezone.

New package completely changes source of authority to /etc/localtime,
as tzdata.postinst script makes /etc/localtime into symlink, and
subsequent run of tzdata.config rewrites contents of /etc/timezone
based on the value of the symlink.

This change in behaviour should be documented, at least somewhere
in /usr/share/doc/tzdata/...

P.S.: Ansible (or other orchestration tool), usually checks file not
only by its contents, but also by its type. Thus there must be now two
paths (old tzdata and new tzdata) when checking /etc/localtime.
Checking /etc/timezone is not sufficient after the change. I spent 4
hours by debugging our ansible environment because of poor
documentation of this change and poor documentation of relation
between /etc/timezone and /etc/localtime in older versions of tzdata.

> Changing /etc/timezone worked in some cases before as we use to store
> /etc/localtime as a copy of the file instead of a symlink when possible,
> in order to allow the timezone to be correct without a /usr partition.
> This is not needed anymore given /usr is now mount from the initramfs
> when needed.
> Aurelien

                                 Tomáš 'ebík' Ebenlendr
                                 Economia a.s.
                                 PF 2017.15021197996

*Úspěch, charisma a inspirace v jednom magazínu. *
*Čtěte o nejúspěšnějších ženách Česka.*

*Objednejte si exkluzivní magazín Hospodářských novin Top ženy Česka 2016 

Attachment: pgpiE2tZZp5mx.pgp
Description: OpenPGP digital signature

Reply to: