Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: On the F18-Beta Live CD, /etc/localtime is a time zone file instead of a symlink to a time zone file. systemd expects /etc/localtime to be a symlink, and when it is not, Date & Time in System Settings incorrectly shows Europe/London instead of America/New_York. Version-Release number of selected component (if applicable): Fedora-18-Beta-x86_64-Live-Desktop.iso How reproducible: Always. Steps to Reproduce: 1. Boot Live CD. 2. Start System Settings (gnome-control-center). 3. Click Date & Time. Actual results: Time zone is Europe/London. Expected results: Time zone is America/New_York. Additional info: The timedatectl commands reports "n/a" for the time zone. [liveuser@localhost ~]$ ls -lF /etc/localtime -rw-r--r--. 1 root root 3519 Oct 23 10:23 /etc/localtime [liveuser@localhost ~]$ date Fri Dec 7 16:27:12 EST 2012 [liveuser@localhost ~]$ zdump /etc/localtime /etc/localtime Fri Dec 7 16:27:22 2012 EST [liveuser@localhost ~]$ timedatectl Local time: Fri, 2012-12-07 16:27:31 EST Universal time: Fri, 2012-12-07 21:27:31 UTC RTC time: Fri, 2012-12-07 21:27:31 Timezone: n/a NTP enabled: yes NTP synchronized: yes RTC in local TZ: no Tested with: $ qemu-kvm -m 2048 -hda f18-test-1.img -cdrom ~/xfr/fedora/F18/F18-Beta/Final/Fedora-18-Beta-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse
Created attachment 659617 [details] /var/log/messages with systemd message about /etc/localtime [snippet from attached /var/log/messages] ... Dec 7 16:26:17 localhost systemd-timedated[1746]: /etc/localtime should be a symbolic link to a timezone data file in /usr/share/zoneinfo/. ...
livecd-creator checks to see whether /etc/localtime is a symlink or not before it makes changes. So if this is wrong it is caused by whatever is writing the original /etc/localtime file/symlink, not livecd-creator. See commit: http://git.fedorahosted.org/cgit/livecd/commit/?h=f18-branch&id=e346b72bbb9aa8067b84ea0da4cd288ba35df37c Taking a second look at that, it should probably fall back to symlink instead of copying. It looks like systemd is providing /etc/localtime so reassigning there.
(In reply to comment #2) > ... it is caused by whatever is writing the original /etc/localtime file/symlink ... Thanks for pointing that out. system-config-date was writing a time zone file instead of a symlink: Bug 824033 - RFE: Make /etc/localtime a symlink Bug 863676 - /etc/localtime link overwritten with incorrect timezone file during firstboot That bug was fixed in system-config-date-1.10.2-1, which was pushed to stable 2012-11-02: https://admin.fedoraproject.org/updates/FEDORA-2012-16696/system-config-date-1.10.2-1.fc18,python-slip-0.2.21-1.fc18 The Live CD has those versions: system-config-date-1.10.2-1.fc18 python-slip-0.2.21-1.fc18 And: systemd-195-8.fc18
OK, since this is apparently closed in s-c-d I guess I can close this now?
This is not fixed on the F18 Final Live CD. /etc/localtime is a file and not a symlink. Reopening until I can verify that it is fixed post F18. Brian and Lennart: You guys are the experts. What component is responsible for creating /etc/localtime on the Live CD? Revising bug summary to make it clear that this bug applies to the Live CD: On Live CD /etc/localtime not a symlink to a time zone file Tested in a VM with: $ qemu-kvm -m 2048 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Final/Final/Fedora-18-x86_64-Live-Desktop.iso -vga qxl -boot menu=on -usbdevice mouse
(In reply to comment #5) > This is not fixed on the F18 Final Live CD. > /etc/localtime is a file and not a symlink. > Reopening until I can verify that it is fixed post F18. > > Brian and Lennart: You guys are the experts. What component is responsible > for creating /etc/localtime on the Live CD? I am hardly an expert on the livecd. I have no clue.
see comment 2. livecd-creator uses yum to install the packages, then it looks at what is there to decide whether or not to use symlink or file replacement. It would appear that systemd is creating a file.
What happens if /etc/localtime does not exist? $ less -N livecd-tools-18.14/imgcreate/kickstart.py ... 152 # /etc/localtime is a symlink with glibc > 2.15-41 153 if os.path.islink(self.path("/etc/localtime")): 154 os.unlink(self.path("/etc/localtime")) 155 os.symlink("/usr/share/zoneinfo/%s" %(tz,), 156 self.path("/etc/localtime")) 157 else: 158 try: 159 shutil.copy2(self.path("/usr/share/zoneinfo/%s" %(tz,)), 160 self.path("/etc/localtime")) 161 except (OSError, shutil.Error) as e: 162 logging.error("Error copying timezone: %s" %(e.strerror,)) ... Source is here: http://git.fedorahosted.org/cgit/livecd
(In reply to comment #8) ... > Source is here: > http://git.fedorahosted.org/cgit/livecd BTW, the link to livecd at http://git.fedorahosted.org/ is broken: http://git.fedorahosted.org/git/livecd
Again, see comment 2. Right now it is falling back to file, but really it should fall back to symlink. But that isn't going to help when there is already a file there.
(In reply to comment #10) > Again, see comment 2. Right now it is falling back to file, but really it > should fall back to symlink. But that isn't going to help when there is > already a file there. But where does that file come from?
oops, didn't mean to make that comment private. rpm says systemd owns that file: $ rpm -qf /etc/localtime systemd-195-13.fc18.x86_64
Confirmed with an updated F18 install. /etc/localtime is an empty file in the systemd package: [joeblow@localhost ~]$ rpm -qlv systemd | grep localtime -rw-r--r-- 1 root root 0 Jan 3 14:51 /etc/localtime -rw-r--r-- 1 root root 965 Jan 3 14:51 /usr/share/man/man5/localtime.5.gz [joeblow@localhost ~]$ rpm -q systemd systemd-195-15.fc18.x86_64
(In reply to comment #12) > oops, didn't mean to make that comment private. > > rpm says systemd owns that file: > > $ rpm -qf /etc/localtime > systemd-195-13.fc18.x86_64 But systemd only ghosts it, so that if it exists it is owned by some package. But this bug is about it being existant as a regular file, so who created it on the livecds? systemd didn't...
Is there a way to get rpm to show non-ghost ownership of files? On f15 it was owned by glibc, but they seem to have dropped it for f18.
Created attachment 679376 [details] strace-livecd-creator-snippet-1.txt strace shows that /etc/localtime does not exist before livecd-creator creates it. Both lstat() and stat() return -1 ENOENT (No such file or directory) for: "/var/tmp/imgcreate-qfRHDC/install_root/etc/localtime" Subsequently, livecd-creator creates it by copying from: "/var/tmp/imgcreate-qfRHDC/install_root/usr/share/zoneinfo/US/Eastern" In the attachement, the first column is the line number in the full strace log, which is 1.6 GB. The snippet includes some surrounding records to provide context. strace command: # strace -tt -f -s 256 -o x1.strace livecd-creator -v --nocleanup -c /usr/share/spin-kickstarts/fedora-live-mini.ks
(In reply to comment #14) > (In reply to comment #12) > > oops, didn't mean to make that comment private. > > > > rpm says systemd owns that file: > > > > $ rpm -qf /etc/localtime > > systemd-195-13.fc18.x86_64 > > But systemd only ghosts it, so that if it exists it is owned by some package. > > But this bug is about it being existant as a regular file, so who created it > on the livecds? systemd didn't... It might also be done in the ks file itself for the relevant spin
Thanks for tracking that down Steve.
livecd-tools-18.15-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/livecd-tools-18.15-1.fc18
livecd-tools-18.15-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.