From 2deb085c92bfc82d3f5d4c30887ce73b049ffa6a Mon Sep 17 00:00:00 2001 From: Jesus Alvarez Date: Fri, 3 Jul 2015 10:45:11 -0700 Subject: [PATCH] Update for kernel 4.0.7-2 --- .SRCINFO | 24 ++++++++++++++++++ .gitignore | 3 +++ PKGBUILD | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ zfs.install | 34 ++++++++++++++++++++++++++ 4 files changed, 131 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 zfs.install diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..8e58fe9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = zfs-git + pkgdesc = Kernel modules for the Zettabyte File System. + pkgver = 0.6.4.2_r0_g44b5ec8_4.0.7_2 + pkgrel = 1 + url = http://zfsonlinux.org/ + install = zfs.install + arch = i686 + arch = x86_64 + groups = archzfs-git + license = CDDL + makedepends = git + makedepends = linux-headers=4.0.7-2 + depends = spl-git + depends = zfs-utils-git + depends = linux=4.0.7-2 + provides = zfs + conflicts = zfs + conflicts = zfs-lts + replaces = zfs + source = git+https://github.com/zfsonlinux/zfs.git#commit=44b5ec8f + md5sums = SKIP + +pkgname = zfs-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31f1f03 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +zfs/ +*.tar.xz +*.sig diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..2fa3598 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Jesus Alvarez +# Contributor: Kyle Fuller +# +# This PKGBUILD was generated by the archzfs build scripts located at +# +# http://github.com/demizer/archzfs +# +# The build script generates and updates the pkgver and _kernel* variables. +# +pkgname="zfs-git" +pkgver=0.6.4.2_r0_g44b5ec8_4.0.7_2 +pkgrel=1 +license=('CDDL') + +# Used incase the i686 and x86_64 linux packages get out of sync with the +# PKGREL. This occurred on January 31, 2014 where i686 was versioned at +# 3.12.9-1 and x86_64 was versioned at 3.12.9-2. +_kernel_version_x32="4.0.7-2" +_kernel_version_x32_full="4.0.7-2" +_kernel_version_x64="4.0.7-2" +_kernel_version_x64_full="4.0.7-2" + +if [[ $CARCH == "i686" ]]; then + _kernel_version=${_kernel_version_x32} + _kernel_version_full=${_kernel_version_x32_full} +else + _kernel_version=${_kernel_version_x64} + _kernel_version_full=${_kernel_version_x64_full} +fi + +pkgdesc="Kernel modules for the Zettabyte File System." +depends=("spl-git" "zfs-utils-git" "linux=${_kernel_version}") +makedepends=("git" "linux-headers=${_kernel_version}") +arch=("i686" "x86_64") +url="http://zfsonlinux.org/" +source=("git+https://github.com/zfsonlinux/zfs.git#commit=44b5ec8f") +groups=("archzfs-git") +md5sums=('SKIP') +replaces=("zfs") +provides=("zfs") +conflicts=("zfs" "zfs-lts") +install=zfs.install + +build() { + cd "${srcdir}/zfs" + ./autogen.sh + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --sbindir=/usr/bin \ + --libdir=/usr/lib \ + --datadir=/usr/share \ + --includedir=/usr/include \ + --with-udevdir=/lib/udev \ + --libexecdir=/usr/lib/zfs \ + --with-config=kernel \ + --with-linux=/usr/lib/modules/${_kernel_version_full}-ARCH/build + + make +} + +package() { + cd "${srcdir}/zfs" + make DESTDIR="${pkgdir}" install + + cp -r "$pkgdir"/{lib,usr} + rm -r "$pkgdir"/lib + + sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/${_kernel_version_full}-ARCH/Module.symvers +} diff --git a/zfs.install b/zfs.install new file mode 100644 index 0000000..6d76888 --- /dev/null +++ b/zfs.install @@ -0,0 +1,34 @@ +post_install() { + check_initramfs +} + +post_remove() { + check_initramfs 'remove' +} + +post_upgrade() { + check_initramfs +} + +check_initramfs() { + echo ">>> Updating module dependencies. Please wait ..." + + _kernel_version_x32_full="4.0.7-2" + _kernel_version_x64_full="4.0.7-2" + + [[ $CARCH == "i686" ]] && _kernel_version_full=${_kernel_version_x32_full} || _kernel_version_full=${_kernel_version_x64_full} + + depmod ${_kernel_version_full}-ARCH + + MK_CONF=$(grep -v '#' /etc/mkinitcpio.conf | grep zfs >/dev/null; echo $?); + if [[ $MK_CONF == '0' ]]; then + if [[ $1 == 'remove' ]]; then + echo '>>> The ZFS packages have been removed, but "zfs" remains in the "hooks"' + echo '>>> list in mkinitcpio.conf! You will need to remove "zfs" from the ' + echo '>>> "hooks" list and then regenerate the initial ramdisk.' + else + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux + fi + fi +}