Bug 19392 - [5.1] upgrade installation reports: "Error:`script' failed for timezone-2016f-1.mga5
Summary: [5.1] upgrade installation reports: "Error:`script' failed for timezone-2016f...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-09-17 09:01 CEST by Ben McMonagle
Modified: 2016-11-16 09:04 CET (History)
5 users (show)

See Also:
Source RPM: timezone
CVE:
Status comment:


Attachments
ddebug.log (i586) (151.88 KB, application/x-xz)
2016-09-23 11:14 CEST, Ben McMonagle
Details
ddebug.log x86_64 (155.16 KB, application/x-xz)
2016-09-23 11:28 CEST, Ben McMonagle
Details
ddebug log x86 upgrade Mga4 -5 vbox 18 oct (120.56 KB, application/x-xz)
2016-10-18 12:07 CEST, Ben McMonagle
Details

Description Ben McMonagle 2016-09-17 09:01:36 CEST
Description of problem:in a virtual-box create a Mageia 4 installation with all desktops included. upgrade the system to Mageia 5.1. at the end of the installation a pop-up reports : "Error:`script' failed for timezone-2016f-1.mga5


Version-Release number of selected component (if applicable):

Mageia-5.1-x86_64-DVD.iso
DATE.txt: Fri Sep  9 23:54:09 CEST 2016
md5sum:   36f2a8fa62d9cd7ba381edefe2ffa48d

+

Mageia-5.1-i586-DVD.iso
DATE.txt: Thu Sep  8 23:21:15 CEST 2016


How reproducible:every time


Steps to Reproduce:
1.see description
2.
3.
David Walser 2016-09-17 12:20:04 CEST

CC: (none) => luigiwalser

Comment 1 Thierry Vignaud 2016-09-19 15:14:22 CEST
This is not an installer bug but a packaging one

Component: Installer => RPM Packages
Source RPM: (none) => timezone

Comment 2 David Walser 2016-09-19 18:31:56 CEST
Somewhere in the logs in /root/drakx it should say which script failed.  I'm guessing it might be %post and it might need to be ln -sf instead of ln -s, but it'd be nice to confirm this.
Comment 3 Marja Van Waes 2016-09-21 16:27:19 CEST
(In reply to David Walser from comment #2)
> Somewhere in the logs in /root/drakx it should say which script failed.  I'm
> guessing it might be %post and it might need to be ln -sf instead of ln -s,
> but it'd be nice to confirm this.

@ Ben

Could you please attach the /root/drakx/ddebug.log from that upgrade? Please make sure it has the time stamp matching the upgrade, so _not_ the timestamp matching the Mga4 install.

You can compress it with xz before attaching it, e.g.:
 
   xz ddebug.log

and then attach ddebug.log.xz

Assigning to basesystem maintainers group, because timezone has

Group       : System/Base

And CC'ing the registered maintainer (neoclust)

Keywords: (none) => NEEDINFO
CC: (none) => mageia, marja11
Assignee: bugsquad => basesystem

Comment 4 Ben McMonagle 2016-09-23 11:14:43 CEST
Created attachment 8441 [details]
ddebug.log (i586)

there were 2 ddebug.log files [ ddebug.log  + ddebug.log1]

ddebug.log1 contains no files *.mga5

ddebug.log contains files *.mga5. this one I have attached.

please advise if you require the other
Comment 5 Ben McMonagle 2016-09-23 11:28:42 CEST
Created attachment 8442 [details]
ddebug.log x86_64

just in case
Comment 6 Ben McMonagle 2016-10-18 12:07:09 CEST
Created attachment 8570 [details]
ddebug log x86 upgrade Mga4 -5 vbox 18 oct
Comment 7 Ben McMonagle 2016-10-18 12:08:09 CEST
still valid

Mageia-5.1-x86_64-DVD.iso
DATE.txt: Thu Sep 22 23:59:29 CEST 2016
md5sum:   497c65d22b74cd8afcd24badf6df6a1c
Comment 8 David Walser 2016-11-13 18:15:46 CET
OK those logs weren't helpful (not your fault Ben).  Our installer needs to do a better job collecting the output from rpm so we can see *which* scriplet fails, but I'm going with my prior guess that %post should have been ln -sf and pushing an update.

Advisory:
----------------------------------------

The timezone package has been updated to version 2016i with the latest time zone
information.

A bug in the package that caused issues when upgrading from Mageia 4 has also
been fixed.

References:
http://mm.icann.org/pipermail/tz-announce/2016-September/000041.html
http://mm.icann.org/pipermail/tz-announce/2016-October/000042.html
http://mm.icann.org/pipermail/tz-announce/2016-November/000043.html
----------------------------------------

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016f-1.mga5
timezone-java-2016f-1.mga5

from timezone-2016f-1.mga5.src.rpm

Keywords: NEEDINFO => (none)
Hardware: x86_64 => All
Assignee: basesystem => qa-bugs

Comment 9 Dave Hodgins 2016-11-14 03:01:15 CET
I have my system time set to utc, with the local time set to Canada/Eastern.

Installing the update changed my local time to utc.

CC: (none) => davidwhodgins
Whiteboard: (none) => feedback

Comment 10 David Walser 2016-11-14 04:15:51 CET
(In reply to Dave Hodgins from comment #9)
> I have my system time set to utc, with the local time set to Canada/Eastern.
> 
> Installing the update changed my local time to utc.

It only does that if /etc/localtime is not a symlink and your time zone isn't set correctly in /etc/sysconfig/clock.  The problem was on your system.  The issue in the %post scriptlet that I just fixed may have been responsible for it getting that way, but there's nothing that can be done about that after the fact.

Whiteboard: feedback => (none)

Comment 11 Dave Hodgins 2016-11-14 17:23:45 CET
I do not consider that an acceptable fix. I'd replace the postinstall scriptlet with ...

. /etc/sysconfig/clock
if [ ! -r /usr/share/zoneinfo/$ZONE ]; then
        ZONE=UTC
fi
if [ ! -L /etc/localtime -a -r /usr/share/zoneinfo/$ZONE ]; then
        ln -sf /usr/share/zoneinfo/$ZONE /etc/localtime
fi
Dave Hodgins 2016-11-14 17:24:08 CET

Whiteboard: (none) => feedback

Comment 12 Dave Hodgins 2016-11-14 18:54:45 CET
Or slightly simpler ...

ZONE=UTC
. /etc/sysconfig/clock
if [ ! -L /etc/localtime -a -r /usr/share/zoneinfo/$ZONE ]; then
        ln -sf /usr/share/zoneinfo/$ZONE /etc/localtime
fi
Comment 13 David Walser 2016-11-14 19:26:49 CET
That's what the triggerun does.  If you revert back to the previous version and install the new update (which I changed to make the triggerun run again), you should be fine.

Advisory:
----------------------------------------

The timezone package has been updated to version 2016i with the latest time zone
information.

A bug in the package that caused issues when upgrading from Mageia 4 has also
been fixed.

References:
http://mm.icann.org/pipermail/tz-announce/2016-September/000041.html
http://mm.icann.org/pipermail/tz-announce/2016-October/000042.html
http://mm.icann.org/pipermail/tz-announce/2016-November/000043.html
----------------------------------------

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016f-1.1.mga5
timezone-java-2016f-1.1.mga5

from timezone-2016f-1.1.mga5.src.rpm

Whiteboard: feedback => (none)

Comment 14 Dave Hodgins 2016-11-14 22:41:53 CET
It's still changing /etc/localtime, which was a copy of
/usr/share/zoneinfo/Canada/Eastern
to /etc/localtime -> /usr/share/zoneinfo/UTC
ignoring the zone value set in /etc/sysconfig/clock.

How do I see what triggers will will be executed? I don't see anything in
/var/lib/rpm/filetriggers related to time, zone, or clock.

The package list above is incorrect. I have
rpm -qa|grep timezone
timezone-java-2016i-2.mga5
timezone-2016i-2.mga5
from timezone-2016i-2.mga5.src.rpm

Whiteboard: (none) => feedback

Comment 15 David Walser 2016-11-15 13:53:18 CET
Try it again.

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016f-3.mga5
timezone-java-2016f-3.mga5

from timezone-2016f-3.mga5.src.rpm

Whiteboard: feedback => f

Comment 16 David Walser 2016-11-15 13:53:26 CET
Try it again.

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016f-3.mga5
timezone-java-2016f-3.mga5

from timezone-2016f-3.mga5.src.rpm

Whiteboard: f => (none)

Comment 17 Dave Hodgins 2016-11-15 15:26:43 CET
Installing timezone-2016i-3.mga5.x86_64.rpm still has the same problem.

# rpm -q --scripts timezone
postinstall scriptlet (using /bin/sh):
if [ ! -L /etc/localtime -a -f /usr/share/zoneinfo/UTC ]; then
        ln -sf /usr/share/zoneinfo/UTC /etc/localtime
fi

I.E. If /etc/localtime is not a link (i.e. leftover from an older version of Mageia, force it to UTC, regardless of what /etc/sysconfig/clock has for the ZONE setting.

The scriptlet in comment 12 works. This doesn't. I don't see anything in the package, or elsewhere in my system for a rpm trigger to be activated.
Comment 18 David Walser 2016-11-15 15:29:58 CET
Please look at the %triggerun part, that's what is handling your issue.  Please revert to the version in updates, make sure your /etc/localtime file is back to what it was originally (a copy and not a symlink) and install the new update.
Comment 19 Dave Hodgins 2016-11-15 17:00:46 CET
[root@x3 ~]# rpm -qa|grep timezone-
timezone-java-2016f-1.mga5
timezone-2016f-1.mga5
[root@x3 ~]# ll /etc/localtime
-rw-r--r-- 1 root root 3503 Nov 15 07:54 /etc/localtime
[root@x3 ~]# urpmi timezone timezone-java
    http://mirror.math.princeton.edu/pub/mageia/distrib/5/x86_64/media/core/updates_testing/timezone-java-2016i-3.mga5.noarch.rpm
    http://mirror.math.princeton.edu/pub/mageia/distrib/5/x86_64/media/core/updates_testing/timezone-2016i-3.mga5.x86_64.rpm
installing timezone-2016i-3.mga5.x86_64.rpm timezone-java-2016i-3.mga5.noarch.rpm from /var/cache/urpmi/rpms      
Preparing...                     ################################################################################
      1/2: timezone-java         ################################################################################
      2/2: timezone              ################################################################################
      1/2: removing timezone-java-6:2016f-1.mga5.noarch
                                 ################################################################################
      2/2: removing timezone-6:2016f-1.mga5.x86_64
                                 ################################################################################
[root@x3 ~]# ll /etc/localtime
lrwxrwxrwx 1 root root 23 Nov 15 15:58 /etc/localtime -> /usr/share/zoneinfo/UTC
[root@x3 ~]# grep ZONE /etc/sysconfig/clock
ZONE=Canada/Eastern
Comment 20 Dave Hodgins 2016-11-15 17:29:20 CET
Found it in the spec file unpacked from the srpm.

%post of new package is executed before the %triggerun of old package,
according to https://fedoraproject.org/wiki/Packaging:Scriptlets
so that's where it's forcing it to UTC
Comment 21 David Walser 2016-11-15 17:37:19 CET
Thanks Dave!

This symlink transition has been extremely frustrating.

Now the build system is not letting me submit the package again.

CC: (none) => sysadmin-bugs

Comment 22 David Walser 2016-11-15 17:44:23 CET
Looks like an SVN problem.  Should be OK once they finish building now.

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016f-4.mga5
timezone-java-2016f-4.mga5

from timezone-2016f-4.mga5.src.rpm
Comment 23 Dave Hodgins 2016-11-15 17:57:53 CET
For the advisory, these are 2016i packages, not 2016f.
Comment 24 David Walser 2016-11-15 18:02:28 CET
I should just give up.

There's a build system issue now too, but it will build eventually.

Advisory:
----------------------------------------

The timezone package has been updated to version 2016i with the latest time zone
information.

A bug in the package that caused issues when upgrading from Mageia 4 has also
been fixed.

References:
http://mm.icann.org/pipermail/tz-announce/2016-September/000041.html
http://mm.icann.org/pipermail/tz-announce/2016-October/000042.html
http://mm.icann.org/pipermail/tz-announce/2016-November/000043.html
----------------------------------------

Updated packages in core/updates_testing:
----------------------------------------
timezone-2016i-4.mga5
timezone-java-2016i-4.mga5

from timezone-2016i-4.mga5.src.rpm
Comment 25 Dave Hodgins 2016-11-15 19:57:37 CET
Yeah! It works. :-)

Keywords: (none) => validated_update
Whiteboard: (none) => MGA5-64-OK advisory

Comment 26 Mageia Robot 2016-11-16 09:04:15 CET
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0138.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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