diff options
author | Iacopo Isimbaldi <isiachi@rhye.it> | 2016-01-11 23:14:23 +0100 |
---|---|---|
committer | Iacopo Isimbaldi <isiachi@rhye.it> | 2016-01-11 23:31:13 +0100 |
commit | aaebb1b66ed84a14a7dcbd070afab3c5334880ac (patch) | |
tree | 5dd83f7db25d906fffcc8482543a57e23b8e253f | |
parent | remove git from makedeps (diff) | |
download | zfs-dkms-aaebb1b66ed84a14a7dcbd070afab3c5334880ac.tar.xz |
Updated zfs.install and hook
Dropped "mkinitcpio-dkms" dep, replaced by zfs hook
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | zfs.bash-completion-r1 (renamed from zfs-utils.bash-completion-r1) | 0 | ||||
-rw-r--r-- | zfs.initcpio.hook (renamed from zfs-utils.initcpio.hook) | 0 | ||||
-rw-r--r-- | zfs.initcpio.install (renamed from zfs-utils.initcpio.install) | 6 | ||||
-rw-r--r-- | zfs.install | 35 |
6 files changed, 28 insertions, 42 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sat Jan 9 16:21:11 UTC 2016 +# Mon Jan 11 22:24:44 UTC 2016 pkgbase = zfs-dkms pkgver = 0.6.5.4 pkgrel = 1 @@ -8,12 +8,12 @@ pkgbase = zfs-dkms arch = x86_64 license = CDDL source = https://github.com/zfsonlinux/zfs/releases/download/zfs-0.6.5.4/zfs-0.6.5.4.tar.gz - source = zfs-utils.bash-completion-r1 - source = zfs-utils.initcpio.install - source = zfs-utils.initcpio.hook + source = zfs.bash-completion-r1 + source = zfs.initcpio.install + source = zfs.initcpio.hook sha256sums = 780862ec2301ccace412a324787e9df762cff6046e73e2ac0ebdce9e2bd59b0f sha256sums = b60214f70ffffb62ffe489cbfabd2e069d14ed2a391fac0e36f914238394b540 - sha256sums = 1e20071fa61a33874505dae0f2d71bb560f43e7faaea735cbde770ea10c133df + sha256sums = 70930eee5b0f55ba587220b9530170d91ef1eea98a37de9ae38f963dee410b3a sha256sums = 250f1232c464a81cc9c8b8ee05f21d752ebeebbc8614fae1c6d0bc600e816ac1 pkgname = zfs-dkms @@ -22,7 +22,6 @@ pkgname = zfs-dkms depends = spl-dkms=0.6.5.4 depends = zfs-utils=0.6.5.4-1 depends = dkms - optdepends = mkinitcpio-dkms: Generate initramfs with zfs modules automatically provides = zfs conflicts = zfs-git conflicts = zfs-lts @@ -11,12 +11,12 @@ license=('CDDL') arch=("i686" "x86_64") url="http://zfsonlinux.org/" source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz" - "zfs-utils.bash-completion-r1" - "zfs-utils.initcpio.install" - "zfs-utils.initcpio.hook") + "zfs.bash-completion-r1" + "zfs.initcpio.install" + "zfs.initcpio.hook") sha256sums=('780862ec2301ccace412a324787e9df762cff6046e73e2ac0ebdce9e2bd59b0f' 'b60214f70ffffb62ffe489cbfabd2e069d14ed2a391fac0e36f914238394b540' - '1e20071fa61a33874505dae0f2d71bb560f43e7faaea735cbde770ea10c133df' + '70930eee5b0f55ba587220b9530170d91ef1eea98a37de9ae38f963dee410b3a' '250f1232c464a81cc9c8b8ee05f21d752ebeebbc8614fae1c6d0bc600e816ac1') build() { @@ -39,7 +39,6 @@ build() { package_zfs-dkms() { pkgdesc="Kernel modules for the Zettabyte File System." depends=("spl-dkms=${pkgver}" "zfs-utils=${pkgver}-${pkgrel}" "dkms") - optdepends=("mkinitcpio-dkms: Generate initramfs with zfs modules automatically") provides=("zfs") conflicts=("zfs-git" "zfs-lts") install=zfs.install @@ -71,7 +70,10 @@ package_zfs-utils() { cp -r "${pkgdir}"/{lib,usr} rm -r "${pkgdir}"/lib - install -D -m644 "${srcdir}"/zfs-utils.initcpio.hook "${pkgdir}"/usr/lib/initcpio/hooks/zfs - install -D -m644 "${srcdir}"/zfs-utils.initcpio.install "${pkgdir}"/usr/lib/initcpio/install/zfs - install -D -m644 "${srcdir}"/zfs-utils.bash-completion-r1 "${pkgdir}"/usr/share/bash-completion/completions/zfs + install -D -m644 "${srcdir}"/zfs.initcpio.hook "${pkgdir}"/usr/lib/initcpio/hooks/zfs + install -D -m644 "${srcdir}"/zfs.bash-completion-r1 "${pkgdir}"/usr/share/bash-completion/completions/zfs + + mkdir -p "${pkgdir}"/usr/lib/initcpio/install + sed -e "s|##VERMARKER##|${pkgver}|" "${srcdir}"/zfs.initcpio.install > "${pkgdir}"/usr/lib/initcpio/install/zfs + chmod 644 "${pkgdir}"/usr/lib/initcpio/install/zfs } diff --git a/zfs-utils.bash-completion-r1 b/zfs.bash-completion-r1 index b1aded3..b1aded3 100644 --- a/zfs-utils.bash-completion-r1 +++ b/zfs.bash-completion-r1 diff --git a/zfs-utils.initcpio.hook b/zfs.initcpio.hook index 3a92894..3a92894 100644 --- a/zfs-utils.initcpio.hook +++ b/zfs.initcpio.hook diff --git a/zfs-utils.initcpio.install b/zfs.initcpio.install index c128d10..e192c3b 100644 --- a/zfs-utils.initcpio.install +++ b/zfs.initcpio.install @@ -1,6 +1,12 @@ #!/bin/bash build() { + echo -en "Build spl module for ${KERNELVERSION} kernel... " + $(which dkms) install -m spl -v ##VERMARKER## -k ${KERNELVERSION} -q + echo -en "Done.\nBuild zfs module for ${KERNELVERSION} kernel... " + $(which dkms) install -m zfs -v ##VERMARKER## -k ${KERNELVERSION} -q + echo "Done." + map add_module \ zavl \ znvpair \ diff --git a/zfs.install b/zfs.install index b8d2f40..28e3d16 100644 --- a/zfs.install +++ b/zfs.install @@ -4,41 +4,20 @@ post_install() { ==> To build and install your modules run: dkms install zfs/${1%%[_-]*} -k [KERNEL] ==> To do this automatically at startup run: systemctl enable dkms.service EOF - check_initramfs "install" } pre_upgrade() { - pre_remove "$2" + if [ "${1%%[-_]*}" != "${2%%[-_]*}" ]; then + pre_remove "$2" + fi } post_upgrade() { - post_install "$1" + if [ "${1%%[-_]*}" != "${2%%[-_]*}" ]; then + post_install "$1" + fi } pre_remove() { - [ -n "${1%%[-_]*}" ] && dkms remove zfs/${1%%[-_]*} --all &>/dev/null || true -} - -post_remove() { - check_initramfs "remove" -} - -check_initramfs() { - if grep -v '#' /etc/mkinitcpio.conf | grep zfs >/dev/null; 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.' - elif grep -v '#' /etc/mkinitcpio.conf | grep dkms >/dev/null; then - echo '==> Generating initial ramdisk automatically (mkinitcpio-dkms found)' - for preset in /etc/mkinitcpio.d/*.preset; do - mkinitcpio -p "$(basename "$preset" .preset)" - done - else - echo '==> The ZFS packages are installed/updated, you need to (re)generate initial ramdisk yourself' - echo '==> After modules are built and installed, run: mkinitcpio -p [PRESET]' - echo '==> To do it automatically, you can also install mkinitcpio-dkms package' - echo '==> and add "dkms" to HOOKSs (before zfs)' - fi - fi + [ -n "${1%%[-_]*}" ] && dkms remove zfs/${1%%[-_]*} --all -q || true } |