debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #09271
[Bug 2125405] Re: timedatectl list-timezones shows timezones that are not installed
Given this is fixed is questing, I will opt to not fix this in plucky,
according to
https://documentation.ubuntu.com/sru/en/latest/reference/requirements/#general-
requirements-for-all-srus.
** Changed in: systemd (Ubuntu Plucky)
Status: New => Won't Fix
** Changed in: systemd (Ubuntu Noble)
Assignee: (unassigned) => Nick Rosbrook (enr0n)
** Changed in: systemd (Ubuntu Noble)
Status: New => Triaged
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2125405
Title:
timedatectl list-timezones shows timezones that are not installed
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Noble:
Triaged
Status in systemd source package in Plucky:
Won't Fix
Bug description:
[Impact]
The org.freedesktop.timedate1.ListTimezones DBus method may return a
list that contains timezones that are not installed on the system.
To build the list, systemd-timedated parses
/usr/share/zoneinfo/tzdata.zi from the tzdata package (or
/usr/share/zoneinfo/zone1970.tab as a fallback). However, not all
timezones listed in tzdata.zi are included in the main tzdata package,
but in the tzdata-legacy package.
But, systemd-timedated does not validate the timezones when building
the list, which makes the following possible:
$ timedatectl list-timezones | grep "US/Alaska"
US/Alaska
$ timedatectl set-timezone US/Alaska
Failed to set time zone: Invalid or not installed time zone 'US/Alaska'
[Test Plan]
Select a timezone from the tzdata-legacy package, e.g. US/Alaska.
Confirm that /usr/share/zoneinfo/US/Alaska does not exist, and that
the tzdata-legacy package is not installed:
$ stat /usr/share/zoneinfo/US/Alaska
$ apt policy tzdata-legacy
Check if US/Alaska is included the the list from systemd-timedated:
$ timedatectl list-timezones | grep "US/Alaska"
With the fix, US/Alaska should not be listed. But, after installing
tzdata-legacy, US/Alaska should be installed.
$ apt install tzdata-legacy
$ timedatectl list-timezones | grep "US/Alaska"
[Where problems could occur]
The patch uses an existing timezone_is_valid() function to validate
timezones before returning a list in get_timezones(). In addition to
systemd-timedated, get_timezones() is used in systemd-firstboot.
If external programs depend on the current buggy behavior, this fix
could cause a regression.
Note that the org.freedesktop.timedate1.SetTimezone method already
uses timezone_is_valid() to validate timezones (as demonstrated in the
Impact section).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2125405/+subscriptions
References