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

tzdata: revert to fat format #102946

Merged
merged 2 commits into from Nov 6, 2020

Conversation

roberth
Copy link
Member

@roberth roberth commented Nov 5, 2020

Motivation for this change

The tzdata default format has changed, breaking some packages. We'll want to stick to the old format until the libraries and applications actually support the new format.

cc @zowoq, @jtojnar

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

The timezone dumps have switched to a "slim" format since 2020b.
This has broken various packages, including
 - go 1.4 (used for bootstrapping)
 - haskellPackages.tz
 - libical

The "fat" format can still be generated, as this commit shows.
It seems to create files that are *mostly* the slim versions with
some more data attached.
roberth added a commit that referenced this pull request Nov 5, 2020
This reverts commit d2678e6.

The commit was masking a real problem.

See #102946:

    The tzdata default format has changed, breaking some packages.
    We'll want to stick to the old format until the libraries and
    applications actually support the new format.
roberth added a commit that referenced this pull request Nov 5, 2020
This reverts commit 2b5cfa7.

The commit was masking a real problem.

See #102946:

    The tzdata default format has changed, breaking some packages.
    We'll want to stick to the old format until the libraries and
    applications actually support the new format.
@roberth roberth mentioned this pull request Nov 5, 2020
2 tasks
@ofborg ofborg bot requested review from fpletz and cstrahan November 5, 2020 17:42
@zowoq
Copy link
Contributor

zowoq commented Nov 5, 2020

As the go_bootstrap timezone tests already require disabling/patching, I'd rather don't revert that commit so we don't need to bother with them in the future.

@roberth
Copy link
Member Author

roberth commented Nov 5, 2020

As the go_bootstrap timezone tests already require disabling/patching, I'd rather don't revert that commit so we don't need to bother with them in the future.

It was valuable because it helped change my mind, letting me find the root cause and a better solution. That doesn't necessarily mean it will be valuable in the future though.
I'm leaning towards keeping the test, but I don't feel strongly about it.

@zowoq
Copy link
Contributor

zowoq commented Nov 5, 2020

We already disable lots of tests for the go packages, I really don't see the benefit in keeping this one.

@roberth
Copy link
Member Author

roberth commented Nov 5, 2020

Sure enough. You're the go maintainer, not me :)

@jtojnar
Copy link
Contributor

jtojnar commented Nov 6, 2020

How wide are the breakages? Can we do it on staging-next?

@roberth
Copy link
Member Author

roberth commented Nov 6, 2020

I don't know how wide. It only shows when you miss an appointment. I don't know which time zones and time ranges are affected. libical apps seem to be affected, possibly more. It'd take considerable effort to figure that out, because test suites may or may not detect the problem.

@FRidh
Copy link
Member

FRidh commented Nov 6, 2020

How wide are the breakages? Can we do it on staging-next?

Channel blocking. https://hydra.nixos.org/build/129869656

If reverting to the old format while keeping the latest version of tzdata is enough, then let's do that. Wel'll need to undo the disabling of the tests as well then and this needs to target staging-next.

@FRidh FRidh mentioned this pull request Nov 6, 2020
10 tasks
@roberth roberth changed the base branch from master to staging-next November 6, 2020 11:43
@FRidh
Copy link
Member

FRidh commented Nov 6, 2020

@GrahamcOfBorg build libical

@doronbehar
Copy link
Contributor

Is it possible there are other regressions for the latest tzdata update?

Screenshot from 2020-11-09 11-12-56

@roberth
Copy link
Member Author

roberth commented Nov 9, 2020

@doronbehar is that master?

I don't know the exact details of the format change, but a certain section of data is missing in the "slim" format. It's supposedly redundant, but some programs clearly still depend on it. The wrong UTC+00 is probably caused by that missing data?

@doronbehar
Copy link
Contributor

@roberth that's from the current latest nixos-unstable channel, which doesn't include the change. I'd have tested this change on my fork, but I didn't merge it since it seems it'd cause tons of rebuilds :/.

I also noticed that manually setting a certain time or using a different time zone, keeps reverting me back to the old time zone.

@jtojnar
Copy link
Contributor

jtojnar commented Nov 9, 2020

You can use staging-next branch which contains the fix and is mostly built.

@jtojnar
Copy link
Contributor

jtojnar commented Nov 9, 2020

I can reproduce this in gnome-control-center in staging-next too. Weirdly, when I click on some location on map, it briefly shows the correct timezone before changing to UTC. And if I click the map second time without moving cursor, it reverts to the correct timezone.

@jtojnar
Copy link
Contributor

jtojnar commented Nov 9, 2020

Possibly https://gitlab.gnome.org/GNOME/glib/-/issues/2215

@doronbehar
Copy link
Contributor

Then maybe we should patch glib with https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1705 ?

@jtojnar
Copy link
Contributor

jtojnar commented Nov 9, 2020

There has been a new glib release since, currently testing

diff --git a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
index 1300f7a7503..0695aeb2cb8 100644
--- a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix
@@ -94,6 +94,14 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
+    (glib.overrideAttrs (attrs: rec {
+      inherit (attrs) pname;
+      version = "2.66.2";
+      src = fetchurl {
+        url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+        sha256 = "1i0pd8y6xz64qlzfj73wxyqp0x7x9j6mwf4gj6ggil4d9vnhnfgc";
+      };
+    }))
     accountsservice
     adwaita-icon-theme
     cheese
@@ -103,7 +111,6 @@ stdenv.mkDerivation rec {
     colord-gtk
     fontconfig
     gdk-pixbuf
-    glib
     glib-networking
     gnome-bluetooth
     gnome-desktop
diff --git a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
index 3c039bc6310..cc21910d3d6 100644
--- a/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-settings-daemon/default.nix
@@ -76,8 +76,15 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
+    (glib.overrideAttrs (attrs: rec {
+      inherit (attrs) pname;
+      version = "2.66.2";
+      src = fetchurl {
+        url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+        sha256 = "1i0pd8y6xz64qlzfj73wxyqp0x7x9j6mwf4gj6ggil4d9vnhnfgc";
+      };
+    }))
     gtk3
-    glib
     gsettings-desktop-schemas
     modemmanager
     networkmanager

@jtojnar
Copy link
Contributor

jtojnar commented Nov 9, 2020

Yes, that seems to fix it.

@andersk
Copy link
Contributor

andersk commented Nov 10, 2020

configuration.nix workaround for those who don’t want to wait for their entire system to rebuild:

{
  environment.etc.zoneinfo.source = lib.mkForce "${
      pkgs.tzdata.overrideAttrs (old: {
        makeFlags = old.makeFlags
          ++ [ ''CFLAGS+=-DZIC_BLOAT_DEFAULT=\"fat\"'' ];
      })
    }/share/zoneinfo";
}

@doronbehar
Copy link
Contributor

configuration.nix workaround for those who don’t want to wait for their entire system to rebuild:

{
  environment.etc.zoneinfo.source = lib.mkForce "${
      pkgs.tzdata.overrideAttrs (old: {
        makeFlags = old.makeFlags
          ++ [ ''CFLAGS+=-DZIC_BLOAT_DEFAULT=\"fat\"'' ];
      })
    }/share/zoneinfo";
}

That fixed it for me, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants