git.iko.soy/typeable/nixpkgs
on master help sign in
Merge #30143: firefox-*: critical security updates
commit84952fc2920e0b490ddbea483b7ab7e3e25db929 authorVladimír Čunát <vcunat@gmail.com> dateSat 7 Oct 2017, 17:41 (9 years ago) parent15b7e10821e3c2
8 files changed+74−52
pkgs/applications/networking/browsers/firefox/common.nix+14−2 pkgs/applications/networking/browsers/firefox/packages.nix+4−4 pkgs/development/libraries/icu/58.nix+14 pkgs/development/libraries/icu/59.nix+4 pkgs/development/libraries/icu/default.nix → pkgs/development/libraries/icu/base.nix+3−13 pkgs/development/libraries/nspr/default.nix+2−2 pkgs/development/libraries/nss/default.nix+28−30 pkgs/top-level/all-packages.nix+5−1
pkgs/applications/networking/browsers/firefox/common.nix+14−2
@@ -8,8 +8,7 @@
88, yasm, mesa, sqlite, unzip, makeWrapper
99, hunspell, libevent, libstartup_notification, libvpx
1010, cairo, icu, libpng, jemalloc
11−, autoconf213, which, gnused, cargo, rustc
12−
11+, autoconf213, which, gnused, cargo, rustc, llvmPackages
1312, debugBuild ? false
1413
1514### optionals
@@ -50,6 +49,7 @@ assert stdenv.cc ? libc && stdenv.cc.libc != null;
5049
5150let
5251 flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
52+ gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
5353in
5454
5555stdenv.mkDerivation (rec {
@@ -74,6 +74,8 @@ stdenv.mkDerivation (rec {
7474 ++ lib.optionals ffmpegSupport [ gstreamer gst-plugins-base ]
7575 ++ lib.optional gtk3Support gtk3;
7676
77+ NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
78+
7779 nativeBuildInputs =
7880 [ autoconf213 which gnused pkgconfig perl python cargo rustc ]
7981 ++ lib.optional gtk3Support wrapGAppsHook;
@@ -88,6 +90,12 @@ stdenv.mkDerivation (rec {
8890 make -f client.mk configure-files
8991
9092 configureScript="$(realpath ./configure)"
93+
94+ cxxLib=$( echo -n ${gcc}/include/c++/* )
95+ archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine )
96+
97+ test -f layout/style/ServoBindings.toml && sed -i -e '/"-DMOZ_STYLO"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml
98+
9199 cd obj-*
92100 '' + lib.optionalString googleAPISupport ''
93101 # Google API key used by Chromium and Firefox.
@@ -120,6 +128,10 @@ stdenv.mkDerivation (rec {
120128 "--disable-gconf"
121129 "--enable-default-toolkit=cairo-gtk${if gtk3Support then "3" else "2"}"
122130 ]
131+ ++ lib.optionals (stdenv.lib.versionAtLeast version "56") [
132+ "--with-libclang-path=${llvmPackages.clang-unwrapped}/lib"
133+ "--with-clang-path=${llvmPackages.clang}/bin/clang"
134+ ]
123135
124136 # TorBrowser patches these
125137 ++ lib.optionals (!isTorBrowserLike) [
pkgs/applications/networking/browsers/firefox/packages.nix+4−4
@@ -6,10 +6,10 @@ rec {
66
77 firefox = common rec {
88 pname = "firefox";
9− version = "55.0.3";
9+ version = "56.0.1";
1010 src = fetchurl {
1111 url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
12− sha512 = "3cacc87b97871f3a8c5e97c17ef7025079cb5c81f32377d9402cdad45815ac6c4c4762c79187f1e477910161c2377c42d41de62a50b6741d5d7c1cd70e8c6416";
12+ sha512 = "6a07de6bfb71ccdef04b0f2ced720e309d037dd89fe983178ac59ea972147360552e2b8e33d8caa476008cabf53a99003807b0e817150b7a39e0bc143d82b88f";
1313 };
1414
1515 patches =
@@ -32,10 +32,10 @@ rec {
3232
3333 firefox-esr = common rec {
3434 pname = "firefox-esr";
35− version = "52.3.0esr";
35+ version = "52.4.0esr";
3636 src = fetchurl {
3737 url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
38− sha512 = "36da8f14b50334e36fca06e09f15583101cadd10e510268255587ea9b09b1fea918da034d6f1d439ab8c34612f6cebc409a0b8d812dddb3f997afebe64d09fe9";
38+ sha512 = "be3be7f9dbf4bd0344d5d76f26d1a5090bb012154d25833d5cd58e5e707c080515b42ed751e1f7e58b15b96939d7da634cafb6e8aa9bb1627ff420836b802183";
3939 };
4040
4141 meta = firefox.meta // {
pkgs/development/libraries/icu/58.nixnew file+14
@@ -0,0 +1,14 @@
1+args @ { stdenv, fetchurl, fetchpatch, fixDarwinDylibNames }:
2+let
3+ keywordFix = fetchurl {
4+ url = "http://bugs.icu-project.org/trac/changeset/39484?format=diff";
5+ name = "icu-changeset-39484.diff";
6+ sha256 = "0hxhpgydalyxacaaxlmaddc1sjwh65rsnpmg0j414mnblq74vmm8";
7+ };
8+in
9+import ./base.nix {
10+ version = "58.2";
11+ sha256 = "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib";
12+ patches = [ keywordFix ];
13+ patchFlags = "-p4";
14+} args
pkgs/development/libraries/icu/59.nixnew file+4
@@ -0,0 +1,4 @@
1+import ./base.nix {
2+ version = "59.1";
3+ sha256 = "1zkmbg2932ggvpgjp8pys0cj6z8bw087y8858009shkrjfpzscki";
4+}
pkgs/development/libraries/icu/default.nix → pkgs/development/libraries/icu/base.nixrenamed+3−13
@@ -1,16 +1,8 @@
1+{ version, sha256, patches ? [], patchFlags ? "" }:
12{ stdenv, fetchurl, fetchpatch, fixDarwinDylibNames }:
23
34let
45 pname = "icu4c";
5− version = "58.2";
6−
7− # this patch should no longer be needed in 58.3
8− # https://bugs.gentoo.org/show_bug.cgi?id=599142#c14
9− keywordFix = fetchurl {
10− url = "http://bugs.icu-project.org/trac/changeset/39484?format=diff";
11− name = "icu-changeset-39484.diff";
12− sha256 = "0hxhpgydalyxacaaxlmaddc1sjwh65rsnpmg0j414mnblq74vmm8";
13− };
146in
157stdenv.mkDerivation {
168 name = pname + "-" + version;
@@ -18,7 +10,7 @@ stdenv.mkDerivation {
1810 src = fetchurl {
1911 url = "http://download.icu-project.org/files/${pname}/${version}/${pname}-"
2012 + (stdenv.lib.replaceChars ["."] ["_"] version) + "-src.tgz";
21− sha256 = "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib";
13+ inherit sha256;
2214 };
2315
2416 outputs = [ "out" "dev" ];
@@ -33,9 +25,7 @@ stdenv.mkDerivation {
3325 echo Source root reset to ''${sourceRoot}
3426 '';
3527
36− patchFlags = "-p4";
37−
38− patches = [ keywordFix ];
28+ inherit patchFlags patches;
3929
4030 preConfigure = ''
4131 sed -i -e "s|/bin/sh|${stdenv.shell}|" configure
pkgs/development/libraries/nspr/default.nix+2−2
@@ -1,14 +1,14 @@
11{ stdenv, fetchurl
22, CoreServices ? null }:
33
4−let version = "4.15"; in
4+let version = "4.16"; in
55
66stdenv.mkDerivation {
77 name = "nspr-${version}";
88
99 src = fetchurl {
1010 url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
11− sha256 = "101dksqm1z0hzd7ap82ccbxjr48s6q3xhshdl81qkj6hqdmy1p97";
11+ sha256 = "1l9wlnb9y0bzicv448jjl9kssqn044dc2qrkwzp4ll35fvch4ccv";
1212 };
1313
1414 outputs = [ "out" "dev" ];
pkgs/development/libraries/nss/default.nix+28−30
@@ -9,11 +9,11 @@ let
99
1010in stdenv.mkDerivation rec {
1111 name = "nss-${version}";
12− version = "3.31";
12+ version = "3.32.1";
1313
1414 src = fetchurl {
15− url = "mirror://mozilla/security/nss/releases/NSS_3_31_RTM/src/${name}.tar.gz";
16− sha256 = "0pd643a8ns7q5az5ai3ascrw666i2kbfiyy1c9hlhw9jd8jn21g9";
15+ url = "mirror://mozilla/security/nss/releases/NSS_3_32_1_RTM/src/${name}.tar.gz";
16+ sha256 = "0lj6c94102aa81bnjisnix09zfjly9aa1d6vrzxmcjmzynkrrrad";
1717 };
1818
1919 buildInputs = [ perl zlib sqlite ];
@@ -25,37 +25,13 @@ in stdenv.mkDerivation rec {
2525 '';
2626
2727 patches =
28− [ # Install a nss.pc (pkgconfig) file and nss-config script
29− # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
30− (fetchurl {
31− name = "nss-3.28-gentoo-fixups.patch";
32− url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/"
33− + "dev-libs/nss/files/nss-3.28-gentoo-fixups.patch"
34− + "?id=05c31f8cca591b3ce8219e4def7c26c7b1b130d6";
35− sha256 = "0z58axd1n7vq4kdp5mrb3dsg6di39a1g40s3shl6n2dzs14c1y2q";
36− })
28+ [
3729 # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
3830 ./85_security_load.patch
3931 ];
4032
4133 patchFlags = "-p0";
4234
43− postPatch = ''
44− # Fix up the patch from Gentoo.
45− sed -i \
46− -e "/^PREFIX =/s|= /usr|= $out|" \
47− -e '/@libdir@/s|gentoo/nss|lib|' \
48− -e '/ln -sf/d' \
49− nss/config/Makefile
50−
51− # Note for spacing/tab nazis: The TAB characters are intentional!
52− cat >> nss/config/Makefile <<INSTALL_TARGET
53− install:
54− mkdir -p \$(DIST)/lib/pkgconfig
55− cp nss.pc \$(DIST)/lib/pkgconfig
56− INSTALL_TARGET
57− '';
58−
5935 outputs = [ "out" "dev" "tools" ];
6036
6137 preConfigure = "cd nss";
@@ -79,9 +55,31 @@ in stdenv.mkDerivation rec {
7955 mv $out/*.OBJ/* $out/
8056 rmdir $out/*.OBJ
8157
82− cp -av config/nss-config $out/bin/nss-config
83−
8458 ln -s lib $out/lib64
59+
60+ # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
61+ # https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.32-gentoo-fixups.patch?id=af1acce6c6d2c3adb17689261dfe2c2b6771ab8a
62+ NSS_MAJOR_VERSION=`grep "NSS_VMAJOR" lib/nss/nss.h | awk '{print $3}'`
63+ NSS_MINOR_VERSION=`grep "NSS_VMINOR" lib/nss/nss.h | awk '{print $3}'`
64+ NSS_PATCH_VERSION=`grep "NSS_VPATCH" lib/nss/nss.h | awk '{print $3}'`
65+ PREFIX="$out"
66+
67+ mkdir -p $out/lib/pkgconfig
68+ sed -e "s,%prefix%,$PREFIX," \
69+ -e "s,%exec_prefix%,$PREFIX," \
70+ -e "s,%libdir%,$PREFIX/lib64," \
71+ -e "s,%includedir%,$PREFIX/include/nss," \
72+ -e "s,%NSS_VERSION%,$NSS_MAJOR_VERSION.$NSS_MINOR_VERSION.$NSS_PATCH_VERSION,g" \
73+ -e "s,%NSPR_VERSION%,4.16,g" \
74+ pkg/pkg-config/nss.pc.in > $out/lib/pkgconfig/nss.pc
75+ chmod 0644 $out/lib/pkgconfig/nss.pc
76+
77+ sed -e "s,@prefix@,$PREFIX," \
78+ -e "s,@MOD_MAJOR_VERSION@,$NSS_MAJOR_VERSION," \
79+ -e "s,@MOD_MINOR_VERSION@,$NSS_MINOR_VERSION," \
80+ -e "s,@MOD_PATCH_VERSION@,$NSS_PATCH_VERSION," \
81+ pkg/pkg-config/nss-config.in > $out/bin/nss-config
82+ chmod 0755 $out/bin/nss-config
8583 '';
8684
8785 postFixup = ''
pkgs/top-level/all-packages.nix+5−1
@@ -8645,7 +8645,10 @@ with pkgs;
86458645
86468646 hyena = callPackage ../development/libraries/hyena { };
86478647
8648− icu = callPackage ../development/libraries/icu { };
8648+ icu58 = callPackage ../development/libraries/icu/58.nix { };
8649+ icu59 = callPackage ../development/libraries/icu/59.nix { };
8650+
8651+ icu = icu59;
86498652
86508653 id3lib = callPackage ../development/libraries/id3lib { };
86518654
@@ -14572,6 +14575,7 @@ with pkgs;
1457214575 libpng = libpng_apng;
1457314576 python = python2;
1457414577 gnused = gnused_422;
14578+ icu = icu59;
1457514579 };
1457614580 });
1457714581