Bug 444043
Summary: | timezone is kind of incompatible with chroot | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Lennart Poettering <lpoetter> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 9 | CC: | drepper |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-06-06 12:45:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lennart Poettering
2008-04-24 18:42:31 UTC
Even if we added some kind of deamon for the time zone, if you don't have /etc/localtime copied into the chroot, then you wouldn't have a unix socket in the chroot either through which it could communicate with the daemon. It is really not hard to ensure /etc/localtime is present and uptodate in the chroot, or you can use TZ env var, at least for timezones where current rules can be expressed in the POSIX syntax (most of them) - though that won't have accurate historic data. Daemon for time zone? Oh no. I think we have a misunderstanding here. All I am asking for is that programs can call tzset() once before chrooting. And this will read all timezone data. And then, when the tz data is used later on, after the chroot, and no longer accessible the cached data will be used. The current behaviour is to go to disk each time, and when the TZ data is not accessible anymore glibc falls back to UTC. (In reply to comment #2) > All I am asking for is that programs can call tzset() once before chrooting. And > this will read all timezone data. We already have such a program. It's called 'cp'. cp /etc/localtime /path/to/chroot/etc If you want to allow changing the timezone also use cp -r /usr/share/zoneinfo /path/to/chroot/usr/share Yes, Ulrich, I know that. But if you'd had read my initial bug report you'd have seen why I think that this solution is suboptimal. Also it makes it quite a bit more difficult to get it right to dynamically set up a new chroot environment, then change to it and drop priviliges from C daemons. Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |