[SM-Grimoire-Bugs] [Bug 14548] glibc (2.7?) overwrites /etc/localtime

bugzilla-daemon at bugs.sourcemage.org bugzilla-daemon at bugs.sourcemage.org
Tue Jul 1 12:30:15 EDT 2008


http://bugs.sourcemage.org/show_bug.cgi?id=14548





------- Additional Comments From sandalle at sourcemage.org  2008-07-01 11:30 -------
I have not yet found *why* this is happening. According to the code I've found
in glibc, it should not be overwriting /etc/localtime:

$ ls -lah /etc/localtime
lrwxrwxrwx 1 root root 30 2008-06-27 13:19 /etc/localtime ->
/usr/share/zoneinfo/US/Pacific

$ ls -lah /usr/share/zoneinfo/US/Pacific 
-rw-r--r-- 2 root root 2.8K 2008-06-27 13:12 /usr/share/zoneinfo/US/Pacific

$ if test -r /etc/localtime; then echo true; else echo false; fi
true

# cast -c glibc
...

$ ls -lah /etc/localtime
lrwxrwxrwx 1 root root 30 2008-06-27 13:19 /etc/localtime ->
/usr/share/zoneinfo/Factory

$ gaze compile glibc
...
if test -r /etc/localtime; then \
          echo Site timezone NOT reset to Factory.; \
        else \
          rm -f /etc/localtimeT; \
          /bin/sh ../scripts/rellns-sh /usr/share/zoneinfo/Factory
/etc/localtimeT; \
          mv -f /etc/localtimeT /etc/localtime; \
if test -r /etc/localtime; then \
          echo Site timezone NOT reset to Factory.; \
        else \
          rm -f /etc/localtimeT; \
          /bin/sh ../scripts/rellns-sh /usr/share/zoneinfo/Factory
/etc/localtimeT; \
          mv -f /etc/localtimeT /etc/localtime; \
        fi
        fi


glibc-2.7/Makeconfig:
# What timezone should be the installed default (e.g., US/Eastern).
# Run `make -C time echo-zonenames' to see a list of available zone names.
# The local timezone can be changed with `zic -l TIMEZONE' at any time.
ifndef localtime
localtime = Factory
endif

# Where to install the "localtime" timezone file; this is the file whose
# contents $(localtime) specifies.  If this is a relative pathname, it is
# relative to $(zonedir).  It is a good idea to put this somewhere
# other than there, so the zoneinfo directory contains only universal data,
# localizing the configuration data elsewhere.
ifndef localtime-file
localtime-file = $(sysconfdir)/localtime
inst_localtime-file = $(install_root)$(localtime-file)
endif


glibc-2.7/timezone/Makefile:
ifdef localtime
$(installed-localtime-file): $(inst_zonedir)/$(localtime) $(objpfx)zic \
                             $(+force)
        $(make-target-directory)
        if test -r $@; then \
          echo Site timezone NOT reset to Factory.; \
        else \
          rm -f $@T; \
          $(SHELL) $(..)scripts/rellns-sh $< $@T; \
          mv -f $@T $@; \
        fi
endif

-- 
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the SM-Grimoire-Bugs mailing list