diff options
author | William A. Kennington III <william@wkennington.com> | 2015-09-03 11:15:58 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-09-03 11:15:58 -0700 |
commit | 86ebd3ee256a773787a354a80b04a9a6231d48a3 (patch) | |
tree | 8fcdeaeb4116aa9a05e9f55b2b28482f456e6daf /pkgs/os-specific | |
parent | 14e715a55da0d4f62651c0401ecc7933e062c5f9 (diff) | |
parent | d169882bb2173402b9ff9691dc7b7004f09cdf51 (diff) | |
download | nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar.gz nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar.bz2 nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar.lz nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar.xz nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.tar.zst nixlib-86ebd3ee256a773787a354a80b04a9a6231d48a3.zip |
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-3.18.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-4.0.nix | 17 | ||||
-rw-r--r-- | pkgs/os-specific/linux/lttng-modules/default.nix | 13 | ||||
-rwxr-xr-x | pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh | 3 | ||||
-rwxr-xr-x | pkgs/os-specific/linux/nvidia-x11/builder.sh | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/phc-intel/default.nix | 50 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/compat-4.2-1.patch | 29 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/compat-4.2-2.patch | 38 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/compat-4.2-3.patch | 214 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/default.nix | 7 |
10 files changed, 330 insertions, 48 deletions
diff --git a/pkgs/os-specific/linux/kernel/linux-3.18.nix b/pkgs/os-specific/linux/kernel/linux-3.18.nix index 05c4b989f394..02052b5d2ae3 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.18.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.18.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, ... } @ args: import ./generic.nix (args // rec { - version = "3.18.20"; + version = "3.18.21"; extraMeta.branch = "3.18"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "1mwm9xgilsqnj95v3jn94dz9a108ggfm4ifb3kxsfsx5rcl5yy8d"; + sha256 = "0y54kh55grgbyw4k8fa9vx8b426bq9lz12bpvwvzfjs7vimachyw"; }; features.iwlwifi = true; diff --git a/pkgs/os-specific/linux/kernel/linux-4.0.nix b/pkgs/os-specific/linux/kernel/linux-4.0.nix deleted file mode 100644 index eee052ad3bb9..000000000000 --- a/pkgs/os-specific/linux/kernel/linux-4.0.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv, fetchurl, ... } @ args: - -import ./generic.nix (args // rec { - version = "4.0.9"; - extraMeta.branch = "4.0"; - - src = fetchurl { - url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0k42blafzd954fncc0b78vi9x1h2k0jhfvkjqxmpv64i7xwwdhsx"; - }; - - features.iwlwifi = true; - features.efiBootStub = true; - features.needsCifsUtils = true; - features.canDisableNetfilterConntrackHelpers = true; - features.netfilterRPFilter = true; -} // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 5fe065d3cc66..128838c9c5cc 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -1,16 +1,17 @@ -{ stdenv, fetchgit, kernel }: +{ stdenv, fetchFromGitHub, kernel }: assert stdenv.lib.versionAtLeast kernel.version "3.4"; # fails on 3.2 stdenv.mkDerivation rec { pname = "lttng-modules-${version}"; name = "${pname}-${kernel.version}"; - version = "2.6.0-5-g1b2a542"; + version = "2.6.2-1-g7a88f8b"; - src = fetchgit { - url = "https://github.com/lttng/lttng-modules.git"; - rev = "1b2a5429de815c95643df2eadf91253909708728"; - sha256 = "0zccaiadnk0xl6xrqaqlg9rpkwjgbq2fiyc3psylzqimnx0ydxc2"; + src = fetchFromGitHub { + owner = "lttng"; + repo = "lttng-modules"; + rev = "7a88f8b50696dd71e80c08661159caf8e119bf51"; + sha256 = "1i185dvk4wn7fmmx1zfv6g15x8wi38jmav2dmq0mmy8cvriajq8h"; }; preConfigure = '' diff --git a/pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh b/pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh index 07cc1a85de0b..d0eec0f7403b 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder-legacy340.sh @@ -107,6 +107,9 @@ installPhase() { #patchelf --set-rpath $out/lib:$glPath $out/lib/libvdpau_nvidia.so.*.* #patchelf --set-rpath $cudaPath $out/lib/libcuda.so.*.* #patchelf --set-rpath $openclPath $out/lib/libnvidia-opencl.so.*.* + + # we distribute these separately in `libvdpau` + rm "$out"/lib/libvdpau{.*,_trace.*} } diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 1198208c9da8..ba65089a4f73 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -122,6 +122,9 @@ installPhase() { # For simplicity and dependency reduction, don't support the gtk3 interface. rm $out/lib/libnvidia-gtk3.* + + # we distribute these separately in `libvdpau` + rm "$out"/lib/libvdpau{.*,_trace.*} } diff --git a/pkgs/os-specific/linux/phc-intel/default.nix b/pkgs/os-specific/linux/phc-intel/default.nix index 4c47047ff74f..dd5a2741267b 100644 --- a/pkgs/os-specific/linux/phc-intel/default.nix +++ b/pkgs/os-specific/linux/phc-intel/default.nix @@ -2,20 +2,41 @@ assert stdenv.isLinux; # Don't bother with older versions, though some would probably work: -assert stdenv.lib.versionAtLeast kernel.version "4.0"; +assert stdenv.lib.versionAtLeast kernel.version "4.2"; # Disable on grsecurity kernels, which break module building: assert !kernel.features ? grsecurity; -let version = "0.4.0-rev17"; in -stdenv.mkDerivation { +let + release = "0.4.0"; + revbump = "rev18"; # don't forget to change forum download id... + version = "${release}-${revbump}"; +in stdenv.mkDerivation { name = "linux-phc-intel-${version}-${kernel.version}"; src = fetchurl { - sha256 = "1fdfpghnsa5s98lisd2sn0vplrq0n54l0pkyyzkyb77z4fa6bs4p"; - url = "http://www.linux-phc.org/forum/download/file.php?id=166"; - name = "phc-intel-pack-rev17.tar.bz2"; + sha256 = "1480y75yid4nw7dhzm97yb10dykinzjz34abvavsrqpq7qclhv27"; + url = "http://www.linux-phc.org/forum/download/file.php?id=167"; + name = "phc-intel-pack-${revbump}.tar.bz2"; }; + buildInputs = [ which ]; + + makeFlags = with kernel; [ + "DESTDIR=$(out)" + "KERNELSRC=${dev}/lib/modules/${modDirVersion}/build" + ]; + + configurePhase = '' + make $makeFlags brave + ''; + + enableParallelBuilding = false; + + installPhase = '' + install -m 755 -d $out/lib/modules/${kernel.version}/extra/ + install -m 644 *.ko $out/lib/modules/${kernel.version}/extra/ + ''; + meta = with stdenv.lib; { inherit version; description = "Undervolting kernel driver for Intel processors"; @@ -28,22 +49,7 @@ stdenv.mkDerivation { homepage = http://www.linux-phc.org/; downloadPage = "http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267"; license = licenses.gpl2; - platforms = with platforms; linux; + platforms = platforms.linux; maintainers = with maintainers; [ nckx ]; }; - - buildInputs = [ which ]; - - makeFlags = "KERNELSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build DESTDIR=$(out)"; - - configurePhase = '' - echo make $makeFlags brave - ''; - - enableParallelBuilding = false; - - installPhase = '' - install -m 755 -d $out/lib/modules/${kernel.version}/extra/ - install -m 644 *.ko $out/lib/modules/${kernel.version}/extra/ - ''; } diff --git a/pkgs/os-specific/linux/zfs/compat-4.2-1.patch b/pkgs/os-specific/linux/zfs/compat-4.2-1.patch new file mode 100644 index 000000000000..a789f82799ae --- /dev/null +++ b/pkgs/os-specific/linux/zfs/compat-4.2-1.patch @@ -0,0 +1,29 @@ +From e80da86447174b583e4b6cebedae2956fac926ee Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Tue, 14 Jul 2015 14:15:13 -0700 +Subject: [PATCH] Linux 4.2 compat: bdi_setup_and_register() + +The vfs_compat.h header should include the linux/backing-dev.h header +because it depends on the bdi_* functions defined there. In previous +kernels this header was being indirectly included which prevented a +build failure. + +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Signed-off-by: Richard Yao <ryao@gentoo.org> +Closes #3596 +--- + include/linux/vfs_compat.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h +index e8f8448..40832d9 100644 +--- a/include/linux/vfs_compat.h ++++ b/include/linux/vfs_compat.h +@@ -28,6 +28,7 @@ + #define _ZFS_VFS_H + + #include <sys/taskq.h> ++#include <linux/backing-dev.h> + + /* + * 2.6.28 API change, diff --git a/pkgs/os-specific/linux/zfs/compat-4.2-2.patch b/pkgs/os-specific/linux/zfs/compat-4.2-2.patch new file mode 100644 index 000000000000..659349c95ac6 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/compat-4.2-2.patch @@ -0,0 +1,38 @@ +From 7eb333fbdde32dbebdcc88c35610159e207237c9 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Tue, 14 Jul 2015 14:57:55 -0700 +Subject: [PATCH] Linux 4.2 compat: remove bio->bi_cnt access + +Linux 4.2 commit torvalds/linux@dac5621 renamed bio->bi_cnt to +bio->__bi_cnt. Because this value is only used once in a block of +debug code it simplest just to remove the PANIC. To my knowledge +this debugging has never been hit or proved useful so this is no +great loss. + +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Signed-off-by: Richard Yao <ryao@gentoo.org> +Closes #3596 +--- + module/zfs/vdev_disk.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c +index 9cfc080..eb77c26 100644 +--- a/module/zfs/vdev_disk.c ++++ b/module/zfs/vdev_disk.c +@@ -426,15 +426,6 @@ BIO_END_IO_PROTO(vdev_disk_physio_completion, bio, size, error) + dio_request_t *dr = bio->bi_private; + int rc; + +- /* Fatal error but print some useful debugging before asserting */ +- if (dr == NULL) +- PANIC("dr == NULL, bio->bi_private == NULL\n" +- "bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d\n" +- "bi_idx: %d, bi_size: %d, bi_end_io: %p, bi_cnt: %d\n", +- bio->bi_next, bio->bi_flags, bio->bi_rw, bio->bi_vcnt, +- BIO_BI_IDX(bio), BIO_BI_SIZE(bio), bio->bi_end_io, +- atomic_read(&bio->bi_cnt)); +- + #ifndef HAVE_2ARGS_BIO_END_IO_T + if (BIO_BI_SIZE(bio)) + return (1); diff --git a/pkgs/os-specific/linux/zfs/compat-4.2-3.patch b/pkgs/os-specific/linux/zfs/compat-4.2-3.patch new file mode 100644 index 000000000000..10ec3ef9cf48 --- /dev/null +++ b/pkgs/os-specific/linux/zfs/compat-4.2-3.patch @@ -0,0 +1,214 @@ +From bd29109f1ac5be68f7f7c8bcb49e1b706fe899f0 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Wed, 15 Jul 2015 10:54:26 -0700 +Subject: [PATCH] Linux 4.2 compat: follow_link() / put_link() + +As of Linux 4.2 the kernel has completely retired the nameidata +structure. One of the few remaining consumers of this interface +were the follow_link() and put_link() callbacks. + +This patch adds the required checks to configure to detect the +interface change and updates the functions accordingly. Migrating +to the simple_follow_link() interface was considered but was decided +against ironically due to the increased complexity. + +It also should be noted that the kernel follow_link() and put_link() +interfaces changes several times after 4.1 and but before 4.2. This +means there is a narrow range of kernel commits which never appear +in an official tag of the Linux kernel which ZoL will not build. + +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Signed-off-by: Richard Yao <ryao@gentoo.org> +Issue #3596 +--- + config/kernel-create-nameidata.m4 | 4 ++-- + config/kernel-follow-link-nameidata.m4 | 24 ++++++++++++++++++++++++ + config/kernel-lookup-nameidata.m4 | 4 ++-- + config/kernel-put-link-nameidata.m4 | 23 +++++++++++++++++++++++ + config/kernel.m4 | 2 ++ + module/zfs/zpl_inode.c | 31 +++++++++++++++++++++++++++---- + 6 files changed, 80 insertions(+), 8 deletions(-) + create mode 100644 config/kernel-follow-link-nameidata.m4 + create mode 100644 config/kernel-put-link-nameidata.m4 + +diff --git a/config/kernel-create-nameidata.m4 b/config/kernel-create-nameidata.m4 +index 9aad46f..a71490a 100644 +--- a/config/kernel-create-nameidata.m4 ++++ b/config/kernel-create-nameidata.m4 +@@ -2,7 +2,7 @@ dnl # + dnl # 3.6 API change + dnl # + AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [ +- AC_MSG_CHECKING([whether iops->create() takes struct nameidata]) ++ AC_MSG_CHECKING([whether iops->create() passes nameidata]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + +@@ -22,7 +22,7 @@ AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [ + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1, +- [iops->create() operation takes nameidata]) ++ [iops->create() passes nameidata]) + ],[ + AC_MSG_RESULT(no) + ]) +diff --git a/config/kernel-follow-link-nameidata.m4 b/config/kernel-follow-link-nameidata.m4 +new file mode 100644 +index 0000000..88c85ac +--- /dev/null ++++ b/config/kernel-follow-link-nameidata.m4 +@@ -0,0 +1,24 @@ ++dnl # ++dnl # 4.2 API change ++dnl # This kernel retired the nameidata structure which forced the ++dnl # restructuring of the follow_link() prototype and how it is called. ++dnl # We check for the new interface rather than detecting the old one. ++dnl # ++AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_LINK], [ ++ AC_MSG_CHECKING([whether iops->follow_link() passes nameidata]) ++ ZFS_LINUX_TRY_COMPILE([ ++ #include <linux/fs.h> ++ const char *follow_link(struct dentry *de, void **cookie) ++ { return "symlink"; } ++ static struct inode_operations iops __attribute__ ((unused)) = { ++ .follow_link = follow_link, ++ }; ++ ],[ ++ ],[ ++ AC_MSG_RESULT(no) ++ ],[ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1, ++ [iops->follow_link() nameidata]) ++ ]) ++]) +diff --git a/config/kernel-lookup-nameidata.m4 b/config/kernel-lookup-nameidata.m4 +index 6455603..43f5fb4 100644 +--- a/config/kernel-lookup-nameidata.m4 ++++ b/config/kernel-lookup-nameidata.m4 +@@ -2,7 +2,7 @@ dnl # + dnl # 3.6 API change + dnl # + AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_NAMEIDATA], [ +- AC_MSG_CHECKING([whether iops->lookup() takes struct nameidata]) ++ AC_MSG_CHECKING([whether iops->lookup() passes nameidata]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + +@@ -18,7 +18,7 @@ AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_NAMEIDATA], [ + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LOOKUP_NAMEIDATA, 1, +- [iops->lookup() operation takes nameidata]) ++ [iops->lookup() passes nameidata]) + ],[ + AC_MSG_RESULT(no) + ]) +diff --git a/config/kernel-put-link-nameidata.m4 b/config/kernel-put-link-nameidata.m4 +new file mode 100644 +index 0000000..0181ae5 +--- /dev/null ++++ b/config/kernel-put-link-nameidata.m4 +@@ -0,0 +1,23 @@ ++dnl # ++dnl # 4.2 API change ++dnl # This kernel retired the nameidata structure which forced the ++dnl # restructuring of the put_link() prototype and how it is called. ++dnl # We check for the new interface rather than detecting the old one. ++dnl # ++AC_DEFUN([ZFS_AC_KERNEL_PUT_LINK], [ ++ AC_MSG_CHECKING([whether iops->put_link() passes nameidata]) ++ ZFS_LINUX_TRY_COMPILE([ ++ #include <linux/fs.h> ++ void put_link(struct inode *ip, void *cookie) { return; } ++ static struct inode_operations iops __attribute__ ((unused)) = { ++ .put_link = put_link, ++ }; ++ ],[ ++ ],[ ++ AC_MSG_RESULT(no) ++ ],[ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_PUT_LINK_NAMEIDATA, 1, ++ [iops->put_link() nameidata]) ++ ]) ++]) +diff --git a/config/kernel.m4 b/config/kernel.m4 +index 806c574..5c97659 100644 +--- a/config/kernel.m4 ++++ b/config/kernel.m4 +@@ -70,6 +70,8 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ + ZFS_AC_KERNEL_MKDIR_UMODE_T + ZFS_AC_KERNEL_LOOKUP_NAMEIDATA + ZFS_AC_KERNEL_CREATE_NAMEIDATA ++ ZFS_AC_KERNEL_FOLLOW_LINK ++ ZFS_AC_KERNEL_PUT_LINK + ZFS_AC_KERNEL_TRUNCATE_RANGE + ZFS_AC_KERNEL_AUTOMOUNT + ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE +diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c +index 31251e7..70b5e12 100644 +--- a/module/zfs/zpl_inode.c ++++ b/module/zfs/zpl_inode.c +@@ -348,8 +348,13 @@ zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name) + return (error); + } + ++#ifdef HAVE_FOLLOW_LINK_NAMEIDATA + static void * + zpl_follow_link(struct dentry *dentry, struct nameidata *nd) ++#else ++const char * ++zpl_follow_link(struct dentry *dentry, void **symlink_cookie) ++#endif + { + cred_t *cr = CRED(); + struct inode *ip = dentry->d_inode; +@@ -372,17 +377,28 @@ zpl_follow_link(struct dentry *dentry, struct nameidata *nd) + cookie = spl_fstrans_mark(); + error = -zfs_readlink(ip, &uio, cr); + spl_fstrans_unmark(cookie); +- if (error) { ++ ++ if (error) + kmem_free(link, MAXPATHLEN); ++ ++ crfree(cr); ++ ++#ifdef HAVE_FOLLOW_LINK_NAMEIDATA ++ if (error) + nd_set_link(nd, ERR_PTR(error)); +- } else { ++ else + nd_set_link(nd, link); +- } + +- crfree(cr); + return (NULL); ++#else ++ if (error) ++ return (ERR_PTR(error)); ++ else ++ return (*symlink_cookie = link); ++#endif + } + ++#ifdef HAVE_PUT_LINK_NAMEIDATA + static void + zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr) + { +@@ -391,6 +407,13 @@ zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr) + if (!IS_ERR(link)) + kmem_free(link, MAXPATHLEN); + } ++#else ++static void ++zpl_put_link(struct inode *unused, void *symlink_cookie) ++{ ++ kmem_free(symlink_cookie, MAXPATHLEN); ++} ++#endif + + static int + zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 399169b364eb..a4aa7b036b39 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -10,5 +10,10 @@ callPackage ./generic.nix (args // rec { sha256 = "192x4z5am5wgrr4hb5skshyr5a6af52xpnk6pni4hs4pxvlpcs37"; }; - patches = [ ./nix-build.patch ]; + patches = [ + ./nix-build.patch + ./compat-4.2-1.patch + ./compat-4.2-2.patch + ./compat-4.2-3.patch + ]; }) |