[pve-devel] [PATCH zfsonlinux 09/15] add python3-pyzfs binary package
Stoiko Ivanov
s.ivanov at proxmox.com
Thu May 23 23:11:36 CEST 2019
taken from debian upstream [0]
[0] https://salsa.debian.org/zfsonlinux-team/zfs/
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
zfs/debian/control | 56 +++++++++++++++++++++++++++++++++++++---
zfs/debian/python3-pyzfs.install | 1 +
zfs/debian/rules | 14 +++++++++-
3 files changed, 67 insertions(+), 4 deletions(-)
create mode 100644 zfs/debian/python3-pyzfs.install
diff --git a/zfs/debian/control b/zfs/debian/control
index ab5ceef..b473269 100644
--- a/zfs/debian/control
+++ b/zfs/debian/control
@@ -9,13 +9,17 @@ Build-Depends: autotools-dev,
libattr1-dev,
libblkid-dev,
libselinux1-dev,
+ libssl-dev | libssl1.0-dev,
libtool,
lsb-release,
- python3,
+ python3-cffi,
+ python3-setuptools,
+ python3-sphinx,
+ python3-all-dev,
uuid-dev,
zlib1g-dev
Standards-Version: 4.1.2
-Homepage: http://www.zfsonlinux.org/
+Homepage: https://www.zfsonlinux.org/
Vcs-Git: https://git.proxmox.com/git/zfsonlinux.git
Vcs-Browser: https://git.proxmox.com/?p=zfsonlinux.git;a=summary
@@ -89,6 +93,51 @@ Description: OpenZFS pool library for Linux
.
This zpool library provides support for managing zpools.
+Package: python3-pyzfs
+Section: contrib/python
+Architecture: linux-any
+Depends: ${misc:Depends},
+ ${python3:Depends},
+ python3-cffi,
+ zfsutils-linux (= ${binary:Version})
+Description: wrapper for libzfs_core C library
+ libzfs_core is intended to be a stable interface for programmatic
+ administration of ZFS. This wrapper provides one-to-one wrappers for
+ libzfs_core API functions, but the signatures and types are more natural to
+ Python.
+ .
+ nvlists are wrapped as dictionaries or lists depending on their usage.
+ Some parameters have default values depending on typical use for
+ increased convenience. Enumerations and bit flags become strings and lists
+ of strings in Python. Errors are reported as exceptions rather than integer
+ errno-style error codes. The wrapper takes care to provide one-to-many
+ mapping of the error codes to the exceptions by interpreting a context
+ in which the error code is produced.
+
+Package: pyzfs-doc
+Section: contrib/doc
+Architecture: all
+Depends:
+ ${sphinxdoc:Depends},
+ ${misc:Depends}
+Recommends:
+ python3-pyzfs
+Description: wrapper for libzfs_core C library (documentation)
+ libzfs_core is intended to be a stable interface for programmatic
+ administration of ZFS. This wrapper provides one-to-one wrappers for
+ libzfs_core API functions, but the signatures and types are more natural to
+ Python.
+ .
+ nvlists are wrapped as dictionaries or lists depending on their usage.
+ Some parameters have default values depending on typical use for
+ increased convenience. Enumerations and bit flags become strings and lists
+ of strings in Python. Errors are reported as exceptions rather than integer
+ errno-style error codes. The wrapper takes care to provide one-to-many
+ mapping of the error codes to the exceptions by interpreting a context
+ in which the error code is produced.
+ .
+ This package contains the documentation.
+
Package: zfs-initramfs
Architecture: all
Depends: busybox-initramfs | busybox-static | busybox,
@@ -146,7 +195,8 @@ Depends: acl,
lsscsi,
mdadm,
parted,
- python,
+ python3,
+ python3-pyzfs,
sudo,
sysstat,
zfsutils-linux (>=${binary:Version}),
diff --git a/zfs/debian/python3-pyzfs.install b/zfs/debian/python3-pyzfs.install
new file mode 100644
index 0000000..4606faa
--- /dev/null
+++ b/zfs/debian/python3-pyzfs.install
@@ -0,0 +1 @@
+usr/lib/python3*
diff --git a/zfs/debian/rules b/zfs/debian/rules
index e08064d..7d044e9 100755
--- a/zfs/debian/rules
+++ b/zfs/debian/rules
@@ -5,10 +5,12 @@ include /usr/share/dpkg/default.mk
VERSION := $(DEB_VERSION_UPSTREAM)
REVISION := $(shell echo $(DEB_VERSION) | cut -d- -f2)
+SPHINX_BUILD = $(shell dpkg -L python3-sphinx | grep "sphinx-build$$")
+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
- dh $@ --with autoreconf,python3,systemd --parallel
+ dh $@ --with autoreconf,python3,systemd,sphinxdoc --parallel
adapt_meta_file:
@# Embed the downstream version in the module.
@@ -30,6 +32,7 @@ override_dh_auto_configure:
--with-udevdir=/lib/udev \
--with-zfsexecdir=/usr/lib/zfs-linux \
--enable-systemd \
+ --enable-pyzfs \
--with-systemdunitdir=/lib/systemd/system \
--with-systemdpresetdir=/lib/systemd/system-preset \
--with-systemdgeneratordir=/lib/systemd/system-generators \
@@ -68,6 +71,9 @@ override_dh_auto_install:
chmod a-x '$(CURDIR)/debian/tmp/etc/default/zfs'
chmod a-x '$(CURDIR)/debian/tmp/usr/share/bash-completion/completions/zfs'
+override_dh_python3:
+ dh_python3 -p python3-pyzfs
+
override_dh_makeshlibs:
dh_makeshlibs -a -V
ifeq ($(BUILD_UDEB), true)
@@ -91,6 +97,12 @@ override_dh_install:
find . -name lib*.la -delete
dh_install --fail-missing
+override_dh_installdocs:
+ dh_installdocs
+ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
+ http_proxy='127.0.0.1:9' $(SPHINX_BUILD) -N -bhtml "$(CURDIR)/contrib/pyzfs/docs/source/" debian/pyzfs-doc/usr/share/doc/pyzfs-doc/html/
+endif
+
# ------------
debian-copyright:
--
2.11.0
More information about the pve-devel
mailing list