diff --git a/Makefile b/Makefile index 6bae9b0..563b51c 100644 --- a/Makefile +++ b/Makefile @@ -3,51 +3,55 @@ RELEASE=3.3 # source form https://github.com/zfsonlinux/ ZFSVER=0.6.3-1.2 +PKGREL=1~wheezy +PKGVER=0.6.3-${PKGREL} SPLDIR=spl-spl-${ZFSVER} SPLSRC=spl-${ZFSVER}.tar.gz ZFSDIR=zfs-zfs-${ZFSVER} ZFSSRC=zfs-${ZFSVER}.tar.gz -TOP=$(shell pwd) -KERNEL_3.10.0_HDR=/usr/src/linux-headers-3.10.0-6-pve/ -KERNEL_2.6.32_HDR=/usr/src/linux-headers-2.6.32-35-pve/ -KERNEL_3.10.0_SRC=${TOP}/../pve-kernel-3.10.0/linux-2.6-3.10.0/ -KERNEL_2.6.32_SRC=${TOP}/../pve-kernel-2.6.32/linux-2.6-2.6.32 +#TOP=$(shell pwd) +#KERNEL_3.10.0_HDR=/usr/src/linux-headers-3.10.0-6-pve/ +#KERNEL_2.6.32_HDR=/usr/src/linux-headers-2.6.32-35-pve/ +#KERNEL_3.10.0_SRC=${TOP}/../pve-kernel-3.10.0/linux-2.6-3.10.0/ +#KERNEL_2.6.32_SRC=${TOP}/../pve-kernel-2.6.32/linux-2.6-2.6.32 -SPL_UTILS_DEBS= \ -${SPLDIR}_utils/spl_0.6.3-1.2_amd64.deb +SPL_DEBS= \ +spl_${PKGVER}_amd64.deb \ +spl-dkms_${PKGVER}_all.deb -SPL_2.6.32_DEBS= \ -${SPLDIR}_2.6.32/kmod-spl-devel_0.6.3-1.2_amd64.deb \ -${SPLDIR}_2.6.32/kmod-spl-2.6.32-35-pve_0.6.3-1.2_amd64.deb \ -${SPLDIR}_2.6.32/kmod-spl-devel-2.6.32-35-pve_0.6.3-1.2_amd64.deb +#SPL_2.6.32_DEBS= \ +#${SPLDIR}_2.6.32/kmod-spl-devel_0.6.3-1.2_amd64.deb \ +#${SPLDIR}_2.6.32/kmod-spl-2.6.32-35-pve_0.6.3-1.2_amd64.deb \ +#${SPLDIR}_2.6.32/kmod-spl-devel-2.6.32-35-pve_0.6.3-1.2_amd64.deb -SPL_3.10.0_DEBS= \ -${SPLDIR}_3.10.0/kmod-spl-3.10.0-6-pve_0.6.3-1.2_amd64.deb \ -${SPLDIR}_3.10.0/kmod-spl-devel-3.10.0-6-pve_0.6.3-1.2_amd64.deb +#SPL_3.10.0_DEBS= \ +#${SPLDIR}_3.10.0/kmod-spl-3.10.0-6-pve_0.6.3-1.2_amd64.deb \ +#${SPLDIR}_3.10.0/kmod-spl-devel-3.10.0-6-pve_0.6.3-1.2_amd64.deb -ZFS_UTILS_DEBS= \ -${ZFSDIR}_utils/libnvpair1_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/libuutil1_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/libzfs2_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/libzfs2-devel_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/libzpool2_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/zfs_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/zfs-dracut_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_utils/zfs-test_0.6.3-1.2_amd64.deb +ZFS_DEBS= \ +libnvpair1_0.6.3-1~wheezy_amd64.deb \ +libuutil1_0.6.3-1~wheezy_amd64.deb \ +libzfs2_0.6.3-1~wheezy_amd64.deb \ +libzfs-dev_0.6.3-1~wheezy_amd64.deb \ +libzpool2_0.6.3-1~wheezy_amd64.deb \ +zfs-dkms_0.6.3-1~wheezy_amd64.deb \ +zfs-doc_0.6.3-1~wheezy_amd64.deb \ +zfs-initramfs_0.6.3-1~wheezy_amd64.deb \ +zfsutils_0.6.3-1~wheezy_amd64.deb -ZFS_2.6.32_DEBS= \ -${ZFSDIR}_2.6.32/kmod-zfs-2.6.32-35-pve_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_2.6.32/kmod-zfs-devel_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_2.6.32/kmod-zfs-devel-2.6.32-35-pve_0.6.3-1.2_amd64.deb +#ZFS_2.6.32_DEBS= \ +#${ZFSDIR}_2.6.32/kmod-zfs-2.6.32-35-pve_0.6.3-1.2_amd64.deb \ +#${ZFSDIR}_2.6.32/kmod-zfs-devel_0.6.3-1.2_amd64.deb \ +#${ZFSDIR}_2.6.32/kmod-zfs-devel-2.6.32-35-pve_0.6.3-1.2_amd64.deb -ZFS_3.10.0_DEBS= \ -${ZFSDIR}_3.10.0/kmod-zfs-3.10.0-6-pve_0.6.3-1.2_amd64.deb \ -${ZFSDIR}_3.10.0/kmod-zfs-devel-3.10.0-6-pve_0.6.3-1.2_amd64.deb +#ZFS_3.10.0_DEBS= \ +#${ZFSDIR}_3.10.0/kmod-zfs-3.10.0-6-pve_0.6.3-1.2_amd64.deb \ +#${ZFSDIR}_3.10.0/kmod-zfs-devel-3.10.0-6-pve_0.6.3-1.2_amd64.deb -DEBS=${SPL_UTILS_DEBS} ${SPL_2.6.32_DEBS} ${SPL_3.10.0_DEBS} ${ZFS_UTILS_DEBS} ${ZFS_2.6.32_DEBS} ${ZFS_3.10.0_DEBS} +DEBS=${SPL_DEBS} ${ZFS_DEBS} all: ${DEBS} @@ -56,70 +60,44 @@ dinstall: ${DEBS} dpkg -i ${DEBS} .PHONY: spl_utils -spl_utils ${SPL_UTILS_DEBS}: ${SPLSRC} +spl_utils ${SPL_DEBS}: ${SPLSRC} rm -rf ${SPLDIR} tar xf ${SPLSRC} - mv ${SPLDIR} ${SPLDIR}_utils - cd ${SPLDIR}_utils; ./autogen.sh - cd ${SPLDIR}_utils; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} - cd ${SPLDIR}_utils; make deb-utils + cp -a spl-debian-pve ${SPLDIR}/debian + cd ${SPLDIR}; dpkg-buildpackage -b -uc -us -.PHONY: spl_kmod_2.6.32 -spl_kmod_2.6.32 ${SPL_2.6.32_DEBS}: ${SPLSRC} - rm -rf ${SPLDIR} - tar xf ${SPLSRC} - mv ${SPLDIR} ${SPLDIR}_2.6.32 - cd ${SPLDIR}_2.6.32; ./autogen.sh - cd ${SPLDIR}_2.6.32; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} - cd ${SPLDIR}_2.6.32; make deb-kmod - -.PHONY: spl_kmod_3.10.0 -spl_kmod_3.10.0 ${SPL_3.10.0_DEBS}: ${SPLSRC} - rm -rf ${SPLDIR} - tar xf ${SPLSRC} - mv ${SPLDIR} ${SPLDIR}_3.10.0 - cd ${SPLDIR}_3.10.0; ./autogen.sh - cd ${SPLDIR}_3.10.0; ./configure --with-linux=${KERNEL_3.10.0_HDR} --with-linux-obj=${KERNEL_3.10.0_SRC} - cd ${SPLDIR}_3.10.0; make deb-kmod +#.PHONY: spl_kmod_2.6.32 +#spl_kmod_2.6.32 ${SPL_2.6.32_DEBS}: ${SPLSRC} +# rm -rf ${SPLDIR} +# tar xf ${SPLSRC} +# mv ${SPLDIR} ${SPLDIR}_2.6.32 +# cd ${SPLDIR}_2.6.32; ./autogen.sh +# cd ${SPLDIR}_2.6.32; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} +# cd ${SPLDIR}_2.6.32; make deb-kmod .PHONY: zfs_utils -zfs_utils ${ZFS_UTILS_DEBS}: ${ZFSSRC} - rm -rf ${ZFSDIR} ${ZFSDIR}_utils +zfs_utils ${ZFS_DEBS}: ${ZFSSRC} + rm -rf ${ZFSDIR} tar xf ${ZFSSRC} - mv ${ZFSDIR} ${ZFSDIR}_utils - cd ${ZFSDIR}_utils; ./autogen.sh - cd ${ZFSDIR}_utils; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} - cd ${ZFSDIR}_utils; make deb-utils + cp -a zfs-debian-pve ${ZFSDIR}/debian + cd ${ZFSDIR}; dpkg-buildpackage -b -uc -us -# Note: install mod-spl-devel-* first -.PHONY: zfs_kmod_2.6.32 -zfs_kmod_2.6.32 ${ZFS_2.6.32_DEBS}: ${ZFSSRC} - rm -rf ${ZFSDIR} ${ZFSDIR}_2.6.32 - tar xf ${ZFSSRC} - mv ${ZFSDIR} ${ZFSDIR}_2.6.32 - cd ${ZFSDIR}_2.6.32; ./autogen.sh - cd ${ZFSDIR}_2.6.32; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} - cd ${ZFSDIR}_2.6.32; make deb-kmod - -# Note: install mod-spl-devel-* first -.PHONY: zfs_kmod_3.10.0 -zfs_kmod_3.10.0 ${ZFS_3.10.0_DEBS}: ${ZFSSRC} - rm -rf ${ZFSDIR} ${ZFSDIR}_3.10.0 - tar xf ${ZFSSRC} - mv ${ZFSDIR} ${ZFSDIR}_3.10.0 - cd ${ZFSDIR}_3.10.0; ./autogen.sh - cd ${ZFSDIR}_3.10.0; ./configure --with-linux=${KERNEL_3.10.0_HDR} --with-linux-obj=${KERNEL_3.10.0_SRC} - cd ${ZFSDIR}_3.10.0; make deb-kmod +## Note: install mod-spl-devel-* first +#.PHONY: zfs_kmod_2.6.32 +#zfs_kmod_2.6.32 ${ZFS_2.6.32_DEBS}: ${ZFSSRC} +# rm -rf ${ZFSDIR} ${ZFSDIR}_2.6.32 +# tar xf ${ZFSSRC} +# mv ${ZFSDIR} ${ZFSDIR}_2.6.32 +# cd ${ZFSDIR}_2.6.32; ./autogen.sh +# cd ${ZFSDIR}_2.6.32; ./configure --with-linux=${KERNEL_2.6.32_HDR} --with-linux-obj=${KERNEL_2.6.32_SRC} +# cd ${ZFSDIR}_2.6.32; make deb-kmod .PHONY: download download: - git clone https://github.com/zfsonlinux/pkg-spl.git + #git clone https://github.com/zfsonlinux/pkg-spl.git #git clone https://github.com/zfsonlinux/pkg-zfs.git - #cd pkg-zfs; git checkout upstream - #cd pkg-zfs; git checkout master/ubuntu/precise - #git checkout master/debian/wheezy - #git merge upstream - dsaf + ##git checkout master/ubuntu/precise + ##git checkout master/debian/wheezy rm spl-*.tar.gz rm zfs-*.tar.gz wget https://github.com/zfsonlinux/spl/archive/${SPLSRC} @@ -127,7 +105,7 @@ download: .PHONY: clean clean: - rm -rf *~ *.deb *.changes ${ZFSDIR} ${ZFSDIR}_utils ${ZFSDIR}_2.6.32 ${ZFSDIR}_3.10.0 ${SPLDIR} ${SPLDIR}_utils ${SPLDIR}_2.6.32 ${SPLDIR}_3.10.0 + rm -rf *~ *.deb *.changes ${ZFSDIR} ${SPLDIR} .PHONY: distclean distclean: clean @@ -142,12 +120,9 @@ upload: ${DEBS} rm -f /pve/${RELEASE}/extra/libnvpair1_*.deb rm -f /pve/${RELEASE}/extra/libuutil1_*.deb rm -f /pve/${RELEASE}/extra/libzfs2_*.deb - rm -f /pve/${RELEASE}/extra/libzfs2-devel_*.deb + rm -f /pve/${RELEASE}/extra/libzfs2-dbg_*.deb rm -f /pve/${RELEASE}/extra/libzpool2_*.deb rm -f /pve/${RELEASE}/extra/zfs_*.deb - rm -f /pve/${RELEASE}/extra/zfs-dracut_*.deb - rm -f /pve/${RELEASE}/extra/zfs-test_*.deb - rm -f /pve/${RELEASE}/extra/kmod-zfs-*.deb rm -f /pve/${RELEASE}/extra/Packages* cp ${DEBS} /pve/${RELEASE}/extra cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz diff --git a/zfs-debian-pve/changelog b/zfs-debian-pve/changelog new file mode 100644 index 0000000..ab13bde --- /dev/null +++ b/zfs-debian-pve/changelog @@ -0,0 +1,6 @@ +zfs-linux (0.6.3-1~wheezy) unstable; urgency=low + + * first version for Proxmox VE + + -- Proxmox Support Team Sat, 10 Jan 2015 14:06:34 +0100 + diff --git a/zfs-debian-pve/compat b/zfs-debian-pve/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/zfs-debian-pve/compat @@ -0,0 +1 @@ +7 diff --git a/zfs-debian-pve/control b/zfs-debian-pve/control new file mode 100644 index 0000000..fc0ab87 --- /dev/null +++ b/zfs-debian-pve/control @@ -0,0 +1,179 @@ +Source: zfs-linux +Section: kernel +Priority: extra +Maintainer: Proxmox Support Team +Build-Depends: autotools-dev, + autoconf, + autogen, + automake, + debhelper (>= 8), + dh-autoreconf, + dkms (>= 2.2.0.2), + libselinux1-dev, + libtool, + uuid-dev, + zlib1g-dev, +Standards-Version: 3.9.5 + +Package: libnvpair1 +Section: libs +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: libnvpair0 +Description: Solaris name-value library for Linux + This library provides routines for packing and unpacking nv pairs for + transporting data across process boundaries, transporting between + kernel and userland, and possibly saving onto disk files. + +Package: libnvpair1-dbg +Section: debug +Architecture: linux-any +Depends: ${misc:Depends}, libnvpair1 (= ${binary:Version}) +Replaces: libnvpair0-dbg +Description: Debugging symbols for libnvpair1 + This library provides routines for packing and unpacking nv pairs for + transporting data across process boundaries, transporting between + kernel and userland, and possibly saving onto disk files. + . + This package contains the debugging symbols for libnvpair1. + +Package: libuutil1 +Section: libs +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: libuutil0 +Description: Solaris userland utility library for Linux + This library provides a variety of glue functions for OpenZFS on Linux: + * libspl: The Solaris Porting Layer library, which provides APIs that make it + possible to run Solaris user code in a Linux environment with relatively + minimal modification. + * libavl: The Adelson-Velskii Landis balanced binary tree manipulation + library. + * libefi: The Extensible Firmware Interface library for GUID disk + partitioning. + * libshare: NFS and SMB service integration for OpenZFS. + +Package: libuutil1-dbg +Section: debug +Architecture: linux-any +Depends: ${misc:Depends}, libuutil1 (= ${binary:Version}) +Replaces: libuutil0-dbg +Description: Debugging symbols for libuutil1 + This library provides a variety of glue functions for OpenZFS on Linux: + * libspl: The Solaris Porting Layer library, which provides APIs that make it + possible to run Solaris user code in a Linux environment with relatively + minimal modification. + * libavl: The Adelson-Velskii Landis balanced binary tree manipulation + library. + * libefi: The Extensible Firmware Interface library for GUID disk + partitioning. + * libshare: NFS and SMB service integration for OpenZFS. + . + This package contains debugging symbols for libuutil1. + +Package: libzfs-dev +Section: libdevel +Architecture: linux-any +Depends: ${misc:Depends}, libzfs2 (= ${binary:Version}) +Provides: libnvpair-dev, libuutil-dev +Replaces: libefi1, + libnvpair1, + libshare1, + libspl1, + libunicode1, + libuutil1, + libzavl1, + libzfs2, + libzpool2, +Description: Native OpenZFS filesystem development files for Linux + Header files and static libraries for compiling software + against libzfs. + +Package: libzfs2 +Section: libs +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: libzfs0, libzfs1 +Description: Native OpenZFS filesystem library for Linux + The ZoL management library. + +Package: libzfs2-dbg +Section: debug +Architecture: linux-any +Depends: ${misc:Depends}, libzfs2 (= ${binary:Version}) +Replaces: libzfs0-dbg, libzfs1-dbg +Description: Debugging symbols for libzfs2 + The ZoL management library. + . + This package contains the debugging symbols for libzfs2. + +Package: libzpool2 +Section: libs +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Replaces: libzpool0, libzpool1 +Description: Native OpenZFS pool library for Linux + The zpool management library. + +Package: libzpool2-dbg +Section: debug +Architecture: linux-any +Depends: ${misc:Depends}, libzpool2 (= ${binary:Version}) +Replaces: libzpool0-dbg, libzpool1-dbg +Description: Debugging symbols for libzpool2 + The zpool management library. + . + This package contains the debugging symbols for libzpool2. + +Package: zfs-dkms +Section: kernel +Architecture: linux-any +Pre-Depends: spl-dkms (>= ${source:Upstream-Version}) +Depends: ${misc:Depends}, dkms (>= 2.2.0.2) +Replaces: lzfs, lzfs-dkms +Provides: lustre-backend-fs, lzfs, lzfs-dkms +Conflicts: lzfs, lzfs-dkms +Description: Native OpenZFS filesystem kernel modules for Linux + An advanced integrated volume manager and filesystem that is designed for + performance and data integrity. Snapshots, clones, checksums, deduplication, + compression, and RAID redundancy are built-in features. + . + Includes the SPA, DMU, ZVOL, and ZPL components of OpenZFS. + +Package: zfs-doc +Section: doc +Architecture: linux-any +Depends: ${misc:Depends} +Description: Native OpenZFS filesystem documentation and examples. + Shared boilerplate files for OpenZFS on Linux that are not required at runtime. + +Package: zfs-initramfs +Section: kernel +Architecture: linux-any +Depends: ${misc:Depends}, zfsutils +Description: Native OpenZFS root filesystem capabilities for Linux + This package adds OpenZFS to the system initramfs with a hook + for the initramfs-tools infrastructure. + +Package: zfsutils +Section: admin +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Recommends: zfs-dkms +Suggests: samba-common-bin (>= 3.0.23), nfs-kernel-server, zfs-initramfs +Conflicts: zfs, zfs-fuse +Replaces: zfs +Description: Native OpenZFS management utilities for Linux + This package provides the zpool and zfs commands that are used to + manage OpenZFS filesystems. + +Package: zfsutils-dbg +Section: debug +Architecture: linux-any +Depends: ${misc:Depends}, zfsutils (= ${binary:Version}) +Replaces: zfs-dbg +Description: Debugging symbols for zfsutils + This package provides the zpool and zfs commands that are used to + manage OpenZFS filesystems. + . + This package contains the debugging symbols for zfsutils. diff --git a/zfs-debian-pve/copyright b/zfs-debian-pve/copyright new file mode 100644 index 0000000..20b7b33 --- /dev/null +++ b/zfs-debian-pve/copyright @@ -0,0 +1,1629 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Native OpenZFS for Linux +Upstream-Contact: Brian Behlendorf +Source: https://github.com/zfsonlinux/zfs/ +Comment: + This work was produced at the Lawrence Livermore National Laboratory + (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between + the U.S. Department of Energy (DOE) and Lawrence Livermore National + Security, LLC (LLNS) for the operation of LLNL. + . + This work was prepared as an account of work sponsored by an agency of + the United States Government. Neither the United States Government nor + Lawrence Livermore National Security, LLC nor any of their employees, + makes any warranty, express or implied, or assumes any liability or + responsibility for the accuracy, completeness, or usefulness of any + information, apparatus, product, or process disclosed, or represents + that its use would not infringe privately-owned rights. + . + Reference herein to any specific commercial products, process, or + services by trade name, trademark, manufacturer or otherwise does + not necessarily constitute or imply its endorsement, recommendation, + or favoring by the United States Government or Lawrence Livermore + National Security, LLC. The views and opinions of authors expressed + herein do not necessarily state or reflect those of the Untied States + Government or Lawrence Livermore National Security, LLC, and shall + not be used for advertising or product endorsement purposes. +License: CDDL-1.0 + +Files: * +Copyright: Lawrence Livermore National Security, LLC. +License: CDDL-1.0 + +Files: cmd/mount_zfs/* +Copyright: Oracle + Lawrence Livermore National Security, LLC. +License: CDDL-1.0 + +Files: cmd/zdb/* +Copyright: Oracle + Sun Microssystems, Inc. +License: CDDL-1.0 + +Files: cmd/zdb/zdb_il.c +Copyright: Sun Microsystems, Inc. + Cyril Plisko +License: CDDL-1.0 + +Files: cmd/zfs/zfs_iter.c +Copyright: Oracle + Pawel Jakub Dawidek +License: CDDL-1.0 + +Files: cmd/zfs/zfs_iter.h +Copyright: Sun Microssystems, Inc. +License: CDDL-1.0 + +Files: cmd/zfs/zfs_main.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: cmd/zfs/zfs_util.? +Copyright: Oracle +License: CDDL-1.0 + +Files: cmd/zinject/* +Copyright: Oracle +License: CDDL-1.0 + +Files: cmd/zpios/* +Copyright: Cluster Filesystems, Inc. + Lawrence Livermore National Security, LLC. +License: GPL-2+ + +Files: cmd/zpool/zpool_iter.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: cmd/zpool/zpool_main.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix + Frederik Wessels +License: CDDL-1.0 + +Files: cmd/zpool/zpool_util.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: cmd/zpool/zpool_util.h +Copyright: Oracle +License: CDDL-1.0 + +Files: cmd/zpool/zpool_vdev.c +Copyright: Oracle +License: CDDL-1.0 + +Files: cmd/zstreamdump/zstreamdump.c +Copyright: Sun Microsystems, Inc. + Martin Matuska +License: CDDL-1.0 + +Files: cmd/ztest/ztest.c +Copyright: Oracle + Delphix + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: cmd/zvol_id/* +Copyright: Fajar A. Nugraha. +License: CDDL-1.0 + +Files: debian/* +Copyright: Darik Horn +License: GPL-2+ +Comment: + On Debian systems, the full text of the GNU General Public License + version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. + . + The source for the debian packaging can be found at: + https://github.com/zfsonlinux/pkg-zfs/ + +Files: debian/tree/zfsutils/etc/bash_completion.d/zfs +Copyright: 2013, Aneurin Price +License: Expat + +Files: etc/init.d/zfs.gentoo.in +Copyright: Gentoo Foundation +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: include/libnvpair.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/libuutil_common.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/libuutil.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/libuutil_impl.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/libzfs.h +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: include/libzfs_impl.h +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: include/sys/arc.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/bplist.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/bpobj.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/dbuf.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/ddt.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/dmu.h +Copyright: Oracle + Delphix + Robert Milkowski +License: CDDL-1.0 + +Files: include/sys/dmu_impl.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/dmu_objset.h +Copyright: Oracle + Robert Milkowski +License: CDDL-1.0 + +Files: include/sys/dmu_traverse.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/dmu_tx.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/dmu_zfetch.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/dnode.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/dsl_* +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/dsl_dataset.h +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: include/sys/dsl_deleg.h +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: include/sys/efi_partition.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/fm/fs/zfs.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/fm/protocol.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/fm/util.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/fs/zfs.h +Copyright: Oracle + Delphix + Nexenta Systems, Inc. + Robert Milkowski +License: CDDL-1.0 + +Files: include/sys/metaslab.h +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: include/sys/metaslab_impl.h +Copyright: Sun Microsystems, Inc. + Delphix +License: CDDL-1.0 + +Files: include/sys/nvpair.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/nvpair_impl.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/refcount.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/rrwlock.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/sa.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/sa_impl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/spa_boot.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/space_map.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/spa.h +Copyright: Oracle + Delphix + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: include/sys/spa_impl.h +Copyright: Oracle + Delphix + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: include/sys/txg.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/txg_impl.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/u8_textprep_data.h +Copyright: Unicode, Inc. + Sun Microsystems, Inc. +License: Expat~Unicode + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation (the + "Data Files") or Unicode software and any associated documentation (the + "Software") to deal in the Data Files or Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, and/or sell copies of the Data Files or Software, and + to permit persons to whom the Data Files or Software are furnished to do so, + provided that (a) the above copyright notice(s) and this permission notice + appear with all copies of the Data Files or Software, (b) both the above + copyright notice(s) and this permission notice appear in associated + documentation, and (c) there is clear notice in each modified Data File or + in the Software as well as in the documentation associated with the Data + File(s) or Software that the data or software has been modified. + . + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + OF THE DATA FILES OR SOFTWARE. + . + Except as contained in this notice, the name of a copyright holder shall not + be used in advertising or otherwise to promote the sale, use or other + dealings in these Data Files or Software without prior written authorization + of the copyright holder. + . + Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be + registered in some jurisdictions. All other trademarks and registered + trademarks mentioned herein are the property of their respective owners. + +Files: include/sys/u8_textprep.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/uberblock.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/uberblock_impl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/uio_impl.h +Copyright: Sun Microsystems, Inc. + AT&T + The Regents of the University of California +License: CDDL-1.0 + +Files: include/sys/unique.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/vdev_file.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/vdev.h +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: include/sys/vdev_impl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/xvattr.h +Copyright: AT&T + Oracle + The Regents of the University of California +License: CDDL-1.0 + +Files: include/sys/zap.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zap_impl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zap_leaf.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_acl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_context.h +Copyright: Sun Microsystems, Inc. + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: include/sys/zfs_ctldir.h +Copyright: Oracle + Lawrence Livermore National Security, LLC. +License: CDDL-1.0 + +Files: include/sys/zfs_debug.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_dir.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zfs_fuid.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zfs_ioctl.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_onexit.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_rlock.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zfs_sa.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zfs_stat.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_vfsops.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_vnops.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zfs_znode.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zil.h +Copyright: Oracle + Robert Milkowski +License: CDDL-1.0 + +Files: include/sys/zil_impl.h +Copyright: Oracle + Robert Milkowski +License: CDDL-1.0 + +Files: include/sys/zio_checksum.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zio_compress.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zio.h +Copyright: Oracle + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: include/sys/zio_impl.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/sys/zrlock.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/sys/zvol.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/zfs_comutil.h +Copyright: Oracle +License: CDDL-1.0 + +Files: include/zfs_deleg.h +Copyright: Oracle + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: include/zfs_fletcher.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/zfs_namecheck.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/zfs_prop.h +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: include/zpios-ctl.h +Copyright: Cluster File Systems, Inc. + Lawrence Livermore National Security, LLC. +License: GPL-2+ + +Files: include/zpios-internal.h +Copyright: Cluster File Systems, Inc. + Lawrence Livermore National Security, LLC. +License: GPL-2+ + +Files: lib/libefi/rdwr_efi.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libnvpair/libnvpair.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libnvpair/nvpair_alloc_system.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libshare/libshare.c +Copyright: Oracle + Gunnar Beutner +License: CDDL-1.0 + +Files: lib/libshare/libshare_impl.h +Copyright: Oracle + Gunnar Beutner +License: CDDL-1.0 + +Files: lib/libshare/nfs.c +Copyright: Oracle + Gunnar Beutner + Cyril Plisko +License: CDDL-1.0 + +Files: lib/libshare/nfs.h +Copyright: Oracle + Gunnar Beutner +License: CDDL-1.0 + +Files: lib/libspl/asm-generic/atomic.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/asm-i386/atomic.S +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/asm-x86_64/atomic.S +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/getexecname.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/gethrestime.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/getmntany.c +Copyright: Sun Microsystems, Inc. + Ricardo Correia + AT&T +License: CDDL-1.0 + +Files: lib/libspl/include/* +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/include/byteorder.h +Copyright: Sun Microsystems, Inc. + AT&T + The Regents of the University of California +License: CDDL-1.0 + +Files: lib/libspl/include/sys/dktp/fdisk.h +Copyright: Sun Microsystems, Inc. + AT&T +License: CDDL-1.0 + +Files: lib/libspl/include/sys/mntent.h +Copyright: Sun Microsystems, Inc. + AT&T +License: CDDL-1.0 + +Files: lib/libspl/include/sys/mnttab.h +Copyright: Sun Microsystems, Inc. + Ricardo Correia + AT&T +License: CDDL-1.0 + +Files: lib/libspl/include/sys/stat.h +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libspl/include/sys/sysevent/eventdefs.h +Copyright: Sun Microsystems, Inc. + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/include/sys/uio.h +Copyright: Sun Microsystems, Inc. + AT&T + The Regents of the University of California +License: CDDL-1.0 + +Files: lib/libspl/include/sys/vtoc.h +Copyright: Sun Microsystems, Inc. + AT&T +License: CDDL-1.0 + +Files: lib/libspl/list.c +Copyright: 2008 Sun Microsystems, Inc. All rights reserved. +License: CDDL-1.0 + +Files: lib/libspl/mkdirp.c +Copyright: Sun Microsystems, Inc. + AT&T +License: CDDL-1.0 + +Files: lib/libspl/strlcat.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/strlcpy.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/strnlen.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/timestamp.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libspl/xdr.c +Copyright: Sun Microsystems, Inc. + AT&T +License: CDDL-1.0 + +Files: lib/libspl/zone.c +Copyright: 2006 Ricardo Correia +License: CDDL-1.0 + +Files: lib/libuutil/uu_alloc.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libuutil/uu_avl.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_dprintf.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_ident.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_list.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_misc.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libuutil/uu_open.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_pname.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libuutil/uu_string.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libuutil/uu_strtoint.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_changelist.c +Copyright: Sun Microsystems, Inc. + Ramprakash Jelari +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_config.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_dataset.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix + DEY Storage Systems, Inc. + Pawel Jakub Dawidek +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_diff.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_fru.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_graph.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_import.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_iter.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_mount.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_pool.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_sendrecv.c +Copyright: Oracle + Delphix + Pawel Jakub Dawidek +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_status.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libzfs/libzfs_util.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: lib/libzpool/kernel.c +Copyright: Oracle +License: CDDL-1.0 + +Files: lib/libzpool/taskq.c +Copyright: Sun Microsystems, Inc. + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: lib/libzpool/util.c +Copyright: Oracle +License: CDDL-1.0 + +Files: man/man8/zdb.8 +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: man/man8/zfs.8 +Copyright: Sun Microsystems, Inc. + Delphix + Nexenta Systems, Inc. + Joshua M. Clulow +License: CDDL-1.0 + +Files: man/man8/zpool.8 +Copyright: Sun Microsystems, Inc. + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: man/man8/zstreamdump.8 +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/avl/avl.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/nvpair/nvpair_alloc_fixed.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/nvpair/nvpair_alloc_spl.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/nvpair/nvpair.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/unicode/u8_textprep.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/unicode/uconv.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zcommon/zfs_comutil.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zcommon/zfs_deleg.c +Copyright: Oracle + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: module/zcommon/zfs_fletcher.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zcommon/zfs_namecheck.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zcommon/zfs_prop.c +Copyright: Oracle + Delphix + Robert Milkowski +License: CDDL-1.0 + +Files: module/zcommon/zfs_uio.c +Copyright: Sun Microsystems, Inc. + AT&T + The Regents of the University of California +License: CDDL-1.0 + +Files: module/zcommon/zpool_prop.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zcommon/zprop_common.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/arc.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/bplist.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/bpobj.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/dbuf.c +Copyright: Oracle + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: module/zfs/ddt.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/ddt_zap.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dmu.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dmu_diff.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dmu_object.c +Copyright: Oracle + Robert Milkowski +License: CDDL-1.0 + +Files: module/zfs/dmu_send.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/dmu_traverse.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dmu_tx.c +Copyright: Oracle + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: module/zfs/dmu_zfetch.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/dnode.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dnode_sync.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dsl_dataset.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/dsl_deadlist.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/dsl_deleg.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/dsl_dir.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dsl_pool.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/dsl_prop.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dsl_scan.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/dsl_synctask.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/fm.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/gzip.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/lzjb.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/lz4.c +Copyright: 2011-2013, Yann Collet +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: module/zfs/metaslab.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/refcount.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/rrwlock.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/sa.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/sha256.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/spa_boot.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/spa.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/space_map.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/spa_config.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/spa_errlog.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/spa_history.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/spa_misc.c +Copyright: Oracle + Delphix + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: module/zfs/txg.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/uberblock.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/unique.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/vdev_cache.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/vdev.c +Copyright: Oracle + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/vdev_file.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/vdev_label.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/vdev_mirror.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/vdev_missing.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/vdev_queue.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/vdev_raidz.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/vdev_root.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zap.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zap_leaf.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zap_micro.c +Copyright: Oracle + Delphix +License: CDDL-1.0 + +Files: module/zfs/zfs_acl.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_byteswap.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zfs_ctldir.c +Copyright: Oracle + Lawrence Livermore National Security, LLC. +License: CDDL-1.0 + +Files: module/zfs/zfs_debug.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_dir.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_fm.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zfs_fuid.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_ioctl.c +Copyright: Oracle + Martin Matuska + Pawel Jakub Dawidek + Joyent, Inc. + Nexenta Systems, Inc. + Delphix +License: CDDL-1.0 + +Files: module/zfs/zfs_log.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_onexit.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_replay.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_rlock.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zfs_sa.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zfs_vfsops.c +Copyright: Oracle + Robert Milkowski +License: CDDL-1.0 + +Files: module/zfs/zfs_vnops.c +Copyright: Oracle + Jeremy Teo + Robert Milkowski +License: CDDL-1.0 + +Files: module/zfs/zfs_znode.c +Copyright: Oracle + Jeremy Teo +License: CDDL-1.0 + +Files: module/zfs/zil.c +Copyright: Oracle + Delphix + Robert Milkowski +License: CDDL-1.0 + +Files: module/zfs/zio.c +Copyright: Oracle + Delphix + Nexenta Systems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zio_checksum.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zio_compress.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zio_inject.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zfs/zle.c +Copyright: Sun Microsystems, Inc. +License: CDDL-1.0 + +Files: module/zfs/zpl_export.c +Copyright: Gunnar Beutner +License: CDDL-1.0 + +Files: module/zfs/zrlock.c +Copyright: Oracle +License: CDDL-1.0 + +Files: module/zpios/pios.c +Copyright: Cluster File Systems, Inc. + Lawrence Livermore National Security, LLC. +License: GPL-2+ + +Files: scripts/kmodtool +Copyright: 2003-2012, Ville Skyttä , + 2003-2012, Thorsten Leemhuis + 2003-2012, Nicolas Chauvet +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along with + this package; if not, write to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public License version 2 + can be found in the file /usr/share/common-licenses/GPL-2. + +License: CDDL-1.0 + COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) + . + Version 1.0 + . + 1. Definitions. + . + 1.1. “Contributor” means each individual or entity that creates or contributes + to the creation of Modifications. + . + 1.2. “Contributor Version” means the combination of the Original Software, + prior Modifications used by a Contributor (if any), and the Modifications made + by that particular Contributor. + . + 1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, + or (c) the combination of files containing Original Software with files + containing Modifications, in each case including portions thereof. + . + 1.4. “Executable” means the Covered Software in any form other than Source + Code. + . + 1.5. “Initial Developer” means the individual or entity that first makes + Original Software available under this License. + . + 1.6. “Larger Work” means a work which combines Covered Software or portions + thereof with code not governed by the terms of this License. + . + 1.7. “License” means this document. + . + 1.8. “Licensable” means having the right to grant, to the maximum extent + possible, whether at the time of the initial grant or subsequently acquired, + any and all of the rights conveyed herein. + . + 1.9. “Modifications” means the Source Code and Executable form of any of the + following: + . + A. Any file that results from an addition to, deletion from or modification of + the contents of a file containing Original Software or previous Modifications; + . + B. Any new file that contains any part of the Original Software or previous + Modification; or + . + C. Any new file that is contributed or otherwise made available under the terms + of this License. + . + 1.10. “Original Software” means the Source Code and Executable form of computer + software code that is originally released under this License. + . + 1.11. “Patent Claims” means any patent claim(s), now owned or hereafter + acquired, including without limitation, method, process, and apparatus claims, + in any patent Licensable by grantor. + . + 1.12. “Source Code” means (a) the common form of computer software code in + which modifications are made and (b) associated documentation included in or + with such code. + . + 1.13. “You” (or “Your”) means an individual or a legal entity exercising rights + under, and complying with all of the terms of, this License. For legal + entities, “You” includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this definition, “control” means + (a) the power, direct or indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership of more than fifty + percent (50%) of the outstanding shares or beneficial ownership of such entity. + . + 2. License Grants. + . + 2.1. The Initial Developer Grant. + . + Conditioned upon Your compliance with Section 3.1 below and subject to third + party intellectual property claims, the Initial Developer hereby grants You a + world-wide, royalty-free, non-exclusive license: + . + (a) under intellectual property rights (other than patent or trademark) + Licensable by Initial Developer, to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or portions thereof), with or + without Modifications, and/or as part of a Larger Work; and + . + (b) under Patent Claims infringed by the making, using or selling of Original + Software, to make, have made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or portions thereof). + . + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date + Initial Developer first distributes or otherwise makes the Original Software + available to a third party under the terms of this License. + . + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for + code that You delete from the Original Software, or (2) for infringements + caused by: (i) the modification of the Original Software, or (ii) the + combination of the Original Software with other software or devices. + . + 2.2. Contributor Grant. + . + Conditioned upon Your compliance with Section 3.1 below and subject to third + party intellectual property claims, each Contributor hereby grants You a + world-wide, royalty-free, non-exclusive license: + . + (a) under intellectual property rights (other than patent or trademark) + Licensable by Contributor to use, reproduce, modify, display, perform, + sublicense and distribute the Modifications created by such Contributor (or + portions thereof), either on an unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + . + (b) under Patent Claims infringed by the making, using, or selling of + Modifications made by that Contributor either alone and/or in combination with + its Contributor Version (or portions of such combination), to make, use, sell, + offer for sale, have made, and/or otherwise dispose of: (1) Modifications made + by that Contributor (or portions thereof); and (2) the combination of + Modifications made by that Contributor with its Contributor Version (or + portions of such combination). + . + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the + date Contributor first distributes or otherwise makes the Modifications + available to a third party. + . + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for + any code that Contributor has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party modifications of Contributor Version, + or (ii) the combination of Modifications made by that Contributor with other + software (except as part of the Contributor Version) or other devices; or (3) + under Patent Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + . + 3. Distribution Obligations. + . + 3.1. Availability of Source Code. + . + Any Covered Software that You distribute or otherwise make available in + Executable form must also be made available in Source Code form and that Source + Code form must be distributed only under the terms of this License. You must + include a copy of this License with every copy of the Source Code form of the + Covered Software You distribute or otherwise make available. You must inform + recipients of any such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a reasonable manner on or + through a medium customarily used for software exchange. + . + 3.2. Modifications. + . + The Modifications that You create or to which You contribute are governed by + the terms of this License. You represent that You believe Your Modifications + are Your original creation(s) and/or You have sufficient rights to grant the + rights conveyed by this License. + . + 3.3. Required Notices. + . + You must include a notice in each of Your Modifications that identifies You as + the Contributor of the Modification. You may not remove or alter any copyright, + patent or trademark notices contained within the Covered Software, or any + notices of licensing or any descriptive text giving attribution to any + Contributor or the Initial Developer. + . + 3.4. Application of Additional Terms. + . + You may not offer or impose any terms on any Covered Software in Source Code + form that alters or restricts the applicable version of this License or the + recipients’ rights hereunder. You may choose to offer, and to charge a fee for, + warranty, support, indemnity or liability obligations to one or more recipients + of Covered Software. However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You must make it absolutely + clear that any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial Developer + and every Contributor for any liability incurred by the Initial Developer or + such Contributor as a result of warranty, support, indemnity or liability terms + You offer. + . + 3.5. Distribution of Executable Versions. + . + You may distribute the Executable form of the Covered Software under the terms + of this License or under the terms of a license of Your choice, which may + contain terms different from this License, provided that You are in compliance + with the terms of this License and that the license for the Executable form + does not attempt to limit or alter the recipient’s rights in the Source Code + form from the rights set forth in this License. If You distribute the Covered + Software in Executable form under a different license, You must make it + absolutely clear that any terms which differ from this License are offered by + You alone, not by the Initial Developer or Contributor. You hereby agree to + indemnify the Initial Developer and every Contributor for any liability + incurred by the Initial Developer or such Contributor as a result of any such + terms You offer. + . + 3.6. Larger Works. + . + You may create a Larger Work by combining Covered Software with other code not + governed by the terms of this License and distribute the Larger Work as a + single product. In such a case, You must make sure the requirements of this + License are fulfilled for the Covered Software. + . + 4. Versions of the License. + . + 4.1. New Versions. + . + Sun Microsystems, Inc. is the initial license steward and may publish revised + and/or new versions of this License from time to time. Each version will be + given a distinguishing version number. Except as provided in Section 4.3, no + one other than the license steward has the right to modify this License. + . + 4.2. Effect of New Versions. + . + You may always continue to use, distribute or otherwise make the Covered + Software available under the terms of the version of the License under which + You originally received the Covered Software. If the Initial Developer includes + a notice in the Original Software prohibiting it from being distributed or + otherwise made available under any subsequent version of the License, You must + distribute and make the Covered Software available under the terms of the + version of the License under which You originally received the Covered + Software. Otherwise, You may also choose to use, distribute or otherwise make + the Covered Software available under the terms of any subsequent version of the + License published by the license steward. + . + 4.3. Modified Versions. + . + When You are an Initial Developer and You want to create a new license for Your + Original Software, You may create and use a modified version of this License if + You: (a) rename the license and remove any references to the name of the + license steward (except to note that the license differs from this License); + and (b) otherwise make it clear that the license contains terms which differ + from this License. + . + 5. DISCLAIMER OF WARRANTY. + . + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT + LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, + MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK + AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD + ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL + DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, + REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART + OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT + UNDER THIS DISCLAIMER. + . + 6. TERMINATION. + . + 6.1. This License and the rights granted hereunder will terminate automatically + if You fail to comply with terms herein and fail to cure such breach within 30 + days of becoming aware of the breach. Provisions which, by their nature, must + remain in effect beyond the termination of this License shall survive. + . + 6.2. If You assert a patent infringement claim (excluding declaratory judgment + actions) against Initial Developer or a Contributor (the Initial Developer or + Contributor against whom You assert such claim is referred to as “Participant”) + alleging that the Participant Software (meaning the Contributor Version where + the Participant is a Contributor or the Original Software where the Participant + is the Initial Developer) directly or indirectly infringes any patent, then any + and all rights granted directly or indirectly to You by such Participant, the + Initial Developer (if the Initial Developer is not the Participant) and all + Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days + notice from Participant terminate prospectively and automatically at the + expiration of such 60 day notice period, unless if within such 60 day period + You withdraw Your claim with respect to the Participant Software against such + Participant either unilaterally or pursuant to a written agreement with + Participant. + . + 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user + licenses that have been validly granted by You or any distributor hereunder + prior to termination (excluding licenses granted to You by any distributor) + shall survive termination. + . + 7. LIMITATION OF LIABILITY. + . + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING + NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY + OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF + ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, + INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER + FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN + IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS + LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR + LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND + LIMITATION MAY NOT APPLY TO YOU. + . + 8. U.S. GOVERNMENT END USERS. + . + The Covered Software is a “commercial item,” as that term is defined in 48 + C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” (as that + term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer + software documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through + 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software + with only those rights set forth herein. This U.S. Government Rights clause is + in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision + that addresses Government rights in computer software under this License. + . + 9. MISCELLANEOUS. + . + This License represents the complete agreement concerning subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. This License shall be governed by the law of the jurisdiction + specified in a notice contained within the Original Software (except to the + extent applicable law, if any, provides otherwise), excluding such + jurisdiction’s conflict-of-law provisions. Any litigation relating to this + License shall be subject to the jurisdiction of the courts located in the + jurisdiction and venue specified in a notice contained within the Original + Software, with the losing party responsible for costs, including, without + limitation, court costs and reasonable attorneys’ fees and expenses. The + application of the United Nations Convention on Contracts for the International + Sale of Goods is expressly excluded. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + apply to this License. You agree that You alone are responsible for compliance + with the United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, distribute or + otherwise make available any Covered Software. + . + 10. RESPONSIBILITY FOR CLAIMS. + . + As between Initial Developer and the Contributors, each party is responsible + for claims and damages arising, directly or indirectly, out of its utilization + of rights under this License and You agree to work with Initial Developer and + Contributors to distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission of liability. + . + -------------------------------------------------------------------- + . + NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND + DISTRIBUTION LICENSE (CDDL) + . + For Covered Software in this distribution, this License shall + be governed by the laws of the State of California (excluding + conflict-of-law provisions). + . + Any litigation relating to this License shall be subject to the + jurisdiction of the Federal Courts of the Northern District of + California and the state courts of the State of California, with + venue lying in Santa Clara County, California. diff --git a/zfs-debian-pve/libnvpair1.install b/zfs-debian-pve/libnvpair1.install new file mode 100644 index 0000000..34a0f61 --- /dev/null +++ b/zfs-debian-pve/libnvpair1.install @@ -0,0 +1 @@ +lib/libnvpair.so.* diff --git a/zfs-debian-pve/libuutil1.install b/zfs-debian-pve/libuutil1.install new file mode 100644 index 0000000..c7fa63e --- /dev/null +++ b/zfs-debian-pve/libuutil1.install @@ -0,0 +1 @@ +lib/libuutil.so.* diff --git a/zfs-debian-pve/libzfs-dev.install b/zfs-debian-pve/libzfs-dev.install new file mode 100644 index 0000000..d87813d --- /dev/null +++ b/zfs-debian-pve/libzfs-dev.install @@ -0,0 +1,4 @@ +lib/*.a +lib/*.la +lib/*.so +usr/include diff --git a/zfs-debian-pve/libzfs2.install b/zfs-debian-pve/libzfs2.install new file mode 100644 index 0000000..660dede --- /dev/null +++ b/zfs-debian-pve/libzfs2.install @@ -0,0 +1,2 @@ +lib/libzfs.so.* +lib/libzfs_core.so.* diff --git a/zfs-debian-pve/libzpool2.install b/zfs-debian-pve/libzpool2.install new file mode 100644 index 0000000..d886d29 --- /dev/null +++ b/zfs-debian-pve/libzpool2.install @@ -0,0 +1 @@ +lib/libzpool.so.* diff --git a/zfs-debian-pve/patches/0001-Prevent-manual-builds-in-the-DKMS-source.patch b/zfs-debian-pve/patches/0001-Prevent-manual-builds-in-the-DKMS-source.patch new file mode 100644 index 0000000..06b6256 --- /dev/null +++ b/zfs-debian-pve/patches/0001-Prevent-manual-builds-in-the-DKMS-source.patch @@ -0,0 +1,71 @@ +From: Darik Horn +Date: Tue, 17 Jan 2012 19:45:07 -0600 +Subject: Prevent manual builds in the DKMS source. + +Print an instructive error messsage and exit if the `dkms.conf` file +exists when the userland is configured. (ie: `--with-config=user`) + +A non-trivial number of people try to rebuild ZoL from the +`/usr/src/zfs` tree, which is modified to better satisfy Debian +packaging policy and contains only the module sources for DKMS. + +Regardless, local installations usually break managed installations, +so this autotools test could be further enhanced to check whether +ZFS has a DKMS registration. +--- + config/dkms.m4 | 14 ++++++++++++++ + config/user.m4 | 1 + + config/zfs-build.m4 | 6 +++--- + 3 files changed, 18 insertions(+), 3 deletions(-) + create mode 100644 config/dkms.m4 + +diff --git a/config/dkms.m4 b/config/dkms.m4 +new file mode 100644 +index 0000000..cfa1152 +--- /dev/null ++++ b/config/dkms.m4 +@@ -0,0 +1,14 @@ ++dnl # ++dnl # Prevent manual building in DKMS source tree. ++dnl # ++AC_DEFUN([ZFS_AC_DKMS_INHIBIT], [ ++ AC_MSG_CHECKING([for dkms.conf file]) ++ AS_IF([test -e dkms.conf], [ ++ AC_MSG_ERROR([ ++ *** ZFS should not be manually built in the DKMS source tree. ++ *** Remove all ZFS packages before compiling the ZoL sources. ++ *** Running "make install" breaks ZFS packages.]) ++ ], [ ++ AC_MSG_RESULT([not found]) ++ ]) ++]) +diff --git a/config/user.m4 b/config/user.m4 +index 3802437..f5a8827 100644 +--- a/config/user.m4 ++++ b/config/user.m4 +@@ -2,6 +2,7 @@ dnl # + dnl # Default ZFS user configuration + dnl # + AC_DEFUN([ZFS_AC_CONFIG_USER], [ ++ ZFS_AC_DKMS_INHIBIT + ZFS_AC_CONFIG_USER_UDEV + ZFS_AC_CONFIG_USER_SYSTEMD + ZFS_AC_CONFIG_USER_SYSVINIT +diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 +index 5ec94a0..41eec88 100644 +--- a/config/zfs-build.m4 ++++ b/config/zfs-build.m4 +@@ -87,10 +87,10 @@ AC_DEFUN([ZFS_AC_CONFIG], [ + ZFS_AC_CONFIG_ALWAYS + + case "$ZFS_CONFIG" in +- kernel) ZFS_AC_CONFIG_KERNEL ;; + user) ZFS_AC_CONFIG_USER ;; +- all) ZFS_AC_CONFIG_KERNEL +- ZFS_AC_CONFIG_USER ;; ++ kernel) ZFS_AC_CONFIG_KERNEL ;; ++ all) ZFS_AC_CONFIG_USER ++ ZFS_AC_CONFIG_KERNEL ;; + srpm) ;; + *) + AC_MSG_RESULT([Error!]) diff --git a/zfs-debian-pve/patches/0002-Check-for-META-and-DCH-consistency-in-autoconf.patch b/zfs-debian-pve/patches/0002-Check-for-META-and-DCH-consistency-in-autoconf.patch new file mode 100644 index 0000000..ab28866 --- /dev/null +++ b/zfs-debian-pve/patches/0002-Check-for-META-and-DCH-consistency-in-autoconf.patch @@ -0,0 +1,70 @@ +From: Darik Horn +Date: Sat, 18 Oct 2014 14:23:11 -0500 +Subject: Check for META and DCH consistency in autoconf. + +If a debian/ packaging overlay exists, then the software versions defined in +the META and debian/changelog files must be the same to ensure that DKMS uses +correct paths and that users see the same version everywhere. +--- + config/zfs-meta.m4 | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4 +index 7c92dd5..d174ccc 100644 +--- a/config/zfs-meta.m4 ++++ b/config/zfs-meta.m4 +@@ -1,9 +1,10 @@ + dnl # + dnl # DESCRIPTION: +-dnl # Read meta data from the META file. When building from a git repository +-dnl # the ZFS_META_RELEASE field will be overwritten if there is an annotated +-dnl # tag matching the form ZFS_META_NAME-ZFS_META_VERSION-*. This allows +-dnl # for working builds to be uniquely identified using the git commit hash. ++dnl # Read meta data from the META file or the debian/changelog file if it ++dnl # exists. When building from a git repository the ZFS_META_RELEASE field ++dnl # will be overwritten if there is an annotated tag matching the form ++dnl # ZFS_META_NAME-ZFS_META_VERSION-*. This allows for working builds to be ++dnl # uniquely identified using the git commit hash. + dnl # + dnl # The META file format is as follows: + dnl # ^[ ]*KEY:[ \t]+VALUE$ +@@ -49,6 +50,7 @@ AC_DEFUN([ZFS_AC_META], [ + _zfs_ac_meta_type="none" + if test -f "$META"; then + _zfs_ac_meta_type="META file" ++ _dpkg_parsechangelog=$(dpkg-parsechangelog 2>/dev/null) + + ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]); + if test -n "$ZFS_META_NAME"; then +@@ -66,8 +68,30 @@ AC_DEFUN([ZFS_AC_META], [ + AC_SUBST([ZFS_META_VERSION]) + fi + ++ if test -n "${_dpkg_parsechangelog}"; then ++ _dpkg_version=$(echo "${_dpkg_parsechangelog}" \ ++ | $AWK '$[]1 == "Version:" { print $[]2; }' \ ++ | cut -d- -f1) ++ if test "${_dpkg_version}" != "$ZFS_META_VERSION"; then ++ AC_MSG_ERROR([ ++ *** Version $ZFS_META_VERSION in the META file is different than ++ *** version $_dpkg_version in the debian/changelog file. DKMS and DEB ++ *** packaging require that these files have the same version. ++ ]) ++ fi ++ fi ++ + ZFS_META_RELEASE=_ZFS_AC_META_GETVAL([Release]); +- if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then ++ ++ if test -n "${_dpkg_parsechangelog}"; then ++ _dpkg_release=$(echo "${_dpkg_parsechangelog}" \ ++ | $AWK '$[]1 == "Version:" { print $[]2; }' \ ++ | cut -d- -f2-) ++ if test -n "${_dpkg_release}"; then ++ ZFS_META_RELEASE=${_dpkg_release} ++ _zfs_ac_meta_type="dpkg-parsechangelog" ++ fi ++ elif test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then + _match="${ZFS_META_NAME}-${ZFS_META_VERSION}" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') diff --git a/zfs-debian-pve/patches/0003-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch b/zfs-debian-pve/patches/0003-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch new file mode 100644 index 0000000..99d0ac6 --- /dev/null +++ b/zfs-debian-pve/patches/0003-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch @@ -0,0 +1,41 @@ +From: Darik Horn +Date: Sat, 18 Oct 2014 19:48:46 -0500 +Subject: Add libuutil to LIBADD for libzfs and libzfs_core + +Resolve spurious dpkg-shlibdeps warnings like this: + + warning: symbol strlcpy used by libzfs_core.so found in none of the libraries + +This happens because dpkg-shlibdeps does not recursively search for symbols. + +Signed-off-by: Darik Horn +--- + lib/libzfs/Makefile.am | 1 + + lib/libzfs_core/Makefile.am | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am +index 8b1f517..efdf84b 100644 +--- a/lib/libzfs/Makefile.am ++++ b/lib/libzfs/Makefile.am +@@ -23,6 +23,7 @@ libzfs_la_SOURCES = \ + + libzfs_la_LIBADD = \ + $(top_builddir)/lib/libzfs_core/libzfs_core.la \ ++ $(top_builddir)/lib/libuutil/libuutil.la \ + $(top_builddir)/lib/libshare/libshare.la \ + $(top_builddir)/lib/libnvpair/libnvpair.la \ + $(top_builddir)/lib/libzpool/libzpool.la +diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am +index 0ecd208..6f0be5f 100644 +--- a/lib/libzfs_core/Makefile.am ++++ b/lib/libzfs_core/Makefile.am +@@ -10,6 +10,7 @@ libzfs_core_la_SOURCES = \ + $(top_srcdir)/lib/libzfs_core/libzfs_core.c + + libzfs_core_la_LIBADD = \ +- $(top_builddir)/lib/libnvpair/libnvpair.la ++ $(top_builddir)/lib/libnvpair/libnvpair.la \ ++ $(top_builddir)/lib/libuutil/libuutil.la + + libzfs_core_la_LDFLAGS = -version-info 1:0:0 diff --git a/zfs-debian-pve/patches/0005-vdev_id-use-mawk-compatible-regular-expression.patch b/zfs-debian-pve/patches/0005-vdev_id-use-mawk-compatible-regular-expression.patch new file mode 100644 index 0000000..6ffa27c --- /dev/null +++ b/zfs-debian-pve/patches/0005-vdev_id-use-mawk-compatible-regular-expression.patch @@ -0,0 +1,31 @@ +From: Ned Bass +Date: Wed, 17 Dec 2014 11:01:42 -0800 +Subject: vdev_id: use mawk-compatible regular expression + +Slot mapping in vdev_id doesn't work on systems using mawk as the 'awk' +alternative. A regular expression in map_slot() contains an unquoted +empty string following the alternation (|) operator, which results in an +"missing operand" error with mawk. The solution is to rearrange the +expression so the alternation has two operands. + +Signed-off-by: Ned Bass +Signed-off-by: Brian Behlendorf +Closes zfsonlinux/pkg-zfs#136 +Closes zfsonlinux/zfs#2965 +--- + cmd/vdev_id/vdev_id | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id +index b6752ba..6fddd12 100755 +--- a/cmd/vdev_id/vdev_id ++++ b/cmd/vdev_id/vdev_id +@@ -116,7 +116,7 @@ map_slot() { + local MAPPED_SLOT= + + MAPPED_SLOT=`awk "\\$1 == \"slot\" && \\$2 == ${LINUX_SLOT} && \ +- \\$4 ~ /^(${CHANNEL}|)$/ { print \\$3; exit }" $CONFIG` ++ \\$4 ~ /^${CHANNEL}$|^$/ { print \\$3; exit }" $CONFIG` + if [ -z "$MAPPED_SLOT" ] ; then + MAPPED_SLOT=$LINUX_SLOT + fi diff --git a/zfs-debian-pve/patches/series b/zfs-debian-pve/patches/series new file mode 100644 index 0000000..56e1bdc --- /dev/null +++ b/zfs-debian-pve/patches/series @@ -0,0 +1,4 @@ +0001-Prevent-manual-builds-in-the-DKMS-source.patch +0002-Check-for-META-and-DCH-consistency-in-autoconf.patch +0003-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch +0005-vdev_id-use-mawk-compatible-regular-expression.patch diff --git a/zfs-debian-pve/rules b/zfs-debian-pve/rules new file mode 100755 index 0000000..be2eda2 --- /dev/null +++ b/zfs-debian-pve/rules @@ -0,0 +1,115 @@ +#!/usr/bin/make -f + +CHMOD ?= chmod +INSTALL ?= install +MAKE ?= make + +META_NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META) +VERSION := $(shell dpkg-parsechangelog \ + | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1) +REVISION := $(shell dpkg-parsechangelog \ + | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f2-) + +META_DISTDIR := $(CURDIR)/$(META_NAME)-$(VERSION)/ + +%: + dh $@ --with autoreconf,dkms + +override_dh_auto_configure: + @# Embed the downstream version in the module. + @sed \ + -e 's/^Version:.*/Version: $(VERSION)/' \ + -e 's/^Release:.*/Release: $(REVISION)/' \ + -i.orig META + + @# Build the userland, but don't build the kernel modules. + dh_auto_configure -- \ + --bindir=/bin \ + --sbindir=/sbin \ + --libdir=/lib \ + --with-udevdir=/lib/udev \ + --with-config=user + +override_dh_auto_test: + # The dh_auto_test rule is disabled because + # `make check` cannot run in an unprivileged build environment. + +override_dh_auto_install: + @# Install the utilities. + $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp' + + @# Get a bare copy of the source code for DKMS. + @# This creates the $(META_DISTDIR)/ tree. + $(MAKE) distdir + + @# Delete components that are not required to build the kernel modules. + @# This prevents several lintian complaints, discourages users from + @# running `make install` in /usr/src, and reduces the installation + @# size by one third. The printf creates a dummy automake file. + umask 0111 && \ + cd '$(META_DISTDIR)' && \ + for ii in $$(find cmd dracut etc lib man rpm scripts udev -type f); do \ + rm "$$ii"; \ + test "$$ii" != "$${ii%.in}" && printf '%%:\n\t#\n' >"$$ii"; \ + true; \ + done + + @# This shunt allows DKMS to copy the Module.symvers and zfs_config.h + @# files into the ${dkms_tree} area through the POST_INSTALL directive. + printf '#!/bin/sh\ncp "$$@"\n' >'$(META_DISTDIR)/cp' + $(CHMOD) 755 '$(META_DISTDIR)/cp' + + @# Install the DKMS source directly, avoiding dh_install. + $(INSTALL) -d '$(CURDIR)/debian/zfs-dkms/usr/src/' + mv '$(META_DISTDIR)' '$(CURDIR)/debian/zfs-dkms/usr/src/' + +override_dh_dkms: + dh_dkms -V + +override_dh_install: + @# Exclude the upstream /usr/lib/udev/rules.d files. + dh_install -X/rules.d/ + + @# Ensure that /etc/zfs is in the zfsutils package + @# because git has difficulty tracking empty directories. + $(INSTALL) -d '$(CURDIR)/debian/zfsutils/etc/zfs/' + + @# Resolve lintian errors regarding Debian Policy Manual Section 8.4 + @# by moving unversioned library links from /lib to /usr/lib in the + @# development package. Look at libc6-dev for a packaging example if + @# multiarch support ever becomes a concern here. + $(INSTALL) -d '$(CURDIR)/debian/libzfs-dev/usr/lib/' + cd '$(CURDIR)/debian/libzfs-dev/lib' && \ + for ii in $$(find -type l); do \ + ln -s "../../lib/$$(readlink "$$ii")" "../usr/lib/$$(basename "$$ii")" \ + && rm "$$ii"; \ + done + +override_dh_installdocs: + dh_installdocs --link-doc=zfs-doc + +override_dh_installinit: + @# Install debian/zfsutils.zfs.default as /etc/default/zfs. + dh_installinit --name=zfs + + @# Install the /etc/init.d/zfs-mount script. + @# Debian runs local mounts at sysv sequences [10..12] [08..09]. + dh_installinit --name=zfs-mount \ + --no-restart-on-upgrade --no-start -- defaults 13 07 + + @# Debian runs nfs-kernel-server at sysv sequence 17 01, + @# iscsitarget at 02 01, and samba at 01 02. + dh_installinit --name=zfs-share \ + --no-restart-on-upgrade --no-start -- defaults 18 00 + + +override_dh_installudev: + dh_installudev --name=zvol --priority=60 + dh_installudev --name=vdev --priority=69 + +override_dh_strip: + dh_strip -plibnvpair1 --dbg-package=libnvpair1-dbg + dh_strip -plibuutil1 --dbg-package=libuutil1-dbg + dh_strip -plibzfs2 --dbg-package=libzfs2-dbg + dh_strip -plibzpool2 --dbg-package=libzpool2-dbg + dh_strip -pzfsutils --dbg-package=zfsutils-dbg diff --git a/zfs-debian-pve/tree/zfs-doc/etc/dpkg/dpkg.cfg.d/zfs-doc b/zfs-debian-pve/tree/zfs-doc/etc/dpkg/dpkg.cfg.d/zfs-doc new file mode 100644 index 0000000..363f596 --- /dev/null +++ b/zfs-debian-pve/tree/zfs-doc/etc/dpkg/dpkg.cfg.d/zfs-doc @@ -0,0 +1,6 @@ +## /etc/dpkg/dpkg.cfg.d/zfs-doc +## +## DPKG overrides that prevent the installation of ZoL documentation. + +## Enable this line to reduce installation size. +#path-exclude /usr/share/doc/zfs-doc/* diff --git a/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/conf-hooks.d/zfs b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/conf-hooks.d/zfs new file mode 100644 index 0000000..29950ca --- /dev/null +++ b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/conf-hooks.d/zfs @@ -0,0 +1,2 @@ +# Force the inclusion of Busybox in the initramfs. +BUSYBOX=y diff --git a/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zfs b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zfs new file mode 100755 index 0000000..16d644c --- /dev/null +++ b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/hooks/zfs @@ -0,0 +1,75 @@ +#!/bin/sh +# +# Add ZoL filesystem capabilities to an initrd, usually for a native OpenZFS root. +# + +# This hook installs udev rules for ZoL. +PREREQ="zdev" + +# These prerequisites are provided by the zfsutils package. The zdb utility is +# not strictly required, but it can be useful at the initramfs recovery prompt. +COPY_EXEC_LIST="/sbin/zdb /sbin/zpool /sbin/zfs /sbin/mount.zfs" + +# These prerequisites are provided by the base system. +COPY_EXEC_LIST="$COPY_EXEC_LIST /bin/hostname /sbin/blkid" + +# Explicitly specify all kernel modules because automatic dependency resolution +# is unreliable on many systems. +MANUAL_ADD_MODULES_LIST="zlib_deflate spl zavl zcommon znvpair zunicode zfs" + +# Generic result code. +RC=0 + +case $1 in +prereqs) + echo "$PREREQ" + exit 0 + ;; +esac + +for ii in $COPY_EXEC_LIST +do + if [ ! -x "$ii" ] + then + echo "Error: $ii is not executable." + RC=2 + fi +done + +if [ "$RC" -ne 0 ] +then + exit "$RC" +fi + +. /usr/share/initramfs-tools/hook-functions + +mkdir -p "$DESTDIR/etc/" + +# ZDB uses pthreads for some functions, but the library dependency is not +# automatically detected. The `find` utility and extended `cp` options are +# used here because libgcc_s.so could be in a subdirectory of /lib for +# multi-arch installations. +cp --target-directory="$DESTDIR" --parents $(find /lib -type f -name libgcc_s.so.1) + +for ii in $COPY_EXEC_LIST +do + copy_exec "$ii" +done + +for ii in $MANUAL_ADD_MODULES_LIST +do + manual_add_modules "$ii" +done + +if [ -f "/etc/hostname" ] +then + cp -p "/etc/hostname" "$DESTDIR/etc/" +else + hostname >"$DESTDIR/etc/hostname" +fi + +# ZoL 0.6.3 deprecated the hostid check. +if [ -f /etc/hostid ] +then + cp -p /etc/hostid "$DESTDIR/etc/hostid" +fi diff --git a/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/scripts/zfs b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/scripts/zfs new file mode 100644 index 0000000..2ff7a55 --- /dev/null +++ b/zfs-debian-pve/tree/zfs-initramfs/usr/share/initramfs-tools/scripts/zfs @@ -0,0 +1,163 @@ +# ZFS boot stub for initramfs-tools. +# +# In the initramfs environment, the /init script sources this stub to +# override the default functions in the /scripts/local script. +# +# Enable this by passing boot=zfs on the kernel command line. +# + + +pre_mountroot() +{ + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top" + run_scripts /scripts/local-top + [ "$quiet" != "y" ] && log_end_msg + + if [ -r '/etc/default/zfs' ] + then + . '/etc/default/zfs' + if [ "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" -gt '0' ] + then + [ "$quiet" != "y" ] && log_begin_msg "Sleeping for $ZFS_INITRD_PRE_MOUNTROOT_SLEEP seconds..." + sleep "$ZFS_INITRD_PRE_MOUNTROOT_SLEEP" + [ "$quiet" != "y" ] && log_end_msg + fi + fi +} + +# Duplicates the functionality found under try_failure_hooks in functions +# but invoking that would be inappropriate here. +disable_plymouth() +{ + if [ -x /bin/plymouth ] && /bin/plymouth --ping + then + /bin/plymouth hide-splash >/dev/null 2>&1 + fi +} + +mountroot() +{ + pre_mountroot + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" + run_scripts /scripts/local-premount + [ "$quiet" != "y" ] && log_end_msg + + # Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear. + wait_for_udev + + # Load the module now to get consistent automatic pool import behavior. + modprobe zfs + + # Check the kernel command line for overrides. + ZFS_RPOOL="${rpool#rpool=}" + ZFS_BOOTFS="${bootfs#bootfs=}" + + if [ -z "$ZFS_RPOOL" ] + then + # Check for the `-B zfs-bootfs=%s/%u,...` kind of parameter. + # + # The ${zfs-bootfs} variable is set at the kernel commmand + # line, usually by GRUB, but it cannot be referenced here + # directly because bourne variable names cannot contain a + # hyphen. + # + # Reassign the variable by dumping the environment and + # stripping the zfs-bootfs= prefix. Let the shell handle + # quoting through the eval command. + eval ZFS_RPOOL=$(set | sed -n -e 's,^zfs-bootfs=,,p') + + # Only the pool name is relevant because the ZFS filesystem on + # Linux is extrinsic and the userland cannot resolve a ZFS + # object number. + # + # Strip everything after the first slash character. + ZFS_RPOOL=$(echo "$ZFS_RPOOL" | sed -e 's,/.*,,') + fi + + # Use "rpool" as the default, like on most Solaris systems. + [ -z "$ZFS_RPOOL" ] && ZFS_RPOOL='rpool' + + # @FIXME: Forcing the import should not be necessary. + # + # Consider inhibiting automatic zpool imports in the initramfs + # environment and doing a full import in the regular system instead. + + [ "$quiet" != "y" ] && log_begin_msg "Importing ZFS root pool $ZFS_RPOOL" + if [ -f /etc/zfs/zpool.cache ] + then + ZFS_STDERR=$(zpool list "$ZFS_RPOOL" 1>/dev/null 2>&1 \ + || zpool import -f -N "$ZFS_RPOOL" 2>&1) + ZFS_ERROR=$? + else + ZFS_STDERR=$(zpool import -f -N "$ZFS_RPOOL" 2>&1) + ZFS_ERROR=$? + fi + [ "$quiet" != "y" ] && log_end_msg + + if [ "$ZFS_ERROR" -ne 0 ] + then + disable_plymouth + echo "Command: zpool import -f -N $ZFS_RPOOL" + echo "Message: $ZFS_STDERR" + echo "Error: $ZFS_ERROR" + echo "" + echo "Manually import the root pool at the command prompt and then exit." + echo "Hint: Try: zpool import -f -R / -N $ZFS_RPOOL" + /bin/sh + fi + + if [ -z "$ZFS_BOOTFS" ] + then + [ "$quiet" != "y" ] && log_begin_msg "Getting ZFS bootfs property" + ZFS_BOOTFS=$(zpool list -H -o bootfs "$ZFS_RPOOL") + ZFS_ERROR=$? + [ "$quiet" != "y" ] && log_end_msg + fi + + if [ -z "$ZFS_BOOTFS" ] + then + disable_plymouth + echo "Command: zpool list -H -o bootfs $ZFS_RPOOL" + echo "Error: $ZFS_ERROR, unable to get the bootfs property." + echo "" + echo "Manually mount the root filesystem on $rootmnt and then exit." + echo "Hint: Try: mount -t zfs -o zfsutil $ZFS_RPOOL/ROOT/system $rootmnt" + /bin/sh + fi + + # Force the mountpoint to the only correct value for a root filesystem. + [ "$quiet" != "y" ] && log_begin_msg "Setting mountpoint=/ on ZFS filesystem $ZFS_BOOTFS" + ZFS_STDERR=$(zfs set mountpoint=/ "$ZFS_BOOTFS" 2>&1) + [ "$quiet" != "y" ] && log_end_msg + + # Ideally, the root filesystem would be mounted like this: + # + # zpool import -R "$rootmnt" -N "$ZFS_RPOOL" + # zfs mount -o mountpoint=/ "$ZFS_BOOTFS" + # + # but the MOUNTPOINT prefix is preserved on descendent filesystem after + # the pivot into the regular root, which later breaks things like + # `zfs mount -a` and the /etc/mtab refresh. + + [ "$quiet" != "y" ] && log_begin_msg "Mounting ZFS filesystem $ZFS_BOOTFS" + ZFS_STDERR=$(mount -t zfs -o zfsutil "$ZFS_BOOTFS" "$rootmnt" 2>&1) + ZFS_ERROR=$? + [ "$quiet" != "y" ] && log_end_msg + + if [ "$ZFS_ERROR" -ne 0 ] + then + disable_plymouth + echo "" + echo "Command: mount -t zfs -o zfsutil $ZFS_BOOTFS $rootmnt" + echo "Message: $ZFS_STDERR" + echo "Error: $ZFS_ERROR" + echo "" + echo "Manually mount the root filesystem on $rootmnt and then exit." + /bin/sh + fi + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom" + run_scripts /scripts/local-bottom + [ "$quiet" != "y" ] && log_end_msg +} diff --git a/zfs-debian-pve/tree/zfsutils/etc/bash_completion.d/zfs b/zfs-debian-pve/tree/zfsutils/etc/bash_completion.d/zfs new file mode 100644 index 0000000..3304ea2 --- /dev/null +++ b/zfs-debian-pve/tree/zfsutils/etc/bash_completion.d/zfs @@ -0,0 +1,391 @@ +# Copyright (c) 2013, Aneurin Price + +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: + +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +if [[ -w /dev/zfs ]]; then + __ZFS_CMD="zfs" + __ZPOOL_CMD="zpool" +else + __ZFS_CMD="sudo zfs" + __ZPOOL_CMD="sudo zpool" +fi + +__zfs_get_commands() +{ + $__ZFS_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | cut -f1 -d '|' | uniq +} + +__zfs_get_properties() +{ + $__ZFS_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all name space +} + +__zfs_get_editable_properties() +{ + $__ZFS_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}' +} + +__zfs_get_inheritable_properties() +{ + $__ZFS_CMD get 2>&1 | awk '$3 == "YES" {print $1}' +} + +__zfs_list_datasets() +{ + $__ZFS_CMD list -H -o name -t filesystem,volume +} + +__zfs_list_filesystems() +{ + $__ZFS_CMD list -H -o name -t filesystem +} + +__zfs_match_snapshot() +{ + local base_dataset=${cur%@*} + if [[ $base_dataset != $cur ]] + then + $__ZFS_CMD list -H -o name -s name -t snapshot -d 1 $base_dataset + else + $__ZFS_CMD list -H -o name -t filesystem,volume | awk '{print $1"@"}' + fi +} + +__zfs_match_explicit_snapshot() +{ + local base_dataset=${cur%@*} + if [[ $base_dataset != $cur ]] + then + $__ZFS_CMD list -H -o name -s name -t snapshot -d 1 $base_dataset + fi +} + +__zfs_match_multiple_snapshots() +{ + local existing_opts=$(expr "$cur" : '\(.*\)[%,]') + if [[ $existing_opts ]] + then + local base_dataset=${cur%@*} + if [[ $base_dataset != $cur ]] + then + local cur=${cur##*,} + if [[ $cur =~ ^%|%.*% ]] + then + # correct range syntax is start%end + return 1 + fi + local range_start=$(expr "$cur" : '\(.*%\)') + $__ZFS_CMD list -H -o name -s name -t snapshot -d 1 $base_dataset | sed 's$.*@$'$range_start'$g' + fi + else + __zfs_match_explicit_snapshot; __zfs_list_datasets + fi +} + +__zfs_list_volumes() +{ + $__ZFS_CMD list -H -o name -t volume +} + +__zfs_argument_chosen() +{ + local word property + for word in $(seq $((COMP_CWORD-1)) -1 2) + do + local prev="${COMP_WORDS[$word]}" + if [[ ${COMP_WORDS[$word-1]} != -[tos] ]] + then + if [[ "$prev" == [^,]*,* ]] || [[ "$prev" == *[@:]* ]] + then + return 0 + fi + for property in $@ + do + if [[ $prev == "$property" ]] + then + return 0 + fi + done + fi + done + return 1 +} + +__zfs_complete_ordered_arguments() +{ + local list1=$1 + local list2=$2 + local cur=$3 + local extra=$4 + if __zfs_argument_chosen $list1 + then + COMPREPLY=($(compgen -W "$list2 $extra" -- "$cur")) + else + COMPREPLY=($(compgen -W "$list1 $extra" -- "$cur")) + fi +} + +__zfs_complete_multiple_options() +{ + local options=$1 + local cur=$2 + + COMPREPLY=($(compgen -W "$options" -- "${cur##*,}")) + local existing_opts=$(expr "$cur" : '\(.*,\)') + if [[ $existing_opts ]] + then + COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" ) + fi +} + +__zfs_complete_switch() +{ + local options=$1 + if [[ ${cur:0:1} == - ]] + then + COMPREPLY=($(compgen -W "-{$options}" -- "$cur")) + return 0 + else + return 1 + fi +} + +__zfs_complete() +{ + local cur prev cmd cmds + COMPREPLY=() + # Don't split on colon + _get_comp_words_by_ref -n : -c cur -p prev -w COMP_WORDS -i COMP_CWORD + cmd="${COMP_WORDS[1]}" + + if [[ ${prev##*/} == zfs ]] + then + cmds=$(__zfs_get_commands) + COMPREPLY=($(compgen -W "$cmds -?" -- "$cur")) + return 0 + fi + + case "${cmd}" in + clone) + case "${prev}" in + -o) + COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur")) + ;; + *) + if ! __zfs_complete_switch "o,p" + then + if __zfs_argument_chosen + then + COMPREPLY=($(compgen -W "$(__zfs_list_datasets)" -- "$cur")) + else + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur")) + fi + fi + ;; + esac + ;; + get) + case "${prev}" in + -d) + COMPREPLY=($(compgen -W "" -- "$cur")) + ;; + -t) + __zfs_complete_multiple_options "filesystem volume snapshot all" "$cur" + ;; + -s) + __zfs_complete_multiple_options "local default inherited temporary none" "$cur" + ;; + -o) + __zfs_complete_multiple_options "name property value source received all" "$cur" + ;; + *) + if ! __zfs_complete_switch "H,r,p,d,o,t,s" + then + if __zfs_argument_chosen $(__zfs_get_properties) + then + COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur")) + else + __zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur" + fi + fi + ;; + esac + ;; + inherit) + if ! __zfs_complete_switch "r" + then + __zfs_complete_ordered_arguments "$(__zfs_get_inheritable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur + fi + ;; + list) + case "${prev}" in + -d) + COMPREPLY=($(compgen -W "" -- "$cur")) + ;; + -t) + __zfs_complete_multiple_options "filesystem volume snapshot all" "$cur" + ;; + -o) + __zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur" + ;; + -s|-S) + COMPREPLY=($(compgen -W "$(__zfs_get_properties)" -- "$cur")) + ;; + *) + if ! __zfs_complete_switch "H,r,d,o,t,s,S" + then + COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur")) + fi + ;; + esac + ;; + promote) + COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur")) + ;; + rollback) + if ! __zfs_complete_switch "r,R,f" + then + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur")) + fi + ;; + send) + if ! __zfs_complete_switch "d,n,P,p,R,v,i,I" + then + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur")) + fi + ;; + snapshot) + case "${prev}" in + -o) + COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur")) + ;; + *) + if ! __zfs_complete_switch "o,r" + then + COMPREPLY=($(compgen -W "$(__zfs_list_datasets | awk '{print $1"@"}')" -- "$cur")) + fi + ;; + esac + ;; + set) + __zfs_complete_ordered_arguments "$(__zfs_get_editable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur + ;; + upgrade) + case "${prev}" in + -a|-V|-v) + COMPREPLY=($(compgen -W "" -- "$cur")) + ;; + *) + if ! __zfs_complete_switch "a,V,v,r" + then + COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur")) + fi + ;; + esac + ;; + destroy) + if ! __zfs_complete_switch "d,f,n,p,R,r,v" + then + __zfs_complete_multiple_options "$(__zfs_match_multiple_snapshots)" $cur + fi + ;; + *) + COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur")) + ;; + esac + __ltrim_colon_completions "$cur" + return 0 +} + +__zpool_get_commands() +{ + $__ZPOOL_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq +} + +__zpool_get_properties() +{ + $__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all +} + +__zpool_get_editable_properties() +{ + $__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}' +} + +__zpool_list_pools() +{ + $__ZPOOL_CMD list -H -o name +} + +__zpool_complete() +{ + local cur prev cmd cmds + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + cmd="${COMP_WORDS[1]}" + + if [[ ${prev##*/} == zpool ]] + then + cmds=$(__zpool_get_commands) + COMPREPLY=($(compgen -W "$cmds" -- "$cur")) + return 0 + fi + + case "${cmd}" in + get) + __zfs_complete_ordered_arguments "$(__zpool_get_properties)" "$(__zpool_list_pools)" $cur + return 0 + ;; + import) + if [[ $prev == -d ]] + then + _filedir -d + else + COMPREPLY=($(compgen -W "$(__zpool_list_pools) -d" -- "$cur")) + fi + return 0 + ;; + set) + __zfs_complete_ordered_arguments "$(__zpool_get_editable_properties)" "$(__zpool_list_pools)" $cur + return 0 + ;; + add|attach|clear|create|detach|offline|online|remove|replace) + local pools="$(__zpool_list_pools)" + if __zfs_argument_chosen $pools + then + _filedir + else + COMPREPLY=($(compgen -W "$pools" -- "$cur")) + fi + return 0 + ;; + *) + COMPREPLY=($(compgen -W "$(__zpool_list_pools)" -- "$cur")) + return 0 + ;; + esac + +} + +complete -F __zfs_complete zfs +complete -F __zpool_complete zpool diff --git a/zfs-debian-pve/tree/zfsutils/etc/sudoers.d/zfs b/zfs-debian-pve/tree/zfsutils/etc/sudoers.d/zfs new file mode 100644 index 0000000..0fbd5b9 --- /dev/null +++ b/zfs-debian-pve/tree/zfsutils/etc/sudoers.d/zfs @@ -0,0 +1,28 @@ +## Allow read-only ZoL commands to be called through sudo +## without a password. Remove the first '#' column to enable. +## +## CAUTION: Any syntax error introduced here will break sudo. +## +## Cmnd alias specification +#Cmnd_Alias C_ZFS = \ +# /sbin/zfs "", /sbin/zfs help *, \ +# /sbin/zfs get, /sbin/zfs get *, \ +# /sbin/zfs list, /sbin/zfs list *, \ +# /sbin/zpool "", /sbin/zpool help *, \ +# /sbin/zpool iostat, /sbin/zpool iostat *, \ +# /sbin/zpool list, /sbin/zpool list *, \ +# /sbin/zpool status, /sbin/zpool status *, \ +# /sbin/zpool upgrade, /sbin/zpool upgrade -v +# +#Runas_Alias R_ROOT = root +# +## User privilege specification +#root ALL=(ALL) ALL +# +## Members of the admin group may gain root privileges +#%adm ALL=(ALL) ALL # linux +#%admin ALL=(ALL) ALL # linux +#%staff ALL=(ALL) ALL # solaris +# +## allow any user to use basic read-only ZFS commands +#ALL ALL = (R_ROOT) NOPASSWD: C_ZFS diff --git a/zfs-debian-pve/tree/zfsutils/usr/lib/os-probes/10zvol-test b/zfs-debian-pve/tree/zfsutils/usr/lib/os-probes/10zvol-test new file mode 100755 index 0000000..cdbe7a5 --- /dev/null +++ b/zfs-debian-pve/tree/zfsutils/usr/lib/os-probes/10zvol-test @@ -0,0 +1,14 @@ +#!/bin/sh +# Sub-test to exclude ZVOLs +set -e +partition="$1" + +. /usr/share/os-prober/common.sh + +if [ "$(stat -L -c %t "$partition")" = "e6" ] ; then + debug "$1 is a ZVOL; skipping" + exit 0 +fi + +# No ZVOLs found +exit 1 diff --git a/zfs-debian-pve/tree/zfsutils/usr/share/initramfs-tools/hooks/zdev b/zfs-debian-pve/tree/zfsutils/usr/share/initramfs-tools/hooks/zdev new file mode 100755 index 0000000..afd6dfb --- /dev/null +++ b/zfs-debian-pve/tree/zfsutils/usr/share/initramfs-tools/hooks/zdev @@ -0,0 +1,67 @@ +#!/bin/sh +# +# Add udev rules for ZoL to the initrd. +# + +PREREQ="udev" +PREREQ_UDEV_RULES="60-zvol.rules 69-vdev.rules" +COPY_EXEC_LIST="/lib/udev/vdev_id /lib/udev/zvol_id" + +# Generic result code. +RC=0 + +case $1 in +prereqs) + echo "$PREREQ" + exit 0 + ;; +esac + +for ii in $COPY_EXEC_LIST +do + if [ ! -x "$ii" ] + then + echo "Error: $ii is not executable." + RC=2 + fi +done + +if [ "$RC" -ne 0 ] +then + exit "$RC" +fi + +. /usr/share/initramfs-tools/hook-functions + +mkdir -p "$DESTDIR/lib/udev/rules.d/" +for ii in $PREREQ_UDEV_RULES +do + if [ -e "/etc/udev/rules.d/$ii" ] + then + cp -p "/etc/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/" + elif [ -e "/lib/udev/rules.d/$ii" ] + then + cp -p "/lib/udev/rules.d/$ii" "$DESTDIR/lib/udev/rules.d/" + else + echo "Error: Missing udev rule: $ii" + echo " This file must be in the /etc/udev/rules.d or /lib/udev/rules.d directory." + exit 1 + fi +done + +for ii in $COPY_EXEC_LIST +do + copy_exec "$ii" +done + +if [ -f '/etc/default/zfs' -a -r '/etc/default/zfs' ] +then + mkdir -p "$DESTDIR/etc/default" + cp -a '/etc/default/zfs' "$DESTDIR/etc/default/" +fi + +if [ -d '/etc/zfs' -a -r '/etc/zfs' ] +then + mkdir -p "$DESTDIR/etc" + cp -a '/etc/zfs' "$DESTDIR/etc/" +fi diff --git a/zfs-debian-pve/zfs-dkms.dkms b/zfs-debian-pve/zfs-dkms.dkms new file mode 100644 index 0000000..bfd18d0 --- /dev/null +++ b/zfs-debian-pve/zfs-dkms.dkms @@ -0,0 +1,88 @@ +BUILD_DEPENDS[0]="spl" +AUTOINSTALL="yes" +PACKAGE_NAME="zfs" +PACKAGE_VERSION="#MODULE_VERSION#" +PRE_BUILD="configure + --prefix=/usr + --with-config=kernel + --with-linux=$( + case `lsb_release -is` in + (Debian) + if [[ -e ${kernel_source_dir/%build/source} ]] + then + echo ${kernel_source_dir/%build/source} + else + # A kpkg exception for Proxmox 2.0 + echo ${kernel_source_dir} + fi + ;; + (*) + echo ${kernel_source_dir} + ;; + esac + ) + --with-linux-obj=${kernel_source_dir} + --with-spl=${source_tree}/spl-${PACKAGE_VERSION} + --with-spl-obj=${dkms_tree}/spl/${PACKAGE_VERSION}/${kernelver}/${arch} + $( + [[ -r /etc/default/zfs ]] \ + && source /etc/default/zfs \ + && shopt -q -s extglob \ + && \ + { + if [[ ${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]] + then + echo --enable-debug + fi + if [[ ${ZFS_DKMS_ENABLE_DEBUG_DMU_TX,,} == @(y|yes) ]] + then + echo --enable-debug-dmu-tx + fi + } + ) +" +POST_BUILD="cp + ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/zfs_config.h + ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/module/Module.symvers + ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/ +" +REMAKE_INITRD="$( + if [ -e /usr/share/initramfs-tools/hooks/zfs \ + -o -e /usr/share/dracut/modules.d/90zfs ] + then + echo -n yes + else + echo -n no + fi +)" +MAKE[0]="make" +STRIP[0]="$( + [[ -r /etc/default/zfs ]] \ + && source /etc/default/zfs \ + && shopt -q -s extglob \ + && [[ ${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \ + && echo -n no +)" +STRIP[1]="${STRIP[0]}" +STRIP[2]="${STRIP[0]}" +STRIP[3]="${STRIP[0]}" +STRIP[4]="${STRIP[0]}" +STRIP[5]="${STRIP[0]}" +BUILT_MODULE_NAME[0]="zavl" +BUILT_MODULE_LOCATION[0]="module/avl/" +DEST_MODULE_LOCATION[0]="/extra/zfs/zavl" +BUILT_MODULE_NAME[1]="zcommon" +BUILT_MODULE_LOCATION[1]="module/zcommon/" +DEST_MODULE_LOCATION[1]="/extra/zfs/zcommon" +BUILT_MODULE_NAME[2]="znvpair" +BUILT_MODULE_LOCATION[2]="module/nvpair/" +DEST_MODULE_LOCATION[2]="/extra/zfs/znvpair" +BUILT_MODULE_NAME[3]="zpios" +BUILT_MODULE_LOCATION[3]="module/zpios/" +DEST_MODULE_LOCATION[3]="/extra/zfs/zpios" +BUILT_MODULE_NAME[4]="zunicode" +BUILT_MODULE_LOCATION[4]="module/unicode/" +DEST_MODULE_LOCATION[4]="/extra/zfs/zunicode" +BUILT_MODULE_NAME[5]="zfs" +BUILT_MODULE_LOCATION[5]="module/zfs/" +DEST_MODULE_LOCATION[5]="/extra/zfs/zfs" diff --git a/zfs-debian-pve/zfs-dkms.postinst b/zfs-debian-pve/zfs-dkms.postinst new file mode 100644 index 0000000..0408a3c --- /dev/null +++ b/zfs-debian-pve/zfs-dkms.postinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +case $1 in + (configure) + [ -x /usr/share/update-notifier/notify-reboot-required ] \ + && /usr/share/update-notifier/notify-reboot-required + ;; +esac + +#DEBHELPER# diff --git a/zfs-debian-pve/zfs-dkms.prerm b/zfs-debian-pve/zfs-dkms.prerm new file mode 100644 index 0000000..07fe0c2 --- /dev/null +++ b/zfs-debian-pve/zfs-dkms.prerm @@ -0,0 +1,3 @@ +#!/bin/sh -e + +#DEBHELPER# diff --git a/zfs-debian-pve/zfs-doc.docs b/zfs-debian-pve/zfs-doc.docs new file mode 100644 index 0000000..425a0e5 --- /dev/null +++ b/zfs-debian-pve/zfs-doc.docs @@ -0,0 +1,2 @@ +COPYRIGHT +OPENSOLARIS.LICENSE diff --git a/zfs-debian-pve/zfs-doc.examples b/zfs-debian-pve/zfs-doc.examples new file mode 100644 index 0000000..50d986a --- /dev/null +++ b/zfs-debian-pve/zfs-doc.examples @@ -0,0 +1,56 @@ +etc/zfs/vdev_id.conf.alias.example +etc/zfs/vdev_id.conf.multipath.example +etc/zfs/vdev_id.conf.sas_direct.example +etc/zfs/vdev_id.conf.sas_switch.example +scripts/common.sh +scripts/zconfig.sh +scripts/zfault.sh +scripts/zfs.sh +scripts/zpios-profile/zpios-profile-disk.sh +scripts/zpios-profile/zpios-profile-pids.sh +scripts/zpios-profile/zpios-profile-post.sh +scripts/zpios-profile/zpios-profile-pre.sh +scripts/zpios-profile/zpios-profile.sh +scripts/zpios-sanity.sh +scripts/zpios-survey.sh +scripts/zpios-test/16th-8192rc-4rs-1cs-4off.sh +scripts/zpios-test/1th-16rc-4rs-1cs-4off.sh +scripts/zpios-test/1x256th-65536rc-4rs-1cs-4off.sh +scripts/zpios-test/256th-65536rc-4rs-1cs-4off.sh +scripts/zpios-test/4th-1024rc-4rs-1cs-4off.sh +scripts/zpios-test/large-thread-survey.sh +scripts/zpios-test/large.sh +scripts/zpios-test/lustre.sh +scripts/zpios-test/medium.sh +scripts/zpios-test/small.sh +scripts/zpios-test/tiny.sh +scripts/zpios.sh +scripts/zpool-config/dm0-raid0.sh +scripts/zpool-config/file-raid0.sh +scripts/zpool-config/file-raid10.sh +scripts/zpool-config/file-raidz.sh +scripts/zpool-config/file-raidz2.sh +scripts/zpool-config/hda-raid0.sh +scripts/zpool-config/lo-faulty-raid0.sh +scripts/zpool-config/lo-faulty-raid10.sh +scripts/zpool-config/lo-faulty-raidz.sh +scripts/zpool-config/lo-faulty-raidz2.sh +scripts/zpool-config/lo-faulty-raidz3.sh +scripts/zpool-config/lo-raid0.sh +scripts/zpool-config/lo-raid10.sh +scripts/zpool-config/lo-raidz.sh +scripts/zpool-config/lo-raidz2.sh +scripts/zpool-config/md0-raid10.sh +scripts/zpool-config/md0-raid5.sh +scripts/zpool-config/ram0-raid0.sh +scripts/zpool-config/scsi_debug-noraid.sh +scripts/zpool-config/scsi_debug-raid0.sh +scripts/zpool-config/scsi_debug-raid10.sh +scripts/zpool-config/scsi_debug-raidz.sh +scripts/zpool-config/scsi_debug-raidz2.sh +scripts/zpool-config/scsi_debug-raidz3.sh +scripts/zpool-config/sda-raid0.sh +scripts/zpool-config/zpool-raid0.sh +scripts/zpool-config/zpool-raid10.sh +scripts/zpool-config/zpool-raidz.sh +scripts/zpool-create.sh diff --git a/zfs-debian-pve/zfs-doc.install b/zfs-debian-pve/zfs-doc.install new file mode 100644 index 0000000..e69563b --- /dev/null +++ b/zfs-debian-pve/zfs-doc.install @@ -0,0 +1 @@ +../tree/zfs-doc/* / diff --git a/zfs-debian-pve/zfs-initramfs.install b/zfs-debian-pve/zfs-initramfs.install new file mode 100644 index 0000000..b853d8e --- /dev/null +++ b/zfs-debian-pve/zfs-initramfs.install @@ -0,0 +1 @@ +../tree/zfs-initramfs/* / diff --git a/zfs-debian-pve/zfs-initramfs.preinst b/zfs-debian-pve/zfs-initramfs.preinst new file mode 100644 index 0000000..af5657d --- /dev/null +++ b/zfs-debian-pve/zfs-initramfs.preinst @@ -0,0 +1,10 @@ +#!/bin/sh -e + +# @FIXME: During system start, the /etc/init/mountall.conf on Ubuntu is unable +# to generate the /etc/mtab file from the /proc/mounts file if a ZFS filesystem +# is already mounted. + +# This depends on mountall 2.18, which recognizes the link. +ln -sf /proc/mounts /etc/mtab + +#DEBHELPER# diff --git a/zfs-debian-pve/zfs-initramfs.triggers b/zfs-debian-pve/zfs-initramfs.triggers new file mode 100644 index 0000000..6c9f454 --- /dev/null +++ b/zfs-debian-pve/zfs-initramfs.triggers @@ -0,0 +1 @@ +activate update-initramfs diff --git a/zfs-debian-pve/zfsutils.install b/zfs-debian-pve/zfsutils.install new file mode 100644 index 0000000..35a5bad --- /dev/null +++ b/zfs-debian-pve/zfsutils.install @@ -0,0 +1,4 @@ +../tree/zfsutils/* / +sbin +lib/udev +usr/share/man diff --git a/zfs-debian-pve/zfsutils.postinst b/zfs-debian-pve/zfsutils.postinst new file mode 100644 index 0000000..15a986b --- /dev/null +++ b/zfs-debian-pve/zfsutils.postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if dpkg-maintscript-helper supports rm_conffile 2>/dev/null +then + dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@" +fi + +#DEBHELPER# diff --git a/zfs-debian-pve/zfsutils.postrm b/zfs-debian-pve/zfsutils.postrm new file mode 100644 index 0000000..15a986b --- /dev/null +++ b/zfs-debian-pve/zfsutils.postrm @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if dpkg-maintscript-helper supports rm_conffile 2>/dev/null +then + dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@" +fi + +#DEBHELPER# diff --git a/zfs-debian-pve/zfsutils.preinst b/zfs-debian-pve/zfsutils.preinst new file mode 100644 index 0000000..15a986b --- /dev/null +++ b/zfs-debian-pve/zfsutils.preinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if dpkg-maintscript-helper supports rm_conffile 2>/dev/null +then + dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@" + dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@" +fi + +#DEBHELPER# diff --git a/zfs-debian-pve/zfsutils.triggers b/zfs-debian-pve/zfsutils.triggers new file mode 100644 index 0000000..6c9f454 --- /dev/null +++ b/zfs-debian-pve/zfsutils.triggers @@ -0,0 +1 @@ +activate update-initramfs diff --git a/zfs-debian-pve/zfsutils.vdev.udev b/zfs-debian-pve/zfsutils.vdev.udev new file mode 100644 index 0000000..d6df785 --- /dev/null +++ b/zfs-debian-pve/zfsutils.vdev.udev @@ -0,0 +1,4 @@ +ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/vdev_id -d %k" +KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" +KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n" +KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" diff --git a/zfs-debian-pve/zfsutils.zfs-mount.init b/zfs-debian-pve/zfsutils.zfs-mount.init new file mode 100644 index 0000000..cfe2b31 --- /dev/null +++ b/zfs-debian-pve/zfsutils.zfs-mount.init @@ -0,0 +1,80 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: zvol zfs +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Mount ZFS filesystems +# Description: Run the `zfs mount -a` or `zfs umount -a` command. +# This init script is deprecated and should be disabled in the +# /etc/default/zfs options file. Instead, use the zfs-mount +# package for Debian or the zfs-mountall package for Ubuntu +### END INIT INFO + +PATH=/sbin:/bin + +. /lib/lsb/init-functions +. /lib/init/vars.sh + +[ -f /etc/default/zfs ] && . /etc/default/zfs + +do_start() +{ + log_begin_msg "Mounting ZFS filesystems" + log_progress_msg "filesystems" + zfs mount -a + RET=$? + + if [ $RET != 0 ] ; then + log_end_msg $RET + exit $RET + fi + + log_end_msg 0 +} + +do_stop() +{ + log_begin_msg "Unmounting ZFS filesystems" + log_progress_msg "filesystems" + zfs unmount -a + RET=$? + + # Ignore a non-zero `zfs` result so that a busy ZFS instance + # does not hang the system during shutdown. + if [ $RET != 0 ] ; then + log_end_msg $RET + fi + + log_end_msg 0 +} + +case "$1" in + (start) + case "$ZFS_MOUNT" in + ([Oo][Ff][Ff]|[Nn][Oo]|'') + exit 0 + ;; + esac + do_start + ;; + (stop) + case "$ZFS_UNMOUNT" in + ([Oo][Ff][Ff]|[Nn][Oo]|'') + exit 0 + ;; + esac + do_stop + ;; + (force-reload|reload|restart|status) + # no-op + ;; + + (*) + [ -n "$1" ] && echo "Error: Unknown command $1." + echo "Usage: $0 {start|stop}" + exit 3 + ;; +esac diff --git a/zfs-debian-pve/zfsutils.zfs-share.init b/zfs-debian-pve/zfsutils.zfs-share.init new file mode 100644 index 0000000..843271a --- /dev/null +++ b/zfs-debian-pve/zfsutils.zfs-share.init @@ -0,0 +1,80 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: shareiscsi sharenfs sharesmb zfs-share +# Required-Start: $local_fs $network $remote_fs +# Required-Stop: $local_fs $network $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Should-Start: iscsi iscsitarget istgt nfs-kernel-server samba +# Should-Stop: iscsi iscsitarget istgt nfs-kernel-server samba +# Short-Description: Network share OpenZFS datasets. +# Description: Run the `zfs share -a` or `zfs unmount -a` commands +# for controlling iSCSI, NFS, or CIFS network shares. +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +. /lib/lsb/init-functions +. /lib/init/vars.sh + +[ -f /etc/default/zfs ] && . /etc/default/zfs + +do_start() +{ + log_begin_msg "Sharing OpenZFS filesystems" + log_progress_msg "filesystems" + zfs share -a + RET=$? + + if [ $RET != 0 ] ; then + log_end_msg $RET + exit $RET + fi + + log_end_msg 0 +} + +do_stop() +{ + log_begin_msg "Unsharing OpenZFS filesystems" + log_progress_msg "filesystems" + zfs unshare -a + RET=$? + + # Ignore a non-zero `zfs` result so that a busy OpenZFS instance + # does not hang the system during shutdown. + if [ $RET != 0 ] ; then + log_end_msg $RET + fi + + log_end_msg 0 +} + +case "$1" in + (start) + case "$ZFS_SHARE" in + ([Oo][Ff][Ff]|[Nn][Oo]|'') + exit 0 + ;; + esac + do_start + ;; + (stop) + case "$ZFS_UNSHARE" in + ([Oo][Ff][Ff]|[Nn][Oo]|'') + exit 0 + ;; + esac + do_stop + ;; + (force-reload|reload|restart|status) + # no-op + ;; + + (*) + [ -n "$1" ] && echo "Error: Unknown command $1." + echo "Usage: $0 {start|stop}" + exit 3 + ;; +esac diff --git a/zfs-debian-pve/zfsutils.zfs.default b/zfs-debian-pve/zfsutils.zfs.default new file mode 100644 index 0000000..acdd39d --- /dev/null +++ b/zfs-debian-pve/zfsutils.zfs.default @@ -0,0 +1,25 @@ +# ZoL userland configuration. + +# Wait this many seconds during system start for pool member devices to appear +# before attempting import and starting mountall. +ZFS_AUTOIMPORT_TIMEOUT='30' + +# Run `zfs share -a` during system start? +# nb: The shareiscsi, sharenfs, and sharesmb dataset properties. +ZFS_SHARE='no' + +# Run `zfs unshare -a` during system stop? +ZFS_UNSHARE='no' + +# Build kernel modules with the --enable-debug switch? +ZFS_DKMS_ENABLE_DEBUG='no' + +# Build kernel modules with the --enable-debug-dmu-tx switch? +ZFS_DKMS_ENABLE_DEBUG_DMU_TX='no' + +# Keep debugging symbols in kernel modules? +ZFS_DKMS_DISABLE_STRIP='no' + +# Wait for this many seconds in the initrd pre_mountroot? +# This delays startup and should be '0' on most systems. +ZFS_INITRD_PRE_MOUNTROOT_SLEEP='0' diff --git a/zfs-debian-pve/zfsutils.zvol.udev b/zfs-debian-pve/zfsutils.zvol.udev new file mode 100644 index 0000000..136c8f3 --- /dev/null +++ b/zfs-debian-pve/zfsutils.zvol.udev @@ -0,0 +1 @@ +KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change" PROGRAM="/lib/udev/zvol_id $tempnode" SYMLINK+="zvol/%c"