From 4c37edd6f3b6ec6e586539e61d3395307196b843 Mon Sep 17 00:00:00 2001 From: Jack Cummings Date: Sat, 6 Apr 2013 00:06:27 -0700 Subject: [PATCH] Don't need NIX_CFLAGS_COMPILE in spl build anymore, consolodate zfs patches. --- pkgs/os-specific/linux/spl/default.nix | 2 - pkgs/os-specific/linux/zfs/default.nix | 2 +- .../linux/zfs/module_perm_prefix.patch | 70 ------------------- .../{kerneldir_path.patch => nix-build.patch} | 0 .../zfs/no_absolute_paths_to_coreutils.patch | 25 ------- 5 files changed, 1 insertion(+), 98 deletions(-) delete mode 100644 pkgs/os-specific/linux/zfs/module_perm_prefix.patch rename pkgs/os-specific/linux/zfs/{kerneldir_path.patch => nix-build.patch} (100%) delete mode 100644 pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index c01a4d33502..75ff2893972 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -11,8 +11,6 @@ stdenv.mkDerivation { buildInputs = [ perl kernelDev autoconf automake libtool ]; - NIX_CFLAGS_COMPILE = "-I${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build/include/generated"; - preConfigure = '' ./autogen.sh diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index b330ddab8fc..ac07474d3f4 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "1ykph9d4p70mam6lvcx0zld6d34gch15dsilds5ncbxh0m52knl0"; }; - patches = [ ./mount_zfs_prefix.patch ./kerneldir_path.patch ]; + patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ]; buildInputs = [ kernelDev spl perl autoconf automake libtool zlib libuuid coreutils ]; diff --git a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch b/pkgs/os-specific/linux/zfs/module_perm_prefix.patch deleted file mode 100644 index 07cd04d1dde..00000000000 --- a/pkgs/os-specific/linux/zfs/module_perm_prefix.patch +++ /dev/null @@ -1,70 +0,0 @@ -*** git-export/module/Makefile.in.orig Wed Dec 31 16:00:01 1969 ---- git-export/module/Makefile.in Tue Mar 6 00:23:07 2012 -*************** -*** 11,19 **** - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ - "*** Missing spl symbols ensure you have built the spl:\n" \ ---- 11,21 ---- - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ -! chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ -! chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ - "*** Missing spl symbols ensure you have built the spl:\n" \ -*************** -*** 35,55 **** - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=$(DESTDIR) \ - INSTALL_MOD_DIR=addon/zfs $@ - @# Remove extraneous build products when packaging -! if [ -n "$(DESTDIR)" ]; then \ -! find $(DESTDIR)/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=$(DESTDIR)/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi - - modules_uninstall: - @# Uninstall the kernel modules -! $(RM) -R $(DESTDIR)/lib/modules/@LINUX_VERSION@/addon/zfs - - distdir: - ---- 37,57 ---- - modules_install: - @# Install the kernel modules - $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ -! INSTALL_MOD_PATH=@prefix@ \ - INSTALL_MOD_DIR=addon/zfs $@ - @# Remove extraneous build products when packaging -! if [ -n "@prefix@" ]; then \ -! find @prefix@/lib/modules/@LINUX_VERSION@ \ - -name 'modules.*' | xargs $(RM); \ - fi -! sysmap=@prefix@/boot/System.map-@LINUX_VERSION@; \ - if [ -f $$sysmap ]; then \ - depmod -ae -F $$sysmap @LINUX_VERSION@; \ - fi - - modules_uninstall: - @# Uninstall the kernel modules -! $(RM) -R @prefix@/lib/modules/@LINUX_VERSION@/addon/zfs - - distdir: - diff --git a/pkgs/os-specific/linux/zfs/kerneldir_path.patch b/pkgs/os-specific/linux/zfs/nix-build.patch similarity index 100% rename from pkgs/os-specific/linux/zfs/kerneldir_path.patch rename to pkgs/os-specific/linux/zfs/nix-build.patch diff --git a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch b/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch deleted file mode 100644 index e223e34c3a4..00000000000 --- a/pkgs/os-specific/linux/zfs/no_absolute_paths_to_coreutils.patch +++ /dev/null @@ -1,25 +0,0 @@ -*** git-export/module/Makefile.in.old Tue Mar 6 01:04:48 2012 ---- git-export/module/Makefile.in Tue Mar 6 01:04:59 2012 -*************** -*** 11,20 **** - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! /bin/cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \ ---- 11,20 ---- - @# installed devel headers, or they may be in the module - @# subdirectory when building against the spl source tree. - @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \ -! cp -f @SPL_OBJ@/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \ -! cp -f @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \ - chmod +w @SPL_SYMBOLS@ .; \ - else \ - echo -e "\n" \