diff options
Diffstat (limited to 'pkgs/os-specific')
42 files changed, 448 insertions, 367 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index fd578cf33d62..7bdff59c5ae8 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -144,7 +144,19 @@ in rec { }; }; - frameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; }); + overrides = super: { + QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: { + installPhase = drv.installPhase + '' + f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h" + substituteInPlace "$f" \ + --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" + ''; + }); + }; + + bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; }); + + frameworks = bareFrameworks // overrides bareFrameworks; inherit sdk; } diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index f6bf51f94432..3889ba211a46 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -80,7 +80,7 @@ with frameworks; with libs; { PreferencePanes = []; PubSub = []; Python = [ ApplicationServices ]; - QTKit = [ QuickTime ]; + QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ]; QuickLook = [ ApplicationServices CF ]; QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; Ruby = []; @@ -103,7 +103,7 @@ with frameworks; with libs; { Tk = [ ApplicationServices Carbon X11 ]; VideoDecodeAcceleration = [ CF CoreVideo ]; VideoToolbox = [ CF CoreMedia CoreVideo ]; - WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL X11 ]; + WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL ]; # Umbrellas Accelerate = [ CoreWLAN IOBluetooth ]; @@ -114,6 +114,6 @@ with frameworks; with libs; { IOBluetooth = [ IOKit ]; JavaVM = []; OpenDirectory = []; - Quartz = [ QuickLook ]; + Quartz = [ QuickLook QTKit ]; QuartzCore = [ ApplicationServices CF CoreVideo OpenCL ]; } diff --git a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix index e2fdef60001f..13bc3fbb6909 100644 --- a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix +++ b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix @@ -7,6 +7,56 @@ rec { IOKit = [ "/System/Library/Frameworks/IOKit.framework" ]; + JavaScriptCore = [ + "/System/Library/Frameworks/JavaScriptCore.framework" + ]; + QuickLook = [ + "/System/Library/Frameworks/QuickLook.framework" + ]; + Quartz = [ + "/System/Library/Frameworks/Quartz.framework" + "/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo" + "/System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF" + "/usr/lib/libspindump.dylib" + ]; + ImageCaptureCore = [ + "/System/Library/Frameworks/ImageCaptureCore.framework" + ]; + VideoToolbox = [ + "/System/Library/Frameworks/VideoToolbox.framework" + "/System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA" + ]; + QuickTime = [ + "/System/Library/Frameworks/QuickTime.framework" + ]; + CoreMedia = [ + "/System/Library/Frameworks/CoreMedia.framework" + ]; + CoreMediaIO = [ + "/System/Library/Frameworks/CoreMediaIO.framework" + "/System/Library/PrivateFrameworks/AppSandbox.framework/Versions/A/AppSandbox" + "/System/Library/PrivateFrameworks/AppContainer.framework/Versions/A/AppContainer" + "/System/Library/PrivateFrameworks/SecCodeWrapper.framework/Versions/A/SecCodeWrapper" + "/System/Library/PrivateFrameworks/XPCService.framework/Versions/A/XPCService" + "/usr/lib/libsandbox.1.dylib" + "/usr/lib/libMatch.1.dylib" + ]; + MediaToolbox = [ + "/System/Library/Frameworks/MediaToolbox.framework" + "/System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC" + "/System/Library/PrivateFrameworks/NetworkStatistics.framework/Versions/A/NetworkStatistics" + ]; + QTKit = [ + "/System/Library/Frameworks/QTKit.framework" + "/System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring" + ]; + OSAKit = [ + "/System/Library/Frameworks/OSAKit.framework" + "/usr/lib/libexslt.0.dylib" + ]; + WebKit = [ + "/System/Library/Frameworks/WebKit.framework" + ]; DiskArbitration = [ "/System/Library/Frameworks/DiskArbitration.framework" ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix index c7fcbb0aabbe..ba97aa4a1fc7 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix @@ -51,6 +51,12 @@ appleDerivation { cp /System/Library/Frameworks/CoreFoundation.framework/Headers/{CFAttributedString,CFNotificationCenter}.h \ "$out/System/Library/Frameworks/CoreFoundation.framework/Headers" + cat >> $out/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h <<EOF + /* extra private system files [IMPURE] */ + #include <CoreFoundation/CFAttributedString.h> + #include <CoreFoundation/CFNotificationCenter.h> + EOF + mv $out/System/* $out rmdir $out/System ''; diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index f29a2b5b9111..43698629a46f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -76,11 +76,11 @@ let libpthread = applePackage "libpthread" "105.1.4" "09vwwahcvmxvx2xl0890gkp91n61dld29j73y2pa597bqkag2qpg" {}; libresolv = applePackage "libresolv" "54" "028mp2smd744ryxwl8cqz4njv8h540sdw3an1yl7yxqcs04r0p4b" {}; Libsystem = applePackage "Libsystem" "1197.1.1" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {}; - libutil = applePackage "libutil" "38" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; + #libutil = applePackage "libutil" "38" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {}; libunwind = applePackage "libunwind" "35.3" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {}; mDNSResponder = applePackage "mDNSResponder" "522.92.1" "1cp87qda1s7brriv413i71yggm8yqfwv64vknrnqv24fcb8hzbmy" {}; objc4 = applePackage "objc4" "551.1" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {}; - objc4_pure = applePackage "objc4/pure.nix" "551.1" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {}; + #objc4_pure = applePackage "objc4/pure.nix" "551.1" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {}; ppp = applePackage "ppp" "727.90.1" "166xz1q7al12hm3q3drlp2r6fgdrsq3pmazjp3nsqg3vnglyh4gk" {}; removefile = applePackage "removefile" "33" "0ycvp7cnv40952a1jyhm258p6gg5xzh30x86z5gb204x80knw30y" {}; Security = applePackage "Security" "55471.14.18" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index bfb389ef37cf..e7165875aa4e 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoconf, automake, libtool +{ stdenv, fetchurl, autoconf, automake, libtool_2 , llvm, libcxx, libcxxabi, clang, openssl, libuuid , libobjc ? null }: @@ -18,7 +18,7 @@ let sha256 = "01f31ijpnplbiyp7ldwzy8vbkn3j3m56n5blsvsav5nlp4lp2g71"; }; - buildInputs = [ autoconf automake libtool openssl libuuid ] ++ + buildInputs = [ autoconf automake libtool_2 openssl libuuid ] ++ # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang) stdenv.lib.optionals (!stdenv.isDarwin) [ llvm clang ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]; diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix index 834e798e8d1d..bb0888855095 100644 --- a/pkgs/os-specific/linux/ati-drivers/default.nix +++ b/pkgs/os-specific/linux/ati-drivers/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernel ? null, xlibs, which, imake +{ stdenv, fetchurl, kernel ? null, which, imake , mesa # for fgl_glxgears , libXxf86vm, xf86vidmodeproto # for fglrx_gamma , xorg, makeWrapper, glibc, patchelf @@ -48,8 +48,8 @@ stdenv.mkDerivation { patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}"; buildInputs = - [ xlibs.libXext xlibs.libX11 xlibs.libXinerama - xlibs.libXrandr which imake makeWrapper + [ xorg.libXext xorg.libX11 xorg.libXinerama + xorg.libXrandr which imake makeWrapper patchelf unzip mesa diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix index 72f4ea7f3339..b309b59f48ca 100644 --- a/pkgs/os-specific/linux/bluez/bluez5.nix +++ b/pkgs/os-specific/linux/bluez/bluez5.nix @@ -5,11 +5,11 @@ assert stdenv.isLinux; stdenv.mkDerivation rec { - name = "bluez-5.33"; + name = "bluez-5.35"; src = fetchurl { url = "mirror://kernel/linux/bluetooth/${name}.tar.xz"; - sha256 = "1lrn2irisr569m3fnrqhzsg77dgci55nlp5izv5phrjh2dx8008q"; + sha256 = "1qphz25hganfnd5ipfscbj7s70anv5favmwqmi9ig2saciaf1zhs"; }; pythonPath = with pythonPackages; diff --git a/pkgs/os-specific/linux/broadcom-sta/linux-recent.patch b/pkgs/os-specific/linux/broadcom-sta/linux-recent.patch index 81d27204b4e0..a690558eb5b8 100644 --- a/pkgs/os-specific/linux/broadcom-sta/linux-recent.patch +++ b/pkgs/os-specific/linux/broadcom-sta/linux-recent.patch @@ -79,7 +79,19 @@ if (unlikely(!cbss)) return -ENOMEM; -@@ -2071,7 +2096,26 @@ +@@ -2047,7 +2072,11 @@ + } + else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) || + event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL); ++#else + cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL); ++#endif + clear_bit(WL_STATUS_CONNECTED, &wl->status); + wl_link_down(wl); + wl_init_prof(wl->profile); +@@ -2071,7 +2100,26 @@ wl_get_assoc_ies(wl); memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN); wl_update_bss_info(wl); @@ -106,7 +118,7 @@ set_bit(WL_STATUS_CONNECTED, &wl->status); wl->profile->active = true; } -@@ -2629,7 +2673,15 @@ +@@ -2629,7 +2677,15 @@ void wl_cfg80211_detach(struct net_device *ndev) { diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix index 60bfe0930171..b857d5ece451 100644 --- a/pkgs/os-specific/linux/conky/default.nix +++ b/pkgs/os-specific/linux/conky/default.nix @@ -9,7 +9,7 @@ # optional features with extra dependencies , ncursesSupport ? true , ncurses ? null -, x11Support ? true , x11 ? null +, x11Support ? true , xlibsWrapper ? null , xdamageSupport ? x11Support, libXdamage ? null , imlib2Support ? x11Support, imlib2 ? null @@ -29,7 +29,7 @@ assert ncursesSupport -> ncurses != null; -assert x11Support -> x11 != null; +assert x11Support -> xlibsWrapper != null; assert xdamageSupport -> x11Support && libXdamage != null; assert imlib2Support -> x11Support && imlib2 != null; assert luaSupport -> lua != null; @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig glib cmake ] ++ optional ncursesSupport ncurses - ++ optional x11Support x11 + ++ optional x11Support xlibsWrapper ++ optional xdamageSupport libXdamage ++ optional imlib2Support imlib2 ++ optional luaSupport lua diff --git a/pkgs/os-specific/linux/eventstat/default.nix b/pkgs/os-specific/linux/eventstat/default.nix new file mode 100644 index 000000000000..d6122202b827 --- /dev/null +++ b/pkgs/os-specific/linux/eventstat/default.nix @@ -0,0 +1,21 @@ +{ stdenv, lib, fetchzip }: + +stdenv.mkDerivation rec { + name = "eventstat-${version}"; + version = "0.02.02"; + src = fetchzip { + url = "http://kernel.ubuntu.com/~cking/tarballs/eventstat/eventstat-${version}.tar.gz"; + sha256 = "1l1shcj3c0pxv1g6sqc10ka1crbx0cm2gldxbyrzqv2lmlfnmm44"; + }; + installFlags = [ "DESTDIR=$(out)" ]; + postInstall = '' + mv $out/usr/* $out + rm -r $out/usr + ''; + meta = with lib; { + description = "Simple monitoring of system events"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ cstrahan ]; + }; +} diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 7b8a18613650..218532a695e0 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -140,7 +140,9 @@ with stdenv.lib; # Video configuration. # Enable KMS for devices whose X.org driver supports it. - DRM_I915_KMS y + ${optionalString (versionOlder version "4.3") '' + DRM_I915_KMS y + ''} # Allow specifying custom EDID on the kernel command line DRM_LOAD_EDID_FIRMWARE y ${optionalString (versionOlder version "3.9") '' @@ -327,6 +329,7 @@ with stdenv.lib; SERIAL_8250 y # 8250/16550 and compatible serial support SLIP_COMPRESSED y # CSLIP compressed headers SLIP_SMART y + HWMON y THERMAL_HWMON y # Hardware monitoring support ${optionalString (versionAtLeast version "3.15") '' UEVENT_HELPER n @@ -475,8 +478,6 @@ with stdenv.lib; ''} ZRAM m - ${optionalString (versionAtLeast version "3.17") "NFC? n"} - # Enable firmware loading via udev (legacy). ${optionalString (versionAtLeast version "3.17") '' FW_LOADER_USER_HELPER_FALLBACK y diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix index b26bc1eb34ad..a66397f689bf 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.10.88"; + version = "3.10.89"; extraMeta.branch = "3.10"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0ayz62v46zmbz43zd36a0zpczv4dyjjcyljcfv1p7mgj3fc9fs4z"; + sha256 = "13697akpdkv7xyyprysb4017q7j1ccynppb6wwllmhz1g2ichpii"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix index f49dceac1106..da520d13a021 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.12.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.12.47"; + version = "3.12.48"; extraMeta.branch = "3.12"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0mcchrm79zjsnxvwf1v3glhv0zs4dszi9qwhmnws3dqxaj9brgyn"; + sha256 = "1mvvpi2s8avg629y72miak8mdbv0mwb5dz0m7b48aah6dg866hiz"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix index fb38e32a4b9b..5ea214c9eb35 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.14.52"; + version = "3.14.53"; # Remember to update grsecurity! extraMeta.branch = "3.14"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "1sgjxp98wdq4a0044i46970jm2prrgp0xz9jg1q4mfysdz3n3fhv"; + sha256 = "0zqaqa7gs895p521c82jggak9zlmiwmkfarh2ykvh423sxjbvs5i"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-4.1.nix b/pkgs/os-specific/linux/kernel/linux-4.1.nix index 917e5d6ffeed..51844f1e0684 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.1.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.1.7"; + version = "4.1.9"; # Remember to update grsecurity! extraMeta.branch = "4.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0g1dnvak0pd03d4miy1025bw64wq71w29a058dzspdr6jcf9qwbn"; + sha256 = "141s028bpci5fwn190rgcivhk0066nkc2h6y49yqdjdanx47i1sr"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-4.2.nix b/pkgs/os-specific/linux/kernel/linux-4.2.nix index ff5fd912db30..56914ae9cdec 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.2.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.2.nix @@ -1,13 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.2"; - modDirVersion = "4.2.0"; + version = "4.2.2"; extraMeta.branch = "4.2"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1syv8n5hwzdbx69rsj4vayyzskfq1w5laalg5jjd523my52f086g"; + sha256 = "0k5nda60jla02n7ghhma7klkfklh008d1cpf684fp82cywbp5g1f"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index 63ea8ee64bad..d13357825a57 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.2-rc5"; - modDirVersion = "4.2.0-rc5"; - extraMeta.branch = "4.2"; + version = "4.3-rc2"; + modDirVersion = "4.3.0-rc2"; + extraMeta.branch = "4.3"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz"; - sha256 = "1ir3g5in53qq50ygnwgkzjkl1pzb12ar8k1zvfzcxapddvnhayr0"; + sha256 = "1mgm3r0vz0jbfbqxcjfw0wv5ix6qhwymjz1chh543lvb0729ayb4"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index a14088c81ef1..49880e0ecdd0 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,4 +1,4 @@ -{ stdenv, runCommand, nettools, bc, perl, kmod, writeTextFile, ubootChooser }: +{ stdenv, runCommand, nettools, bc, perl, kmod, openssl, writeTextFile, ubootChooser }: let readConfig = configfile: import (runCommand "config.nix" {} '' @@ -221,7 +221,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.platform (kernelPatches ++ nativeKe enableParallelBuilding = true; - nativeBuildInputs = [ perl bc nettools ] ++ optional (stdenv.platform.uboot != null) + nativeBuildInputs = [ perl bc nettools openssl ] ++ optional (stdenv.platform.uboot != null) (ubootChooser stdenv.platform.uboot); makeFlags = commonMakeFlags ++ [ diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index 18e73ae68d45..de1b16347e16 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -68,6 +68,11 @@ rec { patch = ./ubuntu-fan-4.patch; }; + ubuntu_unprivileged_overlayfs = + { name = "ubuntu-unprivileged-overlayfs"; + patch = ./ubuntu-unprivileged-overlayfs.patch; + }; + tuxonice_3_10 = makeTuxonicePatch { version = "2013-11-07"; kernelVersion = "3.10.18"; diff --git a/pkgs/os-specific/linux/kernel/ubuntu-unprivileged-overlayfs.patch b/pkgs/os-specific/linux/kernel/ubuntu-unprivileged-overlayfs.patch new file mode 100644 index 000000000000..cfa8009e71ef --- /dev/null +++ b/pkgs/os-specific/linux/kernel/ubuntu-unprivileged-overlayfs.patch @@ -0,0 +1,69 @@ +From 7415cb7b31569e9266229d4ebc79ccec4841ab04 Mon Sep 17 00:00:00 2001 +From: Serge Hallyn <serge.hallyn@ubuntu.com> +Date: Fri, 7 Feb 2014 09:32:46 -0600 +Subject: [PATCH] UBUNTU: SAUCE: Overlayfs: allow unprivileged mounts + +Unprivileged mounting, here, refers to root in a non-initial user +namespace performing the mount. In particular, it requires +CAP_SYS_ADMIN toward the task's mounts namespace, alleviating +the concerns of manipulating mount environment for setuid-root +binaries on the host. + +We refuse unprivileged mounting of most filesystem types because +we do not trust the in-kernel superblock parsers to correctly +handle malicious input. + +However, overlayfs does not parse any user-provided data other +than the pathnames passed in. Therefore unprivileged mounting +of overlayfs should be safe. + +Allowing unprivileged mounting of overlayfs filesystems would +allow Ubuntu Trusty users to create overlayfs-based container +snapshots, which would be a huge usability improvement. + +This patch enables unprivileged mounting of overlayfs. + +I tested a few simple combinations, and found that, when +doing (the equivalent of) + +mount -t overlayfs -oupperdir=u,lowerdir=l l t + +(u for upper, l for lower, t for target), + +1. overlayfs mount is always allowed, regardless of ownership +of u, l, or t. However + +2. Creation of new files is allowed so long as u is owned by + T. Otherwise, regardless of ownerships of l and t it is + denied. (This is expected; t was the mountpoint and + 'disapears', so its ownership is irrelevant) + +3. modification of a file 'hithere' which is in l but not yet + in u, and which is not owned by T, is not allowed, even if + writes to u are allowed. This may be a bug in overlayfs, + but it is safe behavior. It also will not cause a problem + for lxc since lxc will ensure that files are mapped into T's + namespace. + +Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> +Signed-off-by: Tim Gardner <tim.gardner@canonical.com> +Signed-off-by: Andy Whitcroft <apw@canonical.com> +--- + fs/overlayfs/super.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c +index 9473e79..50890c2 100644 +--- a/fs/overlayfs/super.c ++++ b/fs/overlayfs/super.c +@@ -668,6 +668,7 @@ static struct file_system_type ovl_fs_type = { + .name = "overlayfs", + .mount = ovl_mount, + .kill_sb = kill_anon_super, ++ .fs_flags = FS_USERNS_MOUNT, + }; + MODULE_ALIAS_FS("overlayfs"); + +-- +2.1.0.rc1 + diff --git a/pkgs/os-specific/linux/libcap-ng/default.nix b/pkgs/os-specific/linux/libcap-ng/default.nix index 3670f06e5439..ea54f1a39fd1 100644 --- a/pkgs/os-specific/linux/libcap-ng/default.nix +++ b/pkgs/os-specific/linux/libcap-ng/default.nix @@ -1,22 +1,40 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, swig ? null, python2 ? null, python3 ? null }: -assert stdenv.isLinux; +assert python2 != null || python3 != null -> swig != null; stdenv.mkDerivation rec { name = "libcap-ng-${version}"; - version = "0.7.3"; + # When updating make sure to test that the version with + # all of the python bindings still works + version = "0.7.7"; src = fetchurl { url = "${meta.homepage}/${name}.tar.gz"; - sha256 = "1cavlcrpqi4imkmagjhw65br8rv2fsbhf68mm3lczr51sg44392w"; + sha256 = "0syhyrixk7fqvwis3k7iddn75g0qxysc1q5fifvzccxk7774jmb1"; }; - buildInputs = [ python ]; # ToDo? optional swig for python bindings + nativeBuildInputs = [ swig ]; + buildInputs = [ python2 python3 ]; - meta = { + postPatch = '' + function get_header() { + echo -e "#include <$1>" | gcc -M -xc - | tr ' ' '\n' | grep "$1" | head -n 1 + } + + # Fix some hardcoding of header paths + sed -i "s,/usr/include/linux/capability.h,$(get_header linux/capability.h),g" bindings/python{,3}/Makefile.in + ''; + + configureFlags = [ + (if python2 != null then "--with-python" else "--without-python") + (if python3 != null then "--with-python3" else "--without-python3") + ]; + + meta = let inherit (stdenv.lib) platforms licenses maintainers; in { description = "Library for working with POSIX capabilities"; homepage = http://people.redhat.com/sgrubb/libcap-ng/; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.lgpl21; + platforms = platforms.linux; + license = licenses.lgpl21; + maintainers = with maintainers; [ wkennington ]; }; } diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index 6ddbbc9340fe..0e6bf512aa26 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, udev, utillinux, coreutils, enable_dmeventd ? false }: let - version = "2.02.128"; + version = "2.02.132"; in stdenv.mkDerivation { @@ -9,7 +9,7 @@ stdenv.mkDerivation { src = fetchurl { url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${version}.tgz"; - sha256 = "0a5m63b729ranbnmg964b36jlbfc140bs92di37w2gq54hzp1v97"; + sha256 = "0ac8izssflj371zzar16965zlia6a6zd97i0n00jxfxssnfa0fj1"; }; configureFlags = [ diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index a13931b1b224..f88e4b2fb753 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchFromGitHub }: -let version = "126"; in +let version = "128"; in stdenv.mkDerivation { name = "mcelog-${version}"; src = fetchFromGitHub { - sha256 = "13vf3qrar9j4pp6zpspgsff0kbp7zj21mq33ywqa7ljq4v3szi8x"; + sha256 = "0hm1dmqyh36dig158iyb9fckmvqnd5sgpy1qzj59nsg40pb1vbjs"; rev = "v${version}"; repo = "mcelog"; owner = "andikleen"; @@ -16,8 +16,12 @@ stdenv.mkDerivation { substituteInPlace $i --replace /etc $out/etc done touch mcelog.conf.5 # avoid regeneration requiring Python + + substituteInPlace Makefile --replace '"unknown"' '"${version}"' ''; + enableParallelBuilding = true; + installFlags = "DESTDIR=$(out) prefix= DOCDIR=/share/doc"; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/nvidia-x11/beta.nix b/pkgs/os-specific/linux/nvidia-x11/beta.nix index dc6af818837a..d3111a4f75a1 100644 --- a/pkgs/os-specific/linux/nvidia-x11/beta.nix +++ b/pkgs/os-specific/linux/nvidia-x11/beta.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf, cairo, nukeReferences , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -43,14 +43,14 @@ stdenv.mkDerivation { dontStrip = true; - glPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + glPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr]; cudaPath = makeLibraryPath [zlib stdenv.cc.cc]; openclPath = makeLibraryPath [zlib]; - allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; + allLibPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc]; gtkPath = optionalString (!libsOnly) (makeLibraryPath [ gtk atk pango glib gdk_pixbuf cairo ] ); - programPath = makeLibraryPath [ xlibs.libXv ]; + programPath = makeLibraryPath [ xorg.libXv ]; buildInputs = [ perl nukeReferences ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 953c8c601253..4390d5bdf3cd 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf, cairo, nukeReferences , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -46,14 +46,14 @@ stdenv.mkDerivation { dontStrip = true; - glPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + glPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr]; cudaPath = makeLibraryPath [zlib stdenv.cc.cc]; openclPath = makeLibraryPath [zlib]; - allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; + allLibPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc]; gtkPath = optionalString (!libsOnly) (makeLibraryPath [ gtk atk pango glib gdk_pixbuf cairo ] ); - programPath = makeLibraryPath [ xlibs.libXv ]; + programPath = makeLibraryPath [ xorg.libXv ]; buildInputs = [ perl nukeReferences ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix index 432a756b6f6b..6bde91d0ffc8 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy173.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy173.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, kernel, xlibs, zlib, gtk, atk, pango, glib, gdk_pixbuf}: +{stdenv, fetchurl, kernel, xorg, zlib, gtk, atk, pango, glib, gdk_pixbuf}: let @@ -30,11 +30,11 @@ stdenv.mkDerivation { dontStrip = true; - glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + glPath = stdenv.lib.makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr]; cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc]; - programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xlibs.libXv ]; + programPath = stdenv.lib.makeLibraryPath [ gtk atk pango glib gdk_pixbuf xorg.libXv ]; meta = { homepage = http://www.nvidia.com/object/unix.html; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix index 7f13b6795d47..42e65f927b31 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -36,12 +36,12 @@ stdenv.mkDerivation { dontStrip = true; - glPath = stdenv.lib.makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + glPath = stdenv.lib.makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr]; cudaPath = stdenv.lib.makeLibraryPath [zlib stdenv.cc.cc]; programPath = optionalString (!libsOnly) (stdenv.lib.makeLibraryPath - [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] ); + [ gtk atk pango glib gdk_pixbuf xorg.libXv ] ); buildInputs = [ perl ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix index a53906ed0200..bb974410e371 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, kernel ? null, xlibs, zlib, perl +{ stdenv, fetchurl, kernel ? null, xorg, zlib, perl , gtk, atk, pango, glib, gdk_pixbuf , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit @@ -46,13 +46,13 @@ stdenv.mkDerivation { dontStrip = true; - glPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr]; + glPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr]; cudaPath = makeLibraryPath [zlib stdenv.cc.cc]; openclPath = makeLibraryPath [zlib]; - allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; + allLibPath = makeLibraryPath [xorg.libXext xorg.libX11 xorg.libXrandr zlib stdenv.cc.cc]; programPath = optionalString (!libsOnly) (makeLibraryPath - [ gtk atk pango glib gdk_pixbuf xlibs.libXv ] ); + [ gtk atk pango glib gdk_pixbuf xorg.libXv ] ); buildInputs = [ perl ]; diff --git a/pkgs/os-specific/linux/open-iscsi/default.nix b/pkgs/os-specific/linux/open-iscsi/default.nix index 88ab08e6c3d2..c4e39e45cade 100644 --- a/pkgs/os-specific/linux/open-iscsi/default.nix +++ b/pkgs/os-specific/linux/open-iscsi/default.nix @@ -1,27 +1,23 @@ -{ stdenv, fetchurl, kernel}: +{ stdenv, fetchurl }: let - pname = "open-iscsi-2.0-871"; + pname = "open-iscsi-2.0-873"; in stdenv.mkDerivation { - name = "${pname}-${kernel.version}"; + name = "${pname}"; src = fetchurl { url = "http://www.open-iscsi.org/bits/${pname}.tar.gz"; - sha256 = "1jvx1agybaj4czhz41bz37as076spicsmlh5pjksvwl2mr38gsmw"; + sha256 = "1nbwmj48xzy45h52917jbvyqpsfg9zm49nm8941mc5x4gpwz5nbx"; }; - KSRC = "${kernel.dev}/lib/modules/*/build"; DESTDIR = "$(out)"; preConfigure = '' sed -i 's|/usr/|/|' Makefile ''; - patches = [./kernel.patch]; - meta = { description = "A high performance, transport independent, multi-platform implementation of RFC3720"; license = stdenv.lib.licenses.gpl2Plus; homepage = http://www.open-iscsi.org; - broken = true; }; } diff --git a/pkgs/os-specific/linux/open-iscsi/kernel.patch b/pkgs/os-specific/linux/open-iscsi/kernel.patch deleted file mode 100644 index 48dfa195400f..000000000000 --- a/pkgs/os-specific/linux/open-iscsi/kernel.patch +++ /dev/null @@ -1,12 +0,0 @@ -*** open-iscsi-2.0-871/kernel/Makefile 2009-07-11 05:55:58.000000000 +0200 ---- open-iscsi-2.0-871-new/kernel/Makefile 2010-08-30 11:37:56.000000000 +0200 -*************** -*** 101,106 **** ---- 101,107 ---- - linux_2_6_29: $(unpatch_code) - - linux_2_6_30: $(unpatch_code) -+ linux_2_6_32: $(unpatch_code) - - - do_unpatch_code: diff --git a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix index 2cebb8d9dcc2..5bb757a73a06 100644 --- a/pkgs/os-specific/linux/opengl/xorg-sys/default.nix +++ b/pkgs/os-specific/linux/opengl/xorg-sys/default.nix @@ -6,11 +6,11 @@ # Of course, use of the driver in /usr/lib is highly impure. But it # might actually work ;-) -{stdenv, xlibs, expat, libdrm}: +{stdenv, xorg, expat, libdrm}: stdenv.mkDerivation { name = "xorg-sys-opengl-3"; builder = ./builder.sh; - neededLibs = [xlibs.libXxf86vm xlibs.libXext expat libdrm stdenv.cc.cc]; + neededLibs = [xorg.libXxf86vm xorg.libXext expat libdrm stdenv.cc.cc]; } diff --git a/pkgs/os-specific/linux/pam_u2f/default.nix b/pkgs/os-specific/linux/pam_u2f/default.nix index 458d171ec683..ecffa7bec59a 100644 --- a/pkgs/os-specific/linux/pam_u2f/default.nix +++ b/pkgs/os-specific/linux/pam_u2f/default.nix @@ -1,16 +1,23 @@ -{ pkgs, fetchurl, stdenv }: +{ stdenv, fetchurl, pkgconfig, libu2f-host, libu2f-server, pam }: + stdenv.mkDerivation rec { name = "pam_u2f-${version}"; - version = "0.0.1"; + version = "1.0.1"; + src = fetchurl { url = "https://developers.yubico.com/pam-u2f/Releases/${name}.tar.gz"; - sha256 = "0p1wia4nfw5h0pmy1lcgwsbrlm7z39v1n37692lgqfzyg1kmpv7l"; + sha256 = "08lmc2il877k7djkjmza3k0n6ij8b4hx4x9dl6wwfdjqsr8d2zfp"; }; - buildInputs = with pkgs; [ asciidoc autoconf automake docbook_xml_dtd_45 libtool libu2f-host libu2f-server libxml2 libxslt pkgconfig pam ]; - installFlags = [ - "PAMDIR=$(out)/lib/security" - ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libu2f-host libu2f-server pam ]; + + # Fix the broken include in 1.0.1 + CFLAGS = "-I${libu2f-host}/include/u2f-host"; + + preConfigure = '' + configureFlagsArray+=("--with-pam-dir=$out/lib/security") + ''; meta = with stdenv.lib; { homepage = https://developers.yubico.com/pam-u2f/; diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index 42ea1ad4d8bf..57eaa55b2354 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -1,6 +1,22 @@ -{ callPackage, fetchFromGitHub, ... } @ args: +{ fetchFromGitHub, stdenv, autoconf, automake, libtool, coreutils, gawk +, configFile ? "all" + +# Kernel dependencies +, kernel ? null +}: + +with stdenv.lib; +let + buildKernel = any (n: n == configFile) [ "kernel" "all" ]; + buildUser = any (n: n == configFile) [ "user" "all" ]; +in + +assert any (n: n == configFile) [ "kernel" "user" "all" ]; +assert buildKernel -> kernel != null; + +stdenv.mkDerivation rec { + name = "spl-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; -callPackage ./generic.nix (args // rec { version = "0.6.5"; src = fetchFromGitHub { @@ -11,4 +27,40 @@ callPackage ./generic.nix (args // rec { }; patches = [ ./const.patch ./install_prefix.patch ]; -}) + + buildInputs = [ autoconf automake libtool ]; + + preConfigure = '' + ./autogen.sh + + substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid + substituteInPlace ./module/spl/spl-module.c --replace /bin/mknod mknod + + substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" + substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" + substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" + ''; + + configureFlags = [ + "--with-config=${configFile}" + ] ++ optionals buildKernel [ + "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" + "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + enableParallelBuilding = true; + + meta = { + description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; + + longDescription = '' + This kernel module is a porting layer for ZFS to work inside the linux + kernel. + ''; + + homepage = http://zfsonlinux.org/; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ jcumming wizeman wkennington ]; + }; +} diff --git a/pkgs/os-specific/linux/spl/generic.nix b/pkgs/os-specific/linux/spl/generic.nix deleted file mode 100644 index c25ff6608e21..000000000000 --- a/pkgs/os-specific/linux/spl/generic.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ stdenv, autoconf, automake, libtool, coreutils, gawk -, configFile ? "all" - -# Kernel dependencies -, kernel ? null - -# Version specific parameters -, version, src, patches -, ... -}: - -with stdenv.lib; -let - buildKernel = any (n: n == configFile) [ "kernel" "all" ]; - buildUser = any (n: n == configFile) [ "user" "all" ]; -in - -assert any (n: n == configFile) [ "kernel" "user" "all" ]; -assert buildKernel -> kernel != null; - -stdenv.mkDerivation rec { - name = "spl-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; - - inherit version src patches; - - buildInputs = [ autoconf automake libtool ]; - - preConfigure = '' - ./autogen.sh - - substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid - substituteInPlace ./module/spl/spl-module.c --replace /bin/mknod mknod - - substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" - substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" - substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" - ''; - - configureFlags = [ - "--with-config=${configFile}" - ] ++ optionals buildKernel [ - "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" - "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - ]; - - enableParallelBuilding = true; - - meta = { - description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; - - longDescription = '' - This kernel module is a porting layer for ZFS to work inside the linux - kernel. - ''; - - homepage = http://zfsonlinux.org/; - platforms = platforms.linux; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ jcumming wizeman wkennington ]; - }; -} diff --git a/pkgs/os-specific/linux/spl/git.nix b/pkgs/os-specific/linux/spl/git.nix deleted file mode 100644 index ed7b37adcd88..000000000000 --- a/pkgs/os-specific/linux/spl/git.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ callPackage, fetchFromGitHub, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "2015-09-11"; - - src = fetchFromGitHub { - owner = "zfsonlinux"; - repo = "spl"; - rev = "f17d005bcc9b7edeb15b10bf947379a504b2d9f7"; - sha256 = "0ryw2vh3px0q38skm53g83p46011ndrdxi3y2kqvd1pjqgfbjdmj"; - }; - - patches = [ ./const.patch ./install_prefix.patch ]; -}) diff --git a/pkgs/os-specific/linux/sysstat/default.nix b/pkgs/os-specific/linux/sysstat/default.nix index 28d6f0b21a8b..6544210b2067 100644 --- a/pkgs/os-specific/linux/sysstat/default.nix +++ b/pkgs/os-specific/linux/sysstat/default.nix @@ -1,10 +1,11 @@ { stdenv, fetchurl, gettext, bzip2 }: + stdenv.mkDerivation rec { - name = "sysstat-11.0.2"; + name = "sysstat-11.0.7"; src = fetchurl { url = "http://perso.orange.fr/sebastien.godard/${name}.tar.xz"; - sha256 = "15hv3ylr5i6nrrdhyjnp4xld51gpv0cn3hjgy6068ybwpvgpzn5c"; + sha256 = "12j55rdx1hyhsc5qm0anx9h9siaa58lhh9dchp40q4ag2wxamp1r"; }; buildInputs = [ gettext ]; diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix index ccfe396bf554..88e100c7a4db 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/default.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix @@ -4,13 +4,13 @@ with stdenv.lib; stdenv.mkDerivation rec { - version = "2.4"; + version = "2.5"; name = "wpa_supplicant-${version}"; src = fetchurl { url = "http://hostap.epitest.fi/releases/${name}.tar.gz"; - sha256 = "08li21q1wjn5chrv289w666il9ah1w419y3dkq2rl4wnq0rci385"; + sha256 = "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc"; }; # TODO: Patch epoll so that the dbus actually responds @@ -77,33 +77,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; patches = [ - ./0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch ./build-fix.patch - (fetchpatch { - name = "p2p-fix.patch"; - url = "http://w1.fi/cgit/hostap/patch/?id=8a78e227df1ead19be8e12a4108e448887e64d6f"; - sha256 = "1k2mcq1jv8xzi8061ixcz6j56n4i8wbq0vxcvml204q1syy2ika0"; - }) - (fetchpatch { - url = http://w1.fi/security/2015-4/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch; - sha256 = "1cg4r638s4m9ar9lmzm534y657ppcm8bl1h363kjnng1zbzh8rfb"; - }) - (fetchpatch { - url = http://w1.fi/security/2015-4/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch; - sha256 = "0ky850rg1k9lwd1p4wzyvl2dpi5g7k1mwx1ndjclp4x7bshb6w79"; - }) - (fetchpatch { - url = http://w1.fi/security/2015-4/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch; - sha256 = "0hicw3vk1khk849xil75ckrg1xzbwcva7g01kp0lvab34dwhryy7"; - }) - (fetchpatch { - url = http://w1.fi/security/2015-4/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch; - sha256 = "18d5r3zbwz96n4zzj9r27cv4kvc09zkj9x0p6qji68h8k2pcazxd"; - }) - (fetchpatch { - url = http://w1.fi/security/2015-4/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch; - sha256 = "1ndzyfpnxpvryiqal4kdic02kg9dgznh65kaqydaqqfj3rbjdqip"; - }) ]; postInstall = '' diff --git a/pkgs/os-specific/linux/zfs/0.6.5-fix-corruption.patch b/pkgs/os-specific/linux/zfs/0.6.5-fix-corruption.patch deleted file mode 100644 index af4ce1333c84..000000000000 --- a/pkgs/os-specific/linux/zfs/0.6.5-fix-corruption.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 96165264ad0afe7a5d440ef49f9712a188486266 Mon Sep 17 00:00:00 2001 -From: Richard Yao <ryao@gentoo.org> -Date: Fri, 18 Sep 2015 08:32:52 -0400 -Subject: [PATCH] Discard on zvols should not exceed the length of a block - -37f9dac592bf5889c3efb305c48ac39b4c7dd140 replaced the end-start -calculation with a cached value, but neglected to update it on discard -operations. This can cause us to discard data not requested, causing -data loss on zvols. - -Reported-by: Richard Connon <richard.connon@zynstra.com> -Signed-off-by: Richard Yao <ryao@gentoo.org> ---- - module/zfs/zvol.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c -index 492f8ff..c5a8071 100644 ---- a/module/zfs/zvol.c -+++ b/module/zfs/zvol.c -@@ -661,6 +661,7 @@ zvol_discard(struct bio *bio) - if (!(bio->bi_rw & REQ_SECURE)) { - start = P2ROUNDUP(start, zv->zv_volblocksize); - end = P2ALIGN(end, zv->zv_volblocksize); -+ size = end - start; - } - #endif - diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index df74f1c76e20..d068a4e910d6 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -1,17 +1,112 @@ -{ callPackage, fetchFromGitHub, ... } @ args: +{ stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences, coreutils +, configFile ? "all" -callPackage ./generic.nix (args // rec { - version = "0.6.5"; +# Userspace dependencies +, zlib, libuuid, python + +# Kernel dependencies +, kernel ? null, spl ? null +}: + +with stdenv.lib; +let + buildKernel = any (n: n == configFile) [ "kernel" "all" ]; + buildUser = any (n: n == configFile) [ "user" "all" ]; +in + +assert any (n: n == configFile) [ "kernel" "user" "all" ]; +assert buildKernel -> kernel != null && spl != null; + +stdenv.mkDerivation rec { + name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; + + version = "0.6.5.1"; src = fetchFromGitHub { owner = "zfsonlinux"; repo = "zfs"; rev = "zfs-${version}"; - sha256 = "1jqm2a9mldp4km5m454zszsw6p8hrqd7xrbf52pgp82kf5w3d6wz"; + sha256 = "0lbii5kc3b68zj8mvvznl05czwdkr0ld3a2javbkngfvrcn09rz2"; }; - patches = [ - ./nix-build.patch - ./0.6.5-fix-corruption.patch + patches = [ ./nix-build.patch ]; + + buildInputs = [ autoreconfHook nukeReferences ] + ++ optionals buildKernel [ spl ] + ++ optionals buildUser [ zlib libuuid python ]; + + # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work + NIX_CFLAGS_LINK = "-lgcc_s"; + + preConfigure = '' + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" + substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" + substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount" + substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id" + substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest" + substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb" + substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" + substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" + substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" + substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" + substituteInPlace ./module/Makefile.in --replace "/bin/cp" "cp" + substituteInPlace ./etc/systemd/system/zfs-share.service.in \ + --replace "@bindir@/rm " "${coreutils}/bin/rm " + ./autogen.sh + ''; + + configureFlags = [ + "--with-config=${configFile}" + ] ++ optionals buildUser [ + "--with-dracutdir=$(out)/lib/dracut" + "--with-udevdir=$(out)/lib/udev" + "--with-systemdunitdir=$(out)/etc/systemd/system" + "--with-systemdpresetdir=$(out)/etc/systemd/system-preset" + "--with-mounthelperdir=$(out)/bin" + "--sysconfdir=/etc" + "--localstatedir=/var" + "--enable-systemd" + ] ++ optionals buildKernel [ + "--with-spl=${spl}/libexec/spl" + "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" + "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; -}) + + enableParallelBuilding = true; + + installFlags = [ + "sysconfdir=\${out}/etc" + "DEFAULT_INITCONF_DIR=\${out}/default" + ]; + + postInstall = '' + # Prevent kernel modules from depending on the Linux -dev output. + nuke-refs $(find $out -name "*.ko") + '' + optionalString buildUser '' + # Remove provided services as they are buggy + rm $out/etc/systemd/system/zfs-import-*.service + + sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/* + + for i in $out/etc/systemd/system/*; do + substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" + done + + # Fix pkgconfig. + ln -s ../share/pkgconfig $out/lib/pkgconfig + ''; + + meta = { + description = "ZFS Filesystem Linux Kernel module"; + longDescription = '' + ZFS is a filesystem that combines a logical volume manager with a + Copy-On-Write filesystem with data integrity detection and repair, + snapshotting, cloning, block devices, deduplication, and more. + ''; + homepage = http://zfsonlinux.org/; + license = licenses.cddl; + platforms = platforms.linux; + maintainers = with maintainers; [ jcumming wizeman wkennington ]; + }; +} diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix deleted file mode 100644 index e2e574ee5913..000000000000 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences, coreutils -, configFile ? "all" - -# Userspace dependencies -, zlib, libuuid, python - -# Kernel dependencies -, kernel ? null, spl ? null - -# Version specific settings -, version, src, patches -, ... -}: - -with stdenv.lib; -let - buildKernel = any (n: n == configFile) [ "kernel" "all" ]; - buildUser = any (n: n == configFile) [ "user" "all" ]; -in - -assert any (n: n == configFile) [ "kernel" "user" "all" ]; -assert buildKernel -> kernel != null && spl != null; - -stdenv.mkDerivation rec { - name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; - - inherit version src patches; - - buildInputs = [ autoreconfHook nukeReferences ] - ++ optionals buildKernel [ spl ] - ++ optionals buildUser [ zlib libuuid python ]; - - # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work - NIX_CFLAGS_LINK = "-lgcc_s"; - - preConfigure = '' - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" - substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" - substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount" - substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id" - substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest" - substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb" - substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" - substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" - substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" - substituteInPlace ./module/Makefile.in --replace "/bin/cp" "cp" - substituteInPlace ./etc/systemd/system/zfs-share.service.in \ - --replace "@bindir@/rm " "${coreutils}/bin/rm " - ./autogen.sh - ''; - - configureFlags = [ - "--with-config=${configFile}" - ] ++ optionals buildUser [ - "--with-dracutdir=$(out)/lib/dracut" - "--with-udevdir=$(out)/lib/udev" - "--with-systemdunitdir=$(out)/etc/systemd/system" - "--with-systemdpresetdir=$(out)/etc/systemd/system-preset" - "--with-mounthelperdir=$(out)/bin" - "--sysconfdir=/etc" - "--localstatedir=/var" - "--enable-systemd" - ] ++ optionals buildKernel [ - "--with-spl=${spl}/libexec/spl" - "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" - "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - ]; - - enableParallelBuilding = true; - - installFlags = [ - "sysconfdir=\${out}/etc" - "DEFAULT_INITCONF_DIR=\${out}/default" - ]; - - postInstall = '' - # Prevent kernel modules from depending on the Linux -dev output. - nuke-refs $(find $out -name "*.ko") - '' + optionalString buildUser '' - # Remove provided services as they are buggy - rm $out/etc/systemd/system/zfs-import-*.service - - sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/* - - for i in $out/etc/systemd/system/*; do - substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" - done - - # Fix pkgconfig. - ln -s ../share/pkgconfig $out/lib/pkgconfig - ''; - - meta = { - description = "ZFS Filesystem Linux Kernel module"; - longDescription = '' - ZFS is a filesystem that combines a logical volume manager with a - Copy-On-Write filesystem with data integrity detection and repair, - snapshotting, cloning, block devices, deduplication, and more. - ''; - homepage = http://zfsonlinux.org/; - license = licenses.cddl; - platforms = platforms.linux; - maintainers = with maintainers; [ jcumming wizeman wkennington ]; - }; -} diff --git a/pkgs/os-specific/linux/zfs/git.nix b/pkgs/os-specific/linux/zfs/git.nix deleted file mode 100644 index bf127301d2e3..000000000000 --- a/pkgs/os-specific/linux/zfs/git.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ callPackage, stdenv, fetchFromGitHub, spl_git, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "2015-09-11"; - - src = fetchFromGitHub { - owner = "zfsonlinux"; - repo = "zfs"; - rev = "7a27ad00ae142b38d4aef8cc0af7a72b4c0e44fe"; - sha256 = "1jqm2a9mldp4km5m454zszsw6p8hrqd7xrbf52pgp82kf5w3d6wz"; - }; - - patches = [ - ./nix-build.patch - ./0.6.5-fix-corruption.patch - ]; - - spl = spl_git; -}) |