Bug 2047185

Summary: tzdata package contents are missing in quay.io/centos/centos:stream9 image
Product: Red Hat Enterprise Linux 9 Reporter: Marcin Sobczyk <msobczyk>
Component: tzdataAssignee: Patsy Griffin <pfrankli>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, codonell, jwboyer, mperina, oliel
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-14 20:58:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcin Sobczyk 2022-01-27 11:08:33 UTC
Description of problem:

Even though package 'tzdata' is reported as installed in quay.io/centos/centos:stream9 image, its contents are missing.

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

Latest centos:stream9 image from quay is affected.

How reproducible:

Always

Steps to Reproduce:

podman run --rm -it quay.io/centos/centos:stream9
rpm -ql tzdata
...
/usr/share/zoneinfo/Africa
...

ls -l /usr/share/zoneinfo
ls: cannot access '/usr/share/zoneinfo': No such file or directory

Actual results:

'/usr/share/zoneinfo' directory doesn't exist.

Expected results:

'/usr/share/zoneinfo' directory and its contents do exist.

Comment 2 Carlos O'Donell 2022-02-14 20:58:37 UTC
This is not a tzdata issue, but a container issue, and I agree it is confusing.

As part of the technical strategy for creating CentOS Stream 9 base containers, and actually many of the other containers, there are extra steps taken to reduce the size of deployed container. The commands we run are not always what we would like, but it serves a specific purpose e.g. improve security through the removal of a feature that does not yet have package-level granularity, or reduce the size of the uncompressed image.

Removing the zoneinfo files is exactly one of those extra steps that minimizes the unpacked size of the CentOS Stream 9 base container. This is actually not what we want to do, but is an intermediate step towards full tzdata removal. As part of an ongoing project we are looking at allowing the complete removal tzdata, and once that work is complete there won't be a tzdata in the container and you'll be able to layer on top of that if you need more than just UTC for logging.

I'm marking this issue as CLOSED/NOTABUG for now since the container is operating as expected, but I want you to know that we are actively working to improve this.

The relevant Fedora change that needs to happen first is here:

"Bug 1722233 - tzdata: Allow complete removal of tzdata."
https://bugzilla.redhat.com/show_bug.cgi?id=1722233