]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: [Packaging] dkms -- build zfs/spl packages
authorAndrea Righi <andrea.righi@canonical.com>
Wed, 12 Jun 2019 07:03:54 +0000 (07:03 +0000)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:12 +0000 (09:45 -0600)
BugLink: https://bugs.launchpad.net/bugs/1807378
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
debian/dkms-versions
debian/rules
debian/rules.d/2-binary-arch.mk
debian/scripts/misc/update-zfs.sh [deleted file]

index 8626e2dc97be150e79e0e698cace7617719a5d27..425f222418c7a7b7b8d3109e0ae0671687f971e3 100644 (file)
@@ -1 +1,3 @@
+spl-linux 0.7.12-1ubuntu3
+zfs-linux 0.7.12-1ubuntu5
 nvidia-graphics-drivers-390 390.116-0ubuntu1
index 74a749b988fc74f84717adb99b8b9edb88ee6c94..04a71812802c45b05f1dfc9e280ae0efb143c2f7 100755 (executable)
@@ -103,6 +103,8 @@ disable_d_i=true
 endif
 
 # Versions of dkms packages.
+dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }' debian/dkms-versions)
+dkms_spl_linux_version=$(shell gawk '/^spl-linux / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_version=$(shell gawk '/^nvidia-graphics-drivers-/ { print $$2; }' debian/dkms-versions)
 
 # Debian Build System targets
index 18bd5e883738bf22e24acd13abad80241f1bd42d..3e4c81a88fc7e1b3d5477304f740bc0413381614 100644 (file)
@@ -42,39 +42,13 @@ prepare-%: $(stampdir)/stamp-prepare-%
 build-%: $(stampdir)/stamp-build-%
        @echo Debug: $@
 
-define build_zfs =
-       #
-       # SPL/ZFS wants a fully built kernel before you can configure and build.
-       # It seems to be impossible to tease out the application configuration
-       # from the modules, but at least one can build just the modules.
-       #
-       install -d $(builddir)/build-$*/spl
-       rsync -a --exclude=dkms.conf --delete spl/ $(builddir)/build-$*/spl/
-       cd $(builddir)/build-$*/spl; sh autogen.sh; sh configure $(splopts)
-       $(kmake) -C $(builddir)/build-$*/spl/module $(conc_level)
-
-       install -d $(builddir)/build-$*/zfs
-       rsync -a --exclude=dkms.conf --delete zfs/ $(builddir)/build-$*/zfs/
-       cd $(builddir)/build-$*/zfs; sh autogen.sh; sh configure $(zfsopts)
-       $(kmake) -C $(builddir)/build-$*/zfs/module $(conc_level)
-endef
-
 # Do the actual build, including image and modules
 $(stampdir)/stamp-build-%: target_flavour = $*
-$(stampdir)/stamp-build-%: splopts  = --with-linux=$(CURDIR)
-$(stampdir)/stamp-build-%: splopts += --with-linux-obj=$(builddir)/build-$*
-$(stampdir)/stamp-build-%: zfsopts  = $(splopts)
-$(stampdir)/stamp-build-%: zfsopts += --with-spl=$(builddir)/build-$*/spl
-$(stampdir)/stamp-build-%: zfsopts += --with-spl-obj=$(builddir)/build-$*/spl
-$(stampdir)/stamp-build-%: zfsopts += --prefix=/usr --with-config=kernel
 $(stampdir)/stamp-build-%: bldimg = $(call custom_override,build_image,$*)
-$(stampdir)/stamp-build-%: enable_zfs = $(call custom_override,do_zfs,$*)
 $(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
        @echo Debug: $@ build_image $(build_image) bldimg $(bldimg)
        $(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(if $(filter true,$(do_dtbs)),dtbs)
 
-       $(if $(filter true,$(enable_zfs)),$(call build_zfs))
-
        @touch $@
 
 define build_dkms_sign =
@@ -134,11 +108,6 @@ install-%: MODPUBKEY=$(builddir)/build-$*/certs/signing_key.x509
 install-%: build_dir=$(builddir)/build-$*
 install-%: dkms_dir=$(call dkms_dir_prefix,$(builddir)/build-$*)
 install-%: enable_zfs = $(call custom_override,do_zfs,$*)
-install-%: splopts  = INSTALL_MOD_STRIP=1
-install-%: splopts += INSTALL_MOD_PATH=$(pkgdir)/
-install-%: splopts += INSTALL_MOD_DIR=kernel/zfs
-install-%: splopts += $(conc_level)
-install-%: zfsopts  = $(splopts)
 install-%: $(stampdir)/stamp-build-% install-headers
        @echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile)
        dh_testdir
@@ -202,8 +171,6 @@ endif
                INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \
                INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
 
-       $(if $(filter true,$(enable_zfs)),$(call install_zfs))
-
        #
        # Build module blacklists:
        #  - blacklist all watchdog drivers (LP:1432837)
@@ -428,6 +395,9 @@ endif
        install -d $(dkms_dir) $(dkms_dir)/headers $(dkms_dir)/build $(dkms_dir)/source
        cp -rp "$(hdrdir)" "$(indep_hdrdir)" "$(dkms_dir)/headers"
 
+       $(if $(filter true,$(enable_zfs)),$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir)/lib/modules/$(abi_release)-$*/kernel, spl, pool/universe/s/spl-linux/spl-dkms_$(dkms_spl_linux_version)_all.deb))
+       $(if $(filter true,$(enable_zfs)),$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir)/lib/modules/$(abi_release)-$*/kernel, zfs, pool/universe/z/zfs-linux/zfs-dkms_$(dkms_zfs_linux_version)_all.deb))
+
 ifeq ($(do_dkms_nvidia),true)
        $(call build_dkms, $(bldinfo_pkg_name)-$*, $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, nvidia-390, pool/restricted/n/nvidia-graphics-drivers-390/nvidia-kernel-source-390_$(dkms_nvidia_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-390/nvidia-dkms-390_$(dkms_nvidia_version)_$(arch).deb)
 endif
diff --git a/debian/scripts/misc/update-zfs.sh b/debian/scripts/misc/update-zfs.sh
deleted file mode 100755 (executable)
index be93503..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-#
-# Update spl/zfs from the Ubuntu archive. You will have to manually check
-# to see if the version has been updated.
-#
-SPL_MAJOR_VER=${_SPL_MAJOR_VER:-0.6.5.11}
-SPL_MINOR_VER=${_SPL_MINOR_VER:-0ubuntu1}
-SPL_DKMS=${_SPL_DKMS:-http://archive.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms_${SPL_MAJOR_VER}-${SPL_MINOR_VER}_all.deb}
-
-ZFS_MAJOR_VER=${_ZFS_MAJOR_VER:-0.6.5.11}
-ZFS_MINOR_VER=${_ZFS_MINOR_VER:-0ubuntu1}
-ZFS_DKMS=${_ZFS_DKMS:-http://archive.ubuntu.com/ubuntu/pool/universe/z/zfs-linux/zfs-dkms_${ZFS_MAJOR_VER}-${ZFS_MINOR_VER}_all.deb}
-
-function update_from_archive {
-
-       URL=$1
-       DEST_DIR=$2
-       VER=$3
-
-       rm -rf ${DEST_DIR}.tmp
-       wget -O ${DEST_DIR}.deb ${URL}
-       dpkg -x ${DEST_DIR}.deb ${DEST_DIR}.tmp
-       mkdir -p ${DEST_DIR}
-       rsync -aL --delete ${DEST_DIR}.tmp/usr/src/${DEST_DIR}-${VER}*/ ${DEST_DIR}/
-       rm -rf ${DEST_DIR}.deb ${DEST_DIR}.tmp
-       find ${DEST_DIR} -type f | while read f;do git add -f $f;done
-}
-
-update_from_archive ${SPL_DKMS} spl ${SPL_MAJOR_VER}
-update_from_archive ${ZFS_DKMS} zfs ${ZFS_MAJOR_VER}
-
-git add -u
-git commit -s -m"UBUNTU: SAUCE: (noup) Update spl to ${SPL_MAJOR_VER}-${SPL_MINOR_VER}, zfs to ${ZFS_MAJOR_VER}-${ZFS_MINOR_VER}"