diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 84cdf556d02d..e9e9961d1cd0 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -1,8 +1,5 @@ { stdenv, getConfig, fetchurl, makeWrapper, which -# this is needed in order to build the versions older than 21.x -, subversion - # default dependencies , bzip2, flac, speex , libevent, expat, libjpeg @@ -73,14 +70,16 @@ let use_system_v8 = false; }; - needsSubversion = stdenv.lib.versionOlder sourceInfo.version "21.0.0.0"; - defaultDependencies = [ bzip2 flac speex libevent expat libjpeg libpng libxml2 libxslt xdg_utils yasm zlib - ] ++ stdenv.lib.optional needsSubversion subversion; + ]; + + seccompPatch = let + pre22 = stdenv.lib.versionOlder sourceInfo.version "22.0.0.0"; + in if pre22 then ./enable_seccomp.patch else ./enable_seccomp22.patch; in stdenv.mkDerivation rec { name = "${packageName}-${version}"; @@ -113,7 +112,7 @@ in stdenv.mkDerivation rec { prePatch = "patchShebangs ."; - patches = stdenv.lib.optional (!config.selinux) ./enable_seccomp.patch + patches = stdenv.lib.optional (!config.selinux) seccompPatch ++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch ++ stdenv.lib.optional config.pulseaudio ./pulseaudio_array_bounds.patch; diff --git a/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch b/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch new file mode 100644 index 000000000000..f947d796f186 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch @@ -0,0 +1,20 @@ +diff --git a/content/common/sandbox_linux.cc b/content/common/sandbox_linux.cc +index d4618e5..108f846 100644 +--- a/content/common/sandbox_linux.cc ++++ b/content/common/sandbox_linux.cc +@@ -38,15 +38,9 @@ void LogSandboxStarted(const std::string& sandbox_name) { + // Implement the command line enabling logic for seccomp-legacy. + bool IsSeccompLegacyDesired() { + #if defined(SECCOMP_SANDBOX) +-#if defined(NDEBUG) +- // Off by default; allow turning on with a switch. +- return CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kEnableSeccompSandbox); +-#else + // On by default; allow turning off with a switch. + return !CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableSeccompSandbox); +-#endif // NDEBUG + #endif // SECCOMP_SANDBOX + return false; + } diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix index a250cda76102..8ae373438f59 100644 --- a/pkgs/applications/networking/browsers/chromium/sources.nix +++ b/pkgs/applications/networking/browsers/chromium/sources.nix @@ -1,18 +1,18 @@ # This file is autogenerated from update.sh in the same directory. { dev = { - version = "22.0.1229.8"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-22.0.1229.8.tar.bz2"; - sha256 = "0gaa4mqvd0v4y587y6mri2f3b0rc8npmcbs9bfs4wwb8n1cp8kw0"; + version = "23.0.1243.2"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-23.0.1243.2.tar.bz2"; + sha256 = "1idsc1k0c392mvh2rhfv0sr50rmzdab18ilh9p90mab5a6fk32rh"; }; beta = { - version = "21.0.1180.79"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1180.79.tar.bz2"; - sha256 = "1jscpibv02pyqpcj6djcx0d1qwq8hcxampfqbsz8dicgjprp22c8"; + version = "22.0.1229.14"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-22.0.1229.14.tar.bz2"; + sha256 = "11z5wc1m5443bsassq3np79yqr2bwr06ph672by3saikl2xkadn5"; }; stable = { - version = "21.0.1180.79"; - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1180.79.tar.bz2"; - sha256 = "1jscpibv02pyqpcj6djcx0d1qwq8hcxampfqbsz8dicgjprp22c8"; + version = "21.0.1180.81"; + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-21.0.1180.81.tar.bz2"; + sha256 = "1b5svzg7xxx46bz9s5ayai2ig9b7s0x4s1yl7r42p9g27qwf0dpl"; }; } diff --git a/pkgs/applications/networking/browsers/chromium/update.sh b/pkgs/applications/networking/browsers/chromium/update.sh index 4721ded385ae..c978ee4adf3a 100755 --- a/pkgs/applications/networking/browsers/chromium/update.sh +++ b/pkgs/applications/networking/browsers/chromium/update.sh @@ -83,9 +83,9 @@ get_channel_exprs() echo -n "Checking if sha256 of version $version is cached..." >&2; if sha256="$(sha_lookup "$version")"; then - echo "yes: $sha256" >&2; + echo " yes: $sha256" >&2; else - echo "no." >&2; + echo " no." >&2; sha256="$(get_sha256 "$channel" "$version" "$url")"; fi;