From 2e1871fdd9e9a5484f34ac78e542d3cafff23043 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Wed, 2 Nov 2016 11:41:18 +0100 Subject: [PATCH 01/36] alsa-lib: 1.1.1 -> 1.1.2 --- pkgs/os-specific/linux/alsa-lib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-lib/default.nix b/pkgs/os-specific/linux/alsa-lib/default.nix index a839158d0cf..b525cbfc261 100644 --- a/pkgs/os-specific/linux/alsa-lib/default.nix +++ b/pkgs/os-specific/linux/alsa-lib/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "alsa-lib-1.1.1"; + name = "alsa-lib-1.1.2"; src = fetchurl { urls = [ "ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2" "http://alsa.cybermirror.org/lib/${name}.tar.bz2" ]; - sha256 = "0sa24fy3qf3jg63xxvfb7j8halj1qmdbcak2lyfx8bpd8hqnriwa"; + sha256 = "1mk1v2av6ibyydgr6f2mxrwy7clgnf0c68s9y2zvh1ibi7csr3fk"; }; patches = [ From 01fe648552a295b89474cd10ad4890219973d71f Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Wed, 2 Nov 2016 11:42:12 +0100 Subject: [PATCH 02/36] alsa-plugins: 1.1.0 -> 1.1.1 --- pkgs/os-specific/linux/alsa-plugins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-plugins/default.nix b/pkgs/os-specific/linux/alsa-plugins/default.nix index 22c3d464774..7f065a1b9b0 100644 --- a/pkgs/os-specific/linux/alsa-plugins/default.nix +++ b/pkgs/os-specific/linux/alsa-plugins/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, lib, pkgconfig, alsaLib, libogg, libpulseaudio ? null, libjack2 ? null }: stdenv.mkDerivation rec { - name = "alsa-plugins-1.1.0"; + name = "alsa-plugins-1.1.1"; src = fetchurl { urls = [ "ftp://ftp.alsa-project.org/pub/plugins/${name}.tar.bz2" "http://alsa.cybermirror.org/plugins/${name}.tar.bz2" ]; - sha256 = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee"; + sha256 = "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f"; }; # ToDo: a52, etc.? From af0f12299be0ea50450ee7e287ce490c100b4927 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Wed, 2 Nov 2016 11:42:43 +0100 Subject: [PATCH 03/36] alsa-utils: 1.1.0 -> 1.1.2 --- pkgs/os-specific/linux/alsa-utils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/alsa-utils/default.nix b/pkgs/os-specific/linux/alsa-utils/default.nix index d47c9fa2c1a..3c2b53e0e3f 100644 --- a/pkgs/os-specific/linux/alsa-utils/default.nix +++ b/pkgs/os-specific/linux/alsa-utils/default.nix @@ -2,14 +2,14 @@ stdenv.mkDerivation rec { name = "alsa-utils-${version}"; - version = "1.1.0"; + version = "1.1.2"; src = fetchurl { urls = [ "ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2" "http://alsa.cybermirror.org/utils/${name}.tar.bz2" ]; - sha256 = "3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1"; + sha256 = "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"; }; patchPhase = '' From dc9dca4b21be068dfd87c8cbbc8b3f9325624e12 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Wed, 2 Nov 2016 11:57:35 +0100 Subject: [PATCH 04/36] bristol: patch for new alsaLib --- pkgs/applications/audio/bristol/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix index e19acab36b5..3b94235889c 100644 --- a/pkgs/applications/audio/bristol/default.nix +++ b/pkgs/applications/audio/bristol/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { xorg.xproto ]; + patchPhase = "sed -i '41,43d' libbristolaudio/audioEngineJack.c"; # disable alsa/iatomic + + configurePhase = "./configure --prefix=$out --enable-jack-default-audio --enable-jack-default-midi"; + preInstall = '' sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol From 459448727eb74c6db10f97692f57a2bb07381c1b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Nov 2016 10:02:37 +0100 Subject: [PATCH 05/36] gnutar: Fix comment --- pkgs/tools/archivers/gnutar/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 80c84236b8d..447ef1f623f 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "097hx7sbzp8qirl4m930lw84kn0wmxhmq7v1qpra3mrg0b8cyba0"; }; - patches = [ ./CVE-2016-6321.patch ]; # FIXME: remove on another stdenv rebuild + patches = [ ./CVE-2016-6321.patch ]; # avoid retaining reference to CF during stdenv bootstrap configureFlags = stdenv.lib.optionals stdenv.isDarwin [ From be31980848dee782c4504b88c57edcfbb72c6f6b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 10:36:12 +0100 Subject: [PATCH 06/36] libxslt: build python bindings and add a pythonPackages.libxslt alias. --- .../development/libraries/libxslt/default.nix | 22 ++++++++++++++----- pkgs/top-level/python-packages.nix | 3 +++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 2afbfc2fe99..df054319479 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs }: +{ stdenv, fetchurl, fetchpatch, libxml2, findXMLCatalogs +, pythonSupport ? true, python2 +}: + +assert pythonSupport -> python2 != null; +assert pythonSupport -> libxml2.pythonSupport; stdenv.mkDerivation rec { name = "libxslt-1.1.29"; @@ -10,26 +15,33 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch; - outputs = [ "bin" "dev" "out" "doc" ]; + outputs = [ "bin" "dev" "out" "doc" ] ++ stdenv.lib.optional pythonSupport "py"; - buildInputs = [ libxml2 ]; + buildInputs = [ libxml2.dev ] ++ stdenv.lib.optionals pythonSupport [ libxml2.py python2 ]; propagatedBuildInputs = [ findXMLCatalogs ]; configureFlags = [ - "--without-python" "--without-crypto" "--without-debug" "--without-mem-debug" "--without-debugger" - ]; + ] ++ stdenv.lib.optional pythonSupport "--with-python=${python2}"; postFixup = '' moveToOutput bin/xslt-config "$dev" moveToOutput lib/xsltConf.sh "$dev" moveToOutput share/man/man1 "$bin" + '' + stdenv.lib.optionalString pythonSupport '' + mkdir -p $py/nix-support + echo ${libxml2.py} >> $py/nix-support/propagated-native-build-inputs + moveToOutput lib/python2.7 "$py" ''; + passthru = { + inherit pythonSupport; + }; + meta = with stdenv.lib; { homepage = http://xmlsoft.org/XSLT/; description = "A C library and tools to do XSL transformations"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d21281c598..8d03fc06da0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13447,6 +13447,9 @@ in { clblas = pkgs.clblas-cuda; }; + libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else + (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;}).py; + limnoria = buildPythonPackage rec { name = "limnoria-${version}"; version = "2016.05.06"; From d2111660c557bcd59c1be25ff01190365c389c7c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 10:36:37 +0100 Subject: [PATCH 07/36] libxml2: add a pythonPackages.libxml2 alias for the bindings --- pkgs/top-level/python-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d03fc06da0..3ff8960a21b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13447,6 +13447,9 @@ in { clblas = pkgs.clblas-cuda; }; + libxml2 = if isPy3k then throw "libxml2 not supported for interpreter ${python.executable}" else + (pkgs.libxml2.override{supportPython=true; python2=python;}).py; + libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;}).py; From 6b70ac81bbe823c220afea101ab814bf26e59fdd Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 10:55:21 +0100 Subject: [PATCH 08/36] libxml2: supportPython -> pythonSupport since that is more commonly used in Nixpkgs. --- pkgs/development/libraries/libxml2/default.nix | 16 ++++++++-------- pkgs/top-level/emscripten-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 4831f150f45..80354b10f3b 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, zlib, xz, python2, findXMLCatalogs, libiconv, fetchpatch -, supportPython ? (! stdenv ? cross) }: +, pythonSupport ? (! stdenv ? cross) }: let python = python2; @@ -28,10 +28,10 @@ in stdenv.mkDerivation rec { }; outputs = [ "bin" "dev" "out" "doc" ] - ++ lib.optional supportPython "py"; - propagatedBuildOutputs = "out bin" + lib.optionalString supportPython " py"; + ++ lib.optional pythonSupport "py"; + propagatedBuildOutputs = "out bin" + lib.optionalString pythonSupport " py"; - buildInputs = lib.optional supportPython python + buildInputs = lib.optional pythonSupport python # Libxml2 has an optional dependency on liblzma. However, on impure # platforms, it may end up using that from /usr/lib, and thus lack a # RUNPATH for that, leading to undefined references for its users. @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { propagatedBuildInputs = [ zlib findXMLCatalogs ]; - configureFlags = lib.optional supportPython "--with-python=${python}" + configureFlags = lib.optional pythonSupport "--with-python=${python}" ++ [ "--exec_prefix=$dev" ]; enableParallelBuilding = true; @@ -55,9 +55,9 @@ in stdenv.mkDerivation rec { propagatedBuildInputs = [ findXMLCatalogs libiconv ]; }; - preInstall = lib.optionalString supportPython + preInstall = lib.optionalString pythonSupport ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; - installFlags = lib.optionalString supportPython + installFlags = lib.optionalString pythonSupport ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"''; postFixup = '' @@ -66,7 +66,7 @@ in stdenv.mkDerivation rec { moveToOutput share/man/man1 "$bin" ''; - passthru = { inherit version; pythonSupport = supportPython; }; + passthru = { inherit version; pythonSupport = pythonSupport; }; meta = { homepage = http://xmlsoft.org/; diff --git a/pkgs/top-level/emscripten-packages.nix b/pkgs/top-level/emscripten-packages.nix index 633b4f8a211..ed9e09802b7 100644 --- a/pkgs/top-level/emscripten-packages.nix +++ b/pkgs/top-level/emscripten-packages.nix @@ -10,7 +10,7 @@ with pkgs; rec { libxml2 = (pkgs.libxml2.override { stdenv = emscriptenStdenv; - supportPython = false; + pythonSupport = false; }).overrideDerivation (old: { buildInputs = old.buildInputs ++ [ autoreconfHook pkgconfig zlib nodejs ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ff8960a21b..071ca6f2bd5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13448,7 +13448,7 @@ in { }; libxml2 = if isPy3k then throw "libxml2 not supported for interpreter ${python.executable}" else - (pkgs.libxml2.override{supportPython=true; python2=python;}).py; + (pkgs.libxml2.override{pythonSupport=true; python2=python;}).py; libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;}).py; From cd351e25aad03adfff2b0abd934170911476fe8c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 22 Oct 2016 16:54:49 +0200 Subject: [PATCH 09/36] gnome3.anjuta: use python2 --- pkgs/desktops/gnome-3/3.20/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/3.20/default.nix b/pkgs/desktops/gnome-3/3.20/default.nix index e935552b9f5..4facdbfd3e3 100644 --- a/pkgs/desktops/gnome-3/3.20/default.nix +++ b/pkgs/desktops/gnome-3/3.20/default.nix @@ -307,7 +307,7 @@ let #### Dev http://ftp.gnome.org/pub/GNOME/devtools/ - anjuta = callPackage ./devtools/anjuta { }; + anjuta = callPackage ./devtools/anjuta { python=pkgs.python2; }; devhelp = callPackage ./devtools/devhelp { }; From 95c54db3977e7b2526d5864a59e8153bba5612db Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 22 Oct 2016 17:02:59 +0200 Subject: [PATCH 10/36] virtualbox: use python2 and remove python buildInput. Python should only be added when `pythonBindings` is true. --- pkgs/applications/virtualization/virtualbox/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 64275448651..9e51fd0abe2 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -4,7 +4,7 @@ , which, alsaLib, curl, libvpx, gawk, nettools, dbus , xorriso, makeself, perl, pkgconfig , javaBindings ? false, jdk ? null -, pythonBindings ? false, python ? null +, pythonBindings ? false, python2 ? null , enableExtensionPack ? false, requireFile ? null, patchelf ? null, fakeroot ? null , pulseSupport ? false, libpulseaudio ? null , enableHardening ? false @@ -15,6 +15,7 @@ with stdenv.lib; let + python = python2; buildType = "release"; inherit (importJSON ./upstream-info.json) version extpackRev extpack main; @@ -48,7 +49,7 @@ in stdenv.mkDerivation { buildInputs = [ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor libIDL - libcap glib lvm2 python alsaLib curl libvpx pam xorriso makeself perl + libcap glib lvm2 alsaLib curl libvpx pam xorriso makeself perl pkgconfig which libXmu libpng patchelfUnstable ] ++ optional javaBindings jdk ++ optional pythonBindings python From 660585b32d90c1a215421c27472b1863812cbe7d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 14:57:45 +0100 Subject: [PATCH 11/36] compiz: use python2 --- pkgs/applications/window-managers/compiz/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/window-managers/compiz/default.nix b/pkgs/applications/window-managers/compiz/default.nix index b641a571b24..e9f5d9bdbf2 100644 --- a/pkgs/applications/window-managers/compiz/default.nix +++ b/pkgs/applications/window-managers/compiz/default.nix @@ -5,14 +5,15 @@ , libstartup_notification, libpthreadstubs, libxcb, intltool , ORBit2, libXau, libICE, libSM , dbus, dbus_glib, librsvg, mesa -, libXdmcp, libnotify, pythonPackages +, libXdmcp, libnotify, python2Packages , hicolor_icon_theme, libjpeg_turbo, libsigcxx, protobuf , xdg_utils , gettext, boost, pyrex , makeWrapper }: let - inherit (pythonPackages) python dbus-python pygtk; + # FIXME: Use python.withPackages so we can get rid of PYTHONPATH wrapper + inherit (python2Packages) python dbus-python pygtk; s = # Generated upstream information rec { From 0674ed1b6b501e6df294c130103af77940af51e5 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:06:17 +0100 Subject: [PATCH 12/36] bup: use python2 --- pkgs/tools/backup/bup/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix index 075f1653adf..4e035ab67ac 100644 --- a/pkgs/tools/backup/bup/default.nix +++ b/pkgs/tools/backup/bup/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchurl, makeWrapper -, perl, pandoc, pythonPackages, git +, perl, pandoc, python2Packages, git , par2cmdline ? null, par2Support ? false }: @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { sha256 = "1hsxzrjvqa3pd74vmz8agiiwynrzynp1i726h0fzdsakc4adya4l"; }; - buildInputs = [ git pythonPackages.python ]; + buildInputs = [ git python2Packages.python ]; nativeBuildInputs = [ pandoc perl makeWrapper ]; postPatch = '' @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/bup \ --prefix PATH : ${git}/bin \ --prefix PYTHONPATH : ${concatStringsSep ":" (map (x: "$(toPythonPath ${x})") - (with pythonPackages; + (with python2Packages; [ setuptools tornado ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ]))} ''; From dd5256993e902787c4e0d6faf664f6d22a25e653 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:16:06 +0100 Subject: [PATCH 13/36] certbot: use python2 --- pkgs/tools/admin/certbot/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/admin/certbot/default.nix b/pkgs/tools/admin/certbot/default.nix index 80805666a3a..998b8d2e13d 100644 --- a/pkgs/tools/admin/certbot/default.nix +++ b/pkgs/tools/admin/certbot/default.nix @@ -1,6 +1,8 @@ -{ stdenv, pythonPackages, fetchFromGitHub, dialog }: +{ stdenv, python2Packages, fetchFromGitHub, dialog }: -pythonPackages.buildPythonApplication rec { +# Latest version of certbot supports python3 and python3 version of pythondialog + +python2Packages.buildPythonApplication rec { name = "certbot-${version}"; version = "0.6.0"; @@ -11,7 +13,7 @@ pythonPackages.buildPythonApplication rec { sha256 = "1x0prlldkgg0hxmya4m5h3k3c872wr0jylmzpr3m04mk339yiw0c"; }; - propagatedBuildInputs = with pythonPackages; [ + propagatedBuildInputs = with python2Packages; [ ConfigArgParse acme configobj @@ -26,7 +28,7 @@ pythonPackages.buildPythonApplication rec { zope_component zope_interface ]; - buildInputs = [ dialog ] ++ (with pythonPackages; [ nose mock gnureadline ]); + buildInputs = [ dialog ] ++ (with python2Packages; [ nose mock gnureadline ]); patchPhase = '' substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/var/setuid-wrappers/sendmail" From 88a03eb72571f1de44f8ddcd5a13a1d0566608a6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:17:06 +0100 Subject: [PATCH 14/36] qgis: use python2 --- pkgs/applications/gis/qgis/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix index cce683067e7..680cf921ce2 100644 --- a/pkgs/applications/gis/qgis/default.nix +++ b/pkgs/applications/gis/qgis/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl -, qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper +, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper , qjson, qca2, txt2tags, openssl , withGrass ? false, grass }: @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++ (stdenv.lib.optional withGrass grass) ++ - (with pythonPackages; [ numpy psycopg2 requests2 pythonPackages.qscintilla sip ]); + (with python2Packages; [ numpy psycopg2 requests2 python2Packages.qscintilla sip ]); nativeBuildInputs = [ cmake makeWrapper ]; From 5f265dc9c5b657fdc31c56e722040824f6d036ba Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:20:33 +0100 Subject: [PATCH 15/36] electrum: use python2 --- pkgs/applications/misc/electrum/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index bc562b7d577..458aed051a2 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, pythonPackages }: +{ stdenv, fetchurl, python2Packages }: -pythonPackages.buildPythonApplication rec { +python2Packages.buildPythonApplication rec { name = "electrum-${version}"; version = "2.7.11"; @@ -9,7 +9,7 @@ pythonPackages.buildPythonApplication rec { sha256 = "0qy2ynyw57jgi7fw3xzsyy608yk4bhsda7qfw0j26zqinv52mrsb"; }; - propagatedBuildInputs = with pythonPackages; [ + propagatedBuildInputs = with python2Packages; [ dns ecdsa jsonrpclib From cc05895fe5d522e873255c303b80832bef956360 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:26:33 +0100 Subject: [PATCH 16/36] v8: use python2 --- pkgs/top-level/all-packages.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c20868a5503..d53382232af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9349,27 +9349,27 @@ in }); v8_3_14 = callPackage ../development/libraries/v8/3.14.nix { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8_3_24_10 = callPackage ../development/libraries/v8/3.24.10.nix { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8_3_30_33 = callPackage ../development/libraries/v8/3.30.33.nix { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8_4_5 = callPackage ../development/libraries/v8/4.5.nix { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8 = callPackage ../development/libraries/v8 { - inherit (pythonPackages) gyp; + inherit (python2Packages) python gyp; }; v8_static = lowPrio (self.v8.override { static = true; }); From 1f501a2ced8285d3513e8c299357dcef718c85ea Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:29:20 +0100 Subject: [PATCH 17/36] xpra: use python2 --- pkgs/tools/X11/xpra/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 871d5a9dbd8..4ae367abf61 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pythonPackages, pkgconfig +{ stdenv, lib, fetchurl, python2Packages, pkgconfig , xorg, gtk2, glib, pango, cairo, gdk_pixbuf, atk , makeWrapper, xkbcomp, xorgserver, getopt, xauth, utillinux, which, fontsConf, xkeyboard_config , ffmpeg, x264, libvpx, libwebp @@ -8,7 +8,7 @@ with lib; let - inherit (pythonPackages) python cython buildPythonApplication; + inherit (python2Packages) python cython buildPythonApplication; in buildPythonApplication rec { name = "xpra-0.17.6"; namePrefix = ""; @@ -39,7 +39,7 @@ in buildPythonApplication rec { makeWrapper ]; - propagatedBuildInputs = with pythonPackages; [ + propagatedBuildInputs = with python2Packages; [ pillow pygtk pygobject2 rencode pycrypto cryptography pycups lz4 dbus-python netifaces numpy websockify pygobject3 gst-python ]; From e7f91951693f1214e822025a44dba51e68d8d474 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:39:15 +0100 Subject: [PATCH 18/36] grass: use python2 --- pkgs/applications/gis/grass/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index fb6c76be079..44e07cc22c0 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw , cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas -, proj, gdal, geos, sqlite, postgresql, mysql, pythonPackages +, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages }: stdenv.mkDerivation { @@ -12,7 +12,7 @@ stdenv.mkDerivation { buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite pkgconfig cairo readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.client blas ] - ++ (with pythonPackages; [ python dateutil wxPython30 numpy ]); + ++ (with python2Packages; [ python dateutil wxPython30 numpy ]); configureFlags = [ "--with-proj-share=${proj}/share/proj" @@ -59,7 +59,7 @@ stdenv.mkDerivation { postInstall = '' wrapProgram $out/bin/grass70 \ --set PYTHONPATH $PYTHONPATH \ - --set GRASS_PYTHON ${pythonPackages.python}/bin/${pythonPackages.python.executable} + --set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} ln -s $out/grass-*/lib $out/lib ''; From a18ac150a3ee9383bc71e2e37469942915d3ec54 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 15:40:39 +0100 Subject: [PATCH 19/36] virtinst: use python2 --- pkgs/applications/virtualization/virtinst/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/virtualization/virtinst/default.nix b/pkgs/applications/virtualization/virtinst/default.nix index 04223d9a9e9..75f90c234e8 100644 --- a/pkgs/applications/virtualization/virtinst/default.nix +++ b/pkgs/applications/virtualization/virtinst/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl }: +{ stdenv, fetchurl, python2Packages, intltool, libxml2Python, curl }: with stdenv.lib; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "175laiy49dni8hzi0cn14bbsdsigvgr9h6d9z2bcvbpa29spldvf"; }; - pythonPath = with pythonPackages; + pythonPath = with python2Packages; [ setuptools eventlet greenlet gflags netaddr carrot routes PasteDeploy m2crypto ipy twisted distutils_extra simplejson glanceclient cheetah lockfile httplib2 @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { ]; buildInputs = - [ pythonPackages.python - pythonPackages.wrapPython - pythonPackages.mox + [ python2Packages.python + python2Packages.wrapPython + python2Packages.mox intltool ] ++ pythonPath; From 559864a951c9f4f32f1447759a64ccde5cd75940 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 22:40:38 +0100 Subject: [PATCH 20/36] meld: use python2 --- pkgs/applications/version-management/meld/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/meld/default.nix b/pkgs/applications/version-management/meld/default.nix index 503ae4e90b9..d13457ef927 100644 --- a/pkgs/applications/version-management/meld/default.nix +++ b/pkgs/applications/version-management/meld/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, itstool, pythonPackages, intltool, wrapGAppsHook +{ stdenv, fetchurl, itstool, python2Packages, intltool, wrapGAppsHook , libxml2, gobjectIntrospection, gtk3, gnome3, cairo, file }: @@ -6,7 +6,7 @@ let minor = "3.16"; version = "${minor}.2"; - inherit (pythonPackages) python buildPythonApplication pycairo pygobject3; + inherit (python2Packages) python buildPythonApplication pycairo pygobject3; in buildPythonApplication rec { name = "meld-${version}"; From 61158e28338bab57db43d2b31719dc52af58b4b6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 22:42:11 +0100 Subject: [PATCH 21/36] mod_wsgi: use python2 --- pkgs/servers/http/apache-modules/mod_wsgi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix index 4cccf237b9e..1d8507fc4eb 100644 --- a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix +++ b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, apacheHttpd, python }: +{ stdenv, fetchurl, apacheHttpd, python2 }: stdenv.mkDerivation rec { name = "mod_wsgi-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "14xz422jlakdhxzsl8xs9if86yf1fnkwdg0havjyqs7my0w4qrzh"; }; - buildInputs = [ apacheHttpd python ]; + buildInputs = [ apacheHttpd python2 ]; patchPhase = '' sed -r -i -e "s|^LIBEXECDIR=.*$|LIBEXECDIR=$out/modules|" \ From ef320da79c2f5d8a3cf12aa58a16602b3e80e92d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 8 Nov 2016 22:43:02 +0100 Subject: [PATCH 22/36] zeitgeist: use python2 --- pkgs/development/libraries/zeitgeist/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zeitgeist/default.nix b/pkgs/development/libraries/zeitgeist/default.nix index 879e1ccaec3..bb6af73356d 100644 --- a/pkgs/development/libraries/zeitgeist/default.nix +++ b/pkgs/development/libraries/zeitgeist/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, glib, sqlite, gnome3, vala_0_23 , intltool, libtool, python, dbus_libs, telepathy_glib -, gtk3, json_glib, librdf_raptor2, pythonPackages, dbus_glib }: +, gtk3, json_glib, librdf_raptor2, python2Packages, dbus_glib }: stdenv.mkDerivation rec { version = "0.9.15"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig glib sqlite gnome3.gnome_common intltool libtool python dbus_libs telepathy_glib vala_0_23 dbus_glib - gtk3 json_glib librdf_raptor2 pythonPackages.rdflib ]; + gtk3 json_glib librdf_raptor2 python2Packages.rdflib ]; prePatch = "patchShebangs ."; From 16a90832cd52dc2a6aa30cb15a128babddd095c9 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 9 Nov 2016 20:01:54 +0100 Subject: [PATCH 23/36] darwin.Libsystem: export _mach_init_routine --- .../Libsystem/default.nix | 18 +++++++++++------- .../Libsystem/system_symbols | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_symbols diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix index aac213bb804..92c54d9b679 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -56,9 +56,8 @@ appleDerivation rec { # The startup object files cp ${Csu}/lib/* $out/lib - # Narrowly speaking, these would work if we re-exported libsystem_c and libsystem_kernel, - # but we also need to run the original central libsystem constructor (which initializes - # a ton of crap for its consitutent libraries) so we link against the central library here. + # We can't re-exported libsystem_c and libsystem_kernel directly, + # so we link against the central library here. mkdir -p $out/lib/system ld -macosx_version_min 10.7 -arch x86_64 -dylib \ -o $out/lib/system/libsystem_c.dylib \ @@ -70,8 +69,14 @@ appleDerivation rec { /usr/lib/libSystem.dylib \ -reexported_symbols_list ${./system_kernel_symbols} - libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }') + # The umbrella libSystem also exports some symbols, + # but we don't want to pull in everything from the other libraries. + ld -macosx_version_min 10.7 -arch x86_64 -dylib \ + -o $out/lib/libSystem_internal.dylib \ + /usr/lib/libSystem.dylib \ + -reexported_symbols_list ${./system_symbols} + libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }') for i in $libs; do if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then @@ -79,14 +84,13 @@ appleDerivation rec { fi done - ld -macosx_version_min 10.7 \ - -arch x86_64 \ - -dylib \ + ld -macosx_version_min 10.7 -arch x86_64 -dylib \ -o $out/lib/libSystem.B.dylib \ -compatibility_version 1.0 \ -current_version 1226.10.1 \ -reexport_library $out/lib/system/libsystem_c.dylib \ -reexport_library $out/lib/system/libsystem_kernel.dylib \ + -reexport_library $out/lib/libSystem_internal.dylib \ $args ln -s libSystem.B.dylib $out/lib/libSystem.dylib diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_symbols new file mode 100644 index 00000000000..75a00acac49 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_symbols @@ -0,0 +1 @@ +_mach_init_routine From fcfe3c0909c7703bf5cfe6a7c2402e7e1b08b1d6 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sat, 12 Nov 2016 12:48:42 +0300 Subject: [PATCH 24/36] jemalloc: 4.1.1 -> 4.3.1 Fixes #18466. --- pkgs/development/libraries/jemalloc/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix index a332487d4ed..84638bc01ea 100644 --- a/pkgs/development/libraries/jemalloc/default.nix +++ b/pkgs/development/libraries/jemalloc/default.nix @@ -1,11 +1,12 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "jemalloc-4.1.1"; + name = "jemalloc-${version}"; + version = "4.3.1"; src = fetchurl { - url = "http://www.canonware.com/download/jemalloc/${name}.tar.bz2"; - sha256 = "1bmdr51wxiir595k2r6z9a7rcgm42kkgnr586xir7vdcndr3pwf8"; + url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2"; + sha256 = "12r71i8nm3vwz21fc16rwbb0pwcg5s05n1qg3rwl2s85v0x1ifzp"; }; # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which @@ -14,7 +15,7 @@ stdenv.mkDerivation rec { configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix="; meta = with stdenv.lib; { - homepage = http://www.canonware.com/jemalloc/index.html; + homepage = http://jemalloc.net; description = "General purpose malloc(3) implementation"; longDescription = '' malloc(3)-compatible memory allocator that emphasizes fragmentation From 7e933af17344c049cdb13bffeafdb82f0927f3bc Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 12 Nov 2016 17:14:20 +0100 Subject: [PATCH 25/36] db: fix build with libc++-3.8 --- pkgs/development/libraries/db/clang-4.8.patch | 22 --- pkgs/development/libraries/db/clang-5.3.patch | 154 ------------------ .../development/libraries/db/cygwin-4.4.patch | 21 --- .../development/libraries/db/cygwin-4.5.patch | 22 --- pkgs/development/libraries/db/db-4.8.nix | 20 ++- pkgs/development/libraries/db/db-5.3.nix | 4 - pkgs/development/libraries/db/generic.nix | 18 ++ .../libraries/db/register-race-fix.patch | 47 ------ 8 files changed, 37 insertions(+), 271 deletions(-) delete mode 100644 pkgs/development/libraries/db/clang-4.8.patch delete mode 100644 pkgs/development/libraries/db/clang-5.3.patch delete mode 100644 pkgs/development/libraries/db/cygwin-4.4.patch delete mode 100644 pkgs/development/libraries/db/cygwin-4.5.patch delete mode 100644 pkgs/development/libraries/db/register-race-fix.patch diff --git a/pkgs/development/libraries/db/clang-4.8.patch b/pkgs/development/libraries/db/clang-4.8.patch deleted file mode 100644 index c53160a8297..00000000000 --- a/pkgs/development/libraries/db/clang-4.8.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/dbinc/atomic.h b/dbinc/atomic.h -index 0034dcc..fa7ba93 100644 ---- a/dbinc/atomic.h -+++ b/dbinc/atomic.h -@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; - #define atomic_inc(env, p) __atomic_inc(p) - #define atomic_dec(env, p) __atomic_dec(p) - #define atomic_compare_exchange(env, p, o, n) \ -- __atomic_compare_exchange((p), (o), (n)) -+ __db_atomic_compare_exchange((p), (o), (n)) - static inline int __atomic_inc(db_atomic_t *p) - { - int temp; -@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) - * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html - * which configure could be changed to use. - */ --static inline int __atomic_compare_exchange( -+static inline int __db_atomic_compare_exchange( - db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) - { - atomic_value_t was; diff --git a/pkgs/development/libraries/db/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch deleted file mode 100644 index 0a0993da13e..00000000000 --- a/pkgs/development/libraries/db/clang-5.3.patch +++ /dev/null @@ -1,154 +0,0 @@ -diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h -index 6a858f7..9f338dc 100644 ---- a/src/dbinc/atomic.h -+++ b/src/dbinc/atomic.h -@@ -70,7 +70,7 @@ typedef struct { - * These have no memory barriers; the caller must include them when necessary. - */ - #define atomic_read(p) ((p)->value) --#define atomic_init(p, val) ((p)->value = (val)) -+#define atomic_init_db(p, val) ((p)->value = (val)) - - #ifdef HAVE_ATOMIC_SUPPORT - -@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; - #define atomic_inc(env, p) __atomic_inc(p) - #define atomic_dec(env, p) __atomic_dec(p) - #define atomic_compare_exchange(env, p, o, n) \ -- __atomic_compare_exchange((p), (o), (n)) -+ __atomic_compare_exchange_db((p), (o), (n)) - static inline int __atomic_inc(db_atomic_t *p) - { - int temp; -@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) - * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html - * which configure could be changed to use. - */ --static inline int __atomic_compare_exchange( -+static inline int __atomic_compare_exchange_db( - db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) - { - atomic_value_t was; -@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( - #define atomic_dec(env, p) (--(p)->value) - #define atomic_compare_exchange(env, p, oldval, newval) \ - (DB_ASSERT(env, atomic_read(p) == (oldval)), \ -- atomic_init(p, (newval)), 1) -+ atomic_init_db(p, (newval)), 1) - #else - #define atomic_inc(env, p) __atomic_inc(env, p) - #define atomic_dec(env, p) __atomic_dec(env, p) -diff --git a/src/dbinc/db.in b/src/dbinc/db.in -index 92ac822..f80428e 100644 ---- a/src/dbinc/db.in -+++ b/src/dbinc/db.in -@@ -2782,7 +2782,7 @@ typedef struct { - #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) - #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ - #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) --#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) -+#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) - - /******************************************************* - * Hsearch historic interface. -diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c -index 16de695..d0dcc29 100644 ---- a/src/mp/mp_fget.c -+++ b/src/mp/mp_fget.c -@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header and data space. */ - - /* Initialize enough so we can call __memp_bhfree. */ - alloc_bhp->flags = 0; -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - #ifdef DIAGNOSTIC - if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { - __db_errx(env, DB_STR("3025", -@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header and data space. */ - MVCC_MPROTECT(bhp->buf, mfp->pagesize, - PROT_READ); - -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - MUTEX_LOCK(env, alloc_bhp->mtx_buf); - alloc_bhp->priority = bhp->priority; - alloc_bhp->pgno = bhp->pgno; -diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c -index 770bad8..e28cce0 100644 ---- a/src/mp/mp_mvcc.c -+++ b/src/mp/mp_mvcc.c -@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) - #else - memcpy(frozen_bhp, bhp, SSZA(BH, buf)); - #endif -- atomic_init(&frozen_bhp->ref, 0); -+ atomic_init_db(&frozen_bhp->ref, 0); - if (mutex != MUTEX_INVALID) - frozen_bhp->mtx_buf = mutex; - else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, -@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) - #endif - alloc_bhp->mtx_buf = mutex; - MUTEX_LOCK(env, alloc_bhp->mtx_buf); -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - F_CLR(alloc_bhp, BH_FROZEN); - } - -diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c -index 4952030..47645f8 100644 ---- a/src/mp/mp_region.c -+++ b/src/mp/mp_region.c -@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) - MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) - return (ret); - SH_TAILQ_INIT(&htab[i].hash_bucket); -- atomic_init(&htab[i].hash_page_dirty, 0); -+ atomic_init_db(&htab[i].hash_page_dirty, 0); - } - - /* -@@ -302,7 +302,7 @@ no_prealloc: - } else - hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount); - SH_TAILQ_INIT(&hp->hash_bucket); -- atomic_init(&hp->hash_page_dirty, 0); -+ atomic_init_db(&hp->hash_page_dirty, 0); - #ifdef HAVE_STATISTICS - hp->hash_io_wait = 0; - hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; -diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c -index 09353b0..177353c 100644 ---- a/src/mutex/mut_method.c -+++ b/src/mutex/mut_method.c -@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval) - MUTEX_LOCK(env, mtx); - ret = atomic_read(v) == oldval; - if (ret) -- atomic_init(v, newval); -+ atomic_init_db(v, newval); - MUTEX_UNLOCK(env, mtx); - - return (ret); -diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c -index 106b161..fc4de9d 100644 ---- a/src/mutex/mut_tas.c -+++ b/src/mutex/mut_tas.c -@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) - - #ifdef HAVE_SHARED_LATCHES - if (F_ISSET(mutexp, DB_MUTEX_SHARED)) -- atomic_init(&mutexp->sharecount, 0); -+ atomic_init_db(&mutexp->sharecount, 0); - else - #endif - if (MUTEX_INIT(&mutexp->tas)) { -@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex) - F_CLR(mutexp, DB_MUTEX_LOCKED); - /* Flush flag update before zeroing count */ - MEMBAR_EXIT(); -- atomic_init(&mutexp->sharecount, 0); -+ atomic_init_db(&mutexp->sharecount, 0); - } else { - DB_ASSERT(env, sharecount > 0); - MEMBAR_EXIT(); diff --git a/pkgs/development/libraries/db/cygwin-4.4.patch b/pkgs/development/libraries/db/cygwin-4.4.patch deleted file mode 100644 index 3f9d658b5da..00000000000 --- a/pkgs/development/libraries/db/cygwin-4.4.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c -*** db-4.4.20.NC-old/os/os_flock.c Mon Jun 20 16:59:01 2005 ---- db-4.4.20.NC/os/os_flock.c Wed Jun 7 17:01:49 2006 -*************** -*** 36,41 **** ---- 36,50 ---- - - DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); - -+ #ifdef __CYGWIN__ -+ /* -+ * Windows file locking interferes with read/write operations, so we -+ * map the ranges to an area past the end of the file. -+ */ -+ DB_ASSERT(offset < (off_t) 1 << 62); -+ offset += (off_t) 1 << 62; -+ #endif -+ - #ifdef HAVE_FCNTL - fl.l_start = offset; - fl.l_len = 1; diff --git a/pkgs/development/libraries/db/cygwin-4.5.patch b/pkgs/development/libraries/db/cygwin-4.5.patch deleted file mode 100644 index 3f0ee78a708..00000000000 --- a/pkgs/development/libraries/db/cygwin-4.5.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c -*** db-4.5.20-orig/os/os_flock.c 2006-10-13 12:36:12.000000000 +0200 ---- db-4.5.20/os/os_flock.c 2006-10-13 12:40:11.000000000 +0200 -*************** -*** 30,35 **** ---- 30,44 ---- - - DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); - -+ #ifdef __CYGWIN__ -+ /* -+ * Windows file locking interferes with read/write operations, so we -+ * map the ranges to an area past the end of the file. -+ */ -+ DB_ASSERT(dbenv, offset < (off_t) 1 << 62); -+ offset += (off_t) 1 << 62; -+ #endif -+ - fl.l_start = offset; - fl.l_len = 1; - fl.l_type = acquire ? F_WRLCK : F_UNLCK; -Only in db-4.5.20/os: os_flock.c~ diff --git a/pkgs/development/libraries/db/db-4.8.nix b/pkgs/development/libraries/db/db-4.8.nix index 40869a865ae..f631a032102 100644 --- a/pkgs/development/libraries/db/db-4.8.nix +++ b/pkgs/development/libraries/db/db-4.8.nix @@ -5,5 +5,23 @@ import ./generic.nix (args // rec { extraPatches = [ ./clang-4.8.patch ]; sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"; branch = "4.8"; - drvArgs = { hardeningDisable = [ "format" ]; }; + drvArgs.hardeningDisable = [ "format" ]; + + # https://community.oracle.com/thread/3952592 + # this patch renames some sybols that conflict with libc++-3.8 + # symbols: atomic_compare_exchange, atomic_init, store + drvArgs.prePatch = '' + substituteInPlace dbinc/db.in \ + --replace '#define store' '#define store_db' + + substituteInPlace dbinc/atomic.h \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + substituteInPlace mp/*.c \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + substituteInPlace mutex/*.c \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + ''; }) diff --git a/pkgs/development/libraries/db/db-5.3.nix b/pkgs/development/libraries/db/db-5.3.nix index 91adfa24b58..e2253259443 100644 --- a/pkgs/development/libraries/db/db-5.3.nix +++ b/pkgs/development/libraries/db/db-5.3.nix @@ -4,8 +4,4 @@ import ./generic.nix (args // rec { version = "5.3.28"; sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"; branch = "5.3"; - # https://community.oracle.com/thread/3952592 - # this patch renames some sybols that conflict with libc++-3.8 - # symbols: atomic_compare_exchange, atomic_init, store - extraPatches = [ ./clang-5.3.patch ]; }) diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index fdc828effdf..8e3eb5248e9 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -20,6 +20,24 @@ stdenv.mkDerivation (rec { patches = extraPatches; + # https://community.oracle.com/thread/3952592 + # this patch renames some sybols that conflict with libc++-3.8 + # symbols: atomic_compare_exchange, atomic_init, store + prePatch = '' + substituteInPlace src/dbinc/db.in \ + --replace '#define store' '#define store_db' + + substituteInPlace src/dbinc/atomic.h \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + substituteInPlace src/mp/*.c \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + substituteInPlace src/mutex/*.c \ + --replace atomic_compare_exchange atomic_compare_exchange_db \ + --replace atomic_init atomic_init_db + ''; + configureFlags = [ (if cxxSupport then "--enable-cxx" else "--disable-cxx") (if compat185 then "--enable-compat185" else "--disable-compat185") diff --git a/pkgs/development/libraries/db/register-race-fix.patch b/pkgs/development/libraries/db/register-race-fix.patch deleted file mode 100644 index bb05c966e5b..00000000000 --- a/pkgs/development/libraries/db/register-race-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -rc db-4.5.20-orig/env/env_register.c db-4.5.20/env/env_register.c -*** db-4.5.20-orig/env/env_register.c 2006-09-09 16:29:04.000000000 +0200 ---- db-4.5.20/env/env_register.c 2007-05-16 21:13:27.000000000 +0200 -*************** -*** 255,260 **** ---- 255,262 ---- - buf[nr - 1] = '\0'; - } - -+ //sleep(3); -+ - pos = (off_t)lcnt * PID_LEN; - if (REGISTRY_LOCK(dbenv, pos, 1) == 0) { - if ((ret = REGISTRY_UNLOCK(dbenv, pos)) != 0) -*************** -*** 361,366 **** ---- 363,392 ---- - if (recovery_failed) - goto err; - -+ //sleep(5); -+ -+ /* -+ * Acquire an exclusive lock to prevent a race like this: -+ * -+ * 1) Process X is about to exit and process Y is just -+ * starting. -+ * 2) Process Y reads X's slot. -+ * 3) Process X clears its slot. -+ * 4) Process Y sees that X's slot isn't cleared yet (since it -+ * just read the old value). -+ * 5) Process X closes the registry, releases the lock on its -+ * slot. -+ * 6) Process Y tries to acquire X's slot and succeeds, so it -+ * concludes that X died and recovery is needed. -+ * -+ * A more efficient solution to this problem would be to let -+ * __envreg_add acquire the lock on a slot first, and *then* -+ * read the slot (instead of the other way around). Then we -+ * wouldn't need the exclusive lock here. -+ */ -+ if ((ret = REGISTRY_EXCL_LOCK(dbenv, 0)) != 0) -+ goto err; -+ - /* - * Why isn't an exclusive lock necessary to discard a DB_ENV handle? - * From c7d1925b6eb805acbeba9e9324969bf67965d350 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 13 Nov 2016 00:42:17 +0100 Subject: [PATCH 26/36] Revert "db: fix build with libc++-3.8" This reverts commit 7e933af17344c049cdb13bffeafdb82f0927f3bc. --- pkgs/development/libraries/db/clang-4.8.patch | 22 +++ pkgs/development/libraries/db/clang-5.3.patch | 154 ++++++++++++++++++ .../development/libraries/db/cygwin-4.4.patch | 21 +++ .../development/libraries/db/cygwin-4.5.patch | 22 +++ pkgs/development/libraries/db/db-4.8.nix | 20 +-- pkgs/development/libraries/db/db-5.3.nix | 4 + pkgs/development/libraries/db/generic.nix | 18 -- .../libraries/db/register-race-fix.patch | 47 ++++++ 8 files changed, 271 insertions(+), 37 deletions(-) create mode 100644 pkgs/development/libraries/db/clang-4.8.patch create mode 100644 pkgs/development/libraries/db/clang-5.3.patch create mode 100644 pkgs/development/libraries/db/cygwin-4.4.patch create mode 100644 pkgs/development/libraries/db/cygwin-4.5.patch create mode 100644 pkgs/development/libraries/db/register-race-fix.patch diff --git a/pkgs/development/libraries/db/clang-4.8.patch b/pkgs/development/libraries/db/clang-4.8.patch new file mode 100644 index 00000000000..c53160a8297 --- /dev/null +++ b/pkgs/development/libraries/db/clang-4.8.patch @@ -0,0 +1,22 @@ +diff --git a/dbinc/atomic.h b/dbinc/atomic.h +index 0034dcc..fa7ba93 100644 +--- a/dbinc/atomic.h ++++ b/dbinc/atomic.h +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __db_atomic_compare_exchange((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __db_atomic_compare_exchange( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; diff --git a/pkgs/development/libraries/db/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch new file mode 100644 index 00000000000..0a0993da13e --- /dev/null +++ b/pkgs/development/libraries/db/clang-5.3.patch @@ -0,0 +1,154 @@ +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index 6a858f7..9f338dc 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define atomic_init_db(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __atomic_compare_exchange_db((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __atomic_compare_exchange_db( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; +@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ atomic_init_db(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/src/dbinc/db.in b/src/dbinc/db.in +index 92ac822..f80428e 100644 +--- a/src/dbinc/db.in ++++ b/src/dbinc/db.in +@@ -2782,7 +2782,7 @@ typedef struct { + #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) + #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ + #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) +-#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) ++#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) + + /******************************************************* + * Hsearch historic interface. +diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c +index 16de695..d0dcc29 100644 +--- a/src/mp/mp_fget.c ++++ b/src/mp/mp_fget.c +@@ -649,7 +649,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, DB_STR("3025", +@@ -955,7 +955,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c +index 770bad8..e28cce0 100644 +--- a/src/mp/mp_mvcc.c ++++ b/src/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ atomic_init_db(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c +index 4952030..47645f8 100644 +--- a/src/mp/mp_region.c ++++ b/src/mp/mp_region.c +@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ atomic_init_db(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -302,7 +302,7 @@ no_prealloc: + } else + hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount); + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ atomic_init_db(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c +index 09353b0..177353c 100644 +--- a/src/mutex/mut_method.c ++++ b/src/mutex/mut_method.c +@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ atomic_init_db(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c +index 106b161..fc4de9d 100644 +--- a/src/mutex/mut_tas.c ++++ b/src/mutex/mut_tas.c +@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/pkgs/development/libraries/db/cygwin-4.4.patch b/pkgs/development/libraries/db/cygwin-4.4.patch new file mode 100644 index 00000000000..3f9d658b5da --- /dev/null +++ b/pkgs/development/libraries/db/cygwin-4.4.patch @@ -0,0 +1,21 @@ +diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c +*** db-4.4.20.NC-old/os/os_flock.c Mon Jun 20 16:59:01 2005 +--- db-4.4.20.NC/os/os_flock.c Wed Jun 7 17:01:49 2006 +*************** +*** 36,41 **** +--- 36,50 ---- + + DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); + ++ #ifdef __CYGWIN__ ++ /* ++ * Windows file locking interferes with read/write operations, so we ++ * map the ranges to an area past the end of the file. ++ */ ++ DB_ASSERT(offset < (off_t) 1 << 62); ++ offset += (off_t) 1 << 62; ++ #endif ++ + #ifdef HAVE_FCNTL + fl.l_start = offset; + fl.l_len = 1; diff --git a/pkgs/development/libraries/db/cygwin-4.5.patch b/pkgs/development/libraries/db/cygwin-4.5.patch new file mode 100644 index 00000000000..3f0ee78a708 --- /dev/null +++ b/pkgs/development/libraries/db/cygwin-4.5.patch @@ -0,0 +1,22 @@ +diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c +*** db-4.5.20-orig/os/os_flock.c 2006-10-13 12:36:12.000000000 +0200 +--- db-4.5.20/os/os_flock.c 2006-10-13 12:40:11.000000000 +0200 +*************** +*** 30,35 **** +--- 30,44 ---- + + DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); + ++ #ifdef __CYGWIN__ ++ /* ++ * Windows file locking interferes with read/write operations, so we ++ * map the ranges to an area past the end of the file. ++ */ ++ DB_ASSERT(dbenv, offset < (off_t) 1 << 62); ++ offset += (off_t) 1 << 62; ++ #endif ++ + fl.l_start = offset; + fl.l_len = 1; + fl.l_type = acquire ? F_WRLCK : F_UNLCK; +Only in db-4.5.20/os: os_flock.c~ diff --git a/pkgs/development/libraries/db/db-4.8.nix b/pkgs/development/libraries/db/db-4.8.nix index f631a032102..40869a865ae 100644 --- a/pkgs/development/libraries/db/db-4.8.nix +++ b/pkgs/development/libraries/db/db-4.8.nix @@ -5,23 +5,5 @@ import ./generic.nix (args // rec { extraPatches = [ ./clang-4.8.patch ]; sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"; branch = "4.8"; - drvArgs.hardeningDisable = [ "format" ]; - - # https://community.oracle.com/thread/3952592 - # this patch renames some sybols that conflict with libc++-3.8 - # symbols: atomic_compare_exchange, atomic_init, store - drvArgs.prePatch = '' - substituteInPlace dbinc/db.in \ - --replace '#define store' '#define store_db' - - substituteInPlace dbinc/atomic.h \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - substituteInPlace mp/*.c \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - substituteInPlace mutex/*.c \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - ''; + drvArgs = { hardeningDisable = [ "format" ]; }; }) diff --git a/pkgs/development/libraries/db/db-5.3.nix b/pkgs/development/libraries/db/db-5.3.nix index e2253259443..91adfa24b58 100644 --- a/pkgs/development/libraries/db/db-5.3.nix +++ b/pkgs/development/libraries/db/db-5.3.nix @@ -4,4 +4,8 @@ import ./generic.nix (args // rec { version = "5.3.28"; sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"; branch = "5.3"; + # https://community.oracle.com/thread/3952592 + # this patch renames some sybols that conflict with libc++-3.8 + # symbols: atomic_compare_exchange, atomic_init, store + extraPatches = [ ./clang-5.3.patch ]; }) diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index 8e3eb5248e9..fdc828effdf 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -20,24 +20,6 @@ stdenv.mkDerivation (rec { patches = extraPatches; - # https://community.oracle.com/thread/3952592 - # this patch renames some sybols that conflict with libc++-3.8 - # symbols: atomic_compare_exchange, atomic_init, store - prePatch = '' - substituteInPlace src/dbinc/db.in \ - --replace '#define store' '#define store_db' - - substituteInPlace src/dbinc/atomic.h \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - substituteInPlace src/mp/*.c \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - substituteInPlace src/mutex/*.c \ - --replace atomic_compare_exchange atomic_compare_exchange_db \ - --replace atomic_init atomic_init_db - ''; - configureFlags = [ (if cxxSupport then "--enable-cxx" else "--disable-cxx") (if compat185 then "--enable-compat185" else "--disable-compat185") diff --git a/pkgs/development/libraries/db/register-race-fix.patch b/pkgs/development/libraries/db/register-race-fix.patch new file mode 100644 index 00000000000..bb05c966e5b --- /dev/null +++ b/pkgs/development/libraries/db/register-race-fix.patch @@ -0,0 +1,47 @@ +diff -rc db-4.5.20-orig/env/env_register.c db-4.5.20/env/env_register.c +*** db-4.5.20-orig/env/env_register.c 2006-09-09 16:29:04.000000000 +0200 +--- db-4.5.20/env/env_register.c 2007-05-16 21:13:27.000000000 +0200 +*************** +*** 255,260 **** +--- 255,262 ---- + buf[nr - 1] = '\0'; + } + ++ //sleep(3); ++ + pos = (off_t)lcnt * PID_LEN; + if (REGISTRY_LOCK(dbenv, pos, 1) == 0) { + if ((ret = REGISTRY_UNLOCK(dbenv, pos)) != 0) +*************** +*** 361,366 **** +--- 363,392 ---- + if (recovery_failed) + goto err; + ++ //sleep(5); ++ ++ /* ++ * Acquire an exclusive lock to prevent a race like this: ++ * ++ * 1) Process X is about to exit and process Y is just ++ * starting. ++ * 2) Process Y reads X's slot. ++ * 3) Process X clears its slot. ++ * 4) Process Y sees that X's slot isn't cleared yet (since it ++ * just read the old value). ++ * 5) Process X closes the registry, releases the lock on its ++ * slot. ++ * 6) Process Y tries to acquire X's slot and succeeds, so it ++ * concludes that X died and recovery is needed. ++ * ++ * A more efficient solution to this problem would be to let ++ * __envreg_add acquire the lock on a slot first, and *then* ++ * read the slot (instead of the other way around). Then we ++ * wouldn't need the exclusive lock here. ++ */ ++ if ((ret = REGISTRY_EXCL_LOCK(dbenv, 0)) != 0) ++ goto err; ++ + /* + * Why isn't an exclusive lock necessary to discard a DB_ENV handle? + * From b82ad1ba7695e92421e168c26d1915c00f4374ce Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 13 Nov 2016 22:48:52 +0100 Subject: [PATCH 27/36] db: fix all versions with libc++3.8 --- pkgs/development/libraries/db/clang-4.8.patch | 138 +++++++++++++++++- pkgs/development/libraries/db/clang-5.3.patch | 4 +- pkgs/development/libraries/db/clang-6.0.patch | 136 +++++++++++++++++ .../development/libraries/db/cygwin-4.4.patch | 21 --- .../development/libraries/db/cygwin-4.5.patch | 22 --- pkgs/development/libraries/db/db-4.8.nix | 7 +- pkgs/development/libraries/db/db-5.3.nix | 5 +- pkgs/development/libraries/db/db-6.0.nix | 2 +- pkgs/development/libraries/db/generic.nix | 10 +- .../libraries/db/register-race-fix.patch | 47 ------ 10 files changed, 286 insertions(+), 106 deletions(-) create mode 100644 pkgs/development/libraries/db/clang-6.0.patch delete mode 100644 pkgs/development/libraries/db/cygwin-4.4.patch delete mode 100644 pkgs/development/libraries/db/cygwin-4.5.patch delete mode 100644 pkgs/development/libraries/db/register-race-fix.patch diff --git a/pkgs/development/libraries/db/clang-4.8.patch b/pkgs/development/libraries/db/clang-4.8.patch index c53160a8297..bbb77891497 100644 --- a/pkgs/development/libraries/db/clang-4.8.patch +++ b/pkgs/development/libraries/db/clang-4.8.patch @@ -1,13 +1,22 @@ diff --git a/dbinc/atomic.h b/dbinc/atomic.h -index 0034dcc..fa7ba93 100644 +index 0034dcc..160c8ea 100644 --- a/dbinc/atomic.h +++ b/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define atomic_init_db(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + @@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; #define atomic_inc(env, p) __atomic_inc(p) #define atomic_dec(env, p) __atomic_dec(p) #define atomic_compare_exchange(env, p, o, n) \ - __atomic_compare_exchange((p), (o), (n)) -+ __db_atomic_compare_exchange((p), (o), (n)) ++ __atomic_compare_exchange_int((p), (o), (n)) static inline int __atomic_inc(db_atomic_t *p) { int temp; @@ -16,7 +25,130 @@ index 0034dcc..fa7ba93 100644 * which configure could be changed to use. */ -static inline int __atomic_compare_exchange( -+static inline int __db_atomic_compare_exchange( ++static inline int __atomic_compare_exchange_int( db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) { atomic_value_t was; +@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ atomic_init_db(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/dbinc/db.in b/dbinc/db.in +index 9fc6712..7428e0a 100644 +--- a/dbinc/db.in ++++ b/dbinc/db.in +@@ -2413,7 +2413,7 @@ typedef struct { + #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) + #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ + #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) +-#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) ++#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) + + /******************************************************* + * Hsearch historic interface. +diff --git a/mp/mp_fget.c b/mp/mp_fget.c +index 5fdee5a..0b75f57 100644 +--- a/mp/mp_fget.c ++++ b/mp/mp_fget.c +@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, +@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c +index 34467d2..f05aa0c 100644 +--- a/mp/mp_mvcc.c ++++ b/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ atomic_init_db(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/mp/mp_region.c b/mp/mp_region.c +index e6cece9..ddbe906 100644 +--- a/mp/mp_region.c ++++ b/mp/mp_region.c +@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ atomic_init_db(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID : + mtx_base + i; + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ atomic_init_db(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/mutex/mut_method.c b/mutex/mut_method.c +index 2588763..5c6d516 100644 +--- a/mutex/mut_method.c ++++ b/mutex/mut_method.c +@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ atomic_init_db(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c +index f3922e0..e40fcdf 100644 +--- a/mutex/mut_tas.c ++++ b/mutex/mut_tas.c +@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/pkgs/development/libraries/db/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch index 0a0993da13e..1cfb13ca8e6 100644 --- a/pkgs/development/libraries/db/clang-5.3.patch +++ b/pkgs/development/libraries/db/clang-5.3.patch @@ -16,7 +16,7 @@ index 6a858f7..9f338dc 100644 #define atomic_dec(env, p) __atomic_dec(p) #define atomic_compare_exchange(env, p, o, n) \ - __atomic_compare_exchange((p), (o), (n)) -+ __atomic_compare_exchange_db((p), (o), (n)) ++ __atomic_compare_exchange_int((p), (o), (n)) static inline int __atomic_inc(db_atomic_t *p) { int temp; @@ -25,7 +25,7 @@ index 6a858f7..9f338dc 100644 * which configure could be changed to use. */ -static inline int __atomic_compare_exchange( -+static inline int __atomic_compare_exchange_db( ++static inline int __atomic_compare_exchange_int( db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) { atomic_value_t was; diff --git a/pkgs/development/libraries/db/clang-6.0.patch b/pkgs/development/libraries/db/clang-6.0.patch new file mode 100644 index 00000000000..5c1e8f506c4 --- /dev/null +++ b/pkgs/development/libraries/db/clang-6.0.patch @@ -0,0 +1,136 @@ +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index e4420aa..4799b5f 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define atomic_init_db(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -225,7 +225,7 @@ static inline int __atomic_compare_exchange_int( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ atomic_init_db(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc_int(env, p) + #define atomic_dec(env, p) __atomic_dec_int(env, p) +diff --git a/src/dbinc/db.in b/src/dbinc/db.in +index 3c2ad9b..3e46f02 100644 +--- a/src/dbinc/db.in ++++ b/src/dbinc/db.in +@@ -2999,7 +2999,7 @@ typedef struct { + #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) + #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ + #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) +-#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) ++#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) + + /******************************************************* + * Hsearch historic interface. +diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c +index 59fe9fe..fa4ced7 100644 +--- a/src/mp/mp_fget.c ++++ b/src/mp/mp_fget.c +@@ -654,7 +654,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, DB_STR("3025", +@@ -969,7 +969,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c +index 83c4d72..0a47202 100644 +--- a/src/mp/mp_mvcc.c ++++ b/src/mp/mp_mvcc.c +@@ -281,7 +281,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ atomic_init_db(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -440,7 +440,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ atomic_init_db(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c +index 4d95e4f..e97459c 100644 +--- a/src/mp/mp_region.c ++++ b/src/mp/mp_region.c +@@ -278,7 +278,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ atomic_init_db(&htab[i].hash_page_dirty, 0); + } + + mtx_base = mtx_prev = MUTEX_INVALID; +@@ -332,7 +332,7 @@ no_prealloc: + DB_MUTEX_SHARED, &hp->mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ atomic_init_db(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c +index 72b34de..a9f9868 100644 +--- a/src/mutex/mut_method.c ++++ b/src/mutex/mut_method.c +@@ -501,7 +501,7 @@ __atomic_compare_exchange_int(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ atomic_init_db(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c +index 7899c4b..d9420fa 100644 +--- a/src/mutex/mut_tas.c ++++ b/src/mutex/mut_tas.c +@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -643,7 +643,7 @@ was_not_locked: + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ atomic_init_db(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/pkgs/development/libraries/db/cygwin-4.4.patch b/pkgs/development/libraries/db/cygwin-4.4.patch deleted file mode 100644 index 3f9d658b5da..00000000000 --- a/pkgs/development/libraries/db/cygwin-4.4.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c -*** db-4.4.20.NC-old/os/os_flock.c Mon Jun 20 16:59:01 2005 ---- db-4.4.20.NC/os/os_flock.c Wed Jun 7 17:01:49 2006 -*************** -*** 36,41 **** ---- 36,50 ---- - - DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); - -+ #ifdef __CYGWIN__ -+ /* -+ * Windows file locking interferes with read/write operations, so we -+ * map the ranges to an area past the end of the file. -+ */ -+ DB_ASSERT(offset < (off_t) 1 << 62); -+ offset += (off_t) 1 << 62; -+ #endif -+ - #ifdef HAVE_FCNTL - fl.l_start = offset; - fl.l_len = 1; diff --git a/pkgs/development/libraries/db/cygwin-4.5.patch b/pkgs/development/libraries/db/cygwin-4.5.patch deleted file mode 100644 index 3f0ee78a708..00000000000 --- a/pkgs/development/libraries/db/cygwin-4.5.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c -*** db-4.5.20-orig/os/os_flock.c 2006-10-13 12:36:12.000000000 +0200 ---- db-4.5.20/os/os_flock.c 2006-10-13 12:40:11.000000000 +0200 -*************** -*** 30,35 **** ---- 30,44 ---- - - DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); - -+ #ifdef __CYGWIN__ -+ /* -+ * Windows file locking interferes with read/write operations, so we -+ * map the ranges to an area past the end of the file. -+ */ -+ DB_ASSERT(dbenv, offset < (off_t) 1 << 62); -+ offset += (off_t) 1 << 62; -+ #endif -+ - fl.l_start = offset; - fl.l_len = 1; - fl.l_type = acquire ? F_WRLCK : F_UNLCK; -Only in db-4.5.20/os: os_flock.c~ diff --git a/pkgs/development/libraries/db/db-4.8.nix b/pkgs/development/libraries/db/db-4.8.nix index 40869a865ae..bce91e5a940 100644 --- a/pkgs/development/libraries/db/db-4.8.nix +++ b/pkgs/development/libraries/db/db-4.8.nix @@ -2,8 +2,9 @@ import ./generic.nix (args // rec { version = "4.8.30"; - extraPatches = [ ./clang-4.8.patch ]; sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"; - branch = "4.8"; - drvArgs = { hardeningDisable = [ "format" ]; }; + extraPatches = [ ./clang-4.8.patch ]; + + drvArgs.hardeningDisable = [ "format" ]; + drvArgs.doCheck = false; }) diff --git a/pkgs/development/libraries/db/db-5.3.nix b/pkgs/development/libraries/db/db-5.3.nix index 91adfa24b58..d1d3c953fc9 100644 --- a/pkgs/development/libraries/db/db-5.3.nix +++ b/pkgs/development/libraries/db/db-5.3.nix @@ -3,9 +3,6 @@ import ./generic.nix (args // rec { version = "5.3.28"; sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"; - branch = "5.3"; - # https://community.oracle.com/thread/3952592 - # this patch renames some sybols that conflict with libc++-3.8 - # symbols: atomic_compare_exchange, atomic_init, store + license = stdenv.lib.licenses.agpl3; extraPatches = [ ./clang-5.3.patch ]; }) diff --git a/pkgs/development/libraries/db/db-6.0.nix b/pkgs/development/libraries/db/db-6.0.nix index 716cad9ab07..b7c5667b883 100644 --- a/pkgs/development/libraries/db/db-6.0.nix +++ b/pkgs/development/libraries/db/db-6.0.nix @@ -4,5 +4,5 @@ import ./generic.nix (args // rec { version = "6.0.20"; sha256 = "00r2aaglq625y8r9xd5vw2y070plp88f1mb2gbq3kqsl7128lsl0"; license = stdenv.lib.licenses.agpl3; - branch = "6.0"; + extraPatches = [ ./clang-6.0.patch ]; }) diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index fdc828effdf..a6f9c676bba 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -4,9 +4,8 @@ # Options from inherited versions , version, sha256 -, extraPatches ? [ ] +, patchSrc ? "src", extraPatches ? [ ] , license ? stdenv.lib.licenses.sleepycat -, branch ? null , drvArgs ? {} }: @@ -36,11 +35,16 @@ stdenv.mkDerivation (rec { rm -rf $out/docs ''; + doCheck = true; + + checkPhase = '' + make examples_c examples_cxx + ''; + meta = with stdenv.lib; { homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html"; description = "Berkeley DB"; license = license; platforms = platforms.unix; - branch = branch; }; } // drvArgs) diff --git a/pkgs/development/libraries/db/register-race-fix.patch b/pkgs/development/libraries/db/register-race-fix.patch deleted file mode 100644 index bb05c966e5b..00000000000 --- a/pkgs/development/libraries/db/register-race-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -rc db-4.5.20-orig/env/env_register.c db-4.5.20/env/env_register.c -*** db-4.5.20-orig/env/env_register.c 2006-09-09 16:29:04.000000000 +0200 ---- db-4.5.20/env/env_register.c 2007-05-16 21:13:27.000000000 +0200 -*************** -*** 255,260 **** ---- 255,262 ---- - buf[nr - 1] = '\0'; - } - -+ //sleep(3); -+ - pos = (off_t)lcnt * PID_LEN; - if (REGISTRY_LOCK(dbenv, pos, 1) == 0) { - if ((ret = REGISTRY_UNLOCK(dbenv, pos)) != 0) -*************** -*** 361,366 **** ---- 363,392 ---- - if (recovery_failed) - goto err; - -+ //sleep(5); -+ -+ /* -+ * Acquire an exclusive lock to prevent a race like this: -+ * -+ * 1) Process X is about to exit and process Y is just -+ * starting. -+ * 2) Process Y reads X's slot. -+ * 3) Process X clears its slot. -+ * 4) Process Y sees that X's slot isn't cleared yet (since it -+ * just read the old value). -+ * 5) Process X closes the registry, releases the lock on its -+ * slot. -+ * 6) Process Y tries to acquire X's slot and succeeds, so it -+ * concludes that X died and recovery is needed. -+ * -+ * A more efficient solution to this problem would be to let -+ * __envreg_add acquire the lock on a slot first, and *then* -+ * read the slot (instead of the other way around). Then we -+ * wouldn't need the exclusive lock here. -+ */ -+ if ((ret = REGISTRY_EXCL_LOCK(dbenv, 0)) != 0) -+ goto err; -+ - /* - * Why isn't an exclusive lock necessary to discard a DB_ENV handle? - * From a0fa2eca17d0b8ed03ef80ac8ffecc62b7dfb477 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 14 Nov 2016 15:46:33 +0100 Subject: [PATCH 28/36] mesa: 12.0.1 -> 13.0.1 --- pkgs/development/libraries/mesa/default.nix | 10 +++------ .../libraries/mesa/dlopen-absolute-paths.diff | 22 ------------------- 2 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 pkgs/development/libraries/mesa/dlopen-absolute-paths.diff diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 5ff884fd3c1..ed82a6cdb50 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -26,7 +26,7 @@ if ! lists.elem stdenv.system platforms.mesaPlatforms then else let - version = "12.0.3"; + version = "13.0.1"; branch = head (splitString "." version); driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32"; in @@ -40,7 +40,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz" ]; - sha256 = "1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1"; + sha256 = "0cd7axwihwsay0i9fvcw14cldbxyvf8b8rd5sh53plvppyr2z5ki"; }; prePatch = "patchShebangs ."; @@ -51,11 +51,7 @@ stdenv.mkDerivation { patches = [ ./glx_ro_text_segm.patch # fix for grsecurity/PaX ./symlink-drivers.patch - ] ++ optional stdenv.isLinux - (substituteAll { - src = ./dlopen-absolute-paths.diff; - libudev = systemd.lib; - }); + ]; postPatch = '' substituteInPlace src/egl/main/egldriver.c \ diff --git a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff b/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff deleted file mode 100644 index 9a522657223..00000000000 --- a/pkgs/development/libraries/mesa/dlopen-absolute-paths.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/loader.c b/loader.c -index 4fdf3c2..69ea22d 100644 ---- a/src/loader/loader.c -+++ b/src/loader/loader.c -@@ -112,7 +112,7 @@ static void *udev_handle = NULL; - static void * - udev_dlopen_handle(void) - { -- char name[80]; -+ char name[256]; - unsigned flags = RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY; - int version; - -@@ -126,7 +126,7 @@ udev_dlopen_handle(void) - /* First try opening an already linked libudev, then try loading one */ - do { - for (version = 1; version >= 0; version--) { -- snprintf(name, sizeof(name), "libudev.so.%d", version); -+ snprintf(name, sizeof(name), "@libudev@/lib/libudev.so.%d", version); - udev_handle = dlopen(name, flags); - if (udev_handle) - return udev_handle; From 84e9328028daabfd16e9f6e756ffe30b73a9e4f7 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 14 Nov 2016 19:09:25 +0100 Subject: [PATCH 29/36] virtualbox: python is always needed even when not building bindings. --- pkgs/applications/virtualization/virtualbox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 9e51fd0abe2..14a87151e97 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -50,9 +50,9 @@ in stdenv.mkDerivation { buildInputs = [ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor libIDL libcap glib lvm2 alsaLib curl libvpx pam xorriso makeself perl - pkgconfig which libXmu libpng patchelfUnstable ] + pkgconfig which libXmu libpng patchelfUnstable python ] ++ optional javaBindings jdk - ++ optional pythonBindings python + ++ optional pythonBindings python # Python is needed even when not building bindings ++ optional pulseSupport libpulseaudio ++ optionals (headless) [ libXrandr ] ++ optionals (!headless) [ qt5.qtbase qt5.qtx11extras libXinerama SDL ]; From c2d05207a3a6659adcca3885c39c17b5fa9cdc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 14 Nov 2016 23:53:58 +0100 Subject: [PATCH 30/36] mesa: drop systemd build-time dependency After the update dropping libudev (upstream) there's no use for it. --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index ed82a6cdb50..e923f87722a 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, fetchpatch , pkgconfig, intltool, autoreconfHook, substituteAll -, file, expat, libdrm, xorg, wayland, systemd, openssl +, file, expat, libdrm, xorg, wayland, openssl , llvmPackages, libffi, libomxil-bellagio, libva , libelf, libvdpau, python2 , grsecEnabled ? false @@ -112,7 +112,7 @@ stdenv.mkDerivation { libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva libpthreadstubs openssl/*or another sha1 provider*/ (python2.withPackages (ps: [ ps.Mako ])) - ] ++ optional stdenv.isLinux systemd; + ]; enableParallelBuilding = true; From d83d2ba4f3b831ded72c7b29a2ddb9b7a528efca Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 14 Nov 2016 21:58:43 +0100 Subject: [PATCH 31/36] pythonPackages.setuptools: 26.1.1 -> 28.8.0 --- .../python-modules/bootstrapped-pip/default.nix | 4 ++-- pkgs/development/python-modules/setuptools/default.nix | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/bootstrapped-pip/default.nix b/pkgs/development/python-modules/bootstrapped-pip/default.nix index 0fd6c1873b5..7039755198c 100644 --- a/pkgs/development/python-modules/bootstrapped-pip/default.nix +++ b/pkgs/development/python-modules/bootstrapped-pip/default.nix @@ -6,8 +6,8 @@ let sha256 = "ea8033fc9905804e652f75474d33410a07404c1a78dd3c949a66863bd1050ebd"; }; setuptools_source = fetchurl { - url = "https://files.pythonhosted.org/packages/3b/c7/e9724e6f81c96248fba5876054418c11d327b3093d075790903cd66fad44/setuptools-26.1.1-py2.py3-none-any.whl"; - sha256 = "226c9ce65e76c6069e805982b036f36dc4b227b37dd87fc219aef721ec8604ae"; + url = "https://files.pythonhosted.org/packages/3b/7e/293d19ccd106119e35db4bf3e111b1895098f618b455b758aa636496cf03/setuptools-28.8.0-py2.py3-none-any.whl"; + sha256 = "2e59d06ac798efce29c567ee0e0687514efca529a665b8f364cf497cd10d21b2"; }; argparse_source = fetchurl { url = "https://pypi.python.org/packages/2.7/a/argparse/argparse-1.4.0-py2.py3-none-any.whl"; diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index 3a38dee3174..bba5a6c942b 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -1,14 +1,15 @@ { stdenv, lib, fetchurl, python, wrapPython }: stdenv.mkDerivation rec { - shortName = "setuptools-${version}"; + pname = "setuptools"; + shortName = "${pname}-${version}"; name = "${python.libPrefix}-${shortName}"; - version = "26.1.1"; # 18.4 and up breaks python34Packages.characteristic and many others + version = "28.8.0"; src = fetchurl { - url = "mirror://pypi/s/setuptools/${shortName}.tar.gz"; - sha256 = "475ce28993d7cb75335942525b9fac79f7431a7f6e8a0079c0f2680641379481"; + url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${shortName}.tar.gz"; + sha256 = "432a1ad4044338c34c2d09b0ff75d509b9849df8cf329f4c1c7706d9c2ba3c61"; }; buildInputs = [ python wrapPython ]; From 27a6d618816a348464a4e51500d79f8394f07646 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 14 Nov 2016 21:58:53 +0100 Subject: [PATCH 32/36] pythonPackages.pip: 8.1.2 -> 9.0.1 --- .../python-modules/bootstrapped-pip/default.nix | 6 +++--- pkgs/top-level/python-packages.nix | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/bootstrapped-pip/default.nix b/pkgs/development/python-modules/bootstrapped-pip/default.nix index 7039755198c..ed8bbab29a7 100644 --- a/pkgs/development/python-modules/bootstrapped-pip/default.nix +++ b/pkgs/development/python-modules/bootstrapped-pip/default.nix @@ -15,11 +15,11 @@ let }; in stdenv.mkDerivation rec { name = "${python.libPrefix}-bootstrapped-pip-${version}"; - version = "8.1.2"; + version = "9.0.1"; src = fetchurl { - url = "https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-${version}-py2.py3-none-any.whl"; - sha256 = "18cjrd66mn4a0gwa99zzs89lrb0xn4xmajdzya6zqd7v16cdsr34"; + url = "https://files.pythonhosted.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl"; + sha256 = "690b762c0a8460c303c089d5d0be034fb15a5ea2b75bdf565f40421f542fefb0"; }; unpackPhase = '' diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 071ca6f2bd5..ddb610da817 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18419,12 +18419,13 @@ in { }; pip = buildPythonPackage rec { - version = "8.1.2"; - name = "pip-${version}"; + pname = "pip"; + version = "9.0.1"; + name = "${pname}-${version}"; src = pkgs.fetchurl { - url = "mirror://pypi/p/pip/pip-${version}.tar.gz"; - sha256 = "0cmpsy9lr9diskkypswm9s8glgr7w3crzh1im4zqlqv7z8zv092d"; + url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; + sha256 = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"; }; # pip detects that we already have bootstrapped_pip "installed", so we need From 96798a27020356d32470eea9f51fb361c228078e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 14 Nov 2016 22:27:36 +0100 Subject: [PATCH 33/36] xorg.libXi: 1.7.7 -> 1.7.8 The announcement claims it resolves some crashes. --- pkgs/servers/x11/xorg/default.nix | 6 +++--- pkgs/servers/x11/xorg/tarballs-7.7.list | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 640c200e7cf..2c27d6483be 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -823,11 +823,11 @@ let }) // {inherit fontconfig freetype libX11 xproto libXrender ;}; libXi = (mkDerivation "libXi" { - name = "libXi-1.7.7"; + name = "libXi-1.7.8"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/lib/libXi-1.7.7.tar.bz2; - sha256 = "0c70n4aq0ba628wr88ih4740nci9d9f6y3v96sx376vvlm7q6vwr"; + url = mirror://xorg/individual/lib/libXi-1.7.8.tar.bz2; + sha256 = "1fr7mi4nbcxsa88qin9g2ipmzh595ydxy9qnabzl270laf6zmwnq"; }; buildInputs = [pkgconfig inputproto libX11 libXext xextproto libXfixes xproto ]; meta.platforms = stdenv.lib.platforms.unix; diff --git a/pkgs/servers/x11/xorg/tarballs-7.7.list b/pkgs/servers/x11/xorg/tarballs-7.7.list index b2b5f2dc236..161d7bda85e 100644 --- a/pkgs/servers/x11/xorg/tarballs-7.7.list +++ b/pkgs/servers/x11/xorg/tarballs-7.7.list @@ -71,7 +71,7 @@ mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2 mirror://xorg/individual/lib/libXfont-1.5.1.tar.bz2 mirror://xorg/individual/lib/libXfont2-2.0.1.tar.bz2 mirror://xorg/individual/lib/libXft-2.3.2.tar.bz2 -mirror://xorg/individual/lib/libXi-1.7.7.tar.bz2 +mirror://xorg/individual/lib/libXi-1.7.8.tar.bz2 mirror://xorg/individual/lib/libXinerama-1.1.3.tar.bz2 mirror://xorg/individual/lib/libxkbfile-1.0.9.tar.bz2 mirror://xorg/individual/lib/libXmu-1.1.2.tar.bz2 From ea292da4c253893dc8b2ac44faeaaa21255ccdbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 17 Nov 2016 11:21:18 +0100 Subject: [PATCH 34/36] libdrm: 2.4.71 -> 2.4.73 Also: - remove udev remains except explanation; - remove maintainers.urkud, as he's been inactive for years. --- pkgs/development/libraries/libdrm/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index f2174470bec..a0923a15d4a 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }: +{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind }: stdenv.mkDerivation rec { - name = "libdrm-2.4.71"; + name = "libdrm-2.4.73"; src = fetchurl { url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2"; - sha256 = "c66287ddeee5f46ea8f8880b94b80acb3bbc33ba6321d17767eef145046df9b8"; + sha256 = "0kayvwqqrjm45y6dk9q2b4gmjdasci0y28jzv4bq05py8a9d7gwn"; }; outputs = [ "out" "dev" ]; @@ -13,7 +13,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libpthreadstubs libpciaccess ]; # libdrm as of 2.4.70 does not actually do anything with udev. - #++ stdenv.lib.optional stdenv.isLinux udev; patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch; @@ -21,7 +20,6 @@ stdenv.mkDerivation rec { "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache"; configureFlags = [ "--enable-freedreno" "--disable-valgrind" ] - ++ stdenv.lib.optional stdenv.isLinux "--enable-udev" ++ stdenv.lib.optional stdenv.isDarwin "-C"; crossAttrs.configureFlags = configureFlags ++ [ "--disable-intel" ]; @@ -30,7 +28,6 @@ stdenv.mkDerivation rec { homepage = http://dri.freedesktop.org/libdrm/; description = "Library for accessing the kernel's Direct Rendering Manager"; license = "bsd"; - maintainers = [ stdenv.lib.maintainers.urkud ]; platforms = stdenv.lib.platforms.unix; }; } From 94396a579e38d9c4294f7c2d653b4dbe771666d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 17 Nov 2016 11:31:10 +0100 Subject: [PATCH 35/36] libinput: maintenance 1.5.0 -> 1.5.1 --- pkgs/development/libraries/libinput/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index a3b01162914..f0257ed8a44 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -17,11 +17,11 @@ in with stdenv.lib; stdenv.mkDerivation rec { name = "libinput-${version}"; - version = "1.5.0"; + version = "1.5.1"; src = fetchurl { url = "http://www.freedesktop.org/software/libinput/${name}.tar.xz"; - sha256 = "0708259k2qpdyi8z8n74d2pprjdvivmqkskjkq7s7ypchn9mb5js"; + sha256 = "d4f63933b0967bd691735af5e3919e2d29c2121d4e05867cc4e10ff3ae8e2dd8"; }; outputs = [ "out" "dev" ]; From 380bb207b66d559f66b34909a75bd1b588a52d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 17 Nov 2016 11:53:16 +0100 Subject: [PATCH 36/36] libpng: 1.6.23 -> 1.6.26 --- pkgs/development/libraries/libpng/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index ea6e1e50035..a20bc7e5f3c 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -3,11 +3,11 @@ assert zlib != null; let - version = "1.6.23"; - sha256 = "1wb2j8sba6g2h4vmv4pwsp93q74qw4gyqqs4b7vfjmpcv9xix4kd"; + version = "1.6.26"; + sha256 = "1ybkgcqqsd4iiiyv60pxjfi1csszb50bd2cxxsy3sv4q4sil6rr6"; patch_src = fetchurl { url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz"; - sha256 = "1lvsn1kmarzpn269zgykjfmxq16zrdhpd1a75nzgclx97436x408"; + sha256 = "0b6p2k4afvhk1svargpllcvhxb4g3p857wkqk85cks0yv42ckph1"; }; whenPatched = stdenv.lib.optionalString apngSupport;