summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIacopo Isimbaldi <isiachi@rhye.it>2016-01-12 00:33:57 +0100
committerIacopo Isimbaldi <isiachi@rhye.it>2016-01-12 00:33:57 +0100
commit0ba6edb7bed65c8cea724c5b1cc9cceed1a0d268 (patch)
tree46a0c6d7963823bfe58e5d0eb5d4d8c3e17ce5de
parentRevert "remove autogen.sh call" (diff)
parentBump to pkgrel 3 (diff)
downloadzfs-dkms-0ba6edb7bed65c8cea724c5b1cc9cceed1a0d268.tar.xz
Merge branch 'dev'
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD22
-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.install35
6 files changed, 32 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7d86e94..977b372 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,28 @@
# Generated by mksrcinfo v8
-# Mon Jan 11 14:27:27 UTC 2016
+# Mon Jan 11 22:56:11 UTC 2016
pkgbase = zfs-dkms
pkgver = 0.6.5.4
- pkgrel = 2
+ pkgrel = 3
url = http://zfsonlinux.org/
arch = i686
arch = x86_64
license = CDDL
makedepends = spl-dkms=0.6.5.4
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
pkgdesc = Kernel modules for the Zettabyte File System.
install = zfs.install
depends = spl-dkms=0.6.5.4
- depends = zfs-utils=0.6.5.4-2
+ depends = zfs-utils=0.6.5.4-3
depends = dkms
- optdepends = mkinitcpio-dkms: Generate initramfs with zfs modules automatically
provides = zfs
conflicts = zfs-git
conflicts = zfs-lts
diff --git a/PKGBUILD b/PKGBUILD
index 39680f9..9d69b1d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,18 +6,18 @@
pkgbase="zfs-dkms"
pkgname=("zfs-dkms" "zfs-utils")
pkgver=0.6.5.4
-pkgrel=2
+pkgrel=3
license=('CDDL')
makedepends=("spl-dkms=${pkgver}")
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() {
@@ -40,7 +40,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
@@ -52,7 +51,6 @@ package_zfs-dkms() {
tar -xzf "zfs-${pkgver}.tar.gz" -C "${dkmsdir}" --strip-components 1
cd "${dkmsdir}"
- ./autogen.sh
scripts/dkms.mkconf -v ${pkgver} -f dkms.conf -n zfs
chmod g-w,o-w -R .
}
@@ -67,12 +65,16 @@ package_zfs-utils() {
# Remove uneeded files
rm -r "${pkgdir}"/etc/init.d
rm -r "${pkgdir}"/usr/lib/dracut
+ rm -r "${pkgdir}"/usr/share/initramfs-tools
# move module tree /lib -> /usr/lib
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
}