Bug 106572
| Summary: | bind-chroot doesn't install chroot's /etc/localtime, nor update it on tzdata updates | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alexandre Oliva <oliva> |
| Component: | bind | Assignee: | Jason Vas Dias <jvdias> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ben Levenson <benl> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | bind-9.2.4rc8-14 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-09-20 16:30:42 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: | |||
| Bug Depends On: | 107507 | ||
| Bug Blocks: | 123268 | ||
|
Description
Alexandre Oliva
2003-10-08 14:50:16 UTC
Fixed in bind-9_2_2_P3-6 Dan I don't see any change in behavior. /etc/localtime is not present in the chroot, and messages are still logged with the wrong timezone. Still present in -9 This works on my machine. Please make sure you uninstall bind-chroot and reinstall it. Since there is now a check to make sure files only get moved the first time bind-chroot gets installed. Dan Aha, the uninstall&reinstall bit was what I was missing. This fixes the problem, indeed. Ideally, there should be some trigger on tzdata updates to copy the file again, should it change. tzdata should itself update /etc/localtime on postinstall, but currently it doesn't. So this bug is closed correct? Dan Hmm... Maybe I should have closed this bug and opened a new one about the tzdata trigger, instead of changing the summary? tzdata cannot depend on shell etc. as it is a dependency loop. So I think the trigger needs to go into some other packages. What about redhat-config-date? That is a package which normally modifies /etc/localtime... This bug should remain open against bind, since bind should eventually be changed when tzdata is adjusted, at which point bug 107507, that this bug depends on, will remind us. /var/named/chroot/etc/localtime is not there after an everything FC2 install from scratch. Hi, why don't you know how to debug?
# rpm -ivvh bind-chroot-9.2.3-13.i386.rpm
D: ============== bind-chroot-9.2.3-13.i386.rpm
(snip)
D: install: %post(bind-chroot-9.2.3-13) execv(/bin/sh) pid 2501
+ test -r /etc/sysconfig/named
+ grep -q '^ROOTDIR=' /etc/sysconfig/named
+ echo ROOTDIR=/var/named/chroot
+ '[' '!' -d /var/tmp ']'
(snip)
It was easy to find out the reason of this BUG.
The patch which fixes this BUG is below.
--- bind.spec 2004/08/04 15:31:39 1.1
+++ bind.spec 2004/08/04 15:32:11
@@ -101,7 +101,7 @@
then :
else
echo ROOTDIR="%{prefix}" >>/etc/sysconfig/named
-if [ ! -d "${prefix}/var/tmp" ]; then
+if [ ! -d "%{prefix}/var/tmp" ]; then
mkdir -m770 -p "%{prefix}/var/tmp"
rm -f "%{prefix}/dev/null"
mknod "%{prefix}/dev/null" c 1 3
This was fixed in bind-9.2.4rc6-3 . Next version (bind-9.2.4rc6-4) will make the chroot /etc/localtime a hard link to /etc/localtime instead of copying. Will ensure tzdata updates /etc/localtime. It does copy /etc/localtime to /var/named/chroot/etc at install time, indeed, but AFAICT it still fails to update the copy of /etc/localtime in the chroot after a tzdata update (or anything else) that updates it. How was it supposed to update /etc/localtime in the chroot after, say, a tzdata update that modifies /etc/localtime? And it gets worse: apparently, at the time we run the bind-chroot %post script at install time (anaconda), /etc/localtime in /mnt/sysimage is America/New_York, regardless of the timezone selected in the installer. Only at the end of the install is /etc/localtime set up according to the user selection, so /var/named/chroot/etc/localtime is always wrong unless you happen to be in America/New_York timezone. Filed the above as bug 132385. I'll fix by checking if /etc/localtime has changed in the named initscript and copying it again if so; this will handle timezone updates as well as initial install - this should be fixed in: bind-9.2.4rc7-14 *** Bug 132385 has been marked as a duplicate of this bug. *** This is now fixed in bind-9.2.4rc8-14 (fc3-head). |