lol

Merge pull request #21578 from Mic92/zfs

zfs: add unstable variant

authored by

Jörg Thalheim and committed by
GitHub
ca0d747d 1ba9a3cd

+232 -288
+34 -16
nixos/modules/tasks/filesystems/zfs.nix
··· 22 22 23 23 kernel = config.boot.kernelPackages; 24 24 25 - splKernelPkg = kernel.spl; 26 - zfsKernelPkg = kernel.zfs; 27 - zfsUserPkg = pkgs.zfs; 25 + packages = if config.boot.zfs.enableUnstable then { 26 + spl = kernel.splUnstable; 27 + zfs = kernel.zfsUnstable; 28 + zfsUser = pkgs.zfsUnstable; 29 + } else { 30 + spl = kernel.spl; 31 + zfs = kernel.zfs; 32 + zfsUser = pkgs.zfs; 33 + }; 28 34 29 35 autosnapPkg = pkgs.zfstools.override { 30 - zfs = zfsUserPkg; 36 + zfs = packages.zfsUser; 31 37 }; 32 38 33 39 zfsAutoSnap = "${autosnapPkg}/bin/zfs-auto-snapshot"; ··· 54 60 55 61 options = { 56 62 boot.zfs = { 63 + enableUnstable = mkOption { 64 + type = types.bool; 65 + default = false; 66 + description = '' 67 + Use the unstable zfs package. This might be an option, if the latest 68 + kernel is not yet supported by a published release of ZFS. Enabling 69 + this option will install a development version of ZFS on Linux. The 70 + version will have already passed an extensive test suite, but it is 71 + more likely to hit an undiscovered bug compared to running a released 72 + version of ZFS on Linux. 73 + ''; 74 + }; 57 75 58 76 extraPools = mkOption { 59 77 type = types.listOf types.str; ··· 218 236 219 237 boot = { 220 238 kernelModules = [ "spl" "zfs" ] ; 221 - extraModulePackages = [ splKernelPkg zfsKernelPkg ]; 239 + extraModulePackages = with packages; [ spl zfs ]; 222 240 }; 223 241 224 242 boot.initrd = mkIf inInitrd { 225 243 kernelModules = [ "spl" "zfs" ]; 226 244 extraUtilsCommands = 227 245 '' 228 - copy_bin_and_libs ${zfsUserPkg}/sbin/zfs 229 - copy_bin_and_libs ${zfsUserPkg}/sbin/zdb 230 - copy_bin_and_libs ${zfsUserPkg}/sbin/zpool 246 + copy_bin_and_libs ${packages.zfsUser}/sbin/zfs 247 + copy_bin_and_libs ${packages.zfsUser}/sbin/zdb 248 + copy_bin_and_libs ${packages.zfsUser}/sbin/zpool 231 249 ''; 232 250 extraUtilsCommandsTest = mkIf inInitrd 233 251 '' ··· 264 282 zfsSupport = true; 265 283 }; 266 284 267 - environment.etc."zfs/zed.d".source = "${zfsUserPkg}/etc/zfs/zed.d/*"; 285 + environment.etc."zfs/zed.d".source = "${packages.zfsUser}/etc/zfs/zed.d/*"; 268 286 269 - system.fsPackages = [ zfsUserPkg ]; # XXX: needed? zfs doesn't have (need) a fsck 270 - environment.systemPackages = [ zfsUserPkg ] 271 - ++ optional enableAutoSnapshots autosnapPkg; # so the user can run the command to see flags 287 + system.fsPackages = [ packages.zfsUser ]; # XXX: needed? zfs doesn't have (need) a fsck 288 + environment.systemPackages = [ packages.zfsUser ] 289 + ++ optional enableAutoSnapshots autosnapPkg; # so the user can run the command to see flags 272 290 273 - services.udev.packages = [ zfsUserPkg ]; # to hook zvol naming, etc. 274 - systemd.packages = [ zfsUserPkg ]; 291 + services.udev.packages = [ packages.zfsUser ]; # to hook zvol naming, etc. 292 + systemd.packages = [ packages.zfsUser ]; 275 293 276 294 systemd.services = let 277 295 getPoolFilesystems = pool: ··· 298 316 RemainAfterExit = true; 299 317 }; 300 318 script = '' 301 - zpool_cmd="${zfsUserPkg}/sbin/zpool" 319 + zpool_cmd="${packages.zfsUser}/sbin/zpool" 302 320 ("$zpool_cmd" list "${pool}" >/dev/null) || "$zpool_cmd" import -d ${cfgZfs.devNodes} -N ${optionalString cfgZfs.forceImportAll "-f"} "${pool}" 303 321 ''; 304 322 }; ··· 314 332 RemainAfterExit = true; 315 333 }; 316 334 script = '' 317 - ${zfsUserPkg}/sbin/zfs set nixos:shutdown-time="$(date)" "${pool}" 335 + ${packages.zfsUser}/sbin/zfs set nixos:shutdown-time="$(date)" "${pool}" 318 336 ''; 319 337 }; 320 338
+49 -41
pkgs/os-specific/linux/spl/default.nix
··· 9 9 let 10 10 buildKernel = any (n: n == configFile) [ "kernel" "all" ]; 11 11 buildUser = any (n: n == configFile) [ "user" "all" ]; 12 - in 13 12 14 - assert any (n: n == configFile) [ "kernel" "user" "all" ]; 15 - assert buildKernel -> kernel != null; 13 + common = { version, sha256 } @ args : stdenv.mkDerivation rec { 14 + name = "spl-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; 16 15 17 - stdenv.mkDerivation rec { 18 - name = "spl-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; 16 + src = fetchFromGitHub { 17 + owner = "zfsonlinux"; 18 + repo = "spl"; 19 + rev = "spl-${version}"; 20 + inherit sha256; 21 + }; 19 22 20 - version = "0.6.5.8"; 23 + patches = [ ./const.patch ./install_prefix.patch ]; 21 24 22 - src = fetchFromGitHub { 23 - owner = "zfsonlinux"; 24 - repo = "spl"; 25 - rev = "spl-${version}"; 26 - sha256 = "000yvaccqlkrq15sdz0734fp3lkmx58182cdcfpm4869i0q7rf0s"; 27 - }; 25 + nativeBuildInputs = [ autoreconfHook ]; 28 26 29 - patches = [ ./const.patch ./install_prefix.patch ]; 27 + hardeningDisable = [ "pic" ]; 30 28 31 - nativeBuildInputs = [ autoreconfHook ]; 32 - 33 - hardeningDisable = [ "pic" ]; 34 - 35 - preConfigure = '' 36 - substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid 37 - substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" 38 - substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" 39 - substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" 40 - ''; 29 + preConfigure = '' 30 + substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid 31 + substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin" 32 + substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" 33 + substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin" 34 + ''; 41 35 42 - configureFlags = [ 43 - "--with-config=${configFile}" 44 - ] ++ optionals buildKernel [ 45 - "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" 46 - "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 47 - ]; 36 + configureFlags = [ 37 + "--with-config=${configFile}" 38 + ] ++ optionals buildKernel [ 39 + "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" 40 + "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 41 + ]; 48 42 49 - enableParallelBuilding = true; 43 + enableParallelBuilding = true; 50 44 51 - meta = { 52 - description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; 45 + meta = { 46 + description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)"; 53 47 54 - longDescription = '' 55 - This kernel module is a porting layer for ZFS to work inside the linux 56 - kernel. 57 - ''; 48 + longDescription = '' 49 + This kernel module is a porting layer for ZFS to work inside the linux 50 + kernel. 51 + ''; 58 52 59 - homepage = http://zfsonlinux.org/; 60 - platforms = platforms.linux; 61 - license = licenses.gpl2Plus; 62 - maintainers = with maintainers; [ jcumming wizeman wkennington fpletz ]; 53 + homepage = http://zfsonlinux.org/; 54 + platforms = platforms.linux; 55 + license = licenses.gpl2Plus; 56 + maintainers = with maintainers; [ jcumming wizeman wkennington fpletz ]; 57 + }; 63 58 }; 64 - } 59 + 60 + in 61 + assert any (n: n == configFile) [ "kernel" "user" "all" ]; 62 + assert buildKernel -> kernel != null; 63 + { 64 + splStable = common { 65 + version = "0.6.5.8"; 66 + sha256 = "000yvaccqlkrq15sdz0734fp3lkmx58182cdcfpm4869i0q7rf0s"; 67 + }; 68 + splUnstable = common { 69 + version = "0.7.0-rc2"; 70 + sha256 = "1y7jlyj8jwgrgnd6hiabms5h9430b6wjbnr3pwb16mv40wns1i65"; 71 + }; 72 + }
+132 -88
pkgs/os-specific/linux/zfs/default.nix
··· 1 - { stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences, coreutils 1 + { stdenv, fetchFromGitHub, autoreconfHook, utillinux, nukeReferences, coreutils, fetchpatch 2 2 , configFile ? "all" 3 3 4 4 # Userspace dependencies 5 - , zlib, libuuid, python 5 + , zlib, libuuid, python, attr 6 6 7 7 # Kernel dependencies 8 - , kernel ? null, spl ? null 8 + , kernel ? null, spl ? null, splUnstable ? null 9 9 }: 10 10 11 11 with stdenv.lib; 12 12 let 13 13 buildKernel = any (n: n == configFile) [ "kernel" "all" ]; 14 14 buildUser = any (n: n == configFile) [ "user" "all" ]; 15 - in 16 15 17 - assert any (n: n == configFile) [ "kernel" "user" "all" ]; 18 - assert buildKernel -> kernel != null && spl != null; 16 + common = { version, sha256, extraPatches, spl, inkompatibleKernelVersion ? null } @ args: 17 + if buildKernel && 18 + (inkompatibleKernelVersion != null) && 19 + versionAtLeast kernel.version inkompatibleKernelVersion then 20 + throw "linux v${kernel.version} is not yet supported by zfsonlinux v${version}" 21 + else stdenv.mkDerivation rec { 22 + name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; 19 23 20 - stdenv.mkDerivation rec { 21 - name = "zfs-${configFile}-${version}${optionalString buildKernel "-${kernel.version}"}"; 24 + src = fetchFromGitHub { 25 + owner = "zfsonlinux"; 26 + repo = "zfs"; 27 + rev = "zfs-${version}"; 28 + inherit sha256; 29 + }; 22 30 23 - version = "0.6.5.8"; 31 + patches = extraPatches; 24 32 25 - src = fetchFromGitHub { 26 - owner = "zfsonlinux"; 27 - repo = "zfs"; 28 - rev = "zfs-${version}"; 29 - sha256 = "0qccz1832p3i80qlrrrypypspb9sy9hmpgcfx9vmhnqmkf0yri4a"; 30 - }; 33 + buildInputs = [ autoreconfHook nukeReferences ] 34 + ++ optionals buildKernel [ spl ] 35 + ++ optionals buildUser [ zlib libuuid python attr ]; 31 36 32 - patches = [ ./nix-build.patch ]; 37 + # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work 38 + NIX_CFLAGS_LINK = "-lgcc_s"; 33 39 34 - buildInputs = [ autoreconfHook nukeReferences ] 35 - ++ optionals buildKernel [ spl ] 36 - ++ optionals buildUser [ zlib libuuid python ]; 40 + hardeningDisable = [ "pic" ]; 37 41 38 - # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work 39 - NIX_CFLAGS_LINK = "-lgcc_s"; 42 + preConfigure = '' 43 + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" 44 + substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" 45 + substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" 46 + substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount" 47 + substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id" 48 + substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest" 49 + substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb" 50 + substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" 51 + substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" 52 + substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" 53 + substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" 54 + substituteInPlace ./module/Makefile.in --replace "/bin/cp" "cp" 55 + substituteInPlace ./etc/systemd/system/zfs-share.service.in \ 56 + --replace "@bindir@/rm " "${coreutils}/bin/rm " 57 + ./autogen.sh 58 + ''; 40 59 41 - hardeningDisable = [ "pic" ]; 60 + configureFlags = [ 61 + "--with-config=${configFile}" 62 + ] ++ optionals buildUser [ 63 + "--with-dracutdir=$(out)/lib/dracut" 64 + "--with-udevdir=$(out)/lib/udev" 65 + "--with-systemdunitdir=$(out)/etc/systemd/system" 66 + "--with-systemdpresetdir=$(out)/etc/systemd/system-preset" 67 + "--with-mounthelperdir=$(out)/bin" 68 + "--sysconfdir=/etc" 69 + "--localstatedir=/var" 70 + "--enable-systemd" 71 + ] ++ optionals buildKernel [ 72 + "--with-spl=${spl}/libexec/spl" 73 + "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" 74 + "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 75 + ]; 42 76 43 - preConfigure = '' 44 - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" 45 - substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs" 46 - substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" 47 - substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount" 48 - substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id" 49 - substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest" 50 - substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb" 51 - substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" 52 - substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" 53 - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" 54 - substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" 55 - substituteInPlace ./module/Makefile.in --replace "/bin/cp" "cp" 56 - substituteInPlace ./etc/systemd/system/zfs-share.service.in \ 57 - --replace "@bindir@/rm " "${coreutils}/bin/rm " 58 - ./autogen.sh 59 - ''; 77 + enableParallelBuilding = true; 60 78 61 - configureFlags = [ 62 - "--with-config=${configFile}" 63 - ] ++ optionals buildUser [ 64 - "--with-dracutdir=$(out)/lib/dracut" 65 - "--with-udevdir=$(out)/lib/udev" 66 - "--with-systemdunitdir=$(out)/etc/systemd/system" 67 - "--with-systemdpresetdir=$(out)/etc/systemd/system-preset" 68 - "--with-mounthelperdir=$(out)/bin" 69 - "--sysconfdir=/etc" 70 - "--localstatedir=/var" 71 - "--enable-systemd" 72 - ] ++ optionals buildKernel [ 73 - "--with-spl=${spl}/libexec/spl" 74 - "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source" 75 - "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 76 - ]; 79 + installFlags = [ 80 + "sysconfdir=\${out}/etc" 81 + "DEFAULT_INITCONF_DIR=\${out}/default" 82 + ]; 77 83 78 - enableParallelBuilding = true; 84 + postInstall = '' 85 + # Prevent kernel modules from depending on the Linux -dev output. 86 + nuke-refs $(find $out -name "*.ko") 87 + '' + optionalString buildUser '' 88 + # Remove provided services as they are buggy 89 + rm $out/etc/systemd/system/zfs-import-*.service 79 90 80 - installFlags = [ 81 - "sysconfdir=\${out}/etc" 82 - "DEFAULT_INITCONF_DIR=\${out}/default" 83 - ]; 91 + sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/* 84 92 85 - postInstall = '' 86 - # Prevent kernel modules from depending on the Linux -dev output. 87 - nuke-refs $(find $out -name "*.ko") 88 - '' + optionalString buildUser '' 89 - # Remove provided services as they are buggy 90 - rm $out/etc/systemd/system/zfs-import-*.service 93 + for i in $out/etc/systemd/system/*; do 94 + substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" 95 + done 91 96 92 - sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/* 97 + # Fix pkgconfig. 98 + ln -s ../share/pkgconfig $out/lib/pkgconfig 93 99 94 - for i in $out/etc/systemd/system/*; do 95 - substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target" 96 - done 100 + # Remove tests because they add a runtime dependency on gcc 101 + rm -rf $out/share/zfs/zfs-tests 102 + ''; 97 103 98 - # Fix pkgconfig. 99 - ln -s ../share/pkgconfig $out/lib/pkgconfig 104 + meta = { 105 + description = "ZFS Filesystem Linux Kernel module"; 106 + longDescription = '' 107 + ZFS is a filesystem that combines a logical volume manager with a 108 + Copy-On-Write filesystem with data integrity detection and repair, 109 + snapshotting, cloning, block devices, deduplication, and more. 110 + ''; 111 + homepage = http://zfsonlinux.org/; 112 + license = licenses.cddl; 113 + platforms = platforms.linux; 114 + maintainers = with maintainers; [ jcumming wizeman wkennington fpletz ]; 115 + }; 116 + }; 117 + in 118 + assert any (n: n == configFile) [ "kernel" "user" "all" ]; 119 + assert buildKernel -> kernel != null && spl != null; 120 + { 121 + # also check if kernel version constraints in 122 + # ./nixos/modules/tasks/filesystems/zfs.nix needs 123 + # to be adapted 124 + zfsStable = common { 125 + # comment/uncomment if breaking kernel versions are known 126 + inkompatibleKernelVersion = "4.9"; 100 127 101 - # Remove tests because they add a runtime dependency on gcc 102 - rm -rf $out/share/zfs/zfs-tests 103 - ''; 128 + version = "0.6.5.8"; 104 129 105 - meta = { 106 - description = "ZFS Filesystem Linux Kernel module"; 107 - longDescription = '' 108 - ZFS is a filesystem that combines a logical volume manager with a 109 - Copy-On-Write filesystem with data integrity detection and repair, 110 - snapshotting, cloning, block devices, deduplication, and more. 111 - ''; 112 - homepage = http://zfsonlinux.org/; 113 - license = licenses.cddl; 114 - platforms = platforms.linux; 115 - maintainers = with maintainers; [ jcumming wizeman wkennington fpletz ]; 116 - }; 117 - } 130 + # this package should point to the latest release. 131 + sha256 = "0qccz1832p3i80qlrrrypypspb9sy9hmpgcfx9vmhnqmkf0yri4a"; 132 + extraPatches = [ 133 + (fetchpatch { 134 + url = "https://github.com/Mic92/zfs/compare/zfs-0.6.5.8...nixos-zfs-0.6.5.8.patch"; 135 + sha256 = "14kqqphzg02m9a7qncdhff8958cfzdrvsid3vsrm9k75lqv1w08z"; 136 + }) 137 + ]; 138 + inherit spl; 139 + }; 140 + zfsUnstable = common { 141 + # comment/uncomment if breaking kernel versions are known 142 + inkompatibleKernelVersion = "4.10"; 143 + 144 + version = "0.7.0-rc2"; 145 + 146 + # this package should point to a version / git revision compatible with the latest kernel release 147 + sha256 = "197y2jyav9h1ksri9kzqvrwmzpb58mlgw27vfvgd4bvxpwfxq53s"; 148 + extraPatches = [ 149 + (fetchpatch { 150 + url = "https://github.com/Mic92/zfs/compare/zfs-0.7.0-rc2...nixos-zfs-0.7.0-rc2.patch"; 151 + sha256 = "1p33bwd6p5r5phbqb657x8h9x3bd012k2mdmbzgnb09drh9v0r82"; 152 + }) 153 + (fetchpatch { 154 + name = "Kernel_4.9_zfs_aio_fsync_removal.patch"; 155 + url = "https://github.com/zfsonlinux/zfs/commit/99ca173929cb693012dabe98bcee4f12ec7e6e92.patch"; 156 + sha256 = "10npvpj52rpq88vdsn7zkdhx2lphzvqypsd9abdadjbqkwxld9la"; 157 + }) 158 + ]; 159 + spl = splUnstable; 160 + }; 161 + }
-134
pkgs/os-specific/linux/zfs/nix-build.patch
··· 1 - diff --git a/Makefile.am b/Makefile.am 2 - index f8abb5f..82e8fb6 100644 3 - --- a/Makefile.am 4 - +++ b/Makefile.am 5 - @@ -11,10 +11,10 @@ endif 6 - if CONFIG_KERNEL 7 - SUBDIRS += module 8 - 9 - -extradir = @prefix@/src/zfs-$(VERSION) 10 - +extradir = @prefix@/libexec/zfs-$(VERSION) 11 - extra_HEADERS = zfs.release.in zfs_config.h.in 12 - 13 - -kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION) 14 - +kerneldir = @prefix@/zfs-$(VERSION)/$(LINUX_VERSION) 15 - nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) 16 - endif 17 - 18 - diff --git a/include/Makefile.am b/include/Makefile.am 19 - index a94cad5..a160fe2 100644 20 - --- a/include/Makefile.am 21 - +++ b/include/Makefile.am 22 - @@ -29,6 +29,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 23 - endif 24 - 25 - if CONFIG_KERNEL 26 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include 27 - +kerneldir = @prefix@/include 28 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 29 - endif 30 - diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am 31 - index 595d1db..d41375d 100644 32 - --- a/include/linux/Makefile.am 33 - +++ b/include/linux/Makefile.am 34 - @@ -18,6 +18,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 35 - endif 36 - 37 - if CONFIG_KERNEL 38 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux 39 - +kerneldir = @prefix@/include/linux 40 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 41 - endif 42 - diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am 43 - index 77ecfb2..52b3612 100644 44 - --- a/include/sys/Makefile.am 45 - +++ b/include/sys/Makefile.am 46 - @@ -114,6 +114,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 47 - endif 48 - 49 - if CONFIG_KERNEL 50 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys 51 - +kerneldir = @prefix@/include/sys 52 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 53 - endif 54 - diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am 55 - index 8bca5d8..a5eafcd 100644 56 - --- a/include/sys/fm/Makefile.am 57 - +++ b/include/sys/fm/Makefile.am 58 - @@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 59 - endif 60 - 61 - if CONFIG_KERNEL 62 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm 63 - +kerneldir = @prefix@/include/sys/fm 64 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 65 - endif 66 - diff --git a/include/sys/fm/fs/Makefile.am b/include/sys/fm/fs/Makefile.am 67 - index fdc9eb5..807c47c 100644 68 - --- a/include/sys/fm/fs/Makefile.am 69 - +++ b/include/sys/fm/fs/Makefile.am 70 - @@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 71 - endif 72 - 73 - if CONFIG_KERNEL 74 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs 75 - +kerneldir = @prefix@/include/sys/fm/fs 76 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 77 - endif 78 - diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am 79 - index 0859b9f..b0c6eec 100644 80 - --- a/include/sys/fs/Makefile.am 81 - +++ b/include/sys/fs/Makefile.am 82 - @@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H) 83 - endif 84 - 85 - if CONFIG_KERNEL 86 - -kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs 87 - +kerneldir = @prefix@/include/sys/fs 88 - kernel_HEADERS = $(COMMON_H) $(KERNEL_H) 89 - endif 90 - diff --git a/module/Makefile.in b/module/Makefile.in 91 - index d4ddee2..876c811 100644 92 - --- a/module/Makefile.in 93 - +++ b/module/Makefile.in 94 - @@ -18,9 +18,9 @@ modules: 95 - @# installed devel headers, or they may be in the module 96 - @# subdirectory when building against the spl source tree. 97 - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ 98 - - /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \ 99 - + cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \ 100 - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ 101 - - /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ 102 - + cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ 103 - else \ 104 - echo -e "\n" \ 105 - "*** Missing spl symbols ensure you have built the spl:\n" \ 106 - @@ -28,6 +28,8 @@ modules: 107 - "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \ 108 - exit 1; \ 109 - fi 110 - + @# when copying a file out of the nix store, we need to make it writable again. 111 - + chmod +w @SPL_SYMBOLS@ 112 - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@ 113 - 114 - clean: 115 - @@ -42,15 +44,15 @@ clean: 116 - modules_install: 117 - @# Install the kernel modules 118 - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ 119 - - INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ 120 - + INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \ 121 - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \ 122 - KERNELRELEASE=@LINUX_VERSION@ 123 - @# Remove extraneous build products when packaging 124 - - kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ 125 - - if [ -n "$(DESTDIR)" ]; then \ 126 - + kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ 127 - + if [ -n "@prefix@" ]; then \ 128 - find $$kmoddir -name 'modules.*' | xargs $(RM); \ 129 - fi 130 - - sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ 131 - + sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ 132 - if [ -f $$sysmap ]; then \ 133 - depmod -ae -F $$sysmap @LINUX_VERSION@; \ 134 - fi
+17 -9
pkgs/top-level/all-packages.nix
··· 11302 11302 11303 11303 seturgent = callPackage ../os-specific/linux/seturgent { }; 11304 11304 11305 - spl = callPackage ../os-specific/linux/spl { 11305 + inherit (callPackage ../os-specific/linux/spl { 11306 11306 configFile = "kernel"; 11307 11307 inherit kernel; 11308 - }; 11308 + }) splStable splUnstable; 11309 + 11310 + spl = splStable; 11309 11311 11310 11312 sysdig = callPackage ../os-specific/linux/sysdig {}; 11311 11313 ··· 11329 11331 11330 11332 x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { }; 11331 11333 11332 - zfs = callPackage ../os-specific/linux/zfs { 11334 + inherit (callPackage ../os-specific/linux/zfs { 11333 11335 configFile = "kernel"; 11334 11336 inherit kernel spl; 11335 - }; 11337 + }) zfsStable zfsUnstable; 11338 + 11339 + zfs = zfsStable; 11336 11340 }); 11337 11341 11338 11342 # The current default kernel / kernel modules. ··· 11641 11645 11642 11646 statifier = callPackage ../os-specific/linux/statifier { }; 11643 11647 11644 - spl = callPackage ../os-specific/linux/spl { 11648 + inherit (callPackage ../os-specific/linux/spl { 11645 11649 configFile = "user"; 11646 - }; 11650 + }) splStable splUnstable; 11651 + 11652 + spl = splStable; 11647 11653 11648 11654 sysdig = callPackage ../os-specific/linux/sysdig { 11649 11655 kernel = null; ··· 11847 11853 11848 11854 zd1211fw = callPackage ../os-specific/linux/firmware/zd1211 { }; 11849 11855 11850 - zfs = callPackage ../os-specific/linux/zfs { 11856 + inherit (callPackage ../os-specific/linux/zfs { 11851 11857 configFile = "user"; 11852 - }; 11858 + }) zfsStable zfsUnstable; 11859 + 11860 + zfs = zfsStable; 11853 11861 11854 11862 ### DATA 11855 11863 ··· 14595 14603 qscreenshot = callPackage ../applications/graphics/qscreenshot { 14596 14604 qt = qt4; 14597 14605 }; 14598 - 14606 + 14599 14607 qsyncthingtray = qt5.callPackage ../applications/misc/qsyncthingtray { }; 14600 14608 14601 14609 qsynth = callPackage ../applications/audio/qsynth { };