diff options
author | Robin Gloster <mail@glob.in> | 2016-05-30 19:39:34 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-05-30 19:39:34 +0000 |
commit | 2d382f3d981fc9e4a350badb43736c252415d27c (patch) | |
tree | 3d5f7a96aa71be52c86f3c243b23424e319cc286 /pkgs/os-specific | |
parent | 365379857fb561df949fc841e80458e317a1d682 (diff) | |
parent | 2661511cdb39bd7612dd5311b46420785fc1eac8 (diff) | |
download | nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar.gz nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar.bz2 nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar.lz nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar.xz nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.tar.zst nixlib-2d382f3d981fc9e4a350badb43736c252415d27c.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/os-specific')
33 files changed, 347 insertions, 173 deletions
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 42adab1c887c..1c9b5879e6ec 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -53,7 +53,7 @@ appleDerivation rec { cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h $out/include for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ - ${libdispatch} ${ncurses} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ + ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) done diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index d671c7c72303..8014881860bc 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation { ln -sf "${cctools}/bin/$i" "$out/bin/$i" done - for i in ${binutils-raw}/include/*.h; do + for i in ${binutils-raw.dev}/include/*.h; do ln -s "$i" "$out/include/$(basename $i)" done diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh index 4394e785960a..2b907bde10ae 100644 --- a/pkgs/os-specific/linux/ati-drivers/builder.sh +++ b/pkgs/os-specific/linux/ati-drivers/builder.sh @@ -9,6 +9,10 @@ unzip $src run_file=fglrx-$build/amd-driver-installer-$build-x86.x86_64.run sh $run_file --extract . +for patch in $patches;do + patch -p1 < $patch +done + case "$system" in x86_64-linux) arch=x86_64 @@ -238,6 +242,7 @@ if test -z "$libsOnly"; then tar xfz ../common/usr/src/ati/fglrx_sample_source.tgz eval "$patchPhaseSamples" + ( # build and install fgl_glxgears cd fgl_glxgears; gcc -DGL_ARB_texture_multisample=1 -g \ @@ -257,11 +262,11 @@ if test -z "$libsOnly"; then # a symlink named libfglrx_gamma.so.1 linking to libfglrx_gamma.so.1.0 in $out/lib/ cd programs/fglrx_gamma - gcc -fPIC -I${libXxf86vm}/include \ - -I${xf86vidmodeproto}/include \ - -I$out/X11R6/include \ - -L$out/lib \ - -Wall -lm -lfglrx_gamma -lX11 -lXext -o $out/bin/fglrx_xgamma fglrx_xgamma.c + gcc -fPIC -I${libXxf86vm.dev}/include \ + -I${xf86vidmodeproto}/include \ + -I$out/X11R6/include \ + -L$out/lib \ + -Wall -lm -lfglrx_gamma -lX11 -lXext -o $out/bin/fglrx_xgamma fglrx_xgamma.c ) { diff --git a/pkgs/os-specific/linux/ati-drivers/default.nix b/pkgs/os-specific/linux/ati-drivers/default.nix index a4f8b707c084..e5eb9b8c6c3c 100644 --- a/pkgs/os-specific/linux/ati-drivers/default.nix +++ b/pkgs/os-specific/linux/ati-drivers/default.nix @@ -65,7 +65,14 @@ stdenv.mkDerivation rec { curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux+x86_64"; }; - patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}"; + patchPhaseSamples = "patch -p2 < ${./patches/patch-samples.patch}"; + patches = [ + ./patches/15.12-xstate-fp.patch + ./patches/15.9-kcl_str.patch + ./patches/15.9-mtrr.patch + ./patches/15.9-preempt.patch + ./patches/15.9-sep_printf.patch + ]; buildInputs = [ xorg.libXrender xorg.libXext xorg.libX11 xorg.libXinerama xorg.libSM @@ -101,7 +108,7 @@ stdenv.mkDerivation rec { # appear in /run/opengl-driver/lib which get's added to LD_LIBRARY_PATH extraDRIlibs = [ xorg.libXrandr.out xorg.libXrender.out xorg.libXext.out - xorg.libX11.out xorg.libXinerama.out xorg.libSM.out + xorg.libX11.out xorg.libXinerama.out xorg.libSM.out xorg.libICE.out ]; inherit mesa; # only required to build the examples diff --git a/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch b/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch deleted file mode 100644 index f763518b249c..000000000000 --- a/pkgs/os-specific/linux/ati-drivers/kernel-api-fixes.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c ---- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 10:31:23.000000000 -0400 -+++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-03 21:21:13.893211082 -0400 -@@ -242,6 +242,14 @@ - #endif - - // ============================================================ -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) -+#define __read_cr4 read_cr4 -+#define __write_cr4 write_cr4 -+#endif -+ -+// ============================================================ -+ - /* globals */ - - char* firegl = NULL; -@@ -3495,10 +3503,12 @@ - KCL_PUB_InterruptHandlerWrap, - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) - ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)), --#else -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) - //when MSI enabled. keep irq disabled when calling the action handler, - //exclude this IRQ from irq balancing (only on one CPU) - ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), -+#else -+ ((useMSI) ? 0 : IRQF_SHARED), - #endif - dev_name, - context); -@@ -4498,8 +4508,8 @@ - - if (cpu_has_pge) - { -- cr4 = read_cr4(); -- write_cr4(cr4 & ~X86_CR4_PGE); -+ cr4 = __read_cr4(); -+ __write_cr4(cr4 & ~X86_CR4_PGE); - } - __flush_tlb(); - -@@ -4512,7 +4522,7 @@ - write_cr0(cr0 & 0xbfffffff); - if (cpu_has_pge) - { -- write_cr4(cr4); -+ __write_cr4(cr4); - } - local_irq_restore(flags); - -@@ -4539,8 +4549,8 @@ - - if (cpu_has_pge) - { -- cr4 = read_cr4(); -- write_cr4(cr4 & ~X86_CR4_PGE); -+ cr4 = __read_cr4(); -+ __write_cr4(cr4 & ~X86_CR4_PGE); - } - __flush_tlb(); - -@@ -4552,7 +4562,7 @@ - write_cr0(cr0 & 0xbfffffff); - if (cpu_has_pge) - { -- write_cr4(cr4); -+ __write_cr4(cr4); - } - local_irq_restore(flags); - -diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c ---- 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-07-04 10:31:23.000000000 -0400 -+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-08-02 19:59:54.797911610 -0400 -@@ -861,7 +861,10 @@ - #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - if(pdev) - { -- pci_ignore_hotplug(pdev); -+ struct pci_dev *bridge = pdev->bus->self; -+ -+ pdev->ignore_hotplug = 1; -+ if(bridge) bridge->ignore_hotplug = 1; - } - #endif - } -diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c ---- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-07-04 10:31:23.000000000 -0400 -+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-08-03 00:35:25.938410435 -0400 -@@ -169,7 +169,7 @@ - const char* s2, - KCL_TYPE_SizeSigned count) - { -- return strnicmp(s1, s2, count); -+ return strncasecmp(s1, s2, count); - } - - /** \brief Locate character in string diff --git a/pkgs/os-specific/linux/ati-drivers/patches/15.12-xstate-fp.patch b/pkgs/os-specific/linux/ati-drivers/patches/15.12-xstate-fp.patch new file mode 100644 index 000000000000..22e43fc0c7b6 --- /dev/null +++ b/pkgs/os-specific/linux/ati-drivers/patches/15.12-xstate-fp.patch @@ -0,0 +1,26 @@ +From: Krzysztof Kolasa <kkolasa@winsoft.pl> +Date: Thu, 26 Nov 2015 14:28:46 +0100 +Subject: [PATCH] Patch for kernel 4.4.0-rc2 + +constant change of name XSTATE_XP to name XFEATURE_MASK_FP +--- + firegl_public.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c +index 3626c7b..f071d42 100644 +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod//firegl_public.c +@@ -6463,7 +6463,11 @@ static int KCL_fpu_save_init(struct task_struct *tsk) + if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP)) + #else + copy_xregs_to_kernel(&fpu->state.xsave); +- if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP)) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) ++ if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP)) ++#else ++ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP)) ++#endif + #endif + return 1; + } else if (static_cpu_has(X86_FEATURE_FXSR)) { diff --git a/pkgs/os-specific/linux/ati-drivers/patches/15.9-kcl_str.patch b/pkgs/os-specific/linux/ati-drivers/patches/15.9-kcl_str.patch new file mode 100644 index 000000000000..20c3bc8a169b --- /dev/null +++ b/pkgs/os-specific/linux/ati-drivers/patches/15.9-kcl_str.patch @@ -0,0 +1,14 @@ +--- a/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-09-13 13:47:30.000000000 -0400 ++++ b/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-09-13 13:49:42.000000000 -0400 +@@ -169,7 +169,11 @@ int ATI_API_CALL KCL_STR_Strnicmp(const + const char* s2, + KCL_TYPE_SizeSigned count) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0) + return strnicmp(s1, s2, count); ++#else ++ return strncasecmp(s1, s2, count); ++#endif + } + + /** \brief Locate character in string diff --git a/pkgs/os-specific/linux/ati-drivers/patches/15.9-mtrr.patch b/pkgs/os-specific/linux/ati-drivers/patches/15.9-mtrr.patch new file mode 100644 index 000000000000..bdf70b4ccdc4 --- /dev/null +++ b/pkgs/os-specific/linux/ati-drivers/patches/15.9-mtrr.patch @@ -0,0 +1,27 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-19 23:43:22.000000000 -0400 ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-19 23:52:07.000000000 -0400 +@@ -3442,7 +3442,11 @@ int ATI_API_CALL KCL_MEM_MTRR_Support(vo + int ATI_API_CALL KCL_MEM_MTRR_AddRegionWc(unsigned long base, unsigned long size) + { + #ifdef CONFIG_MTRR ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) ++ return arch_phys_wc_add(base, size); ++#else + return mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1); ++#endif + #else /* !CONFIG_MTRR */ + return -EPERM; + #endif /* !CONFIG_MTRR */ +@@ -3451,7 +3455,12 @@ int ATI_API_CALL KCL_MEM_MTRR_AddRegionW + int ATI_API_CALL KCL_MEM_MTRR_DeleteRegion(int reg, unsigned long base, unsigned long size) + { + #ifdef CONFIG_MTRR ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) ++ arch_phys_wc_del(reg); ++ return reg; ++#else + return mtrr_del(reg, base, size); ++#endif + #else /* !CONFIG_MTRR */ + return -EPERM; + #endif /* !CONFIG_MTRR */ diff --git a/pkgs/os-specific/linux/ati-drivers/patches/15.9-preempt.patch b/pkgs/os-specific/linux/ati-drivers/patches/15.9-preempt.patch new file mode 100644 index 000000000000..c6598835133e --- /dev/null +++ b/pkgs/os-specific/linux/ati-drivers/patches/15.9-preempt.patch @@ -0,0 +1,103 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-30 17:36:02.000000000 -0400 ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-30 17:39:36.000000000 -0400 +@@ -21,6 +21,8 @@ + !!! since it requires changes to linux/init/main.c. + #endif /* !MODULE */ + ++#include <linux/preempt.h> ++ + // ============================================================ + #include <linux/version.h> + +@@ -4997,7 +4999,9 @@ static unsigned int kas_spin_unlock(kas_ + unsigned long ATI_API_CALL KAS_GetExecutionLevel(void) + { + unsigned long ret; ++ preempt_disable(); + ret = kas_GetExecutionLevel(); ++ preempt_enable(); + return ret; + } + +@@ -5022,8 +5026,10 @@ unsigned int ATI_API_CALL KAS_Ih_Execute + KCL_DEBUG5(FN_FIREGL_KAS,"0x%08X, 0x%08X\n", ih_routine, ih_context); + + //Prevent simultaneous entry on some SMP systems. ++ preempt_disable(); + if (test_and_set_bit(0, (void *)&(kasContext.in_interrupts[smp_processor_id()]))) + { ++ preempt_enable(); + KCL_DEBUG1(FN_FIREGL_KAS, "The processor is handling the interrupt\n"); + return IRQ_NONE; + } +@@ -5036,9 +5042,9 @@ unsigned int ATI_API_CALL KAS_Ih_Execute + + kasSetExecutionLevel(orig_level); + spin_unlock(&kasContext.lock_ih); +- + clear_bit(0, (void *)&(kasContext.in_interrupts[smp_processor_id()])); + KCL_DEBUG5(FN_FIREGL_KAS,"%d\n", ret); ++ preempt_enable(); + + return ret; + } +@@ -5256,6 +5262,7 @@ unsigned int ATI_API_CALL KAS_Spinlock_A + + KCL_DEBUG5(FN_FIREGL_KAS,"0x%08X\n", hSpinLock); + ++ preempt_disable(); + spin_lock_info.routine_type = spinlock_obj->routine_type; + spin_lock_info.plock = &(spinlock_obj->lock); + +@@ -5263,6 +5270,7 @@ unsigned int ATI_API_CALL KAS_Spinlock_A + + spinlock_obj->acquire_type = spin_lock_info.acquire_type; + spinlock_obj->flags = spin_lock_info.flags; ++ preempt_enable(); + + KCL_DEBUG5(FN_FIREGL_KAS,"%d\n", ret); + return ret; +@@ -6034,6 +6042,8 @@ unsigned int ATI_API_CALL KAS_Interlocke + + KCL_DEBUG5(FN_FIREGL_KAS,"0x%08X, 0x%08X, 0x%08X\n", hListHead, hListEntry, phPrevEntry); + ++ preempt_disable(); ++ + /* Protect the operation with spinlock */ + spin_lock_info.routine_type = listhead_obj->routine_type; + spin_lock_info.plock = &(listhead_obj->lock); +@@ -6041,6 +6051,7 @@ unsigned int ATI_API_CALL KAS_Interlocke + if (!kas_spin_lock(&spin_lock_info)) + { + KCL_DEBUG_ERROR("Unable to grab list spinlock\n"); ++ preempt_enable(); + return 0; /* No spinlock - no operation */ + } + +@@ -6065,6 +6076,7 @@ unsigned int ATI_API_CALL KAS_Interlocke + spin_unlock_info.flags = spin_lock_info.flags; + + ret = kas_spin_unlock(&spin_unlock_info); ++ preempt_enable(); + KCL_DEBUG5(FN_FIREGL_KAS,"%d", ret); + return ret; + } +@@ -6153,8 +6165,10 @@ unsigned int ATI_API_CALL KAS_Interlocke + spin_lock_info.routine_type = listhead_obj->routine_type; + spin_lock_info.plock = &(listhead_obj->lock); + ++ preempt_disable(); + if (!kas_spin_lock(&spin_lock_info)) + { ++ preempt_enable(); + KCL_DEBUG_ERROR("Unable to grab list spinlock"); + return 0; /* No spinlock - no operation */ + } +@@ -6178,6 +6192,7 @@ unsigned int ATI_API_CALL KAS_Interlocke + spin_unlock_info.flags = spin_lock_info.flags; + + ret = kas_spin_unlock(&spin_unlock_info); ++ preempt_enable(); + KCL_DEBUG5(FN_FIREGL_KAS,"%d", ret); + return ret; + } diff --git a/pkgs/os-specific/linux/ati-drivers/patches/15.9-sep_printf.patch b/pkgs/os-specific/linux/ati-drivers/patches/15.9-sep_printf.patch new file mode 100644 index 000000000000..3e4e8d6499a0 --- /dev/null +++ b/pkgs/os-specific/linux/ati-drivers/patches/15.9-sep_printf.patch @@ -0,0 +1,11 @@ +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-14 15:14:36.000000000 -0400 ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-14 16:18:58.000000000 -0400 +@@ -649,6 +649,8 @@ static int firegl_major_proc_read(struct + *eof = 1; + + len = snprintf(buf, request, "%d\n", major); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) ++ seq_printf(m, "%d\n", major); + #else + len = seq_printf(m, "%d\n", major); + #endif diff --git a/pkgs/os-specific/linux/ati-drivers/patch-samples.patch b/pkgs/os-specific/linux/ati-drivers/patches/patch-samples.patch index 8bd24b1d022b..8bd24b1d022b 100644 --- a/pkgs/os-specific/linux/ati-drivers/patch-samples.patch +++ b/pkgs/os-specific/linux/ati-drivers/patches/patch-samples.patch diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix new file mode 100644 index 000000000000..838c65dd1966 --- /dev/null +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, makeWrapper, cmake, llvmPackages, kernel, + flex, bison, elfutils, python, pythonPackages, luajit, netperf, iperf }: + +stdenv.mkDerivation rec { + version = "git-2016-05-18"; + name = "bcc-${version}"; + + src = fetchFromGitHub { + owner = "iovisor"; + repo = "bcc"; + rev = "c7f317deb577d59007411e978ac21a2ea376358f"; + sha256 = "0jv4smy615kp7623pd61s46m52jjp6m47w0fjgr7s22qamra3g98"; + }; + + buildInputs = [ makeWrapper cmake llvmPackages.llvm llvmPackages.clang-unwrapped kernel + flex bison elfutils python pythonPackages.netaddr luajit netperf iperf + ]; + + cmakeFlags="-DBCC_KERNEL_MODULES_DIR=${kernel.dev}/lib/modules -DBCC_KERNEL_HAS_SOURCE_DIR=1"; + + postInstall = '' + mkdir -p $out/bin + for f in $out/share/bcc/tools\/*; do + ln -s $f $out/bin/$(basename $f) + wrapProgram $f \ + --prefix LD_LIBRARY_PATH : $out/lib \ + --prefix PYTHONPATH : $out/lib/python2.7/site-packages \ + --prefix PYTHONPATH : :${pythonPackages.netaddr}/lib/${python.libPrefix}/site-packages + done + ''; + + meta = with stdenv.lib; { + description = "Dynamic Tracing Tools for Linux"; + homepage = "https://iovisor.github.io/bcc/"; + license = licenses.asl20; + maintainers = with maintainers; [ ragge ]; + }; +} diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix index a7e36d21dd48..f29acaa13540 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.37"; + name = "bluez-5.40"; src = fetchurl { url = "mirror://kernel/linux/bluetooth/${name}.tar.xz"; - sha256 = "c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0"; + sha256 = "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"; }; pythonPath = with pythonPackages; diff --git a/pkgs/os-specific/linux/btfs/default.nix b/pkgs/os-specific/linux/btfs/default.nix index 0470110fc4bf..a0197c58095b 100644 --- a/pkgs/os-specific/linux/btfs/default.nix +++ b/pkgs/os-specific/linux/btfs/default.nix @@ -1,24 +1,23 @@ -{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, python, boost, fuse, libtorrentRasterbar, curl }: stdenv.mkDerivation rec { name = "btfs-${version}"; - version = "2.8"; + version = "2.9"; src = fetchFromGitHub { owner = "johang"; repo = "btfs"; - rev = "0567010e553b290eaa50b1afaa717dd7656c82de"; - sha256 = "1x3x1v7fhcfcpffprf63sb720nxci2ap2cq92jy1xd68kmshdmwd"; + rev = "3ee6671eca2c0e326ac38d07cab4989ebad3495c"; + sha256 = "0f7yc7hkfwdj9hixsyswf17yrpcpwxxb0svj5lfqcir8a45kf100"; }; - + buildInputs = [ - pkgconfig autoconf automake boost + boost autoreconfHook pkgconfig fuse libtorrentRasterbar curl ]; - preConfigure = '' - autoreconf -i + preInstall = '' substituteInPlace scripts/btplay \ --replace "/usr/bin/env python" "${python}/bin/python" ''; diff --git a/pkgs/os-specific/linux/cifs-utils/default.nix b/pkgs/os-specific/linux/cifs-utils/default.nix index 46a927209a23..6dcf8e11a3e1 100644 --- a/pkgs/os-specific/linux/cifs-utils/default.nix +++ b/pkgs/os-specific/linux/cifs-utils/default.nix @@ -1,11 +1,12 @@ { stdenv, fetchurl, kerberos, keyutils, pam }: stdenv.mkDerivation rec { - name = "cifs-utils-6.4"; + name = "cifs-utils-${version}"; + version = "6.5"; src = fetchurl { url = "mirror://samba/pub/linux-cifs/cifs-utils/${name}.tar.bz2"; - sha256 = "1qz6d2xg4z1if0hy7qwyzgcr59l0alkhci6gxgjdldglda967z1q"; + sha256 = "1xs9rwqfpx8qj5mcmagw6y1hzwc71zhzb5r8hv06sz16p1w6axz2"; }; buildInputs = [ kerberos keyutils pam ]; @@ -17,5 +18,6 @@ stdenv.mkDerivation rec { description = "Tools for managing Linux CIFS client filesystems"; platforms = platforms.linux; license = licenses.lgpl3; + maintainers = with maintainers; [ nckx ]; }; } diff --git a/pkgs/os-specific/linux/criu/default.nix b/pkgs/os-specific/linux/criu/default.nix index 16116019567d..fb25ef27378a 100644 --- a/pkgs/os-specific/linux/criu/default.nix +++ b/pkgs/os-specific/linux/criu/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { substituteInPlace ./scripts/gen-offsets.sh --replace hexdump ${utillinux}/bin/hexdump substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" "" substituteInPlace ./Documentation/Makefile --replace "--skip-validation" "--skip-validation -x ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl" - substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl}/include/libnl3" + substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl.dev}/include/libnl3" substituteInPlace ./Makefile --replace "tar-name := $(shell git tag -l v$(CRIU_VERSION))" "tar-name = 2.0" # --replace "-Werror" "" ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto ''; diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 2d7c8a5f14e1..479188b365f2 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation rec { RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; RTE_TARGET = "x86_64-native-linuxapp-gcc"; + # we need ssse3 instructions to build + NIX_CFLAGS_COMPILE = [ "-march=core2" ]; + enableParallelBuilding = true; outputs = [ "out" "examples" ]; diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix index b25a65b2ab47..de726d5b42c9 100644 --- a/pkgs/os-specific/linux/facetimehd/default.nix +++ b/pkgs/os-specific/linux/facetimehd/default.nix @@ -5,13 +5,23 @@ assert stdenv.lib.versionAtLeast kernel.version "3.19"; stdenv.mkDerivation rec { name = "facetimehd-${version}-${kernel.version}"; - version = "git-20160127"; + version = "git-20160503"; src = fetchFromGitHub { owner = "patjak"; repo = "bcwc_pcie"; - rev = "186e9f9101ed9bbd7cc8d470f840d4a74c585ca7"; - sha256 = "1frsf6z6v94cz9fww9rbnk926jzl36fp3w2d1aw6djhzwm80a5gs"; + # Note: When updating this revision: + # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/ + # 2. Test the module and firmware change via: + # a. Give some applications a try (Skype, Hangouts, Cheese, etc.) + # b. Run: journalctl -f + # c. Then close the lid + # d. Then open the lid (and maybe press a key to wake it up) + # e. see if the module loads back (apps using the camera won't + # recover and will have to be restarted) and the camera + # still works. + rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c"; + sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp"; }; preConfigure = '' @@ -28,7 +38,7 @@ stdenv.mkDerivation rec { homepage = https://github.com/patjak/bcwc_pcie; description = "Linux driver for the Facetime HD (Broadcom 1570) PCIe webcam"; license = licenses.gpl2; - maintainers = [ maintainers.womfoo ]; + maintainers = with maintainers; [ womfoo grahamc ]; platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix index 05a293083b7f..69abaf26197d 100644 --- a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix @@ -2,14 +2,28 @@ let - version = "1.43"; + version = "1.43_4"; - dmgRange = "420107885-421933300"; # the whole download is 1.3GB, this cuts it down to 2MB + # Updated according to https://github.com/patjak/bcwc_pcie/pull/81/files + # and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/Makefile#L3-L9 + # and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/extract-firmware.sh + + # From the Makefile: + dmgUrl = "https://support.apple.com/downloads/DL1877/en_US/osxupd10.11.5.dmg"; + dmgRange = "205261917-208085450"; # the whole download is 1.3GB, this cuts it down to 2MB + # Notes: + # 1. Be sure to update the sha256 below in the fetch_url + # 2. Be sure to update the homepage in the meta + + # Also from the Makefile (OS_DRV, OS_DRV_DIR), but seems to not change: firmwareIn = "./System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface"; firmwareOut = "firmware.bin"; - firmwareOffset = "81920"; - firmwareSize = "603715"; + + # The following are from the extract-firmware.sh + firmwareOffset = "81920"; # Variable: firmw_offsets + firmwareSize = "603715"; # Variable: firmw_sizes + # separated this here as the script will fail without the 'exit 0' unpack = pkgs.writeScriptBin "unpack" '' @@ -22,10 +36,9 @@ in stdenv.mkDerivation { name = "facetimehd-firmware-${version}"; - src = fetchurl { - url = "https://support.apple.com/downloads/DL1849/en_US/osxupd10.11.2.dmg"; - sha256 = "1jw6sy9vj27amfak83cs2c7q856y4mk1wix3rl4q10yvd9bl4k9x"; + url = dmgUrl; + sha256 = "0xqkl4yds0n9fdjvnk0v5mj382q02crry6wm2q7j3ncdqwsv02sv"; curlOpts = "-r ${dmgRange}"; }; @@ -42,9 +55,9 @@ stdenv.mkDerivation { meta = with stdenv.lib; { description = "facetimehd firmware"; - homepage = https://support.apple.com/downloads/DL1849; + homepage = https://support.apple.com/downloads/DL1877; license = licenses.unfree; - maintainers = [ maintainers.womfoo ]; + maintainers = with maintainers; [ womfoo grahamc ]; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index bd7c7f636f87..e89a53d21bfc 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.4.10"; + version = "4.4.11"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1kpjvvd9q9wwr3314q5ymvxii4dv2d27295bzly225wlc552xhja"; + sha256 = "1c0lqk2q4hf8jx6myhcqgh2509d36wx87l5k5cl3xfsnrzrpclrs"; }; kernelPatches = args.kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-4.5.nix b/pkgs/os-specific/linux/kernel/linux-4.5.nix index 09bd490ccfea..84d48865bcb7 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.5.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.5.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.5.4"; + version = "4.5.5"; extraMeta.branch = "4.5"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1s0mhhxx2sw93a9cin5mvjl82ah93a4sa2lfkvs6ay73mw3ifp2p"; + sha256 = "0l7wnilqqhg3im2v04g6k2x621yckdb9bpfh8s8jq9l2fixjln99"; }; kernelPatches = args.kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-grsecurity-4.5.nix b/pkgs/os-specific/linux/kernel/linux-grsecurity-4.5.nix index 09bd490ccfea..84d48865bcb7 100644 --- a/pkgs/os-specific/linux/kernel/linux-grsecurity-4.5.nix +++ b/pkgs/os-specific/linux/kernel/linux-grsecurity-4.5.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.5.4"; + version = "4.5.5"; extraMeta.branch = "4.5"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1s0mhhxx2sw93a9cin5mvjl82ah93a4sa2lfkvs6ay73mw3ifp2p"; + sha256 = "0l7wnilqqhg3im2v04g6k2x621yckdb9bpfh8s8jq9l2fixjln99"; }; kernelPatches = args.kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index 8e198e7a3ed9..820e9ed6e264 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -95,9 +95,9 @@ rec { grsecurity_4_5 = grsecPatch { kernel = pkgs.grsecurity_base_linux_4_5; patches = [ grsecurity_fix_path_4_5 ]; - kversion = "4.5.4"; - revision = "201605131918"; - sha256 = "0f5s8lj6zc4jp2cpxm7r891px3dmb6m3ximfigwq809yydg5aimv"; + kversion = "4.5.5"; + revision = "201605291201"; + sha256 = "0r66l5zmvlb7phlvi1pma7vzj78krl23k8lcpdqlx27szr361sda"; }; grsecurity_latest = grsecurity_4_5; diff --git a/pkgs/os-specific/linux/kmscon/default.nix b/pkgs/os-specific/linux/kmscon/default.nix index ed2cb76e8203..f04198059138 100644 --- a/pkgs/os-specific/linux/kmscon/default.nix +++ b/pkgs/os-specific/linux/kmscon/default.nix @@ -33,6 +33,11 @@ stdenv.mkDerivation rec { libxslt ]; + # FIXME: Remove as soon as kmscon > 8 comes along. + postPatch = '' + sed -i -e 's/libsystemd-daemon libsystemd-login/libsystemd/g' configure + ''; + configureFlags = [ "--enable-multi-seat" "--disable-debug" diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix index 275f325b84ab..82ea72af1605 100644 --- a/pkgs/os-specific/linux/lxc/default.nix +++ b/pkgs/os-specific/linux/lxc/default.nix @@ -12,11 +12,11 @@ in with stdenv.lib; stdenv.mkDerivation rec { name = "lxc-${version}"; - version = "2.0.0"; + version = "2.0.1"; src = fetchurl { url = "https://linuxcontainers.org/downloads/lxc/lxc-${version}.tar.gz"; - sha256 = "1r0hgk91n3frrmla1681l74ag5sngbbkdagvjfqzxwcf9l8pwwsv"; + sha256 = "0l4fs6ckvip5akfa0vbjfk34ddvcv0c84mmpj9yrcfl67qwn31z9"; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/openvswitch/default.nix b/pkgs/os-specific/linux/openvswitch/default.nix index 0e5dbeebf921..b1e24884557a 100644 --- a/pkgs/os-specific/linux/openvswitch/default.nix +++ b/pkgs/os-specific/linux/openvswitch/default.nix @@ -1,22 +1,24 @@ -{ stdenv, fetchurl, makeWrapper -, openssl, python27, iproute, perl, kernel ? null }: +{ stdenv, fetchurl, makeWrapper, pkgconfig, utillinux, which +, procps, libcap_ng, openssl, python27, iproute , perl +, kernel ? null }: with stdenv.lib; let _kernel = kernel; in stdenv.mkDerivation rec { - version = "2.3.1"; + version = "2.5.0"; name = "openvswitch-${version}"; src = fetchurl { url = "http://openvswitch.org/releases/${name}.tar.gz"; - sha256 = "1lmwyhm5wmdv1l4v1v5xd36d5ra21jz9ix57nh1lgm8iqc0lj5r1"; + sha256 = "08bgsqjjn2q5hvxsjqs7n3jir7k7291wlj3blsqhacjhmpxm9nil"; }; kernel = optional (_kernel != null) _kernel.dev; - buildInputs = [ makeWrapper openssl python27 perl ]; + buildInputs = [ makeWrapper pkgconfig utillinux openssl libcap_ng python27 + perl procps which ]; configureFlags = [ "--localstatedir=/var" @@ -31,6 +33,15 @@ in stdenv.mkDerivation rec { "PKIDIR=$(TMPDIR)/dummy" ]; + postBuild = '' + # fix tests + substituteInPlace xenserver/opt_xensource_libexec_interface-reconfigure --replace '/usr/bin/env python' '${python27.interpreter}' + substituteInPlace vtep/ovs-vtep --replace '/usr/bin/env python' '${python27.interpreter}' + ''; + + enableParallelBuilding = true; + doCheck = false; # bash-completion test fails with "compgen: command not found" + postInstall = '' cp debian/ovs-monitor-ipsec $out/share/openvswitch/scripts makeWrapper \ diff --git a/pkgs/os-specific/linux/paxtest/default.nix b/pkgs/os-specific/linux/paxtest/default.nix index 7c8e5eb70a15..0c2fd9b6f86c 100644 --- a/pkgs/os-specific/linux/paxtest/default.nix +++ b/pkgs/os-specific/linux/paxtest/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, paxctl }: stdenv.mkDerivation rec { name = "paxtest-${version}"; @@ -9,20 +9,16 @@ stdenv.mkDerivation rec { sha256 = "0j40h3x42k5mr5gc5np4wvr9cdf9szk2f46swf42zny8rlgxiskx"; }; - buildPhase = '' - make $makeFlags RUNDIR=$out/bin/ linux - ''; + enableParallelBuilding = true; - installPhase = '' - mkdir -p $out/bin - find . -executable -exec cp {} $out/bin \; - ''; + makefile = "Makefile.psm"; + makeFlags = [ "PAXBIN=${paxctl}/bin/paxctl" "BINDIR=$(out)/bin" "RUNDIR=$(out)/lib/paxtest" ]; + installFlags = ''DESTDIR=""''; meta = with stdenv.lib; { description = "Test various memory protection measures"; license = licenses.gpl2; platforms = platforms.linux; - maintainer = [ maintainers.copumpkin ]; + maintainer = with maintainers; [ copumpkin joachifm ]; }; } - diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index de497eb4fd13..61fe17c3df76 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -17,13 +17,13 @@ assert buildKernel -> kernel != null; stdenv.mkDerivation rec { name = "spl-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; - version = "0.6.5.6"; + version = "0.6.5.7"; src = fetchFromGitHub { owner = "zfsonlinux"; repo = "spl"; rev = "spl-${version}"; - sha256 = "08lbfwsd368sk7dgydabzkyyn2l2n82ifcqakra3xknwgg1ka9bn"; + sha256 = "0i9ak4wqn444i6362xq5xl0msvcck8qqypp0fynrxq8mddzypwps"; }; patches = [ ./const.patch ./install_prefix.patch ]; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 15ec3202e6b7..f5dc3145b68b 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -10,14 +10,14 @@ assert stdenv.isLinux; stdenv.mkDerivation rec { - version = "229"; + version = "230"; name = "systemd-${version}"; src = fetchFromGitHub { owner = "NixOS"; repo = "systemd"; - rev = "4936f6e6c05162516a685ebd227b55816cf2b670"; - sha256 = "1q0pyrljmq73qcan9rfqsiw66l1g159m5in5qgb8zwlwhl928670"; + rev = "4ccee551f2ba8383c8b9bd06590a3cd1dfdf690f"; + sha256 = "1i4my5z7f8g5bykv1vxyw1az66s087lfqrck79kdm4hgvb4lsk6y"; }; patches = [ ./hwdb-location.diff ]; diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix index dceb777ad720..f0f25f14e496 100644 --- a/pkgs/os-specific/linux/tp_smapi/default.nix +++ b/pkgs/os-specific/linux/tp_smapi/default.nix @@ -1,11 +1,12 @@ {stdenv, fetchurl, kernel}: -stdenv.mkDerivation { - name = "tp_smapi-0.41-${kernel.version}"; +stdenv.mkDerivation rec { + version = "0.42"; + name = "tp_smapi-${version}-${kernel.version}"; src = fetchurl { - url = "https://github.com/downloads/evgeni/tp_smapi/tp_smapi-0.41.tar.gz"; - sha256 = "6aef02b92d10360ac9be0db29ae390636be55017990063a092a285c70b54e666"; + url = "https://github.com/evgeni/tp_smapi/releases/download/tp-smapi%2F0.42/tp_smapi-${version}.tgz"; + sha256 = "09rdg7fm423x6sbbw3lvnvmk4nyc33az8ar93xgq0n9qii49z3bv"; }; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix index 0edd2d6e0f45..a3e9e930f5ea 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/default.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { cat -n .config substituteInPlace Makefile --replace /usr/local $out export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \ - -I$(echo "${libnl}"/include/libnl*/) \ + -I$(echo "${libnl.dev}"/include/libnl*/) \ -I${pcsclite}/include/PCSC/" ''; diff --git a/pkgs/os-specific/linux/xf86-input-multitouch/default.nix b/pkgs/os-specific/linux/xf86-input-multitouch/default.nix index 7abf6d7c8288..8b10136309cd 100644 --- a/pkgs/os-specific/linux/xf86-input-multitouch/default.nix +++ b/pkgs/os-specific/linux/xf86-input-multitouch/default.nix @@ -10,6 +10,8 @@ , libpciaccess }: +assert stdenv.isLinux; + stdenv.mkDerivation { name = "xf86-input-multitouch-20110312"; @@ -31,7 +33,7 @@ stdenv.mkDerivation { buildInputs = [ mtdev xproto xextproto inputproto libpciaccess randrproto ]; buildPhase = '' - make INCLUDE="$NIX_CFLAGS_COMPILE -I${xorgserver}/include/xorg -I${pixman}/include/pixman-1 -Iinclude" + make INCLUDE="$NIX_CFLAGS_COMPILE -I${xorgserver.dev}/include/xorg -I${pixman}/include/pixman-1 -Iinclude" ''; installPhase = '' diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 46d6fa496995..4b5d7e35daeb 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -20,13 +20,13 @@ assert buildKernel -> kernel != null && spl != null; stdenv.mkDerivation rec { name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; - version = "0.6.5.6"; + version = "0.6.5.7"; src = fetchFromGitHub { owner = "zfsonlinux"; repo = "zfs"; rev = "zfs-${version}"; - sha256 = "0lsb93y5zbwc8fafxzm9vyfpr6fmvl8h86ny4llbd2xy2hnfwk2i"; + sha256 = "17mshxyp8k7i9a7ys0rznhkz83f6650pby9ka48d6gzgcwv9nnsm"; }; patches = [ ./nix-build.patch ]; |