summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/chromium/source
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-01-28 08:12:51 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-02-22 07:52:52 +0100
commit0aad4b7ee418a5a4a6aa0c2da8a590480a63562a (patch)
treef65fe9ab04a5b3f09adc7ed9bba5dcd2d0710cb5 /pkgs/applications/networking/browsers/chromium/source
parentd15d0bebc3950a2a1494a5b5fbb34b6507d176d8 (diff)
downloadnixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar.gz
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar.bz2
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar.lz
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar.xz
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.tar.zst
nixpkgs-0aad4b7ee418a5a4a6aa0c2da8a590480a63562a.zip
chromium: Update all channels to latest versions.
Overview of the updated versions:

stable: 40.0.2214.91 -> 40.0.2214.115
beta:   41.0.2272.16 -> 41.0.2272.64
dev:    41.0.2272.16 -> 42.0.2305.3

Introduces 42.0.2305.3 as the new dev version, which no longer requires
our user namespaces sandbox patch. Thanks to everyone participating in
https://crbug.com/312380 for finally having this upstream.

In the course of supporting the official namespace sandbox (that's what
the user namespace sandbox is called), a few things needed to be fixed
for version 42:

 * Add an updated nix_plugin_paths.patch, because the old
   one tries to patch the path for libpdf, which is now natively included
   in Chromium.

 * Don't copy libpdf.so to libexec path for version 42, it's no longer
   needed as it's completely built-in now.

 * Disable SUID sandbox directly in the source instead of going the easy
   route of passing --disable-setuid-sandbox. The reason is that with
   the command line flag a nasty nagbar will appear.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/source')
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/default.nix13
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_42.patch93
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/sources.nix24
3 files changed, 116 insertions, 14 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix
index 15f2feb5a43..1a48c2d037c 100644
--- a/pkgs/applications/networking/browsers/chromium/source/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/default.nix
@@ -9,7 +9,9 @@ with (import ./update.nix {
   inherit (stdenv) system;
 }).getChannel channel;
 
-stdenv.mkDerivation {
+let
+  pre42 = versionOlder version "42.0.0.0";
+in stdenv.mkDerivation {
   name = "chromium-source-${version}";
 
   src = fetchurl main;
@@ -22,7 +24,11 @@ stdenv.mkDerivation {
 
   prePatch = "patchShebangs .";
 
-  patches = [ ./sandbox_userns_36.patch ./nix_plugin_paths.patch ];
+  patches = if pre42 then [
+    ./sandbox_userns_36.patch ./nix_plugin_paths.patch
+  ] else [
+    ./nix_plugin_paths_42.patch
+  ];
 
   postPatch = ''
     sed -i -r \
@@ -32,6 +38,9 @@ stdenv.mkDerivation {
       build/common.gypi chrome/chrome_tests.gypi
   '' + optionalString useOpenSSL ''
     cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
+  '' + optionalString (!pre42) ''
+    sed -i -e '/LOG.*no_suid_error/d' \
+      "$main/content/browser/browser_main_loop.cc"
   '';
 
   outputs = [ "out" "sandbox" "bundled" "main" ];
diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_42.patch b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_42.patch
new file mode 100644
index 00000000000..fb09763c997
--- /dev/null
+++ b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_42.patch
@@ -0,0 +1,93 @@
+diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
+index 8a205a6..d5c24e1 100644
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -97,21 +97,14 @@ static base::LazyInstance<base::FilePath>
+     g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
+ 
+ // Gets the path for internal plugins.
+-bool GetInternalPluginsDirectory(base::FilePath* result) {
+-#if defined(OS_MACOSX) && !defined(OS_IOS)
+-  // If called from Chrome, get internal plugins from a subdirectory of the
+-  // framework.
+-  if (base::mac::AmIBundled()) {
+-    *result = chrome::GetFrameworkBundlePath();
+-    DCHECK(!result->empty());
+-    *result = result->Append("Internet Plug-Ins");
+-    return true;
+-  }
+-  // In tests, just look in the module directory (below).
+-#endif
+-
+-  // The rest of the world expects plugins in the module directory.
+-  return PathService::Get(base::DIR_MODULE, result);
++bool GetInternalPluginsDirectory(base::FilePath* result,
++                                 const std::string& ident) {
++  std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
++  const char* value = getenv(full_env.c_str());
++  if (value == NULL)
++      return PathService::Get(base::DIR_MODULE, result);
++  else
++      *result = base::FilePath(value);
+ }
+ 
+ }  // namespace
+@@ -248,11 +241,11 @@ bool PathProvider(int key, base::FilePath* result) {
+       create_dir = true;
+       break;
+     case chrome::DIR_INTERNAL_PLUGINS:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "ALL"))
+         return false;
+       break;
+     case chrome::DIR_PEPPER_FLASH_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
+         return false;
+       cur = cur.Append(kPepperFlashBaseDirectory);
+       break;
+@@ -285,7 +278,7 @@ bool PathProvider(int key, base::FilePath* result) {
+       cur = cur.Append(FILE_PATH_LITERAL("script.log"));
+       break;
+     case chrome::FILE_FLASH_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "FILEFLASH"))
+         return false;
+       cur = cur.Append(kInternalFlashPluginFileName);
+       break;
+@@ -295,7 +288,7 @@ bool PathProvider(int key, base::FilePath* result) {
+       cur = cur.Append(chrome::kPepperFlashPluginFilename);
+       break;
+     case chrome::FILE_EFFECTS_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "FILE_EFFECTS"))
+         return false;
+       cur = cur.Append(kEffectsPluginFileName);
+       break;
+@@ -308,7 +301,7 @@ bool PathProvider(int key, base::FilePath* result) {
+     // We currently need a path here to look up whether the plugin is disabled
+     // and what its permissions are.
+     case chrome::FILE_NACL_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "NACL"))
+         return false;
+       cur = cur.Append(kInternalNaClPluginFileName);
+       break;
+@@ -343,7 +336,7 @@ bool PathProvider(int key, base::FilePath* result) {
+         cur = cur.DirName();
+       }
+ #else
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PNACL"))
+         return false;
+ #endif
+       cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
+@@ -372,7 +365,7 @@ bool PathProvider(int key, base::FilePath* result) {
+     // In the component case, this is the source adapter. Otherwise, it is the
+     // actual Pepper module that gets loaded.
+     case chrome::FILE_WIDEVINE_CDM_ADAPTER:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "WIDEVINE"))
+         return false;
+       cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
+       break;
diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/source/sources.nix
index 5f40e63125d..daefa263510 100644
--- a/pkgs/applications/networking/browsers/chromium/source/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/sources.nix
@@ -1,21 +1,21 @@
 # This file is autogenerated from update.sh in the parent directory.
 {
   dev = {
-    version = "41.0.2272.16";
-    sha256 = "14l3l5gcjqszqjb3zmwxsyfci495fi315sznvm2n2ark24mf03yq";
-    sha256bin32 = "0xqhzlmbyh5w678j7iwssd81z1bpggpzxni1y79xn5lhc26c50jd";
-    sha256bin64 = "0c9j75xqv4jx57asiaadarz714h1adscvb4h5ng7mbmr268qp6f2";
+    version = "42.0.2305.3";
+    sha256 = "00338x1x78wcvaxcnnq5cng30450gsyqnlwplgyq7zjsrpqpprvn";
+    sha256bin32 = "1xxmyfmdksqpwwf3wxhxrxvqnvjxlwkhkrdzkmra7d74hz7mqjz7";
+    sha256bin64 = "0q4hvvkjzy46x9hfhchywakzrd0jfwhxxsv96cz3yfcqwasf42x7";
   };
   beta = {
-    version = "41.0.2272.16";
-    sha256 = "14l3l5gcjqszqjb3zmwxsyfci495fi315sznvm2n2ark24mf03yq";
-    sha256bin32 = "0xqhzlmbyh5w678j7iwssd81z1bpggpzxni1y79xn5lhc26c50jd";
-    sha256bin64 = "0c9j75xqv4jx57asiaadarz714h1adscvb4h5ng7mbmr268qp6f2";
+    version = "41.0.2272.64";
+    sha256 = "0jq864636527fpnrkdaalp73hjcd581imdk13bxfi6g4ic0sizkg";
+    sha256bin32 = "12sisp6bk6qvgikzxi616d8cnrrgs2593kyq7sv3276wjz34a07m";
+    sha256bin64 = "1vz89r43byd0shjvr6bvmwlsh97fx281hlzfv49q9k49piyfylgp";
   };
   stable = {
-    version = "40.0.2214.91";
-    sha256 = "0ja1wvjn0g8xs20j87s3gl9h70yzx8rfa3k126wnl9gay6gxlbzp";
-    sha256bin32 = "0mfg66s7fqx6v8n0hilsw40i5ximasbqhrmw4fpnpa0x0i77bphj";
-    sha256bin64 = "14lqm8m937b9sl5k7sc939aar76ij9790c807yahk6q36mfyd269";
+    version = "40.0.2214.115";
+    sha256 = "19d6zd71w3zvqwb0ncdapfwkckjgqmb1jfg228jvaispp9nvjq92";
+    sha256bin32 = "1sv8sj0xp14q5693jcwwipinx539d5rgvhqcxm6b030024jjh8sr";
+    sha256bin64 = "1zgb9g6fr29i7f9s1s1dcih1qjiz62ir90k0fsam9df99gzmmyc0";
   };
 }