Bug 23472

Summary: mythbackend: MySQL time zone support is missing
Product: Mageia Reporter: Bit Twister <bittwister2>
Component: RPM PackagesAssignee: Marc Krämer <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: Normal CC: alien, mageia, marja11, tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: mariadb-10.3.9-1.mga7.src.rpm CVE:
Status comment:

Description Bit Twister 2018-08-22 00:15:51 CEST
Description of problem: mga7 dev0

mythbackend fails to start.

  MySQL time zone support is missing.  Please install it and try again.
  See 'mysql_tzinfo_to_sql' for assistance.

Thought about opening problem against  timezone-2018d-2.mga7.src.rpm
but guessing fix should be in post install trigger for mythtv



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


How reproducible: Always


Steps to Reproduce:

1. systemctl start mysqld
2. mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root

ignore Warning: Unable to load for
    /usr/share/zoneinfo/leapseconds
    /usr/share/zoneinfo/posix/leapseconds
    /usr/share/zoneinfo/posix/tzdata.zi
    /usr/share/zoneinfo/tzdata.zi
as time zone. Skipping it.

3. install transcode, perl-Net-UPnP, mythtv-frontend, perl-MythTV, mythtv-backend,  mythtv-setup

4. run mythtv-setup
5. systemctl start mythbackend
6. systemctl status mythbackend

Note startup failed.

Workaround: See https://www.mythtv.org/wiki/MySQL_Time_Zone_Tables
# cd /usr/share/zoneinfo/Etc
# mv UTC UTC_bkup
# ln -s ../Zulu UTC
# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root

Run step 5 and 6.

Other mythtv install related bugs, bug 19127, bug 20227
Comment 1 David Walser 2018-08-22 11:40:52 CEST
That workaround shouldn't be necessary, as our timezone package does provide the Zulu file.  The link said you only need to make the symlink if it's missing.  If doing that really is necessary for it to work, that would be a bug in mariadb.
Comment 2 Bit Twister 2018-08-22 14:12:27 CEST
(In reply to David Walser from comment #1)
> That workaround shouldn't be necessary, as our timezone package does provide
> the Zulu file.

Yes, it bother me that I found a UTC file where I had to place the link to get mythbackend to see the data. 

>  The link said you only need to make the symlink if it's
> missing.  If doing that really is necessary for it to work, 

It was, since the previous 5+ clean installs failed mythbackend from starting.

> that would be a bug in mariadb.

I'll take your word for it and change Source rpm. Leaving summary as is so anyone searching for mythbackend error message can find this workaround.

Source RPM: mythtv-29.1-20180521.2.mga7.tainted.src.rpm => mariadb-10.3.9-1.mga7.src.rpm

Comment 3 Marja Van Waes 2018-08-23 08:40:22 CEST
(In reply to Bit Twister from comment #2)

> 
> >  The link said you only need to make the symlink if it's
> > missing.  If doing that really is necessary for it to work, 
> 
> It was, since the previous 5+ clean installs failed mythbackend from
> starting.
> 
> > that would be a bug in mariadb.
> 
> I'll take your word for it and change Source rpm. Leaving summary as is so
> anyone searching for mythbackend error message can find this workaround.

Assigning to the basesystem maintainers and CC'ing the registered mariadb maintainer and the de facto maintainer.

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

Comment 4 Marc Krämer 2018-08-24 00:26:26 CEST
the only thing to be done is to run 
mysql_tzinfo_to_sql /usr/share/zoneinfo |mysql

maybe it is a good idea to add these infos in postinstall
Comment 5 Marc Krämer 2018-08-24 00:48:20 CEST
after install of mysql, the service is not started automatically, so we are not able to add this info in post stage.
Comment 6 Thomas Backlund 2018-08-24 00:52:41 CEST
you can add it as an README.urpmi.update to get it to show on rpm update

CC: (none) => tmb

Comment 7 Marc Krämer 2018-08-24 00:57:50 CEST
thx, I'll put another line to README.urpmi, since this is no mysql-issue. And it depends on the use case if you really need this data.
Marc Krämer 2018-08-24 01:05:17 CEST

Assignee: basesystem => mageia

Comment 8 Marc Krämer 2018-08-24 01:05:43 CEST
added a new line to readme.urpmi

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

Comment 9 Bit Twister 2018-08-24 01:22:33 CEST
(In reply to Marc Krämer from comment #4)
> the only thing to be done is to run 
> mysql_tzinfo_to_sql /usr/share/zoneinfo |mysql

I ran the mysql_tzinfo_to_sql on 5+ installs. None worked until I did the workaround.


> maybe it is a good idea to add these infos in postinstall

If adding the workaround in the infos, then Ok, but if just adding the command to run mysql_tzinfo_to_sql then that is not going to solve the problem.
Comment 10 Marc Krämer 2018-08-24 01:28:05 CEST
You have to execute
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql

which will select the mysql-database and run the insert statements on this database. Otherwise you will get an error like "you have to select a database..."