Gentoo Archives: gentoo-dev

From: "Andreas K. Huettel" <dilfridge@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] timezone configuration - why copying, not symlinking /etc/localtime ?
Date: Sat, 20 Mar 2021 15:37:33
Message-Id: 1890158.tdWV9SEqCh@pinacolada
1 Hi all,
2
3 why do we *copy* the timezone file to /etc/localtime, instead of symlinking it like everyone else?
4
5 1) Our handbook recommends:
6
7 echo "Europe/Brussels" > /etc/timezone
8 emerge --config sys-libs/timezone-data
9
10 which is effectively doing
11
12 echo "Europe/Brussels" > /etc/timezone
13 cp -f /usr/share/zoneinfo/Europe/Brussels /etc/localtime
14
15 2) Most other distros seem to just do
16
17 ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
18
19 and use the link content as timezone name (this is also what is required by systemd).
20
21 Does anyone remember the reason for 1) ? Or is that lost in history?
22
23 Cheers,
24 Andreas
25
26 PS See also bug https://bugs.gentoo.org/737914 , where support for 1) was removed from Qt.
27
28 --
29 Andreas K. Hüttel
30 dilfridge@g.o
31 Gentoo Linux developer
32 (council, toolchain, base-system, perl, libreoffice)

Replies