Bug 1870814 - fedora-minimal contains broken tzdata package
Summary: fedora-minimal contains broken tzdata package
Keywords:
Status: NEW
Alias: None
Product: Fedora Container Images
Classification: Fedora
Component: fedora-container-image
Version: 32
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Clement Verna
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-20 19:31 UTC by Simon Krenger
Modified: 2021-02-17 14:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1668185 0 unspecified CLOSED rhel8-beta container contains broken tzdata package 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1722233 0 unspecified NEW tzdata: Consider splitting out UTC into a separate subpackage 2021-02-22 00:41:40 UTC

Description Simon Krenger 2020-08-20 19:31:32 UTC
Description of problem:

In the `fedora-minimal:32` container image, the `tzdata` package seems to be installed but broken:

```
$ podman run -it registry.fedoraproject.org/fedora-minimal:32 bash
bash-5.0# rpm -V tzdata
missing     /usr/share/zoneinfo
missing     /usr/share/zoneinfo/Africa
[..]
```

This will lead to application errors (PHP errors in my case) regarding the TZ database. A very similar issue was resolved for the `rhel8-beta` image in BZ#1668185.

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

registry.fedoraproject.org/fedora-minimal:32

How reproducible:

Always

Steps to Reproduce:
1. `podman run -it registry.fedoraproject.org/fedora-minimal:32 bash`
2. `rpm -V tzdata`

Actual results:

```
# rpm -V tzdata
missing     /usr/share/zoneinfo
missing     /usr/share/zoneinfo/Africa
missing     /usr/share/zoneinfo/Africa/Abidjan
missing     /usr/share/zoneinfo/Africa/Accra
missing     /usr/share/zoneinfo/Africa/Addis_Ababa
missing     /usr/share/zoneinfo/Africa/Algiers
# ls -l /usr/share/zoneinfo
ls: cannot access '/usr/share/zoneinfo': No such file or director
```

Expected results:

`microdnf reinstall tzdata` will resolve the issue, `rpm -V` will then succeed:

```
# microdnf reinstall tzdata
Downloading metadata...
Downloading metadata...
Downloading metadata...
Downloading metadata...
Downloading metadata...
Package                                                                                                         Repository                                  Size
Reinstalling:
 tzdata-2020a-1.fc32.noarch                                                                                     updates                          440.1\xc2\xa0kB
Transaction Summary:
 Installing:        0 packages
 Reinstalling:      1 packages
 Upgrading:         0 packages
 Removing:          0 packages
 Downgrading:       0 packages
Downloading packages...
Running transaction test...
Reinstalling: tzdata;2020a-1.fc32;noarch;updates
Complete.
bash-5.0# rpm -V tzdata
# ls -l /usr/share/zoneinfo/
total 420
drwxr-xr-x  2 root root   4096 Aug 20 19:29 Africa
drwxr-xr-x  6 root root   4096 Aug 20 19:29 America
drwxr-xr-x  2 root root   4096 Aug 20 19:29 Antarctica
drwxr-xr-x  2 root root   4096 Aug 20 19:29 Arctic
drwxr-xr-x  2 root root   4096 Aug 20 19:29 Asia
[..]
```

Additional info:

Workaround is to execute `microdnf reinstall tzdata`, see also Bug 1668185

Comment 1 Simon Krenger 2020-08-26 09:57:32 UTC
Removing these files seems to be a deliberate decision: https://pagure.io/fedora-kickstarts/blob/master/f/fedora-container-base-minimal.ks#_39

```
# if you want to change the timezone, bind-mount it from the host or reinstall tzdata
rm -fv /etc/localtime
mv /usr/share/zoneinfo/UTC /etc/localtime
rm -rfv  /usr/share/zoneinfo
```

Proposed fix would be to copy the "/usr/share/zoneinfo/UTC" file back to avoid applications not being able to fall back to UTC.

Comment 2 Carlos O'Donell 2021-02-17 14:31:10 UTC
This needs more work to fix and test.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1722233

Removing files without solving the technical packaging problem is always a bad design choice since it breaks validation.


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