summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-08-13 20:40:45 +0200
committerJörg Thalheim <joerg@thalheim.io>2018-08-14 14:12:07 +0200
commit4360a87c45f69f7444c7b87546705de7fbc8681f (patch)
tree321157050a1e1e1ecccce78ae497ff179daa6503 /pkgs/os-specific
parent43595c7884533769a68f92359ca13f06dd62af97 (diff)
downloadnixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar.gz
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar.bz2
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar.lz
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar.xz
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.tar.zst
nixpkgs-4360a87c45f69f7444c7b87546705de7fbc8681f.zip
linuxPackages.zfsUnstable: 2018-05-22 -> 2018-08-13
spl was merged into zfs master
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/spl/default.nix89
-rw-r--r--pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch162
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix23
3 files changed, 46 insertions, 228 deletions
diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix
index 43711f92209..58c4fc53a41 100644
--- a/pkgs/os-specific/linux/spl/default.nix
+++ b/pkgs/os-specific/linux/spl/default.nix
@@ -6,71 +6,50 @@
 
 with stdenv.lib;
 
-let
-  common = { version
-    , sha256
-    , rev ? "spl-${version}"
-    , broken ? false
-    , patches ? []
-    }: stdenv.mkDerivation rec {
-      name = "spl-${version}-${kernel.version}";
+assert kernel != null;
 
-      src = fetchFromGitHub {
-        owner = "zfsonlinux";
-        repo = "spl";
-        inherit rev sha256;
-      };
+stdenv.mkDerivation rec {
+  name = "spl-${version}-${kernel.version}";
 
-      inherit patches;
+  src = fetchFromGitHub {
+    owner = "zfsonlinux";
+    repo = "spl";
+    rev = "spl-0.7.9";
+    sha256 = "0540m1dv9jvrzk9kw61glg0h0cwj976mr9zb42y3nh17k47ywff0";
+  };
 
-      nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies;
+  patches = [ ./install_prefix.patch ];
 
-      hardeningDisable = [ "fortify" "stackprotector" "pic" ];
+  nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies;
 
-      preConfigure = ''
-        substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
-        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"
-      '';
+  hardeningDisable = [ "fortify" "stackprotector" "pic" ];
 
-      configureFlags = [
-        "--with-config=kernel"
-        "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
-        "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
-      ];
+  preConfigure = ''
+    substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
+    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"
+  '';
 
-      enableParallelBuilding = true;
+  configureFlags = [
+    "--with-config=kernel"
+    "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
+    "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
 
-      meta = {
-        description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
+  enableParallelBuilding = true;
 
-        longDescription = ''
-          This kernel module is a porting layer for ZFS to work inside the linux
-          kernel.
-        '';
+  meta = {
+    description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
 
-        inherit broken;
+    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 fpletz globin ];
-      };
+    homepage = http://zfsonlinux.org/;
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ jcumming wizeman wkennington fpletz globin ];
   };
-in
-  assert kernel != null;
-{
-    splStable = common {
-      version = "0.7.9";
-      sha256 = "0540m1dv9jvrzk9kw61glg0h0cwj976mr9zb42y3nh17k47ywff0";
-      patches = [ ./install_prefix-0.7.9.patch ];
-    };
-
-    splUnstable = common {
-      version = "2018-05-07";
-      rev = "1149b62d20b7ed9d8ae25d5da7a06213d79b7602";
-      sha256 = "07qlx7l23y696gzyy7ynly7n1141w66y21gkmxiia2xwldj8klkx";
-      patches = [ ./install_prefix.patch ];
-    };
 }
diff --git a/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch b/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch
deleted file mode 100644
index 114ca123147..00000000000
--- a/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 4977448..ac17217 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -12,10 +12,10 @@ endif
- if CONFIG_KERNEL
- SUBDIRS += module
- 
--extradir = @prefix@/src/spl-$(VERSION)
-+extradir = @prefix@/libexec/spl
- extra_HEADERS = spl.release.in spl_config.h.in
- 
--kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
-+kerneldir = @prefix@/libexec/spl/$(LINUX_VERSION)
- nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
- endif
- 
-diff --git a/include/Makefile.am b/include/Makefile.am
-index 3200222..4a47aaa 100644
---- a/include/Makefile.am
-+++ b/include/Makefile.am
-@@ -13,6 +13,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include
-+kerneldir = @prefix@/libexec/spl/include
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am
-index e0da4b3..d6d7af0 100644
---- a/include/fs/Makefile.am
-+++ b/include/fs/Makefile.am
-@@ -8,6 +8,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
-+kerneldir = @prefix@/libexec/spl/include/fs
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
-index 712e94e..4af9fb7 100644
---- a/include/linux/Makefile.am
-+++ b/include/linux/Makefile.am
-@@ -18,6 +18,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
-+kerneldir = @prefix@/libexec/spl/include/linux
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am
-index cfc8246..4fbd33d 100644
---- a/include/rpc/Makefile.am
-+++ b/include/rpc/Makefile.am
-@@ -9,6 +9,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
-+kerneldir = @prefix@/libexec/spl/include/rpc
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am
-index 10e7093..febecdf 100644
---- a/include/sharefs/Makefile.am
-+++ b/include/sharefs/Makefile.am
-@@ -8,6 +8,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
-+kerneldir = @prefix@/libexec/spl/include/sharefs
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
-index 73c4a84..31a9f50 100644
---- a/include/sys/Makefile.am
-+++ b/include/sys/Makefile.am
-@@ -107,7 +107,7 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
-+kerneldir = @prefix@/libexec/spl/include/sys
- kernel_HEADERS = $(KERNEL_H)
- endif
- 
-diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
-index 2821cbe..a84ce8e 100644
---- a/include/sys/fm/Makefile.am
-+++ b/include/sys/fm/Makefile.am
-@@ -9,6 +9,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
-+kerneldir = @prefix@/libexec/spl/include/sys/fm
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
-index 581083e..0c35fb7 100644
---- a/include/sys/fs/Makefile.am
-+++ b/include/sys/fs/Makefile.am
-@@ -8,6 +8,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
-+kerneldir = @prefix@/libexec/spl/include/sys/fs
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/util/Makefile.am b/include/util/Makefile.am
-index e2bf09f..3f5d6ce 100644
---- a/include/util/Makefile.am
-+++ b/include/util/Makefile.am
-@@ -9,6 +9,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/util
-+kerneldir = @prefix@/libexec/spl/include/util
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am
-index 7faab0a..8148b3d 100644
---- a/include/vm/Makefile.am
-+++ b/include/vm/Makefile.am
-@@ -10,6 +10,6 @@ USER_H =
- EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
- 
- if CONFIG_KERNEL
--kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
-+kerneldir = @prefix@/libexec/spl/include/vm
- kernel_HEADERS = $(KERNEL_H)
- endif
-diff --git a/module/Makefile.in b/module/Makefile.in
-index d4e62e1..73fa01c 100644
---- a/module/Makefile.in
-+++ b/module/Makefile.in
-@@ -21,15 +21,15 @@ clean:
- modules_install:
- 	@# Install the kernel modules
- 	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
--		INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
-+		INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
- 		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
- 		KERNELRELEASE=@LINUX_VERSION@
- 	@# Remove extraneous build products when packaging
--	kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
--	if [ -n "$(DESTDIR)" ]; then \
-+	kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
-+	if [ -n "@prefix@" ]; then \
- 		find $$kmoddir -name 'modules.*' | xargs $(RM); \
- 	fi
--	sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
-+	sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
- 	if [ -f $$sysmap ]; then \
- 		depmod -ae -F $$sysmap @LINUX_VERSION@; \
- 	fi
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 9a1baf8f7b9..776842da1dc 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -9,7 +9,7 @@
 , gawk, gnugrep, gnused, systemd
 
 # Kernel dependencies
-, kernel ? null, spl ? null, splUnstable ? null
+, kernel ? null, spl ? null
 }:
 
 with stdenv.lib;
@@ -51,7 +51,7 @@ let
       '';
 
       nativeBuildInputs = [ autoreconfHook nukeReferences ]
-         ++ optional buildKernel (kernel.moduleBuildDependencies ++ [ perl ]);
+        ++ optional buildKernel (kernel.moduleBuildDependencies ++ [ perl ]);
       buildInputs =
            optionals buildKernel [ spl ]
         ++ optionals buildUser [ zlib libuuid python attr ]
@@ -93,7 +93,7 @@ let
 
       configureFlags = [
         "--with-config=${configFile}"
-        ] ++ optionals buildUser [
+      ] ++ optionals buildUser [
         "--with-dracutdir=$(out)/lib/dracut"
         "--with-udevdir=$(out)/lib/udev"
         "--with-systemdunitdir=$(out)/etc/systemd/system"
@@ -103,10 +103,11 @@ let
         "--sysconfdir=/etc"
         "--localstatedir=/var"
         "--enable-systemd"
-        ] ++ optionals buildKernel [
-        "--with-spl=${spl}/libexec/spl"
+      ] ++ optionals buildKernel [
         "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
         "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+      ] ++ optionals (buildKernel && spl != null) [
+        "--with-spl=${spl}/libexec/spl"
       ];
 
       enableParallelBuilding = true;
@@ -179,19 +180,19 @@ in {
     incompatibleKernelVersion = null;
 
     # this package should point to a version / git revision compatible with the latest kernel release
-    version = "2018-05-22";
+    version = "2018-08-13";
 
-    rev = "ba863d0be4cbfbea938b10e49fb6ff459ac9ec20";
-    sha256 = "11dhigw1gybalwg2m6si148b6w195dj2lw38snqf6576wb5zndd0";
+    rev = "64e96969a88c21aebb2f8d982a8c345e55a2ae6c";
+    sha256 = "164fvsf9zqvq3vafnvjxafjl8gihmfqfsjwsmky16i90a6hs96gf";
     isUnstable = true;
 
     extraPatches = [
       (fetchpatch {
-        url = "https://github.com/Mic92/zfs/compare/${rev}...nixos-zfs-2018-02-02.patch";
-        sha256 = "1gqmgqi39qhk5kbbvidh8f2xqq25vj58i9x0wjqvcx6a71qj49ch";
+        url = "https://github.com/Mic92/zfs/compare/${rev}...nixos-zfs-2018-08-13.patch";
+        sha256 = "1sdcr1w2jp3djpwlf1f91hrxxmc34q0jl388smdkxh5n5bpw5gzw";
       })
     ];
 
-    spl = splUnstable;
+    spl = null;
   };
 }