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

chromium: 58.0.3029.110 -> 59.0.3071.86 #26512

Merged
merged 1 commit into from
Jun 11, 2017
Merged

chromium: 58.0.3029.110 -> 59.0.3071.86 #26512

merged 1 commit into from
Jun 11, 2017

Conversation

ntruessel
Copy link

Motivation for this change

https://chromereleases.googleblog.com/2017/06/stable-channel-update-for-desktop.html

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@ntruessel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @aszlig, @bendlas and @obadz to be potential reviewers.

@ntruessel
Copy link
Author

There are a lot of no space left on device error messages on the build agent, I don't think the errors are very meaningful. In fact I'm typing this in the version of chromium 59 that I built yesterday using nix-env -i chromium -f ~/nixos/nixpkgs.

@grahamc
Copy link
Member

grahamc commented Jun 11, 2017

This looks great, @ntruessel! Thank you so much! Everything seems to be in order except for the second commit. Can you squash this in to the first one? If you're not sure how, or would rather me do it for you, I can do that -- just let me know.

Thank you again!

(p.s. on these big builds, travis never works :( )

@grahamc
Copy link
Member

grahamc commented Jun 11, 2017

Thanks! I'm doing a test build now.

@grahamc grahamc merged commit 4a90156 into NixOS:master Jun 11, 2017
@ntruessel ntruessel deleted the update-chromium branch June 11, 2017 20:08
@joachifm
Copy link
Contributor

Pick to release as well?

@joachifm
Copy link
Contributor

Esp CVE-2017-5071: Out of bounds read in V8.
and CVE-2017-5072: Address spoofing in Omnibox. sound kind of scary.

@cstrahan
Copy link
Contributor

cstrahan commented Jun 15, 2017

google-chrome-stable crashes whenever I try to save a PDF (e.g. go to http://www.pdf995.com/samples/pdf.pdf and press Ctrl+S). Are you sure that the other changes -- aside from just changing the upstream urls/shas -- are correct? I'll try to bisect when I get a chance.

@cstrahan
Copy link
Contributor

Correction: anything that would cause a save dialogue to open causes the browser to crash, not just pdfs.

@MP2E
Copy link

MP2E commented Jun 15, 2017

Just tested this on my end: can confirm trying to save any file results in a crash. This is happening with the chromium package, in my case

@cstrahan
Copy link
Contributor

Yeah, happens across all flavors (dev, stable, unstable) of chrome and chromium.

More info, for better repro:

  • google-chrome-stable 58.0.3029.110 works just fine (from 46a2da8)
  • This commit (74fd4de) cherry-picked on top of the latest nixos-unstable (0011f90) crashes

@cstrahan
Copy link
Contributor

chrome prints this on stderr before crashing:

(google-chrome:13350): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

I presume the crash is because of one of these possibilities:

  1. chrome 59 requires a new gtk package
  2. the chrome 59 processes somehow lose important env vars (e.g. GTK_DATA_PREFIX), compared to chrome 58

@cstrahan
Copy link
Contributor

Here's the relevant bits from strace:

[pid 16960] open("/run/current-system/sw/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] open("/nix/var/nix/profiles/default/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] open("/home/cstrahan/.nix-profile/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] open("/etc/per-user-pkgs/cstrahan/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] open("/run/opengl-driver-32/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] open("/run/opengl-driver/share/glib-2.0/schemas/gschemas.compiled", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 16960] futex(0x7f03a6a64e08, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 16960] getpeername(2, 0x7ffe58beb9e0, [128]) = -1 ENOTSOCK (Socket operation on non-socket)
[pid 16960] futex(0x7f03a6a64e08, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 16960] ioctl(2, TCGETS, 0x7ffe58beb9d0) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 16960] getpid()                    = 16960
[pid 16960] write(2, "\n(google-chrome:16960): GLib-GIO"..., 92 <unfinished ...>
[pid 16966] <... read resumed> "\n(google-chrome:16960): GLib-GIO"..., 131072) = 92
[pid 16966] write(1, "\n(google-chrome:16960): GLib-GIO"..., 92

I think we might need to do something like what was done to resolve issue #16521 in commit 5228bc9.

@cstrahan
Copy link
Contributor

This fixes google-chrome, but I still need to test chromium:

diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index cfc8951eef..30a16d824d 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -1,4 +1,5 @@
 { newScope, stdenv, makeWrapper, makeDesktopItem, ed
+, glib, gtk2, gtk3, gnome2, gnome3, gsettings_desktop_schemas
 
 # package customization
 , channel ? "stable"
@@ -62,10 +63,26 @@ let
 
   sandboxExecutableName = chromium.browser.passthru.sandboxExecutableName;
 
+  version = chromium.browser.version;
+
+  inherit (stdenv.lib) versionAtLeast;
+
+  gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
+  gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
+
 in stdenv.mkDerivation {
-  name = "chromium${suffix}-${chromium.browser.version}";
+  name = "chromium${suffix}-${version}";
+  inherit version;
 
-  buildInputs = [ makeWrapper ed ];
+  buildInputs = [
+    makeWrapper ed
+
+    # needed for GSETTINGS_SCHEMAS_PATH
+    gsettings_desktop_schemas glib gtk
+
+    # needed for XDG_ICON_DIRS
+    gnome.defaultIconTheme
+  ];
 
   outputs = ["out" "sandbox"];
 
@@ -92,6 +109,8 @@ in stdenv.mkDerivation {
     # libredirect causes chromium to deadlock on startup
     export LD_PRELOAD="\$(echo -n "\$LD_PRELOAD" | tr ':' '\n' | grep -v /lib/libredirect\\\\.so$ | tr '\n' ':')"
 
+    export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
+
     .
     w
     EOF
@@ -107,7 +126,7 @@ in stdenv.mkDerivation {
     cp -v "${desktopItem}/share/applications/"* "$out/share/applications"
   '';
 
-  inherit (chromium.browser) meta packageName version;
+  inherit (chromium.browser) meta packageName;
 
   passthru = {
     inherit (chromium) upstream-info browser;
diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix
index e7b74562bd..9a4d90701b 100644
--- a/pkgs/applications/networking/browsers/google-chrome/default.nix
+++ b/pkgs/applications/networking/browsers/google-chrome/default.nix
@@ -31,6 +31,9 @@
 
 # Only needed for getting information about upstream binaries
 , chromium
+
+, gsettings_desktop_schemas
+, gnome2, gnome3
 }:
 
 with stdenv.lib;
@@ -42,6 +45,9 @@ let
     withCustomModes = true;
   };
 
+  gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
+  gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
+
   deps = [
     glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
     libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite libxcb
@@ -53,7 +59,7 @@ let
     flac harfbuzz icu libpng opusWithCustomModes snappy speechd
     bzip2 libcap
   ] ++ optional pulseSupport libpulseaudio
-    ++ (if (versionAtLeast version "59.0.0.0") then [gtk3] else [gtk2]);
+    ++ [ gtk ];
 
   suffix = if channel != "stable" then "-" + channel else "";
 
@@ -64,7 +70,15 @@ in stdenv.mkDerivation rec {
 
   src = binary;
 
-  buildInputs = [ patchelf ];
+  buildInputs = [
+    patchelf
+
+    # needed for GSETTINGS_SCHEMAS_PATH
+    gsettings_desktop_schemas glib gtk
+
+    # needed for XDG_ICON_DIRS
+    gnome.defaultIconTheme
+  ];
 
   unpackPhase = ''
     ar x $src
@@ -109,6 +123,7 @@ in stdenv.mkDerivation rec {
     #!${bash}/bin/sh
     export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
     export PATH=$binpath\''${PATH:+:\$PATH}
+    export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
     $out/share/google/$appname/google-$appname ${commandLineArgs} "\$@"
     EOF
     chmod +x $exe

cstrahan added a commit to cstrahan/nixpkgs that referenced this pull request Jun 16, 2017
Fixes broken save dialogue (causes chrome to crash) and missing icons.
@cstrahan
Copy link
Contributor

Pull request opened here: #26614

cstrahan added a commit that referenced this pull request Jun 16, 2017
Fixes broken save dialogue (causes chrome to crash) and missing icons.
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
Fixes broken save dialogue (causes chrome to crash) and missing icons.

(cherry picked from commit 39fd944)

release-17.03 now contains chrome & chromium version >= 59, in form of dev and
beta releases.
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

7 participants