24 Commits

Author SHA1 Message Date
Fabian Grünbichler 2ce263d24d bump version to 0.7.2-pve1
and add new zfs-test deb
2017-10-13 11:32:02 +02:00
Fabian Grünbichler 38b6b3a10d build: whitespace cleanup 2017-10-13 11:32:02 +02:00
Fabian Grünbichler 65fc6d785f zfs: add PR 6616 - compatibility with 0.6.5 2017-10-13 11:32:02 +02:00
Fabian Grünbichler f2be26ec96 zfs: add PR 6695
don't accidently skip over objects which should be freed
2017-10-13 11:32:02 +02:00
Fabian Grünbichler e2f4edc81e zfs: add various small fixes 2017-10-13 11:32:02 +02:00
Fabian Grünbichler 3c99d2a035 zfs: split test suite into zfs-test package 2017-10-13 11:32:02 +02:00
Fabian Grünbichler 3264cfc5e7 zfs: drop patch applied upstream 2017-10-12 13:23:57 +02:00
Fabian Grünbichler bdc71736c4 spl: add man page cleanup patches 2017-10-12 13:19:24 +02:00
Fabian Grünbichler 11fac95726 update SPL and ZFS sources to 0.7.2 2017-10-12 13:18:47 +02:00
Fabian Grünbichler 012341487f bump ZFS version to 0.6.5.11-pve18 2017-10-02 09:31:03 +02:00
Fabian Grünbichler ea927859d2 fix #1509: arc_summary error with L2ARC 2017-10-02 09:30:14 +02:00
Fabian Grünbichler e6fdafd565 build: remove old source tar balls and download target
they are not used anymore
2017-08-25 09:28:12 +02:00
Fabian Grünbichler 4c3d639686 bump version to 0.6.5.17-pve16/0.6.5.11-pve10 2017-08-07 15:28:34 +02:00
Fabian Grünbichler 8a19f2ad5d buildsys: switch to submodules 2017-08-07 15:28:34 +02:00
Fabian Grünbichler 56d9662c48 buildsys: add zfs-debian and spl-debian submodules 2017-08-07 15:28:34 +02:00
Fabian Grünbichler a59077893a drop patches applied upstream 2017-07-27 13:14:15 +02:00
Fabian Grünbichler 4156449701 update sources to 0.6.5.11-1 2017-07-27 13:10:29 +02:00
Fabian Grünbichler 8dbff718a0 update dkms removal patches
to reflect that we don't need DKMS for building.
2017-07-27 12:29:31 +02:00
Fabian Grünbichler 58a974f8f0 buildsys: add deb target 2017-07-27 12:09:16 +02:00
Fabian Grünbichler 1e88a70802 buildsys: clean up *.buildinfo 2017-03-10 10:50:09 +01:00
Fabian Grünbichler 59653d92a8 bump versions to -pve16~bpo90/pve-9~bpo90 2017-03-10 09:50:37 +01:00
Fabian Grünbichler a5dfd38639 buildsys: no longer build transitional packages 2017-03-10 09:50:37 +01:00
Fabian Grünbichler 100fba2dff drop patches no longer needed for stretch 2017-03-10 09:50:37 +01:00
Fabian Grünbichler eee857a82b buildsys: update make upload target for stretch 2017-03-10 09:37:21 +01:00
27 changed files with 1133 additions and 470 deletions
+6
View File
@@ -0,0 +1,6 @@
[submodule "zfs-debian"]
path = zfs-debian
url = ../mirror_zfs-debian
[submodule "spl-debian"]
path = spl-debian
url = ../mirror_spl-debian
+25 -33
View File
@@ -1,17 +1,17 @@
RELEASE=4.1 RELEASE=5.0
# source form https://github.com/zfsonlinux/ # source form https://github.com/zfsonlinux/
ZFSVER=0.6.5.9 ZFSVER=0.7.2
ZFSPKGREL=pve15~bpo80 ZFSPKGREL=pve1~bpo90
SPLPKGREL=pve8~bpo80 SPLPKGREL=pve1~bpo90
ZFSPKGVER=${ZFSVER}-${ZFSPKGREL} ZFSPKGVER=${ZFSVER}-${ZFSPKGREL}
SPLPKGVER=${ZFSVER}-${SPLPKGREL} SPLPKGVER=${ZFSVER}-${SPLPKGREL}
SPLDIR=pkg-spl SPLDIR=spl-build
SPLSRC=pkg-spl.tar.gz SPLSRC=spl-debian
ZFSDIR=pkg-zfs ZFSDIR=zfs-build
ZFSSRC=pkg-zfs.tar.gz ZFSSRC=zfs-debian
SPL_DEBS= \ SPL_DEBS= \
spl_${SPLPKGVER}_amd64.deb spl_${SPLPKGVER}_amd64.deb
@@ -25,58 +25,50 @@ libzpool2linux_${ZFSPKGVER}_amd64.deb \
zfs-dbg_${ZFSPKGVER}_amd64.deb \ zfs-dbg_${ZFSPKGVER}_amd64.deb \
zfs-zed_${ZFSPKGVER}_amd64.deb \ zfs-zed_${ZFSPKGVER}_amd64.deb \
zfs-initramfs_${ZFSPKGVER}_all.deb \ zfs-initramfs_${ZFSPKGVER}_all.deb \
zfs-test_${ZFSPKGVER}_amd64.deb \
zfsutils-linux_${ZFSPKGVER}_amd64.deb zfsutils-linux_${ZFSPKGVER}_amd64.deb
ZFS_TRANS_DEBS= \ DEBS=${SPL_DEBS} ${ZFS_DEBS}
libnvpair1_${ZFSPKGVER}_all.deb \
libuutil1_${ZFSPKGVER}_all.deb \
libzfs2_${ZFSPKGVER}_all.deb \
libzpool2_${ZFSPKGVER}_all.deb \
zfsutils_${ZFSPKGVER}_all.deb
DEBS=${SPL_DEBS} ${ZFS_DEBS} ${ZFS_TRANS_DEBS} all: deb
deb: ${DEBS}
all: ${DEBS}
.PHONY: dinstall .PHONY: dinstall
dinstall: ${DEBS} dinstall: ${DEBS}
dpkg -i ${DEBS} dpkg -i ${DEBS}
.PHONY: submodule
submodule:
test -f "${ZFSSRC}/debian/changelog" || git submodule update --init
test -f "${SPLSRC}/debian/changelog" || git submodule update --init
.PHONY: spl .PHONY: spl
spl ${SPL_DEBS}: ${SPLSRC} spl ${SPL_DEBS}: ${SPLSRC}
rm -rf ${SPLDIR} rm -rf ${SPLDIR}
tar xf ${SPLSRC} mkdir ${SPLDIR}
cp -a ${SPLSRC}/* ${SPLDIR}/
mv ${SPLDIR}/debian/changelog ${SPLDIR}/debian/changelog.org mv ${SPLDIR}/debian/changelog ${SPLDIR}/debian/changelog.org
cat spl-changelog.Debian ${SPLDIR}/debian/changelog.org > ${SPLDIR}/debian/changelog cat spl-changelog.Debian ${SPLDIR}/debian/changelog.org > ${SPLDIR}/debian/changelog
cd ${SPLDIR}; ln -s ../spl-patches patches cd ${SPLDIR}; ln -s ../spl-patches patches
cd ${SPLDIR}; quilt push -a cd ${SPLDIR}; quilt push -a
cd ${SPLDIR}; rm -rf .pc ./patches cd ${SPLDIR}; rm -rf .pc ./patches
cd ${SPLDIR}; dpkg-buildpackage -b -uc -us cd ${SPLDIR}; dpkg-buildpackage -b -uc -us
.PHONY: zfs .PHONY: zfs
zfs ${ZFS_DEBS} ${ZFS_TRANS_DEBS}: ${ZFSSRC} zfs ${ZFS_DEBS} ${ZFS_TRANS_DEBS}: ${ZFSSRC}
rm -rf ${ZFSDIR} rm -rf ${ZFSDIR}
tar xf ${ZFSSRC} mkdir ${ZFSDIR}
cp -a ${ZFSSRC}/* ${ZFSDIR}/
mv ${ZFSDIR}/debian/changelog ${ZFSDIR}/debian/changelog.org mv ${ZFSDIR}/debian/changelog ${ZFSDIR}/debian/changelog.org
cat zfs-changelog.Debian ${ZFSDIR}/debian/changelog.org > ${ZFSDIR}/debian/changelog cat zfs-changelog.Debian ${ZFSDIR}/debian/changelog.org > ${ZFSDIR}/debian/changelog
cd ${ZFSDIR}; ln -s ../zfs-patches patches cd ${ZFSDIR}; ln -s ../zfs-patches patches
cd ${ZFSDIR}; quilt push -a cd ${ZFSDIR}; quilt push -a
cd ${ZFSDIR}; rm -rf .pc ./patches cd ${ZFSDIR}; rm -rf .pc ./patches
cd ${ZFSDIR}; dpkg-buildpackage -b -uc -us cd ${ZFSDIR}; dpkg-buildpackage -b -uc -us
.PHONY: download
download:
rm -rf pkg-spl pkg-zfs ${SPLSRC} ${ZFSSRC}
# clone pkg-zfsonlinux/spl and checkout 0.6.5.9-1
git clone -b debian/0.6.5.9-1 git://anonscm.debian.org/pkg-zfsonlinux/spl.git pkg-spl
# clone pkg-zfsonlinux/zfs and checkout 0.6.5.9-2
git clone -b debian/0.6.5.9-2 git://anonscm.debian.org/pkg-zfsonlinux/zfs.git pkg-zfs
tar czf ${SPLSRC} pkg-spl
tar czf ${ZFSSRC} pkg-zfs
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf *~ *.deb *.changes ${ZFSDIR} ${SPLDIR} rm -rf *~ *.deb *.changes *.buildinfo ${ZFSDIR} ${SPLDIR}
.PHONY: distclean .PHONY: distclean
distclean: clean distclean: clean
@@ -84,4 +76,4 @@ distclean: clean
.PHONY: upload .PHONY: upload
upload: ${DEBS} upload: ${DEBS}
tar -cf - ${DEBS} | ssh repoman@repo.proxmox.com upload tar -cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch amd64
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+20
View File
@@ -1,3 +1,23 @@
spl-linux (0.7.2-pve1~bpo90) unstable; urgency=medium
* update spl to 0.7.2
* clean up man pages
-- Proxmox Support Team <support@proxmox.com> Thu, 12 Oct 2017 13:33:04 +0200
spl-linux (0.6.5.11-pve10~bpo90) unstable; urgency=medium
* update spl to debian/0.6.5.11-1
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Jul 2017 13:11:45 +0200
spl-linux (0.6.5.9-pve9~bpo90) unstable; urgency=medium
* rebuild for PVE 5.0 / Debian Stretch
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Mar 2017 09:45:52 +0100
spl-linux (0.6.5.9-pve8~bpo80) unstable; urgency=medium spl-linux (0.6.5.9-pve8~bpo80) unstable; urgency=medium
* update spl to debian/0.6.5.9-1 * update spl to debian/0.6.5.9-1
Submodule
+1
Submodule spl-debian added at 135069abeb
@@ -1,7 +1,7 @@
From b750abda7a2b24c52a4fba505571a629223ad64e Mon Sep 17 00:00:00 2001 From 9cb5edffe475c25c4132aace431ffc6a97531583 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 12 Oct 2016 10:57:39 +0200 Date: Wed, 12 Oct 2016 10:57:39 +0200
Subject: [PATCH] remove DKMS and module build Subject: [PATCH 1/3] remove DKMS and module build
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@@ -9,8 +9,9 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
--- ---
debian/control.in | 24 -------------------- debian/control.in | 24 --------------------
debian/control | 1 -
debian/rules | 68 +------------------------------------------------------ debian/rules | 68 +------------------------------------------------------
2 files changed, 1 insertion(+), 91 deletions(-) 3 files changed, 1 insertion(+), 92 deletions(-)
diff --git a/debian/control.in b/debian/control.in diff --git a/debian/control.in b/debian/control.in
index 52c1660..dc6ee96 100644 index 52c1660..dc6ee96 100644
@@ -57,6 +58,18 @@ index 52c1660..dc6ee96 100644
Description: Solaris Porting Layer user-space utilities for Linux Description: Solaris Porting Layer user-space utilities for Linux
The Solaris Porting Layer (SPL) is a Linux kernel module which provides The Solaris Porting Layer (SPL) is a Linux kernel module which provides
many of the Solaris kernel APIs. This shim layer makes it possible to many of the Solaris kernel APIs. This shim layer makes it possible to
diff --git a/debian/control b/debian/control
index 52c1660..e055965 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Build-Depends: autogen,
autotools-dev,
debhelper (>= 9),
dh-autoreconf,
- dkms (>> 2.2.0.2-1~),
libtool
Standards-Version: 3.9.8
Homepage: http://www.zfsonlinux.org/
diff --git a/debian/rules b/debian/rules diff --git a/debian/rules b/debian/rules
index b2fc86c..a474ca4 100755 index b2fc86c..a474ca4 100755
--- a/debian/rules --- a/debian/rules
@@ -146,5 +159,5 @@ index b2fc86c..a474ca4 100755
- -
- dh_builddeb -p${pmodules} - dh_builddeb -p${pmodules}
-- --
2.1.4 2.14.1
@@ -0,0 +1,55 @@
From b414fa1353cac23e1d58d3fbdd1c48a7925bdbdb Mon Sep 17 00:00:00 2001
From: Fabian-Gruenbichler <f.gruenbichler@proxmox.com>
Date: Fri, 11 Aug 2017 00:21:54 +0200
Subject: [PATCH 2/3] splat.1 manpage: fix spelling of 'hexadecimal'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #642
(cherry picked from commit a02fa347b75266f40c8f571d7d63a21ec7f6f13d)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
man/man1/splat.1 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/man/man1/splat.1 b/man/man1/splat.1
index 37f8435..407680b 100644
--- a/man/man1/splat.1
+++ b/man/man1/splat.1
@@ -32,7 +32,7 @@ Print the usage message.
.BI "\-l" "" ", \-\-list" ""
.IP
For each spl.ko subsystem, print all available test names and
-hexidecimal identifiers with a short description.
+hexadecimal identifiers with a short description.
.HP
.BI "\-t" " subsystem" ":" "test" ", \-\-test" " subsystem" ":" "test"
.HP
@@ -42,9 +42,9 @@ Run the \fItest\fR diagnostic routine for the spl.ko \fIsubsystem\fR.
Specify this option more than once to run multiple tests.
The \fItest\fR and \fIsubsystem\fR parameters are the names or
-hexidecimal identifiers returned by the \fBsplat --list\fR command.
+hexadecimal identifiers returned by the \fBsplat --list\fR command.
-If \fIsubsystem\fR is a name and not a hexidecimal identifier, then the
+If \fIsubsystem\fR is a name and not a hexadecimal identifier, then the
\fBall\fR keyword can be used to run all available \fIsubsystem\fR
tests.
@@ -73,7 +73,7 @@ Test the kernel compression and queue waiting facilities:
# splat --test zlib:compress/uncompress --test taskq:wait
.LP
This is the same as the previous command, except that the subsystems
-and tests are referenced by hexidecimal identifier instead of by name:
+and tests are referenced by hexadecimal identifier instead of by name:
.IP
# splat -t 0x0f00:0x0f01 -t 0x0200:0x0204
--
2.14.1
@@ -0,0 +1,38 @@
From cb03b1234f9e3645fb731fdbeb5ba12f0013caa8 Mon Sep 17 00:00:00 2001
From: Fabian-Gruenbichler <f.gruenbichler@proxmox.com>
Date: Fri, 11 Aug 2017 00:22:31 +0200
Subject: [PATCH 3/3] spl-module-parameters.5 manpage: fix macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There is no '.sh' macro in troff/groff/man, only '.SH' for section
headers. I assume .sp for a line break was intended here like
in the rest of the man page.
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #643
(cherry picked from commit 945b7f1c63e3a12d08349afb986b7dfaca370222)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
man/man5/spl-module-parameters.5 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5
index 97241fd..e151144 100644
--- a/man/man5/spl-module-parameters.5
+++ b/man/man5/spl-module-parameters.5
@@ -153,7 +153,7 @@ function takes a single global lock over the entire virtual address range
which serializes all allocations. Using slightly different allocation
functions for small and large objects allows us to handle a wide range of
object sizes.
-.sh
+.sp
The \fBspl_kmem_cache_kmem_limit\fR value is used to determine this cutoff
size. One quarter the PAGE_SIZE is used as the default value because
\fBspl_kmem_cache_obj_per_slab\fR defaults to 16. This means that at
--
2.14.1
+3 -1
View File
@@ -1 +1,3 @@
fix-control.patch 0001-remove-DKMS-and-module-build.patch
0002-splat.1-manpage-fix-spelling-of-hexadecimal.patch
0003-spl-module-parameters.5-manpage-fix-macro.patch
+36
View File
@@ -1,3 +1,39 @@
zfs-linux (0.7.2-pve1~bpo90) unstable; urgency=medium
* update zfs to 0.7.2
* add PR 6616 - zfs send/recv compatibility with 0.6.5
* add PR 6695 - zfs recv: don't skip over objects which should be freed
* various small fixes
* split test suite into zfs-test package
-- Proxmox Support Team <support@proxmox.com> Thu, 12 Oct 2017 13:34:05 +0200
zfs-linux (0.6.5.11-pve18~bpo90) unstable; urgency=medium
* fix #1509: arc_summary error with L2ARC
-- Proxmox Support Team <support@proxmox.com> Mon, 2 Oct 2017 09:30:41 +0200
zfs-linux (0.6.5.11-pve17~bpo90) unstable; urgency=medium
* update zfs to debian/0.6.5.11-1
-- Proxmox Support Team <support@proxmox.com> Thu, 27 Jul 2017 13:11:45 +0200
zfs-linux (0.6.5.9-pve16~bpo90) unstable; urgency=medium
* drop transitional packages
* convert python scripts to python 3, drop .py suffix
* rebuild for PVE 5.0 / Debian Stretch
-- Proxmox Support Team <support@proxmox.com> Fri, 10 Mar 2017 09:45:52 +0100
zfs-linux (0.6.5.9-pve15~bpo80) unstable; urgency=medium zfs-linux (0.6.5.9-pve15~bpo80) unstable; urgency=medium
* update zfs to debian/0.6.5.9-1 * update zfs to debian/0.6.5.9-1
Submodule
+1
Submodule zfs-debian added at 024b8de22e
@@ -1,174 +0,0 @@
From b8f3b081a866fc3d529fb2e72c425ef54c4d141d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Jan 2017 09:16:11 +0100
Subject: [PATCH 1/6] Undo python changes until PVE 5.0 release
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Revert "Remove .py extension from utilities in /usr/sbin as per policy 10.4 Scripts (LP: #1628279)"
This reverts commit e1c956cc55451476c465aad351c4b9c92294fc36.
Revert "Use python3 for arcstat.py, arc_summary.py & dbufstat.py (LP: #1627909)"
This reverts commit a52a9356809b8a09b97957a238a36da82ce9f850.
Revert "Add missing part in python3 move"
This reverts commit 9173586640d4a9f64f87a70bb9f93e41c78009fc.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control.in | 4 ++--
debian/patches/1001-cmd-python-exec-path.patch | 30 --------------------------
debian/control | 4 ++--
debian/patches/series | 1 -
debian/rules | 11 ++++------
debian/zfsutils-linux.install | 6 +++---
6 files changed, 11 insertions(+), 45 deletions(-)
delete mode 100644 debian/patches/1001-cmd-python-exec-path.patch
diff --git a/debian/control.in b/debian/control.in
index 76907e4..db75496 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -16,7 +16,7 @@ Build-Depends: dh-autoreconf,
po-debconf,
uuid-dev,
zlib1g-dev,
- python3,
+ python,
dh-python,
libblkid-dev,
libattr1-dev
@@ -127,7 +127,7 @@ Description: OpenZFS root filesystem capabilities for Linux - dracut
Package: zfsutils-linux
Section: contrib/admin
Architecture: linux-any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, python3
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
Conflicts: zfs, zfs-fuse, zutils
diff --git a/debian/patches/1001-cmd-python-exec-path.patch b/debian/patches/1001-cmd-python-exec-path.patch
deleted file mode 100644
index a05afb4..0000000
--- a/debian/patches/1001-cmd-python-exec-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: zfs-linux-0.6.5.8/cmd/arc_summary/arc_summary.py
-===================================================================
---- zfs-linux-0.6.5.8.orig/cmd/arc_summary/arc_summary.py
-+++ zfs-linux-0.6.5.8/cmd/arc_summary/arc_summary.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # $Id: arc_summary.pl,v 388:e27800740aa2 2011-07-08 02:53:29Z jhell $
- #
-Index: zfs-linux-0.6.5.8/cmd/arcstat/arcstat.py
-===================================================================
---- zfs-linux-0.6.5.8.orig/cmd/arcstat/arcstat.py
-+++ zfs-linux-0.6.5.8/cmd/arcstat/arcstat.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # Print out ZFS ARC Statistics exported via kstat(1)
- # For a definition of fields, or usage, use arctstat.pl -v
-Index: zfs-linux-0.6.5.8/cmd/dbufstat/dbufstat.py
-===================================================================
---- zfs-linux-0.6.5.8.orig/cmd/dbufstat/dbufstat.py
-+++ zfs-linux-0.6.5.8/cmd/dbufstat/dbufstat.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # Print out statistics for all cached dmu buffers. This information
- # is available through the dbufs kstat and may be post-processed as
diff --git a/debian/control b/debian/control
index 76907e4..db75496 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Build-Depends: dh-autoreconf,
po-debconf,
uuid-dev,
zlib1g-dev,
- python3,
+ python,
dh-python,
libblkid-dev,
libattr1-dev
@@ -127,7 +127,7 @@ Description: OpenZFS root filesystem capabilities for Linux - dracut
Package: zfsutils-linux
Section: contrib/admin
Architecture: linux-any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, python3
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
Conflicts: zfs, zfs-fuse, zutils
diff --git a/debian/patches/series b/debian/patches/series
index df85d5b..0fed690 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,6 @@
1000-ppc64el-endian-support.patch
1002-fix-mips-build.patch
enable-zed.patch
-1001-cmd-python-exec-path.patch
1004-zed-service-bindir.patch
1002-Fix-dev-zfs-device-is-missing.patch
0001-fix-booting-via-dracut-generated-initramfs.patch
diff --git a/debian/rules b/debian/rules
index 9efbace..70e57e5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,7 +35,7 @@ pmodules = $(PACKAGE)-modules-$(non_epoch_version)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
- dh $@ --with autoreconf,dkms,python3,systemd --parallel
+ dh $@ --with autoreconf,dkms,python2,systemd --parallel
override_dh_auto_configure:
@cp debian/control.in debian/control
@@ -64,14 +64,11 @@ override_dh_auto_install:
@# Install the utilities.
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
-
# Move from bin_dir to /usr/sbin
- # Remove suffix (.py) as per policy 10.4 - Scripts
- # https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
mkdir -p '$(CURDIR)/debian/tmp/usr/sbin/'
- mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary.py' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary'
- mv '$(CURDIR)/debian/tmp/usr/bin/arcstat.py' '$(CURDIR)/debian/tmp/usr/sbin/arcstat'
- mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat.py' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat'
+ mv '$(CURDIR)/debian/tmp/usr/bin/arc_summary.py' '$(CURDIR)/debian/tmp/usr/sbin/arc_summary.py'
+ mv '$(CURDIR)/debian/tmp/usr/bin/arcstat.py' '$(CURDIR)/debian/tmp/usr/sbin/arcstat.py'
+ mv '$(CURDIR)/debian/tmp/usr/bin/dbufstat.py' '$(CURDIR)/debian/tmp/usr/sbin/dbufstat.py'
@# Zed has dependencies outside of the system root.
$(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install
index 947ffd9..4badbf1 100644
--- a/debian/zfsutils-linux.install
+++ b/debian/zfsutils-linux.install
@@ -19,9 +19,9 @@ sbin/zdb
sbin/zpios
sbin/zpool
sbin/zfs
-usr/sbin/arc_summary
-usr/sbin/arcstat
-usr/sbin/dbufstat
+usr/sbin/arc_summary.py
+usr/sbin/arcstat.py
+usr/sbin/dbufstat.py
usr/share/zfs/
usr/share/man/man1/
usr/share/man/man5/
--
2.1.4
@@ -1,7 +1,7 @@
From 0e7871b8878f78fd2c8c73a50cbf805b39afb4e7 Mon Sep 17 00:00:00 2001 From 6ea6f086a714ed9157f7e880426a71f46f48c2db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 6 Feb 2017 11:03:10 +0100 Date: Mon, 6 Feb 2017 11:03:10 +0100
Subject: [PATCH 2/6] remove DKMS, modules and dracut build Subject: [PATCH 1/3] remove DKMS, modules and dracut build
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@@ -9,11 +9,12 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
--- ---
debian/control.in | 34 +++--------------- debian/control.in | 34 +++---------------
debian/control | 1 -
debian/rules | 105 ++---------------------------------------------------- debian/rules | 105 ++----------------------------------------------------
2 files changed, 6 insertions(+), 133 deletions(-) 3 files changed, 6 insertions(+), 134 deletions(-)
diff --git a/debian/control.in b/debian/control.in diff --git a/debian/control.in b/debian/control.in
index db75496..22dd958 100644 index 76907e45..235e74c9 100644
--- a/debian/control.in --- a/debian/control.in
+++ b/debian/control.in +++ b/debian/control.in
@@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf, @@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
@@ -69,7 +70,7 @@ index db75496..22dd958 100644
Package: zfsutils-linux Package: zfsutils-linux
Section: contrib/admin Section: contrib/admin
Architecture: linux-any Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends} Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, python3
-Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed -Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
-Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut -Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
+Recommends: lsb-base, zfs-zed +Recommends: lsb-base, zfs-zed
@@ -86,8 +87,20 @@ index db75496..22dd958 100644
Description: OpenZFS Event Daemon Description: OpenZFS Event Daemon
The Z file system is a pooled filesystem designed for maximum data The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data integrity, supporting data snapshots, multiple copies, and data
diff --git a/debian/control b/debian/control
index 76907e45..3bcb9a96 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
dh-systemd,
autotools-dev,
debhelper (>= 9),
- dkms (>> 2.1.1.2-5),
libselinux1-dev,
libtool,
lsb-release,
diff --git a/debian/rules b/debian/rules diff --git a/debian/rules b/debian/rules
index 70e57e5..0c8a6a2 100755 index 9efbace6..49da7067 100755
--- a/debian/rules --- a/debian/rules
+++ b/debian/rules +++ b/debian/rules
@@ -5,9 +5,6 @@ NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META) @@ -5,9 +5,6 @@ NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
@@ -119,12 +132,12 @@ index 70e57e5..0c8a6a2 100755
export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%: %:
- dh $@ --with autoreconf,dkms,python2,systemd --parallel - dh $@ --with autoreconf,dkms,python3,systemd --parallel
+ dh $@ --with autoreconf,python2,systemd --parallel + dh $@ --with autoreconf,python3,systemd --parallel
override_dh_auto_configure: override_dh_auto_configure:
@cp debian/control.in debian/control @cp debian/control.in debian/control
@@ -74,36 +66,6 @@ override_dh_auto_install: @@ -77,36 +69,6 @@ override_dh_auto_install:
$(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/' $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed' mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
@@ -161,7 +174,7 @@ index 70e57e5..0c8a6a2 100755
mkdir -p $(CURDIR)/debian/tmp/usr/lib mkdir -p $(CURDIR)/debian/tmp/usr/lib
for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \ for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \ ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
@@ -113,9 +75,6 @@ override_dh_auto_install: @@ -116,9 +78,6 @@ override_dh_auto_install:
chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
@@ -171,7 +184,7 @@ index 70e57e5..0c8a6a2 100755
override_dh_makeshlibs: override_dh_makeshlibs:
dh_makeshlibs -a dh_makeshlibs -a
ifeq ($(BUILD_UDEB), true) ifeq ($(BUILD_UDEB), true)
@@ -153,65 +112,5 @@ override_dh_install: @@ -156,65 +115,5 @@ override_dh_install:
# ------------ # ------------
@@ -238,5 +251,5 @@ index 70e57e5..0c8a6a2 100755
debian-copyright: debian-copyright:
cme update dpkg-copyright -file debian/copyright.cme cme update dpkg-copyright -file debian/copyright.cme
-- --
2.1.4 2.11.0
@@ -1,7 +1,7 @@
From 9a97a884f8a409395e00891afdc28fa92b9f79b3 Mon Sep 17 00:00:00 2001 From e64c1e7341865c7a0b060ac9aa9a988ad589b31f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 24 Oct 2016 13:47:06 +0200 Date: Mon, 24 Oct 2016 13:47:06 +0200
Subject: [PATCH 5/6] import with -d /dev/disk/by-id in scan service Subject: [PATCH 2/3] import with -d /dev/disk/by-id in scan service
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
+102
View File
@@ -0,0 +1,102 @@
From b2ad235e8b8053b6e033de855e7f3932031a207d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Oct 2017 14:22:34 +0200
Subject: [PATCH 03/11] add zfs-test package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control.in | 13 +++++++++++++
debian/control | 13 +++++++++++++
debian/zfs-test.install | 16 ++++++++++++++++
debian/zfsutils-linux.install | 1 -
4 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 debian/zfs-test.install
diff --git a/debian/control.in b/debian/control.in
index 199c0df0d..b802712a0 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -125,6 +125,19 @@ Description: OpenZFS Event Daemon
.
This package provides the OpenZFS Event Daemon (zed).
+Package: zfs-test
+Section: contrib/admin
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux, parted, lsscsi, mdadm, bc, ksh, fio, acl, sudo, sysstat, python
+Description: OpenZFS test infrastructure an support scripts
+ The Z file system is a pooled filesystem designed for maximum data
+ integrity, supporting data snapshots, multiple copies, and data
+ checksums.
+ .
+ This package provides the OpenZFS test infrastructure for destructively
+ testing and validating a system using OpenZFS. It is entirely optional
+ and should only be installed and used in test environments.
+
Package: zfs-dbg
Section: contrib/debug
Priority: extra
diff --git a/debian/control b/debian/control
index 6775aa71a..6a2a3b654 100644
--- a/debian/control
+++ b/debian/control
@@ -150,6 +150,19 @@ Description: OpenZFS Event Daemon
.
This package provides the OpenZFS Event Daemon (zed).
+Package: zfs-test
+Section: contrib/admin
+Architecture: linux-any
+Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux, parted, lsscsi, mdadm, bc, ksh, fio, acl, sudo, sysstat, python
+Description: OpenZFS test infrastructure an support scripts
+ The Z file system is a pooled filesystem designed for maximum data
+ integrity, supporting data snapshots, multiple copies, and data
+ checksums.
+ .
+ This package provides the OpenZFS test infrastructure for destructively
+ testing and validating a system using OpenZFS. It is entirely optional
+ and should only be installed and used in test environments.
+
Package: zfs-dbg
Section: contrib/debug
Priority: extra
diff --git a/debian/zfs-test.install b/debian/zfs-test.install
new file mode 100644
index 000000000..ad98d183e
--- /dev/null
+++ b/debian/zfs-test.install
@@ -0,0 +1,16 @@
+usr/share/zfs/common.sh
+usr/share/zfs/runfiles/
+usr/share/zfs/smb.sh
+usr/share/zfs/test-runner
+usr/share/zfs/zfs-tests/
+usr/share/zfs/zfs-tests.sh
+usr/share/zfs/zfs.sh
+usr/share/zfs/zimport.sh
+usr/share/zfs/zloop.sh
+usr/share/zfs/zpios*
+usr/share/zfs/zpool-config/
+usr/share/zfs/zpool-create.sh
+usr/share/zfs/common.sh
+usr/share/zfs/common.sh
+usr/share/zfs/common.sh
+usr/bin/raidz_test
diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install
index 947ffd91c..5b7dabfa9 100644
--- a/debian/zfsutils-linux.install
+++ b/debian/zfsutils-linux.install
@@ -22,7 +22,6 @@ sbin/zfs
usr/sbin/arc_summary
usr/sbin/arcstat
usr/sbin/dbufstat
-usr/share/zfs/
usr/share/man/man1/
usr/share/man/man5/
usr/share/man/man8/zstreamdump.8
--
2.14.1
@@ -1,68 +0,0 @@
From 7e46d0f379706d74d5dc05ff20e58e708a1005a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 12 Oct 2016 11:32:17 +0200
Subject: [PATCH 3/6] add zfsutils.preinst/postinst for wheezy upgrade path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/zfsutils-linux.postinst | 20 ++++++++++++++++++++
debian/zfsutils-linux.preinst | 17 +++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100755 debian/zfsutils-linux.postinst
create mode 100755 debian/zfsutils-linux.preinst
diff --git a/debian/zfsutils-linux.postinst b/debian/zfsutils-linux.postinst
new file mode 100755
index 0000000..7d57919
--- /dev/null
+++ b/debian/zfsutils-linux.postinst
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library
+. /usr/share/debconf/confmodule
+
+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 -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
+fi
+
+#DEBHELPER#
+
diff --git a/debian/zfsutils-linux.preinst b/debian/zfsutils-linux.preinst
new file mode 100755
index 0000000..9338a7c
--- /dev/null
+++ b/debian/zfsutils-linux.preinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -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 -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
+fi
+
+#DEBHELPER#
+
--
2.1.4
@@ -0,0 +1,75 @@
From 32939d5a4aed18160e508f029e5d26cf62e37ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Oct 2017 14:28:07 +0200
Subject: [PATCH 04/11] dracut: make module-setup.sh shebang explicit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...cut-make-module-setup.sh-shebang-explicit.patch | 42 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 43 insertions(+)
create mode 100644 debian/patches/0008-dracut-make-module-setup.sh-shebang-explicit.patch
diff --git a/debian/patches/0008-dracut-make-module-setup.sh-shebang-explicit.patch b/debian/patches/0008-dracut-make-module-setup.sh-shebang-explicit.patch
new file mode 100644
index 000000000..3114035dc
--- /dev/null
+++ b/debian/patches/0008-dracut-make-module-setup.sh-shebang-explicit.patch
@@ -0,0 +1,42 @@
+From: Fabian-Gruenbichler <f.gruenbichler@proxmox.com>
+Date: Mon, 14 Aug 2017 19:56:04 +0200
+Subject: dracut: make module-setup.sh shebang explicit
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+while these are source by dracut (which is a bash script)
+the practical difference is small, but it is more correct:
+
+/bin/sh is not bash on all systems (e.g. Debian and its
+derivatives use /bin/dash as /bin/sh by default).
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+Closes #6491
+(cherry picked from commit 42a76fc8d757ab82fc1ce8e5e1f2079e07a5b9d4)
+---
+ contrib/dracut/02zfsexpandknowledge/module-setup.sh.in | 2 +-
+ contrib/dracut/90zfs/module-setup.sh.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
+index 981beb3..c22141f 100755
+--- a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
++++ b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ get_devtype() {
+ local typ
+diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
+index 9bbee0e..7632cbc 100755
+--- a/contrib/dracut/90zfs/module-setup.sh.in
++++ b/contrib/dracut/90zfs/module-setup.sh.in
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ check() {
+ # We depend on udev-rules being loaded
diff --git a/debian/patches/series b/debian/patches/series
index 5714ff20c..ca6cf6657 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
enable-zed.patch
1001-cmd-python-exec-path.patch
1004-zed-service-bindir.patch
+0008-dracut-make-module-setup.sh-shebang-explicit.patch
--
2.14.1
@@ -1,141 +0,0 @@
From 97a0ced45e12cd4cca627392f2d9eea6963ee00e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 12 Oct 2016 13:16:03 +0200
Subject: [PATCH 4/6] ensure upgrade path from existing PVE ZFS packages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control.in | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/debian/control.in b/debian/control.in
index 22dd958..2bee2bf 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -28,6 +28,8 @@ Package: libnvpair1linux
Section: contrib/libs
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}
+Replaces: libnvpair1 (<< 0.6.5.8-pve11~bpo80)
+Breaks: libnvpair1 (<< 0.6.5.8-pve11~bpo80)
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
@@ -37,6 +39,8 @@ Package: libuutil1linux
Section: contrib/libs
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}
+Replaces: libuutil1 (<< 0.6.5.8-pve11~bpo80)
+Breaks: libuutil1 (<< 0.6.5.8-pve11~bpo80)
Description: Solaris userland utility library for Linux
This library provides a variety of glue functions for ZFS on Linux:
* libspl: The Solaris Porting Layer userland library, which provides APIs
@@ -54,6 +58,8 @@ Architecture: linux-any
Depends: libzfs2linux (= ${binary:Version}), libzpool2linux (= ${binary:Version}),
libnvpair1linux (= ${binary:Version}), libuutil1linux (= ${binary:Version}),
${misc:Depends}
+Replaces: libzfs-dev (<< 0.6.5.8-pve11~bpo80)
+Breaks: libzfs-dev (<< 0.6.5.8-pve11~bpo80)
Provides: libnvpair-dev, libuutil-dev
Description: OpenZFS filesystem development files for Linux
Header files and static libraries for compiling software against
@@ -66,6 +72,8 @@ Package: libzfs2linux
Section: contrib/libs
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}
+Replaces: libzfs2 (<< 0.6.5.8-pve11~bpo80)
+Breaks: libzfs2 (<< 0.6.5.8-pve11~bpo80)
Description: OpenZFS filesystem library for Linux
The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data
@@ -77,6 +85,8 @@ Package: libzpool2linux
Section: contrib/libs
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}
+Replaces: libzpool2 (<< 0.6.5.8-pve11~bpo80)
+Breaks: libzpool2 (<< 0.6.5.8-pve11~bpo80)
Description: OpenZFS pool library for Linux
The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data
@@ -88,8 +98,10 @@ Package: zfs-initramfs
Architecture: all
Depends: initramfs-tools,
busybox-initramfs | busybox-static | busybox,
- zfsutils-linux,
+ zfsutils-linux (>= 0.6.5.8-pve11~bpo80),
${misc:Depends}
+Breaks: zfs-initramfs (<< 0.6.5.8-pve11~bpo80)
+Replaces: zfs-initramfs (<< 0.6.5.8-pve11~bpo80)
Description: OpenZFS root filesystem capabilities for Linux - initramfs
The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data
@@ -104,7 +116,9 @@ Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
Recommends: lsb-base, zfs-zed
Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs
+Replaces: zfsutils (<< 0.6.5.8-pve11~bpo80)
Conflicts: zfs, zfs-fuse, zutils
+Breaks: zfsutils (<< 0.6.5.8-pve11~bpo80)
Provides: zfsutils
Description: command-line tools to manage OpenZFS filesystems
The Z file system is a pooled filesystem designed for maximum data
@@ -118,6 +132,7 @@ Package: zfs-zed
Section: contrib/admin
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux
+Replaces: zfsutils (<< 0.6.5.8-pve11~bpo80)
Description: OpenZFS Event Daemon
The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data
@@ -142,3 +157,45 @@ Description: Debugging symbols for OpenZFS userland libraries and tools
.
This package contains the debugging symbols for libzpool2linux, libzfs2linux,
libnvpair1linux, libuutil1linux, zfs-zed and zfsutils-linux.
+
+# Transitional packages
+
+Package: libzfs2
+Depends: libzfs2linux, ${misc:Depends}
+Architecture: all
+Priority: extra
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
+Package: libzpool2
+Depends: libzpool2linux, ${misc:Depends}
+Architecture: all
+Priority: extra
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
+Package: libnvpair1
+Depends: libnvpair1linux, ${misc:Depends}
+Architecture: all
+Priority: extra
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
+Package: libuutil1
+Depends: libuutil1linux, ${misc:Depends}
+Architecture: all
+Priority: extra
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
+
+Package: zfsutils
+Depends: zfsutils-linux, ${misc:Depends}
+Architecture: all
+Priority: extra
+Section: oldlibs
+Description: transitional package
+ This is a transitional package. It can safely be removed.
--
2.1.4
@@ -0,0 +1,92 @@
From 08b9f2876aaf844c995c9eb461d6eee4589b2ca1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Oct 2017 14:28:31 +0200
Subject: [PATCH 05/11] man: add references to systemd units
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...9-add-man-page-reference-to-systemd-units.patch | 59 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 60 insertions(+)
create mode 100644 debian/patches/0009-add-man-page-reference-to-systemd-units.patch
diff --git a/debian/patches/0009-add-man-page-reference-to-systemd-units.patch b/debian/patches/0009-add-man-page-reference-to-systemd-units.patch
new file mode 100644
index 000000000..523d52f48
--- /dev/null
+++ b/debian/patches/0009-add-man-page-reference-to-systemd-units.patch
@@ -0,0 +1,59 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Mon, 4 Sep 2017 10:59:32 +0200
+Subject: add man page reference to systemd units
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ etc/systemd/system/zfs-import-cache.service.in | 1 +
+ etc/systemd/system/zfs-import-scan.service.in | 1 +
+ etc/systemd/system/zfs-mount.service.in | 1 +
+ etc/systemd/system/zfs-share.service.in | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
+index 02184a6..6170676 100644
+--- a/etc/systemd/system/zfs-import-cache.service.in
++++ b/etc/systemd/system/zfs-import-cache.service.in
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Import ZFS pools by cache file
++Documentation=man:zpool(8)
+ DefaultDependencies=no
+ Requires=systemd-udev-settle.service
+ After=systemd-udev-settle.service
+diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
+index 625f3a9..9254fd3 100644
+--- a/etc/systemd/system/zfs-import-scan.service.in
++++ b/etc/systemd/system/zfs-import-scan.service.in
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Import ZFS pools by device scanning
++Documentation=man:zpool(8)
+ DefaultDependencies=no
+ Requires=systemd-udev-settle.service
+ After=systemd-udev-settle.service
+diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in
+index 0664fd9..3da7158 100644
+--- a/etc/systemd/system/zfs-mount.service.in
++++ b/etc/systemd/system/zfs-mount.service.in
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Mount ZFS filesystems
++Documentation=man:zfs(8)
+ DefaultDependencies=no
+ After=systemd-udev-settle.service
+ After=zfs-import-cache.service
+diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in
+index 494f5cb..d0c93a3 100644
+--- a/etc/systemd/system/zfs-share.service.in
++++ b/etc/systemd/system/zfs-share.service.in
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=ZFS file system shares
++Documentation=man:zfs(8)
+ After=nfs-server.service nfs-kernel-server.service
+ After=smb.service
+ After=zfs-mount.service
diff --git a/debian/patches/series b/debian/patches/series
index ca6cf6657..b5e68c829 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ enable-zed.patch
1001-cmd-python-exec-path.patch
1004-zed-service-bindir.patch
0008-dracut-make-module-setup.sh-shebang-explicit.patch
+0009-add-man-page-reference-to-systemd-units.patch
--
2.14.1
@@ -1,29 +0,0 @@
From 4264f648987efc980002ede5add258a427ad9a05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Thu, 27 Oct 2016 10:18:55 +0200
Subject: [PATCH 6/6] fix rm path in zfs-share.service
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
etc/systemd/system/zfs-share.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in
index 688731e..494f5cb 100644
--- a/etc/systemd/system/zfs-share.service.in
+++ b/etc/systemd/system/zfs-share.service.in
@@ -9,7 +9,7 @@ PartOf=smb.service
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStartPre=-@bindir@/rm -f /etc/dfs/sharetab
+ExecStartPre=-/bin/rm -f /etc/dfs/sharetab
ExecStart=@sbindir@/zfs share -a
[Install]
--
2.1.4
@@ -0,0 +1,70 @@
From 0621f2d155fcf7b12498e39fdb0867748ce8c626 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Thu, 12 Oct 2017 09:01:08 +0200
Subject: [PATCH 07/11] fix install path of zpool.d scripts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
.../0010-fix-install-path-of-zpool.d-scripts.patch | 37 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 38 insertions(+)
create mode 100644 debian/patches/0010-fix-install-path-of-zpool.d-scripts.patch
diff --git a/debian/patches/0010-fix-install-path-of-zpool.d-scripts.patch b/debian/patches/0010-fix-install-path-of-zpool.d-scripts.patch
new file mode 100644
index 000000000..8fc81b144
--- /dev/null
+++ b/debian/patches/0010-fix-install-path-of-zpool.d-scripts.patch
@@ -0,0 +1,37 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Thu, 12 Oct 2017 08:57:48 +0200
+Subject: fix install path of zpool.d scripts
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ cmd/zpool/Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am
+index 6eff1d1..872a223 100644
+--- a/cmd/zpool/Makefile.am
++++ b/cmd/zpool/Makefile.am
+@@ -22,11 +22,11 @@ zpool_LDADD = \
+ -lm $(LIBBLKID)
+
+ zpoolconfdir = $(sysconfdir)/zfs/zpool.d
+-zpoolexecdir = $(libexecdir)/zfs/zpool.d
++zpoollibdir = /usr/lib/zfs-linux/zpool.d
+
+ EXTRA_DIST = zpool.d/README
+
+-dist_zpoolexec_SCRIPTS = \
++dist_zpoollib_SCRIPTS = \
+ zpool.d/enc \
+ zpool.d/encdev \
+ zpool.d/fault_led \
+@@ -107,5 +107,5 @@ install-data-hook:
+ for f in $(zpoolconfdefaults); do \
+ test -f "$(DESTDIR)$(zpoolconfdir)/$${f}" -o \
+ -L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \
+- ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
++ ln -s "$(zpoollibdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
+ done
diff --git a/debian/patches/series b/debian/patches/series
index b5e68c829..d6f6f87f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ enable-zed.patch
1004-zed-service-bindir.patch
0008-dracut-make-module-setup.sh-shebang-explicit.patch
0009-add-man-page-reference-to-systemd-units.patch
+0010-fix-install-path-of-zpool.d-scripts.patch
--
2.14.1
@@ -0,0 +1,42 @@
From 63ec66eeb1aefb7b0586a5eee3c0d0288e3451d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Oct 2017 14:33:14 +0200
Subject: [PATCH 08/11] zfsutils-linux: install new files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/zfsutils-linux.install | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install
index 5b7dabfa9..b355ec47e 100644
--- a/debian/zfsutils-linux.install
+++ b/debian/zfsutils-linux.install
@@ -9,6 +9,8 @@ usr/lib/modules-load.d/ lib/
lib/udev/
etc/default/zfs
etc/zfs/zfs-functions
+etc/zfs/zpool.d/
+usr/lib/zfs-linux/zpool.d/
sbin/fsck.zfs
sbin/mount.zfs
sbin/ztest
@@ -19,6 +21,7 @@ sbin/zdb
sbin/zpios
sbin/zpool
sbin/zfs
+usr/bin/zgenhostid
usr/sbin/arc_summary
usr/sbin/arcstat
usr/sbin/dbufstat
@@ -32,3 +35,4 @@ usr/share/man/man8/zdb.8
usr/share/man/man8/vdev_id.8
usr/share/man/man8/mount.zfs.8
usr/share/man/man8/fsck.zfs.8
+usr/share/man/man8/zgenhostid.8
--
2.14.1
@@ -0,0 +1,45 @@
From 8732479a2f06b612fddc7df258f8c3bb97575e09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 11 Oct 2017 14:33:34 +0200
Subject: [PATCH 09/11] dh_install: switch to --fail-missing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/not-installed | 8 ++++++++
debian/rules | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 debian/not-installed
diff --git a/debian/not-installed b/debian/not-installed
new file mode 100644
index 000000000..16b1cef6c
--- /dev/null
+++ b/debian/not-installed
@@ -0,0 +1,8 @@
+usr/share/zfs/zfs-helpers.sh
+etc/init.d
+etc/sudoers.d
+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
+usr/lib/dracut
diff --git a/debian/rules b/debian/rules
index 49da7067b..8c5beca10 100755
--- a/debian/rules
+++ b/debian/rules
@@ -111,7 +111,7 @@ endif
override_dh_install:
find . -name lib*.la -delete
- dh_install --list-missing
+ dh_install --fail-missing
# ------------
--
2.14.1
@@ -0,0 +1,203 @@
From c47a0ade3f46171a3c1e459c379550b6dc3a0913 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Thu, 12 Oct 2017 12:28:32 +0200
Subject: [PATCH 10/11] include upstream PR #6695
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
receive_freeobjects() skips freeing some objects
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...ve_freeobjects-skips-freeing-some-objects.patch | 168 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 169 insertions(+)
create mode 100644 debian/patches/0010-receive_freeobjects-skips-freeing-some-objects.patch
diff --git a/debian/patches/0010-receive_freeobjects-skips-freeing-some-objects.patch b/debian/patches/0010-receive_freeobjects-skips-freeing-some-objects.patch
new file mode 100644
index 000000000..3470be026
--- /dev/null
+++ b/debian/patches/0010-receive_freeobjects-skips-freeing-some-objects.patch
@@ -0,0 +1,168 @@
+From: Ned Bass <bass6@llnl.gov>
+Date: Mon, 2 Oct 2017 15:36:04 -0700
+Subject: receive_freeobjects() skips freeing some objects
+
+When receiving a FREEOBJECTS record, receive_freeobjects()
+incorrectly skips a freed object in some cases. Specifically, this
+happens when the first object in the range to be freed doesn't exist,
+but the second object does. This leaves an object allocated on disk
+on the receiving side which is unallocated on the sending side, which
+may cause receiving subsequent incremental streams to fail.
+
+The bug was caused by an incorrect increment of the object index
+variable when current object being freed doesn't exist. The
+increment is incorrect because incrementing the object index is
+handled by a call to dmu_object_next() in the increment portion of
+the for loop statement.
+
+Add test case that exposes this bug.
+
+Reviewed-by: George Melikov <mail@gmelikov.ru>
+Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Ned Bass <bass6@llnl.gov>
+Closes #6694
+Closes #6695
+
+(backported from commit 39f56627ae988d09b4e3803c01c22b2026b2310e)
+
+Conflicts:
+ tests/runfiles/linux.run
+---
+ tests/zfs-tests/tests/functional/rsend/Makefile.am | 3 +-
+ module/zfs/dmu_send.c | 6 +-
+ tests/runfiles/linux.run | 2 +-
+ .../tests/functional/rsend/send_freeobjects.ksh | 81 ++++++++++++++++++++++
+ 4 files changed, 86 insertions(+), 6 deletions(-)
+ create mode 100755 tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
+
+diff --git a/tests/zfs-tests/tests/functional/rsend/Makefile.am b/tests/zfs-tests/tests/functional/rsend/Makefile.am
+index b9f8dba..60ca776 100644
+--- a/tests/zfs-tests/tests/functional/rsend/Makefile.am
++++ b/tests/zfs-tests/tests/functional/rsend/Makefile.am
+@@ -37,4 +37,5 @@ dist_pkgdata_SCRIPTS = \
+ send-c_verify_ratio.ksh \
+ send-c_volume.ksh \
+ send-c_zstreamdump.ksh \
+- send-cpL_varied_recsize.ksh
++ send-cpL_varied_recsize.ksh \
++ send_freeobjects.ksh
+diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
+index a2ace9b..0c53ced 100644
+--- a/module/zfs/dmu_send.c
++++ b/module/zfs/dmu_send.c
+@@ -2233,12 +2233,10 @@ receive_freeobjects(struct receive_writer_arg *rwa,
+ int err;
+
+ err = dmu_object_info(rwa->os, obj, &doi);
+- if (err == ENOENT) {
+- obj++;
++ if (err == ENOENT)
+ continue;
+- } else if (err != 0) {
++ else if (err != 0)
+ return (err);
+- }
+
+ err = dmu_free_long_object(rwa->os, obj);
+ if (err != 0)
+diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
+index a12fc2d..5583a25 100644
+--- a/tests/runfiles/linux.run
++++ b/tests/runfiles/linux.run
+@@ -501,7 +501,7 @@ tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos',
+ 'send-c_lz4_disabled', 'send-c_recv_lz4_disabled',
+ 'send-c_mixed_compression', 'send-c_stream_size_estimate', 'send-cD',
+ 'send-c_embedded_blocks', 'send-c_resume', 'send-cpL_varied_recsize',
+- 'send-c_recv_dedup']
++ 'send-c_recv_dedup', 'send_freeobjects']
+
+ [tests/functional/scrub_mirror]
+ tests = ['scrub_mirror_001_pos', 'scrub_mirror_002_pos',
+diff --git a/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh b/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
+new file mode 100755
+index 0000000..6533352
+--- /dev/null
++++ b/tests/zfs-tests/tests/functional/rsend/send_freeobjects.ksh
+@@ -0,0 +1,81 @@
++#!/bin/ksh
++
++#
++# This file and its contents are supplied under the terms of the
++# Common Development and Distribution License ("CDDL"), version 1.0.
++# You may only use this file in accordance with the terms of version
++# 1.0 of the CDDL.
++#
++# A full copy of the text of the CDDL should have accompanied this
++# source. A copy of the CDDL is also available via the Internet at
++# http://www.illumos.org/license/CDDL.
++#
++
++#
++# Copyright (c) 2017 by Lawrence Livermore National Security, LLC.
++#
++
++. $STF_SUITE/include/libtest.shlib
++. $STF_SUITE/tests/functional/rsend/rsend.kshlib
++
++#
++# Description:
++# Verify FREEOBJECTS record frees sequential objects (See
++# https://github.com/zfsonlinux/zfs/issues/6694)
++#
++# Strategy:
++# 1. Create three files with sequential object numbers, f1 f2 and f3
++# 2. Delete f2
++# 3. Take snapshot A
++# 4. Delete f3
++# 5. Take snapshot B
++# 6. Receive a full send of A
++# 7. Receive an incremental send of B
++# 8. Fail test if f3 exists on received snapshot B
++#
++
++verify_runnable "both"
++
++log_assert "Verify FREEOBJECTS record frees sequential objects"
++
++sendds=sendfo
++recvds=recvfo
++f1=/$POOL/$sendds/f1
++f2=/$POOL/$sendds/f2
++f3=/$POOL/$sendds/f3
++
++#
++# We need to set xattr=sa and dnodesize=legacy to guarantee sequential
++# object numbers for this test. Otherwise, if we used directory-based
++# xattrs, SELinux extended attributes might consume intervening object
++# numbers.
++#
++log_must zfs create -o xattr=sa -o dnodesize=legacy $POOL/$sendds
++
++tries=100
++for ((i=0; i<$tries; i++)); do
++ touch $f1 $f2 $f3
++ o1=$(ls -li $f1 | awk '{print $1}')
++ o2=$(ls -li $f2 | awk '{print $1}')
++ o3=$(ls -li $f3 | awk '{print $1}')
++
++ if [[ $o2 -ne $(( $o1 + 1 )) ]] || [[ $o3 -ne $(( $o2 + 1 )) ]]; then
++ rm -f $f1 $f2 $f3
++ else
++ break
++ fi
++done
++
++if [[ $i -eq $tries ]]; then
++ log_fail "Failed to create three sequential objects"
++fi
++
++log_must rm $f2
++log_must zfs snap $POOL/$sendds@A
++log_must rm $f3
++log_must zfs snap $POOL/$sendds@B
++log_must eval "zfs send $POOL/$sendds@A | zfs recv $POOL/$recvds"
++log_must eval "zfs send -i $POOL/$sendds@A $POOL/$sendds@B |" \
++ "zfs recv $POOL/$recvds"
++log_mustnot zdb $POOL/$recvds@B $o3
++log_pass "Verify FREEOBJECTS record frees sequential objects"
diff --git a/debian/patches/series b/debian/patches/series
index d6f6f87f9..3c8f56483 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ enable-zed.patch
0008-dracut-make-module-setup.sh-shebang-explicit.patch
0009-add-man-page-reference-to-systemd-units.patch
0010-fix-install-path-of-zpool.d-scripts.patch
+0010-receive_freeobjects-skips-freeing-some-objects.patch
--
2.14.1
@@ -0,0 +1,265 @@
From 27d60535a612beaf31c27f5d8969abffac514841 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Thu, 12 Oct 2017 12:29:01 +0200
Subject: [PATCH 11/11] include upstream PR #6616
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
send/recv compatibility with 0.6.5.x
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...FREEOBJECTS-for-objects-which-can-t-exist.patch | 54 +++++++
...jects-when-receiving-full-stream-as-clone.patch | 167 +++++++++++++++++++++
debian/patches/series | 2 +
3 files changed, 223 insertions(+)
create mode 100644 debian/patches/0011-Skip-FREEOBJECTS-for-objects-which-can-t-exist.patch
create mode 100644 debian/patches/0012-Free-objects-when-receiving-full-stream-as-clone.patch
diff --git a/debian/patches/0011-Skip-FREEOBJECTS-for-objects-which-can-t-exist.patch b/debian/patches/0011-Skip-FREEOBJECTS-for-objects-which-can-t-exist.patch
new file mode 100644
index 000000000..e2f0a7cdd
--- /dev/null
+++ b/debian/patches/0011-Skip-FREEOBJECTS-for-objects-which-can-t-exist.patch
@@ -0,0 +1,54 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Tue, 26 Sep 2017 14:03:21 +0200
+Subject: Skip FREEOBJECTS for objects which can't exist
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+When sending an incremental stream based on a snapshot, the receiving
+side must have the same base snapshot. Thus we do not need to send
+FREEOBJECTS records for any objects past the maximum one which exists
+locally.
+
+This allows us to send incremental streams (again) to older ZFS
+implementations (e.g. ZoL < 0.7) which actually try to free all objects
+in a FREEOBJECTS record, instead of bailing out early.
+
+Reviewed by: Paul Dagnelie <pcd@delphix.com>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+Closes #5699
+Closes #6507
+Closes #6616
+(cherry picked from commit 829e95c4dc74d7d6d31d01af9c39e03752499b15)
+---
+ module/zfs/dmu_send.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
+index 0c53ced..a81580d 100644
+--- a/module/zfs/dmu_send.c
++++ b/module/zfs/dmu_send.c
+@@ -421,6 +421,22 @@ static int
+ dump_freeobjects(dmu_sendarg_t *dsp, uint64_t firstobj, uint64_t numobjs)
+ {
+ struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects);
++ uint64_t maxobj = DNODES_PER_BLOCK *
++ (DMU_META_DNODE(dsp->dsa_os)->dn_maxblkid + 1);
++
++ /*
++ * ZoL < 0.7 does not handle large FREEOBJECTS records correctly,
++ * leading to zfs recv never completing. to avoid this issue, don't
++ * send FREEOBJECTS records for object IDs which cannot exist on the
++ * receiving side.
++ */
++ if (maxobj > 0) {
++ if (maxobj < firstobj)
++ return (0);
++
++ if (maxobj < firstobj + numobjs)
++ numobjs = maxobj - firstobj;
++ }
+
+ /*
+ * If there is a pending op, but it's not PENDING_FREEOBJECTS,
diff --git a/debian/patches/0012-Free-objects-when-receiving-full-stream-as-clone.patch b/debian/patches/0012-Free-objects-when-receiving-full-stream-as-clone.patch
new file mode 100644
index 000000000..75f4be84c
--- /dev/null
+++ b/debian/patches/0012-Free-objects-when-receiving-full-stream-as-clone.patch
@@ -0,0 +1,167 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Fri, 29 Sep 2017 12:00:29 +0200
+Subject: Free objects when receiving full stream as clone
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+All objects after the last written or freed object are not supposed to
+exist after receiving the stream. Free them accordingly, as if a
+freeobjects record for them had been included in the stream.
+
+Reviewed by: Paul Dagnelie <pcd@delphix.com>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+Closes #5699
+Closes #6507
+Closes #6616
+(backported from commit 48fbb9ddbf2281911560dfbc2821aa8b74127315)
+
+ Conflicts:
+ include/sys/dmu_send.h
+ module/zfs/dmu_send.c
+
+modified for code paths missing in 0.7
+---
+ include/sys/dmu_send.h | 1 +
+ module/zfs/dmu_send.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git a/include/sys/dmu_send.h b/include/sys/dmu_send.h
+index e9bef8b..5cf67a6 100644
+--- a/include/sys/dmu_send.h
++++ b/include/sys/dmu_send.h
+@@ -61,6 +61,7 @@ typedef struct dmu_recv_cookie {
+ boolean_t drc_byteswap;
+ boolean_t drc_force;
+ boolean_t drc_resumable;
++ boolean_t drc_clone;
+ struct avl_tree *drc_guid_to_ds_map;
+ zio_cksum_t drc_cksum;
+ uint64_t drc_newsnapobj;
+diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
+index a81580d..344e420 100644
+--- a/module/zfs/dmu_send.c
++++ b/module/zfs/dmu_send.c
+@@ -1823,6 +1823,7 @@ dmu_recv_begin(char *tofs, char *tosnap, dmu_replay_record_t *drr_begin,
+ drc->drc_force = force;
+ drc->drc_resumable = resumable;
+ drc->drc_cred = CRED();
++ drc->drc_clone = (origin != NULL);
+
+ if (drc->drc_drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) {
+ drc->drc_byteswap = B_TRUE;
+@@ -1883,7 +1884,9 @@ struct receive_writer_arg {
+ /* A map from guid to dataset to help handle dedup'd streams. */
+ avl_tree_t *guid_to_ds_map;
+ boolean_t resumable;
+- uint64_t last_object, last_offset;
++ uint64_t last_object;
++ uint64_t last_offset;
++ uint64_t max_object; /* highest object ID referenced in stream */
+ uint64_t bytes_read; /* bytes read when current record created */
+ };
+
+@@ -2157,6 +2160,9 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
+ return (SET_ERROR(EINVAL));
+ object = err == 0 ? drro->drr_object : DMU_NEW_OBJECT;
+
++ if (drro->drr_object > rwa->max_object)
++ rwa->max_object = drro->drr_object;
++
+ /*
+ * If we are losing blkptrs or changing the block size this must
+ * be a new file instance. We must clear out the previous file
+@@ -2257,6 +2263,9 @@ receive_freeobjects(struct receive_writer_arg *rwa,
+ err = dmu_free_long_object(rwa->os, obj);
+ if (err != 0)
+ return (err);
++
++ if (obj > rwa->max_object)
++ rwa->max_object = obj;
+ }
+ if (next_err != ESRCH)
+ return (next_err);
+@@ -2287,6 +2296,9 @@ receive_write(struct receive_writer_arg *rwa, struct drr_write *drrw,
+ rwa->last_object = drrw->drr_object;
+ rwa->last_offset = drrw->drr_offset;
+
++ if (rwa->last_object > rwa->max_object)
++ rwa->max_object = rwa->last_object;
++
+ if (dmu_object_info(rwa->os, drrw->drr_object, NULL) != 0)
+ return (SET_ERROR(EINVAL));
+
+@@ -2362,6 +2374,9 @@ receive_write_byref(struct receive_writer_arg *rwa,
+ ref_os = rwa->os;
+ }
+
++ if (drrwbr->drr_object > rwa->max_object)
++ rwa->max_object = drrwbr->drr_object;
++
+ err = dmu_buf_hold(ref_os, drrwbr->drr_refobject,
+ drrwbr->drr_refoffset, FTAG, &dbp, DMU_READ_PREFETCH);
+ if (err != 0)
+@@ -2404,6 +2419,9 @@ receive_write_embedded(struct receive_writer_arg *rwa,
+ if (drrwe->drr_compression >= ZIO_COMPRESS_FUNCTIONS)
+ return (EINVAL);
+
++ if (drrwe->drr_object > rwa->max_object)
++ rwa->max_object = drrwe->drr_object;
++
+ tx = dmu_tx_create(rwa->os);
+
+ dmu_tx_hold_write(tx, drrwe->drr_object,
+@@ -2440,6 +2458,9 @@ receive_spill(struct receive_writer_arg *rwa, struct drr_spill *drrs,
+ if (dmu_object_info(rwa->os, drrs->drr_object, NULL) != 0)
+ return (SET_ERROR(EINVAL));
+
++ if (drrs->drr_object > rwa->max_object)
++ rwa->max_object = drrs->drr_object;
++
+ VERIFY0(dmu_bonus_hold(rwa->os, drrs->drr_object, FTAG, &db));
+ if ((err = dmu_spill_hold_by_bonus(db, FTAG, &db_spill)) != 0) {
+ dmu_buf_rele(db, FTAG);
+@@ -2484,6 +2505,9 @@ receive_free(struct receive_writer_arg *rwa, struct drr_free *drrf)
+ if (dmu_object_info(rwa->os, drrf->drr_object, NULL) != 0)
+ return (SET_ERROR(EINVAL));
+
++ if (drrf->drr_object > rwa->max_object)
++ rwa->max_object = drrf->drr_object;
++
+ err = dmu_free_long_range(rwa->os, drrf->drr_object,
+ drrf->drr_offset, drrf->drr_length);
+
+@@ -3207,6 +3231,32 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, vnode_t *vp, offset_t *voffp,
+ }
+ mutex_exit(&rwa->mutex);
+
++ /*
++ * If we are receiving a full stream as a clone, all object IDs which
++ * are greater than the maximum ID referenced in the stream are
++ * by definition unused and must be freed.
++ */
++ if (drc->drc_clone && drc->drc_drrb->drr_fromguid == 0) {
++ uint64_t obj = rwa->max_object + 1;
++ int free_err = 0;
++ int next_err = 0;
++
++ while (next_err == 0) {
++ free_err = dmu_free_long_object(rwa->os, obj);
++ if (free_err != 0 && free_err != ENOENT)
++ break;
++
++ next_err = dmu_object_next(rwa->os, &obj, FALSE, 0);
++ }
++
++ if (err == 0) {
++ if (free_err != 0 && free_err != ENOENT)
++ err = free_err;
++ else if (next_err != ESRCH)
++ err = next_err;
++ }
++ }
++
+ cv_destroy(&rwa->cv);
+ mutex_destroy(&rwa->mutex);
+ bqueue_destroy(&rwa->q);
diff --git a/debian/patches/series b/debian/patches/series
index 3c8f56483..8bd73161c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,5 @@ enable-zed.patch
0009-add-man-page-reference-to-systemd-units.patch
0010-fix-install-path-of-zpool.d-scripts.patch
0010-receive_freeobjects-skips-freeing-some-objects.patch
+0011-Skip-FREEOBJECTS-for-objects-which-can-t-exist.patch
+0012-Free-objects-when-receiving-full-stream-as-clone.patch
--
2.14.1
+10 -6
View File
@@ -1,6 +1,10 @@
0001-Undo-python-changes-until-PVE-5.0-release.patch 0001-remove-DKMS-modules-and-dracut-build.patch
0002-remove-DKMS-modules-and-dracut-build.patch 0002-import-with-d-dev-disk-by-id-in-scan-service.patch
0003-add-zfsutils.preinst-postinst-for-wheezy-upgrade-pat.patch 0003-add-zfs-test-package.patch
0004-ensure-upgrade-path-from-existing-PVE-ZFS-packages.patch 0004-dracut-make-module-setup.sh-shebang-explicit.patch
0005-import-with-d-dev-disk-by-id-in-scan-service.patch 0005-man-add-references-to-systemd-units.patch
0006-fix-rm-path-in-zfs-share.service.patch 0007-fix-install-path-of-zpool.d-scripts.patch
0008-zfsutils-linux-install-new-files.patch
0009-dh_install-switch-to-fail-missing.patch
0010-include-upstream-PR-6695.patch
0011-include-upstream-PR-6616.patch