diff options
author | William A. Kennington III <william@wkennington.com> | 2015-09-29 15:54:33 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-09-29 15:54:33 -0700 |
commit | 271972de0a7f0027f33d2bf3098070f1a73bbc55 (patch) | |
tree | c37c532df1e46c3ad5e5a51f713cb35fdd374373 /pkgs/os-specific | |
parent | 48a791d27062c71ced0921920d95fdd991b35107 (diff) | |
parent | ea4850ca6438d62012d2f3caec1c52c1653192b0 (diff) | |
download | nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar.gz nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar.bz2 nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar.lz nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar.xz nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.tar.zst nixlib-271972de0a7f0027f33d2bf3098070f1a73bbc55.zip |
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/darwin/apple-source-releases/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/eventstat/default.nix | 21 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/patches.nix | 5 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/ubuntu-unprivileged-overlayfs.patch | 69 | ||||
-rw-r--r-- | pkgs/os-specific/linux/lvm2/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/mcelog/default.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/spl/default.nix | 58 | ||||
-rw-r--r-- | pkgs/os-specific/linux/spl/generic.nix | 61 | ||||
-rw-r--r-- | pkgs/os-specific/linux/spl/git.nix | 14 | ||||
-rw-r--r-- | pkgs/os-specific/linux/sysstat/default.nix | 5 | ||||
-rw-r--r-- | pkgs/os-specific/linux/wpa_supplicant/default.nix | 30 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/default.nix | 104 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/generic.nix | 107 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/git.nix | 16 |
14 files changed, 264 insertions, 240 deletions
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/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/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/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..70f3f3f27b5a 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 = "127"; in stdenv.mkDerivation { name = "mcelog-${version}"; src = fetchFromGitHub { - sha256 = "13vf3qrar9j4pp6zpspgsff0kbp7zj21mq33ywqa7ljq4v3szi8x"; + sha256 = "0ap00f283d1hhv0f6l2fwsbq7sd6b96lf3jwg5cyam03pj2l8qk1"; rev = "v${version}"; repo = "mcelog"; owner = "andikleen"; @@ -16,6 +16,8 @@ stdenv.mkDerivation { substituteInPlace $i --replace /etc $out/etc done touch mcelog.conf.5 # avoid regeneration requiring Python + + substituteInPlace Makefile --replace '"unknown"' '"${version}"' ''; installFlags = "DESTDIR=$(out) prefix= DOCDIR=/share/doc"; 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/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 1432fa3e79bb..d068a4e910d6 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -1,6 +1,25 @@ -{ callPackage, fetchFromGitHub, ... } @ args: +{ stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences, coreutils +, configFile ? "all" + +# 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}"}"; -callPackage ./generic.nix (args // rec { version = "0.6.5.1"; src = fetchFromGitHub { @@ -11,4 +30,83 @@ callPackage ./generic.nix (args // rec { }; 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 0423d139c83c..000000000000 --- a/pkgs/os-specific/linux/zfs/git.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ callPackage, stdenv, fetchFromGitHub, spl_git, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "2015-09-19"; - - src = fetchFromGitHub { - owner = "zfsonlinux"; - repo = "zfs"; - rev = "3af56fd95fbe8b417d7ed7c9c25ef59d6f1ee161"; - sha256 = "08sx1jzwrsdyvvlcf5as7rkglgbx5x6zvfn8ps8gk4miqfckq4z0"; - }; - - patches = [ ./nix-build.patch ]; - - spl = spl_git; -}) |