Bug 858735 - Revert timezone file every glibc-common update
Revert timezone file every glibc-common update
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-19 10:22 EDT by Bastien Nocera
Modified: 2012-10-07 18:50 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-07 18:50:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2012-09-19 10:22:35 EDT
glibc-common-2.16-15.fc18.x86_64
systemd-188-3.fc18.x86_64

glibc-common references /etc/sysconfig/clock in its post installation script[1], but systemd's timedated mechanism uses /etc/timezone.

[1]: http://pkgs.fedoraproject.org/cgit/glibc.git/tree/glibc.spec#n1176

This means that changing the timezone through GNOME System Settings' will update /etc/timezone and /etc/localtime correctly, but glibc-common will overwrite /etc/localtime according to /etc/sysconfig/clock on every upgrade.

For example, on this system installed with the Europe/London timezone, later changed to Europe/Paris through GNOME's systems settings (so through timedated):

$ cat /etc/sysconfig/clock 
# The time zone of the system is defined by the contents of /etc/localtime.
# This file is only for evaluation by system-config-date, do not rely on its
# contents elsewhere.
ZONE="Europe/London"

$ cat /etc/timezone 
Europe/Paris

$ ls -l /etc/localtime 
0 lrwxrwxrwx. 1 root root 32 Sep 19 13:55 /etc/localtime -> /usr/share/zoneinfo/Europe/Paris

$ sudo yum -y reinstall glibc-common
Plugins carregados: auto-update-debuginfo, langpacks, presto, refresh-packagekit
Resolvendo dependências
--> Executando verificação da transação
---> O pacote glibc-common.x86_64 0:2.16-15.fc18 será Reinstalado
--> Resolução de dependências finalizada
<snip>
Instalados:
  glibc-common.x86_64 0:2.16-15.fc18                                                                                                                   

Concluído!

$ ls -l /etc/localtime 
0 lrwxrwxrwx. 1 root root 33 Sep 19 15:08 /etc/localtime -> /usr/share/zoneinfo/Europe/London
Comment 1 Jakub Jelinek 2012-09-19 10:28:27 EDT
Sounds like systemd screwup to me.
Comment 2 Jeff Law 2012-09-19 11:35:11 EDT
/etc/localtime is owned by glibc and shouldn't be modified by other utilities.  The right file for them to be updating is /etc/sysconfig/clock.
Comment 3 Bastien Nocera 2012-09-19 13:12:12 EDT
(In reply to comment #2)
> /etc/localtime is owned by glibc and shouldn't be modified by other
> utilities.  The right file for them to be updating is /etc/sysconfig/clock.

And what will update /etc/localtime once I've changed /etc/sysconfig/clock?
Comment 4 Lennart Poettering 2012-09-19 13:52:30 EDT
I was not aware that glibc is fiddling with /etc/localtime. 

We are trying to move everything over to use /etc/localtime now, and read /etc/sysconfig/clock only for compat reasons, but never update it.

Jakub, can I convince you to drop the code %post code that overwrites the /etc/localtime symlink?
Comment 5 Jeff Law 2012-09-19 14:33:25 EDT
Lennart,

If y'all want systemd to own /etc/localtime, that's fine with me.  It's a bit of a PITA anyway and I'm happy to drop it out of glibc.

Let me know when you've updated systemd to own that file and I'll update glibc appropriately.

jeff
Comment 6 Jakub Jelinek 2012-09-19 14:38:06 EDT
But note that you'll then need to deal with the upgrade consequences thereof, e.g. from the long times when /etc/localtime was a file copy instead of a symlink, so some %post needs to convert it from a file copy into a symlink depending on /etc/sysconfig/clock.  And tools that change only /etc/localtime and not /etc/sysconfig/clock should be fixed anyway.
Comment 7 Bastien Nocera 2012-09-19 17:07:39 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > /etc/localtime is owned by glibc and shouldn't be modified by other
> > utilities.  The right file for them to be updating is /etc/sysconfig/clock.
> 
> And what will update /etc/localtime once I've changed /etc/sysconfig/clock?

I'm guessing that the answer is "reinstall glibc-common" after having changed /etc/sysconfig/clock. Those who live in glasshouses shouldn't be throwing stones.
Comment 8 Lennart Poettering 2012-09-20 15:49:12 EDT
(In reply to comment #5)
> Lennart,
> 
> If y'all want systemd to own /etc/localtime, that's fine with me.  It's a
> bit of a PITA anyway and I'm happy to drop it out of glibc.
> 
> Let me know when you've updated systemd to own that file and I'll update
> glibc appropriately.

I have now updated the RPM to take possession of /etc/localtime and to implement the symlink migration logic. It's in bodhi for F18 (systemd-190).
Comment 9 Fedora Update System 2012-09-20 15:57:16 EDT
systemd-190-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-190-1.fc18
Comment 10 Lennart Poettering 2012-09-20 15:59:22 EDT
I have also filed bugs against system-config-date and anaconda to stop creating /etc/sysconfig/clock.
Comment 11 Jeff Law 2012-09-20 17:01:32 EDT
Excellent.  From looking at the glibc.spec file something should own updating /var/spool/postfix/etc/localtime as well, presumably systemd.  As far as I can tell, it should be a copy of /etc/localtime.

I've got fresh glibc builds spinning.
Comment 12 Bastien Nocera 2012-09-20 18:08:21 EDT
(In reply to comment #11)
> Excellent.  From looking at the glibc.spec file something should own
> updating /var/spool/postfix/etc/localtime as well, presumably systemd.  As
> far as I can tell, it should be a copy of /etc/localtime.
> 
> I've got fresh glibc builds spinning.

Should probably be in the same update as systemd.
Comment 13 Jeff Law 2012-09-21 16:16:01 EDT
Agreed.  I've never had to issue an update with multiple packages.  Do we just tack it on as another build to Lennart's existing update?  If so, the right build is glibc-2.16-17.fc18.
Comment 14 Fedora Update System 2012-09-22 02:38:20 EDT
Package systemd-191-2.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-191-2.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-191-2.fc18
then log in and leave karma (feedback).
Comment 15 Lennart Poettering 2012-09-24 09:08:39 EDT
Added the glibc update to the bodhi ticket!

Thanks everybody!
Comment 16 Fedora Update System 2012-09-27 20:18:54 EDT
Package glibc-2.16-17.fc18, systemd-192-1.fc18, selinux-policy-3.11.1-23.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 systemd-192-1.fc18 selinux-policy-3.11.1-23.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/selinux-policy-3.11.1-23.fc18,rtkit-0.11-3.fc18,systemd-192-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).
Comment 17 Fedora Update System 2012-10-01 16:11:53 EDT
Package glibc-2.16-17.fc18, rtkit-0.11-3.fc18, systemd-193-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 rtkit-0.11-3.fc18 systemd-193-1.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-193-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Note You need to log in before you can comment on or make changes to this bug.