]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: [Debian] Added script to update SPL/ZFS module from archive package
authorTim Gardner <tim.gardner@canonical.com>
Sat, 24 Oct 2015 14:23:27 +0000 (08:23 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
BugLink: http://bugs.launchpad.net/bugs/1509881
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
debian/scripts/misc/update-zfs.sh [new file with mode: 0755]

diff --git a/debian/scripts/misc/update-zfs.sh b/debian/scripts/misc/update-zfs.sh
new file mode 100755 (executable)
index 0000000..c8dbc76
--- /dev/null
@@ -0,0 +1,33 @@
+#!/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=0.6.4.2
+SPL_MINOR_VER=0ubuntu1
+SPL_DKMS=http://archive.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms_${SPL_MAJOR_VER}-${SPL_MINOR_VER}_amd64.deb
+
+ZFS_MAJOR_VER=0.6.4.2
+ZFS_MINOR_VER=0ubuntu1
+ZFS_DKMS=http://archive.ubuntu.com/ubuntu/pool/universe/z/zfs-linux/zfs-dkms_${ZFS_MAJOR_VER}-${ZFS_MINOR_VER}_amd64.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 -a --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}"