mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Adopt pyzfs from ClusterHQ
This commit introduces several changes: * Update LICENSE and project information * Give a good PEP8 talk to existing Python source code * Add RPM/DEB packaging for pyzfs * Fix some outstanding issues with the existing pyzfs code caused by changes in the ABI since the last time the code was updated * Integrate pyzfs Python unittest with the ZFS Test Suite * Add missing libzfs_core functions: lzc_change_key, lzc_channel_program, lzc_channel_program_nosync, lzc_load_key, lzc_receive_one, lzc_receive_resumable, lzc_receive_with_cmdprops, lzc_receive_with_header, lzc_reopen, lzc_send_resume, lzc_sync, lzc_unload_key, lzc_remap Note: this commit slightly changes zfs_ioc_unload_key() ABI. This allow to differentiate the case where we tried to unload a key on a non-existing dataset (ENOENT) from the situation where a dataset has no key loaded: this is consistent with the "change" case where trying to zfs_ioc_change_key() from a dataset with no key results in EACCES. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #7230
This commit is contained in:
committed by
Brian Behlendorf
parent
6abf922574
commit
85ce3f4fd1
@@ -31,11 +31,14 @@ export ZEDLET_ETC_DIR=$$CMD_DIR/zed/zed.d
|
||||
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/zed/zed.d
|
||||
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/zpool/zpool.d
|
||||
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/zpool/zpool.d
|
||||
export CONTRIB_DIR=@abs_top_builddir@/contrib
|
||||
export LIB_DIR=@abs_top_builddir@/lib
|
||||
|
||||
export INSTALL_UDEV_DIR=@udevdir@
|
||||
export INSTALL_UDEV_RULE_DIR=@udevruledir@
|
||||
export INSTALL_MOUNT_HELPER_DIR=@mounthelperdir@
|
||||
export INSTALL_SYSCONF_DIR=@sysconfdir@
|
||||
export INSTALL_PYTHON_DIR=@pythonsitedir@
|
||||
|
||||
export KMOD_SPL=@SPL_OBJ@/module/spl/spl.ko
|
||||
export KMOD_SPLAT=@SPL_OBJ@/module/splat/splat.ko
|
||||
|
||||
@@ -110,6 +110,7 @@ if [ "$VERBOSE" = "yes" ]; then
|
||||
echo "udevruledir: $INSTALL_UDEV_RULE_DIR"
|
||||
echo "mounthelperdir: $INSTALL_MOUNT_HELPER_DIR"
|
||||
echo "sysconfdir: $INSTALL_SYSCONF_DIR"
|
||||
echo "pythonsitedir: $INSTALL_PYTHON_DIR"
|
||||
echo "dryrun: $DRYRUN"
|
||||
echo
|
||||
fi
|
||||
@@ -165,6 +166,16 @@ if [ "${INSTALL}" = "yes" ]; then
|
||||
"$INSTALL_UDEV_RULE_DIR/90-zfs.rules"
|
||||
install "$CMD_DIR/zpool/zpool.d" \
|
||||
"$INSTALL_SYSCONF_DIR/zfs/zpool.d"
|
||||
install "$CONTRIB_DIR/pyzfs/libzfs_core" \
|
||||
"$INSTALL_PYTHON_DIR/libzfs_core"
|
||||
# Ideally we would install these in the configured ${libdir}, which is
|
||||
# by default "/usr/local/lib and unfortunately not included in the
|
||||
# dynamic linker search path.
|
||||
install "$(find "$LIB_DIR/libzfs_core" -type f -name 'libzfs_core.so*')" \
|
||||
"/lib/libzfs_core.so"
|
||||
install "$(find "$LIB_DIR/libnvpair" -type f -name 'libnvpair.so*')" \
|
||||
"/lib/libnvpair.so"
|
||||
ldconfig
|
||||
else
|
||||
remove "$INSTALL_MOUNT_HELPER_DIR/mount.zfs"
|
||||
remove "$INSTALL_MOUNT_HELPER_DIR/fsck.zfs"
|
||||
@@ -174,6 +185,10 @@ else
|
||||
remove "$INSTALL_UDEV_RULE_DIR/69-vdev.rules"
|
||||
remove "$INSTALL_UDEV_RULE_DIR/90-zfs.rules"
|
||||
remove "$INSTALL_SYSCONF_DIR/zfs/zpool.d"
|
||||
remove "$INSTALL_PYTHON_DIR/libzfs_core"
|
||||
remove "/lib/libzfs_core.so"
|
||||
remove "/lib/libnvpair.so"
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user