diff options
author | Iacopo Isimbaldi | 2015-12-29 16:00:00 +0100 |
---|---|---|
committer | Iacopo Isimbaldi | 2015-12-29 16:53:09 +0100 |
commit | a63663e98710773b00c242a31574d038381e4821 (patch) | |
tree | 6dd78baa93eeee91edf531fd5225a5001c92abeb | |
parent | 4589e7402b500980eefb55f311a4be9668396b11 (diff) | |
download | aur-a63663e98710773b00c242a31574d038381e4821.tar.gz |
Updated to pkgver 0.6.5.3
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | spl.install | 34 |
3 files changed, 46 insertions, 38 deletions
@@ -1,12 +1,14 @@ +# Generated by mksrcinfo v8 +# Tue Dec 29 15:27:59 UTC 2015 pkgbase = spl-dkms - pkgver = 0.6.5.2 + pkgver = 0.6.5.3 pkgrel = 1 url = http://zfsonlinux.org/ arch = i686 arch = x86_64 license = GPL makedepends = git - source = git+https://github.com/zfsonlinux/spl.git + source = git+https://github.com/zfsonlinux/spl.git#tag=spl-0.6.5.3 source = spl-utils.hostid md5sums = SKIP md5sums = a54f0041a9e15b050f25c463f1db7449 @@ -15,15 +17,13 @@ pkgname = spl-dkms pkgdesc = Solaris Porting Layer kernel modules. install = spl.install depends = dkms - depends = spl-utils=0.6.5.2-1 + depends = spl-utils=0.6.5.3-1 provides = spl conflicts = spl-git conflicts = spl-lts - replaces = spl-dkms-git pkgname = spl-utils pkgdesc = Solaris Porting Layer kernel module support files. conflicts = spl-utils-git conflicts = spl-utils-lts - replaces = spl-utils-dkms-git @@ -1,35 +1,25 @@ # -# Maintainer: isiachi <isiachi@rhyeworld.it> +# Maintainer: bjin <bjin1990 at gmail dot com> +# Maintainer: Iacopo Isimbaldi <isiachi@rhye.it> # pkgbase="spl-dkms" pkgname=("spl-dkms" "spl-utils") -pkgver=0.6.5.2 +pkgver=0.6.5.3 pkgrel=1 license=('GPL') makedepends=("git") arch=("i686" "x86_64") url="http://zfsonlinux.org/" -source=("git+https://github.com/zfsonlinux/spl.git" +source=("git+https://github.com/zfsonlinux/spl.git#tag=spl-${pkgver}" "spl-utils.hostid") md5sums=('SKIP' 'a54f0041a9e15b050f25c463f1db7449') -#install=spl.install - -_dirver="${pkgver}" -_gittag="spl-${pkgver}" - -prepare() { - cd "${srcdir}/spl" - - git checkout ${_gittag} -} build() { cd "${srcdir}/spl" ./autogen.sh - scripts/dkms.mkconf -v ${_dirver} -f dkms.conf -n spl - + _at_enable="" [ "${CARCH}" == "i686" ] && _at_enable="--enable-atomic-spinlocks" @@ -47,21 +37,23 @@ package_spl-dkms() { depends=("dkms" "spl-utils=${pkgver}-${pkgrel}") provides=("spl") conflicts=("spl-git" "spl-lts") - replaces=("spl-dkms-git") install=spl.install - - install -d ${pkgdir}/usr/src - cp -a ${srcdir}/spl ${pkgdir}/usr/src/spl-${_dirver} - rm -rf ${pkgdir}/usr/src/spl-${_dirver}/.git - rm -f ${pkgdir}/usr/src/spl-${_dirver}/.gitignore - + + dkmsdir="${pkgdir}/usr/src/spl-${pkgver}" + install -d "${dkmsdir}" + + cd "${srcdir}/spl" + git archive --format=tar HEAD | tar -x -C "${dkmsdir}" + + cd "${dkmsdir}" + ./autogen.sh + scripts/dkms.mkconf -v ${pkgver} -f dkms.conf -n spl + chmod g-w,o-w -R . } package_spl-utils() { pkgdesc="Solaris Porting Layer kernel module support files." - makedepends=("git") conflicts=("spl-utils-git" "spl-utils-lts") - replaces=("spl-utils-dkms-git") cd "${srcdir}/spl" make DESTDIR="${pkgdir}" install diff --git a/spl.install b/spl.install index 1ecc9658f24e..615ec56d9fff 100644 --- a/spl.install +++ b/spl.install @@ -1,17 +1,33 @@ post_install() { - check_initramfs + dkms add spl/${1%%[_-]*} + check_hostid + cat << EOF +==> To build and install your modules run: dkms install spl/${1%%[_-]*} -k [KERNEL] +==> To do this automatically at startup run: systemctl enable dkms.service +EOF +} + +pre_upgrade() { + pre_remove "$2" } post_upgrade() { - check_initramfs + post_install "$1" } -check_initramfs() { - echo " >>> To build the module for the current kernel use this command: - # dkms install spl/0.6.5.2 -k _KERNEL_VERSION_HERE_ - or just boot to kernel you want to build and do - # dkms install spl/0.6.5.2 -k \$(uname -r) +pre_remove() { + [ -n "${1%%[_-]*}" ] && dkms remove spl/${1%%[_-]*} --all &> /dev/null || true +} - >>> Always remember to install kernel headers! -" +check_hostid() { + # Check /etc/hostid to see if it set to the sentinel value, see + # https://wiki.archlinux.org/index.php/ZFS for more information. + HOSTID=$(hostid) + if [ "0x$HOSTID" == "0xffffffff" ]; then + # Generate a new hostid + : >/etc/hostid + HOSTID=$(hostid) + # hostid is 4 byte little endian + printf $(echo -n $HOSTID | sed 's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/') >/etc/hostid + fi } |