Summary: | Gentoo stages (incl. systemd stages) default to /etc/localtime as a file, whil sys-apps/systemd expects a symlink | ||
---|---|---|---|
Product: | Gentoo Release Media | Reporter: | Michał Górny <mgorny> |
Component: | Stages | Assignee: | Gentoo Release Team <releng> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | bkohler, holger, joakim.tjernlund, systemd |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/llvm/llvm-project/issues/105634 https://bugs.gentoo.org/show_bug.cgi?id=941741 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michał Górny
![]() ![]() ![]() ![]() I would not expect /etc/localtime to exist at all in stage3 tarballs. I wonder what creates it. Ah, it might be this hook in stage1: https://gitweb.gentoo.org/proj/catalyst.git/tree/targets/stage1/preclean-chroot.sh Gentle ping. Testing with this change now: diff --git a/targets/stage1/preclean-chroot.sh b/targets/stage1/preclean-chroot.sh index 2dc761e9..193a12f9 100755 --- a/targets/stage1/preclean-chroot.sh +++ b/targets/stage1/preclean-chroot.sh @@ -15,7 +15,7 @@ setup_binutils if [ -d "${ROOT}/usr/share/zoneinfo" ] then rm -f "${ROOT}/etc/localtime" - cp "${ROOT}/usr/share/zoneinfo/Factory" "${ROOT}/etc/localtime" + ln -s ../usr/share/zoneinfo/Factory "${ROOT}/etc/localtime" else echo UTC > "${ROOT}/etc/TZ" fi The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e574dbd24c74cedd7f59263859a6551b914410a4 commit e574dbd24c74cedd7f59263859a6551b914410a4 Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2024-10-10 01:06:11 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2024-10-10 01:06:11 +0000 targets/stage1/preclean-chroot.sh: use symlink for /etc/localtime This should be a symlink on modern systems. Bug: https://bugs.gentoo.org/938309 Signed-off-by: Ben Kohler <bkohler@gentoo.org> targets/stage1/preclean-chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Could we update that hook to not create any file/link at all? Having a symlink to the bogus "Factory" zone is pretty useless. If /etc/localtime does not exist, libc and timedatedtl will default to UTC, which seems reasonable. I suppose we should check that new libc++ API to see how it handles /etc/localtime not existing at all. (In reply to Mike Gilbert from comment #7) > I suppose we should check that new libc++ API to see how it handles > /etc/localtime not existing at all. Make a guess :) https://github.com/llvm/llvm-project/blob/7da0a698526ff657c2348a6e4bb835fc764177da/libcxx/src/experimental/tzdb.cpp#L727 |