From 20edf1937919932ae5f8a23dbe614bdcca35c61a Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 27 Jan 2016 16:39:44 -0500 Subject: sys-fs/zfs-0.6.5.3-r4: Regression fixes Fixes additional regressions in the code from the proposed stable API branch. Package-Manager: portage-2.2.24 Signed-off-by: Richard Yao --- sys-fs/zfs/Manifest | 1 + sys-fs/zfs/zfs-0.6.5.3-r4.ebuild | 230 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 sys-fs/zfs/zfs-0.6.5.3-r4.ebuild diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest index 7690f9c6af14..73a49e98dd9f 100644 --- a/sys-fs/zfs/Manifest +++ b/sys-fs/zfs/Manifest @@ -8,5 +8,6 @@ DIST zfs-0.6.4.2.tar.gz 1738601 SHA256 26af2924cbb891b79203a31827cba4cdc310162d5 DIST zfs-0.6.5.2.tar.gz 1817267 SHA256 aecd2bc5189f2a71a45eb222230146bed231af4f35af5ec7af83a74987c3d595 SHA512 7f0b20feca91d5ab952c1d49ae94d241f8868825b163a3d5f2ad0fd7adcac3ab246a3e6a755019a833be553fbbfd6609828d8123f49a43b42bf76cfd64f234ec WHIRLPOOL 00fd628ef2267366b6f0705e6436ac55b260aabc3588c7f58a7042dfbfe95a0478740b4579326638d28f10ffc8f2d5b3ed21b9f8297e72344ec439fe30310634 DIST zfs-0.6.5.3-patches-p0.tar.xz 63780 SHA256 cc6d2881304738619b9d00bc55fbd358119b35cbb345cae2ecf538051f1b7fe7 SHA512 4a531fd10d1d4d9c9cabaad9c13d8112eab3641249a7ce44599288bc4510b444d132833fae2fdf922eff43670ce77d32972c7b5b4a7d70f80c3365a0dcc89b70 WHIRLPOOL adc20e7917a518c790007499763210a4d27a164abe00a86f76d64f56f0fafc459f5d5c483019acacc136e41c57894e669fd58956b3f0ac0bcafeb1e02fec7988 DIST zfs-0.6.5.3-patches-p2.tar.xz 85996 SHA256 0e38b1bd7e2eb96c74b3eaab49c14f1f65fa02dc42b62b6015200185bfc911c7 SHA512 0a8fb131cc9a5a239a7434593000259a581b20ee7c6fef87ec2ea78281b7887151e219ebe66603b9dafaa4fa22cbf8c55175e1f6b36af4502c147c478f0b3e38 WHIRLPOOL 726bf1c05605943a205e2e70099c6cf8c7ba8cc9bbf34d45a2d56cea87c1e23166700979e47c82dd91bd1778e297dd211a0e6f48e0eab2392471218bcb5853ce +DIST zfs-0.6.5.3-patches-p3.tar.xz 88736 SHA256 031cd97765f890d9b78e1a5746cbd2a3ce06c7208693ec75c0b47324ac67b97a SHA512 8f17cc6e02a35828a57a7c2a437d9d18a41203b6e3f9e154b2ab863296b64596dc827afeeb0f993e37f47881d0f2ed4834f270d0ba843ab84b21c491cc352576 WHIRLPOOL 20f69c0a936bb612d5e3b551d4bf904aca3aff6d885d72f67f3b14cd720094ec13e383032ee4e322b0e81017d8ffcfafb47bf07f273badef34f7210d687ddacc DIST zfs-0.6.5.3.tar.gz 2524218 SHA256 49e6f9760ea172cb756f7357e4bcb90ee0293028540a68d62ed087724276131f SHA512 325cb91b7ddbcd6aa0bb9fc41eb0099dbb047a4e32d096fd414799729ef68cbc9c2e15714092eff8044a681af4ab552bd9ac1949cc673c6c5c3de1a23d9895ec WHIRLPOOL 957c3a75bb11befd4b74583883f2f11f717deb6bda368939b342049e809aa191a9ee8d1e709eaddc2a831418c7fdb5e763f918ff56d45f03baf4569ef8a4a070 DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19 diff --git a/sys-fs/zfs/zfs-0.6.5.3-r4.ebuild b/sys-fs/zfs/zfs-0.6.5.3-r4.ebuild new file mode 100644 index 000000000000..6a6be4aa12da --- /dev/null +++ b/sys-fs/zfs/zfs-0.6.5.3-r4.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) + +AT_M4DIR="config" +AUTOTOOLS_AUTORECONF="1" +AUTOTOOLS_IN_SOURCE_BUILD="1" + +if [ ${PV} == "9999" ] ; then + inherit git-r3 linux-mod + AUTOTOOLS_AUTORECONF="1" + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git" +else + SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz + https://dev.gentoo.org/~ryao/dist/${P}-patches-p3.tar.xz" + KEYWORDS="~amd64 ~arm ~ppc ~ppc64" +fi + +inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev + +DESCRIPTION="Userland utilities for ZFS Linux kernel module" +HOMEPAGE="http://zfsonlinux.org/" + +LICENSE="BSD-2 CDDL MIT" +SLOT="0" +IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs" +RESTRICT="test" + +COMMON_DEPEND=" + sys-apps/util-linux[static-libs?] + sys-libs/zlib[static-libs(+)?] + virtual/awk +" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig +" + +RDEPEND="${COMMON_DEPEND} + !=sys-apps/grep-2.13* + !kernel-builtin? ( + =sys-fs/zfs-kmod-${PV}* + !=sys-fs/udev-init-scripts-28 +" + +AT_M4DIR="config" +AUTOTOOLS_IN_SOURCE_BUILD="1" + +pkg_setup() { + if use kernel_linux && use test-suite; then + linux-info_pkg_setup + if ! linux_config_exists; then + ewarn "Cannot check the linux kernel configuration." + else + # recheck that we don't have usblp to collide with libusb + if use test-suite; then + if linux_chkconfig_present BLK_DEV_LOOP; then + eerror "The ZFS test suite requires loop device support enabled." + eerror "Please enable it:" + eerror " CONFIG_BLK_DEV_LOOP=y" + eerror "in /usr/src/linux/.config or" + eerror " Device Drivers --->" + eerror " Block devices --->" + eerror " [ ] Loopback device support" + fi + fi + fi + fi + +} + +src_prepare() { + if [ ${PV} != "9999" ] + then + # Apply patch set + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + epatch "${WORKDIR}/${P}-patches" + fi + + # Update paths + sed -e "s|/sbin/lsmod|/bin/lsmod|" \ + -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \ + -e "s|/sbin/parted|/usr/sbin/parted|" \ + -i scripts/common.sh.in + + autotools-utils_src_prepare +} + +src_configure() { + use custom-cflags || strip-flags + local myeconfargs=( + --bindir="${EPREFIX}/bin" + --sbindir="${EPREFIX}/sbin" + --with-config=user + --with-dracutdir="/usr/$(get_libdir)/dracut" + --with-linux="${KV_DIR}" + --with-linux-obj="${KV_OUT_DIR}" + --with-udevdir="$(get_udevdir)" + --with-blkid + $(use_enable debug) + ) + autotools-utils_src_configure + + # prepare systemd unit and helper script + cat "${FILESDIR}/zfs.service.in" | \ + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \ + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \ + > "${T}/zfs.service" || die + cat "${FILESDIR}/zfs-init.sh.in" | \ + sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \ + -e "s:@sysconfdir@:${EPREFIX}/etc:g" \ + > "${T}/zfs-init.sh" || die +} + +src_install() { + autotools-utils_src_install + gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core + use test-suite || rm -rf "${ED}usr/share/zfs" + + newbashcomp "${FILESDIR}/bash-completion-r1" zfs + bashcomp_alias zfs zpool + + exeinto /usr/libexec + doexe "${T}/zfs-init.sh" + systemd_dounit "${T}/zfs.service" +} + +pkg_postinst() { + if ! use kernel-builtin && [ ${PV} = "9999" ] + then + einfo "Adding ${P} to the module database to ensure that the" + einfo "kernel modules and userland utilities stay in sync." + update_moduledb + fi + + if [ -e "${EROOT}etc/runlevels/boot/zfs" ] + then + einfo 'The zfs boot script has been split into the zfs-import,' + einfo 'zfs-mount and zfs-share scripts.' + einfo + einfo 'You had the zfs script in your boot runlevel. For your' + einfo 'convenience, it has been automatically removed and the three' + einfo 'scripts that replace it have been configured to start.' + einfo 'The zfs-import and zfs-mount scripts have been added to the boot' + einfo 'runlevel while the zfs-share script is in the default runlevel.' + + rm "${EROOT}etc/runlevels/boot/zfs" + ln -snf "${EROOT}etc/init.d/zfs-import" \ + "${EROOT}etc/runlevels/boot/zfs-import" + ln -snf "${EROOT}etc/init.d/zfs-mount" \ + "${EROOT}etc/runlevels/boot/zfs-mount" + ln -snf "${EROOT}etc/init.d/zfs-share" \ + "${EROOT}etc/runlevels/default/zfs-share" + else + [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \ + einfo "You should add zfs-import to the boot runlevel." + [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \ + einfo "You should add zfs-mount to the boot runlevel." + [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \ + einfo "You should add zfs-share to the default runlevel." + fi + + if [ -e "${EROOT}etc/runlevels/default/zed" ] + then + einfo 'The downstream OpenRC zed script has replaced by the upstream' + einfo 'OpenRC zfs-zed script.' + einfo + einfo 'You had the zed script in your default runlevel. For your' + einfo 'convenience, it has been automatically removed and the zfs-zed' + einfo 'script that replaced it has been configured to start.' + + rm "${EROOT}etc/runlevels/boot/zed" + ln -snf "${EROOT}etc/init.d/zfs-sed" \ + "${EROOT}etc/runlevels/default/zfs-zed" + else + [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \ + einfo "You should add zfs-zed to the default runlevel." + fi + + if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ] + then + einfo "The zfs-shutdown script is obsolete. Removing it from runlevel." + rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown" + fi + + einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and " + einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable " + einfo "/dev/zfs API developed by ClusterHQ. This means that situations " + einfo "arising from the kernel modules and userland tools being " + einfo "mismatched on future updates will not cause problems." + einfo + einfo "In specific, this should solve the failure to mount filesystems when " + einfo "old modules are cached in an old initramfs provided that those " + einfo "modules support this API" + if use rootfs + then + einfo + ewarn "The older modules will *NOT* work with the new userland code." + ewarn "It is very important that you update your initramfs after this " + ewarn "update." + fi +} + +pkg_postrm() { + if ! use kernel-builtin && [ ${PV} = "9999" ] + then + remove_moduledb + fi +} -- cgit v1.2.3-65-gdbad