From: Mike Gilbert <floppym@gentoo.org>
To: Gentoo Dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ?
Date: Sun, 21 Mar 2021 22:49:24 -0400 [thread overview]
Message-ID: <CAJ0EP42qapT8hpt1ZZnQGsEMBYykZgxJWHL4oe_Z1ATyLq2cbA@mail.gmail.com> (raw)
In-Reply-To: <1890158.tdWV9SEqCh@pinacolada>
On Sat, Mar 20, 2021 at 11:37 AM Andreas K. Huettel
<dilfridge@gentoo.org> wrote:
>
> Hi all,
>
> why do we *copy* the timezone file to /etc/localtime, instead of symlinking it like everyone else?
>
> 1) Our handbook recommends:
>
> echo "Europe/Brussels" > /etc/timezone
> emerge --config sys-libs/timezone-data
>
> which is effectively doing
>
> echo "Europe/Brussels" > /etc/timezone
> cp -f /usr/share/zoneinfo/Europe/Brussels /etc/localtime
>
> 2) Most other distros seem to just do
>
> ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
>
> and use the link content as timezone name (this is also what is required by systemd).
>
> Does anyone remember the reason for 1) ? Or is that lost in history?
I think the most obvious reason would be to support late-mounting of
/usr, after the system clock has been reset with a UTC offset on boot.
To make this work, the /etc/localtime file would need to be available
when the hwclock init script runs.
These days, I suspect there are not many users running systems with a
hardware clock in local time, and a separate /usr filesystem, and no
initramfs to mount /usr early.
I created a PR to adjust the logic in timezone-data to promote
symlinks for new installs, while keeping regular files in place for
existing users.
https://github.com/gentoo/gentoo/pull/20050
If we added some logic to detect if /usr is a separate filesystem, we
could possibly be even more aggressive about this. But I'm not sure I
want to rock the boat that much in one commit.
prev parent reply other threads:[~2021-03-22 2:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 15:37 [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ? Andreas K. Huettel
2021-03-20 16:04 ` Nils Freydank
2021-03-20 19:10 ` William Hubbs
2021-03-21 4:18 ` Ulrich Mueller
2021-03-21 4:48 ` Alec Warner
2021-03-21 5:27 ` Ulrich Mueller
2021-03-21 5:56 ` Alec Warner
2021-03-21 7:23 ` Ulrich Mueller
2021-03-21 7:58 ` James Le Cuirot
2021-03-22 8:59 ` Andreas Sturmlechner
2021-03-22 20:18 ` Lars Wendler
2021-03-23 3:01 ` Andreas Sturmlechner
2021-03-22 22:54 ` Andreas K. Huettel
2021-03-23 7:22 ` Jaco Kroon
2021-03-23 11:31 ` Rich Freeman
2021-03-27 21:43 ` Joshua Kinard
2021-03-27 22:16 ` James Le Cuirot
2021-03-27 22:40 ` Joshua Kinard
2021-03-28 9:25 ` James Le Cuirot
2021-03-28 23:46 ` Joshua Kinard
2021-03-29 8:06 ` James Le Cuirot
2021-04-22 18:14 ` Marek Szuba
2021-04-22 18:18 ` Marek Szuba
2021-03-28 0:32 ` William Hubbs
2021-03-28 2:51 ` Joshua Kinard
2021-03-28 20:05 ` William Hubbs
2021-03-28 23:31 ` Joshua Kinard
2021-03-29 6:07 ` William Hubbs
2021-03-28 1:00 ` Rich Freeman
2021-03-28 1:58 ` Joshua Kinard
2021-03-21 23:58 ` Thomas Deutschmann
2021-03-22 2:06 ` Mike Gilbert
2021-03-22 3:06 ` Thomas Deutschmann
2021-03-22 3:19 ` Thomas Deutschmann
2021-03-22 4:07 ` Mike Gilbert
2021-03-22 2:49 ` Mike Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ0EP42qapT8hpt1ZZnQGsEMBYykZgxJWHL4oe_Z1ATyLq2cbA@mail.gmail.com \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox