summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIacopo Isimbaldi2016-01-15 10:12:07 +0100
committerIacopo Isimbaldi2016-01-15 10:58:07 +0100
commit5963f8fface55f897debe7138312dc75b31b94a2 (patch)
treecee4fe5d8e3d0f37f71a00c13a70b895a67303d5
parentf8bbb58f7aa601010440772be0835a5d914b2424 (diff)
parent693ba6e8a6f15556be2a1bfd247f614475688d16 (diff)
downloadaur-5963f8fface55f897debe7138312dc75b31b94a2.tar.gz
Merge branch 'zfs_stable' into zfs_git_wip
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD32
-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.install76
6 files changed, 94 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e68f0357a7d8..6b1c98cca58e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,36 +1,37 @@
# Generated by mksrcinfo v8
-# Tue Jan 12 09:33:30 UTC 2016
+# Fri Jan 15 09:06:00 UTC 2016
pkgbase = zfs-dkms-git
- pkgver = 0.6.5.4_r0_g1ffc4c1
- pkgrel = 2
+ pkgver = 0.6.5_r118_gd21f279
+ pkgrel = 1
url = http://zfsonlinux.org/
arch = i686
arch = x86_64
license = CDDL
makedepends = git
- makedepends = spl-dkms-git>=0.6.5.4
- source = git+https://github.com/zfsonlinux/zfs.git#branch=zfs-0.6.5-release
- source = zfs-utils.bash-completion-r1
- source = zfs-utils.initcpio.install
- source = zfs-utils.initcpio.hook
+ makedepends = spl-dkms-git>=0.6.5
+ source = git+https://github.com/zfsonlinux/zfs.git
+ source = zfs.bash-completion-r1
+ source = zfs.initcpio.install
+ source = zfs.initcpio.hook
sha256sums = SKIP
sha256sums = b60214f70ffffb62ffe489cbfabd2e069d14ed2a391fac0e36f914238394b540
- sha256sums = 1e20071fa61a33874505dae0f2d71bb560f43e7faaea735cbde770ea10c133df
+ sha256sums = 70930eee5b0f55ba587220b9530170d91ef1eea98a37de9ae38f963dee410b3a
sha256sums = 250f1232c464a81cc9c8b8ee05f21d752ebeebbc8614fae1c6d0bc600e816ac1
pkgname = zfs-dkms-git
- pkgdesc = Kernel modules for the Zettabyte File System.
+ pkgdesc = Kernel modules for the Zettabyte File System. (Git version)
install = zfs.install
- depends = spl-dkms-git>=0.6.5.4
- depends = zfs-utils-dkms-git=0.6.5.4_r0_g1ffc4c1-2
+ depends = spl-dkms-git>=0.6.5
+ depends = zfs-utils-dkms-git=0.6.5_r118_gd21f279-1
depends = dkms
- optdepends = mkinitcpio-dkms: Generate initramfs with zfs modules automatically
+ provides = zfs
conflicts = zfs-git
conflicts = zfs-lts
conflicts = zfs-dkms
pkgname = zfs-utils-dkms-git
- pkgdesc = Kernel module support files for the Zettabyte File System.
+ pkgdesc = Kernel module support files for the Zettabyte File System. (Git version)
+ provides = zfs-utils
conflicts = zfs-utils-git
conflicts = zfs-utils-lts
conflicts = zfs-utils
diff --git a/PKGBUILD b/PKGBUILD
index a8fef64ab56f..2656d9e07284 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,19 @@
pkgbase="zfs-dkms-git"
pkgname=("zfs-dkms-git" "zfs-utils-dkms-git")
-pkgver=0.6.5.4_r0_g1ffc4c1
-pkgrel=2
+pkgver=0.6.5_r118_gd21f279
+pkgrel=1
license=('CDDL')
makedepends=("git" "spl-dkms-git>=${pkgver%%_*}")
arch=("i686" "x86_64")
url="http://zfsonlinux.org/"
-source=("git+https://github.com/zfsonlinux/zfs.git#branch=zfs-0.6.5-release"
- "zfs-utils.bash-completion-r1"
- "zfs-utils.initcpio.install"
- "zfs-utils.initcpio.hook")
+source=("git+https://github.com/zfsonlinux/zfs.git"
+ "zfs.bash-completion-r1"
+ "zfs.initcpio.install"
+ "zfs.initcpio.hook")
sha256sums=('SKIP'
'b60214f70ffffb62ffe489cbfabd2e069d14ed2a391fac0e36f914238394b540'
- '1e20071fa61a33874505dae0f2d71bb560f43e7faaea735cbde770ea10c133df'
+ '70930eee5b0f55ba587220b9530170d91ef1eea98a37de9ae38f963dee410b3a'
'250f1232c464a81cc9c8b8ee05f21d752ebeebbc8614fae1c6d0bc600e816ac1')
pkgver() {
@@ -43,9 +43,9 @@ build() {
}
package_zfs-dkms-git() {
- pkgdesc="Kernel modules for the Zettabyte File System."
+ pkgdesc="Kernel modules for the Zettabyte File System. (Git version)"
depends=("spl-dkms-git>=${pkgver%%_*}" "zfs-utils-dkms-git=${pkgver}-${pkgrel}" "dkms")
- optdepends=("mkinitcpio-dkms: Generate initramfs with zfs modules automatically")
+ provides=("zfs")
conflicts=("zfs-git" "zfs-lts" "zfs-dkms")
install=zfs.install
@@ -56,13 +56,13 @@ package_zfs-dkms-git() {
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-dkms-git() {
- pkgdesc="Kernel module support files for the Zettabyte File System."
+ pkgdesc="Kernel module support files for the Zettabyte File System. (Git version)"
+ provides=("zfs-utils")
conflicts=("zfs-utils-git" "zfs-utils-lts" "zfs-utils")
cd "${srcdir}/zfs"
@@ -71,12 +71,16 @@ package_zfs-utils-dkms-git() {
# 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 b1aded368e85..b1aded368e85 100644
--- a/zfs-utils.bash-completion-r1
+++ b/zfs.bash-completion-r1
diff --git a/zfs-utils.initcpio.hook b/zfs.initcpio.hook
index 3a928944db92..3a928944db92 100644
--- a/zfs-utils.initcpio.hook
+++ b/zfs.initcpio.hook
diff --git a/zfs-utils.initcpio.install b/zfs.initcpio.install
index c128d1006371..e192c3bcbdd7 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 b8d2f40ebcd1..6cba9a637006 100644
--- a/zfs.install
+++ b/zfs.install
@@ -3,42 +3,76 @@ post_install() {
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"
+ check_hook
}
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
+ [ -n "${1%%[-_]*}" ] && dkms remove zfs/${1%%[-_]*} --all -q || true
}
post_remove() {
- check_initramfs "remove"
+ check_hook 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)'
+check_hook() {
+ ZFSHOOKFILES=()
+
+ for preset in /etc/mkinitcpio.d/*.preset; do
+ source $preset
+ CONF_FILE=()
+
+ if [ -n "${ALL_config}" ]; then
+ CONF_FILE+=("${ALL_config}")
+ unset ALL_config
fi
+
+ for prefix in ${PRESETS[@]}; do
+ varname="${prefix}_config"
+ if [ -n "$(eval echo \$$varname)" ]; then
+ eval CONF_FILE+=("$(eval echo \$$varname)")
+ unset $varname
+ fi
+ done
+
+ i=0
+ unset ZFSHOOKPRESENCE
+ while [ $i -lt ${#CONF_FILE[@]} ]; do
+ if [ -e "${CONF_FILE[$i]}" ] && [ $(grep -q "zfs" ${CONF_FILE[$i]} && echo -n "1") ]; then
+ ZFSHOOKPRESENCE=1
+ if [ "$1" == "remove" ] && [ $(echo -n "${ZFSHOOKFILES[@]}" | grep -q "${CONF_FILE[$i]}" || echo -n "1") ]; then
+ ZFSHOOKFILES+=("${CONF_FILE[$i]}")
+ fi
+ fi
+ i+=1
+ done
+
+ if [ ${ZFSHOOKPRESENCE} ]; then
+ if [ "$1" != "remove" ]; then
+ echo "==> Generating initial ramdisk for $(basename "$preset" .preset), using mkinitcpio. Please wait..."
+ mkinitcpio -p $(basename "$preset" .preset)
+ fi
+ fi
+ done
+
+ if [ "$1" == "remove" ] && [ ${#ZFSHOOKFILES[@]} -gt 0 ]; then
+ echo "==> zfs-dkms package has been removed but \"zfs\" is still in the hooks list of:"
+ for file in ${ZFSHOOKFILES[@]}; do
+ echo " -> ${file}"
+ done
+ echo "==> Remove \"zfs\" and generate a new initrd."
fi
}