Commit b8ed65d3 authored by Tim Gardner's avatar Tim Gardner

UBUNTU: [Debian] Added script to update SPL/ZFS module from archive package

BugLink: http://bugs.launchpad.net/bugs/1509881Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 675e9cf1
#!/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}"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment