Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timezone info package #179

Closed
Eeems opened this issue Jan 3, 2021 · 17 comments · Fixed by #182
Closed

Add timezone info package #179

Eeems opened this issue Jan 3, 2021 · 17 comments · Fixed by #182
Assignees
Labels
good first issue Want to make your first contribution to Toltec? Start here! packages Add or improve packages of the repository

Comments

@Eeems
Copy link
Member

Eeems commented Jan 3, 2021

The reMarkable doesn't come with the full set of timezone information. So timezones listed by timedatectl as on the device are not actually selectable. We should add a package that contains the full set and likely install it by default.

@Eeems Eeems added packages Add or improve packages of the repository good first issue Want to make your first contribution to Toltec? Start here! labels Jan 3, 2021
@matteodelabre
Copy link
Member

Note that the zoneinfo-* packages from Entware (of which zoneinfo-asia and zoneinfo-europe are installed by default) already install timezone information to /opt/share/timezone/. So we could simply defer to these packages by symlinking /usr/share/timezone to /opt/share/timezone. We also need to install zoneinfo-core for this to work (strangely, it is not installed by default), otherwise key files like /opt/share/timezone/zone.tab are missing.

@Eeems
Copy link
Member Author

Eeems commented Jan 5, 2021

Hmm, but does this work nicely with timedatectl?

@matteodelabre
Copy link
Member

Just tested it on my device and it works (both list-timezones and set-timezone).

@Eeems
Copy link
Member Author

Eeems commented Jan 5, 2021

So I guess the tzdata package isn't needed?

@MechEng70
Copy link

MechEng70 commented Jan 5, 2021

RM2 here (without installing anything):

reMarkable: ~/ timedatectl set-timezone America/Los_Angeles
reMarkable: ~/ timedatectl
                      Local time: Tue 2021-01-05 08:12:21 PST
                  Universal time: Tue 2021-01-05 16:12:21 UTC
                        RTC time: Tue 2021-01-05 16:12:22
                       Time zone: America/Los_Angeles (PST, -0800)
       System clock synchronized: no
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
reMarkable: ~/

@matteodelabre
Copy link
Member

So I guess the tzdata package isn't needed?

@Eeems Yes. It seems to be redundant with the Entware packages. As an added bonus, installing timezone info to /opt saves space on the root partition.

RM2 here (without installing anything)

@MechEng70 America/Los_Angeles is shipped by default with the reMarkable. Try another timezone like Africa/Abidjan which although it is listed in timedatectl list-timezones should give you an error.

@Eeems
Copy link
Member Author

Eeems commented Jan 5, 2021

Does zoneinfo-core contain zdump or zic?

@matteodelabre
Copy link
Member

It looks like zoneinfo-* packages only contain zone definitions and no binaries.

@MechEng70
Copy link

@matteodelabre Confirmed that "Africa/Abidjan" does give an error on RM2.

reMarkable: ~/ timedatectl set-timezone Africa/Abidjan
Failed to set time zone: Invalid time zone 'Africa/Abidjan'

@matteodelabre
Copy link
Member

@MechEng70 Thanks for testing!

@Eeems
Copy link
Member Author

Eeems commented Jan 5, 2021

It looks like zoneinfo-* packages only contain zone definitions and no binaries.

Alright I'll take a quick look to see if entware has them elsewhere, if not I'll rename the package and only include those binaries.

@matteodelabre
Copy link
Member

To make everything work smoothly, we’ll also need to create the symlink from /usr/share/timezone to /opt/share/timezone in the bootstrap script. But since we don’t have an uninstall script (maybe we ought to have one?), I’m not sure what is the best way to restore the rM-provided timezone data.

@Eeems
Copy link
Member Author

Eeems commented Jan 6, 2021

The best way would be to pull it directly from an update archive to be honest. Perhaps we should be using a bind mount instead of symlinking? That way we don't have to worry about restoring?

@matteodelabre
Copy link
Member

Good idea, I forgot about bind mounts. I'll open a PR to add this to the install script tomorrow.

@Eeems Eeems self-assigned this Jan 10, 2021
@Eeems
Copy link
Member Author

Eeems commented Jan 10, 2021

Good idea, I forgot about bind mounts. I'll open a PR to add this to the install script tomorrow.

Which PR is that ;P

@matteodelabre
Copy link
Member

Is it tomorrow yet?

@Eeems
Copy link
Member Author

Eeems commented Jan 12, 2021

Opened #213

@Eeems Eeems closed this as completed Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Want to make your first contribution to Toltec? Start here! packages Add or improve packages of the repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants