summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIacopo Isimbaldi2015-12-29 16:38:03 +0100
committerIacopo Isimbaldi2015-12-29 16:38:03 +0100
commitb76bd4a5b317ac6f07caa8785c475f58046635ce (patch)
treeee13fefd6f936d3fe3e32e2e5a9e180706b25e03
parent25e777b85b38dbf8c8f68d5f1cb9a440ad82ae99 (diff)
downloadaur-b76bd4a5b317ac6f07caa8785c475f58046635ce.tar.gz
Updated to pkgver 0.6.5.3
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD47
-rw-r--r--zfs.install45
3 files changed, 62 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 260db9ddfeba..75b54f4fae16 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,15 @@
+# Generated by mksrcinfo v8
+# Tue Dec 29 15:37:47 UTC 2015
pkgbase = zfs-dkms
- pkgver = 0.6.5.2
+ pkgver = 0.6.5.3
pkgrel = 1
url = http://zfsonlinux.org/
arch = i686
arch = x86_64
license = CDDL
makedepends = git
- source = git+https://github.com/zfsonlinux/zfs.git
+ makedepends = spl-dkms=0.6.5.3
+ source = git+https://github.com/zfsonlinux/zfs.git#tag=zfs-0.6.5.3
source = zfs-utils.bash-completion-r1
source = zfs-utils.initcpio.install
source = zfs-utils.initcpio.hook
@@ -18,18 +21,15 @@ pkgbase = zfs-dkms
pkgname = zfs-dkms
pkgdesc = Kernel modules for the Zettabyte File System.
install = zfs.install
- depends = spl-dkms=0.6.5.2-1
- depends = zfs-utils=0.6.5.2-1
+ depends = spl-dkms=0.6.5.3
+ depends = zfs-utils=0.6.5.3-1
depends = dkms
provides = zfs
conflicts = zfs-git
conflicts = zfs-lts
- replaces = zfs-dkms-git
pkgname = zfs-utils
pkgdesc = Kernel module support files for the Zettabyte File System.
- depends = spl-dkms=0.6.5.2-1
conflicts = zfs-utils-git
conflicts = zfs-utils-lts
- replaces = zfs-utils-dkms-git
diff --git a/PKGBUILD b/PKGBUILD
index 82ce1380f47c..db40d0cbd961 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,17 @@
#
-# Maintainer: isiachi <isiachi@rhyeworld.it>
+# Maintainer: bjin <bjin1990 at gmail dot com>
+# Maintainer: Iacopo Isimbaldi <isiachi@rhye.it>
#
pkgbase="zfs-dkms"
pkgname=("zfs-dkms" "zfs-utils")
-pkgver=0.6.5.2
+pkgver=0.6.5.3
pkgrel=1
license=('CDDL')
-makedepends=("git")
+makedepends=("git" "spl-dkms=${pkgver}")
arch=("i686" "x86_64")
url="http://zfsonlinux.org/"
-source=("git+https://github.com/zfsonlinux/zfs.git"
+source=("git+https://github.com/zfsonlinux/zfs.git#tag=zfs-${pkgver}"
"zfs-utils.bash-completion-r1"
"zfs-utils.initcpio.install"
"zfs-utils.initcpio.hook")
@@ -18,26 +19,15 @@ md5sums=('SKIP'
'9ddb0c8a94861f929d0fa741fdc49950'
'9ef4841abb85dee611828cc7e6f5c6fe'
'62ba32c6853c315ff231c396cf8bfdbb')
-#install=zfs.install
-
-_dirver="${pkgver}"
-_gittag="zfs-${pkgver}"
-
-prepare() {
- cd "${srcdir}/zfs"
-
- git checkout ${_gittag}
-}
build() {
cd "${srcdir}/zfs"
./autogen.sh
- scripts/dkms.mkconf -v ${_dirver} -f dkms.conf -n zfs
-
+
./configure --prefix=/usr \
--sysconfdir=/etc \
- --bindir=/usr/bin \
--sbindir=/usr/bin \
+ --with-mounthelperdir=/usr/bin \
--libdir=/usr/lib \
--datadir=/usr/share \
--includedir=/usr/include \
@@ -49,23 +39,26 @@ build() {
package_zfs-dkms() {
pkgdesc="Kernel modules for the Zettabyte File System."
- depends=("spl-dkms=${pkgver}-${pkgrel}" "zfs-utils=${pkgver}-${pkgrel}" "dkms")
+ depends=("spl-dkms=${pkgver}" "zfs-utils=${pkgver}-${pkgrel}" "dkms")
provides=("zfs")
conflicts=("zfs-git" "zfs-lts")
- replaces=("zfs-dkms-git")
install=zfs.install
-
- install -d ${pkgdir}/usr/src
- cp -a ${srcdir}/zfs ${pkgdir}/usr/src/zfs-${_dirver}
- rm -rf ${pkgdir}/usr/src/zfs-${_dirver}/.git
- rm -f ${pkgdir}/usr/src/zfs-${_dirver}/.gitignore
+
+ dkmsdir="${pkgdir}/usr/src/zfs-${pkgver}"
+ install -d "${dkmsdir}"
+
+ cd "${srcdir}/zfs"
+ git archive --format=tar HEAD | tar -x -C "${dkmsdir}"
+
+ cd "${dkmsdir}"
+ ./autogen.sh
+ scripts/dkms.mkconf -v ${pkgver} -f dkms.conf -n zfs
+ chmod g-w,o-w -R .
}
package_zfs-utils() {
pkgdesc="Kernel module support files for the Zettabyte File System."
- depends=("spl-dkms=${pkgver}-${pkgrel}")
conflicts=("zfs-utils-git" "zfs-utils-lts")
- replaces=("zfs-utils-dkms-git")
cd "${srcdir}/zfs"
make DESTDIR="${pkgdir}" install
@@ -77,8 +70,6 @@ package_zfs-utils() {
# move module tree /lib -> /usr/lib
cp -r "${pkgdir}"/{lib,usr}
rm -r "${pkgdir}"/lib
- mv "${pkgdir}"/sbin/* "${pkgdir}"/usr/bin
- rm -r "${pkgdir}"/sbin
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
diff --git a/zfs.install b/zfs.install
index f406c472032e..b8d2f40ebcd1 100644
--- a/zfs.install
+++ b/zfs.install
@@ -1,17 +1,44 @@
post_install() {
- check_initramfs
+ dkms add zfs/${1%%[-_]*}
+ cat << EOF
+==> 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"
}
post_upgrade() {
- check_initramfs
+ post_install "$1"
}
-check_initramfs() {
- echo " >>> To build the module for the current kernel use this command:
- # dkms install zfs/0.6.5.2 -k _KERNEL_VERSION_HERE_
- or just boot to kernel you want to build and do
- # dkms install zfs/0.6.5.2 -k \$(uname -r)
+pre_remove() {
+ [ -n "${1%%[-_]*}" ] && dkms remove zfs/${1%%[-_]*} --all &>/dev/null || true
+}
+
+post_remove() {
+ check_initramfs "remove"
+}
- >>> Always remember to install kernel headers!
-"
+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
}