refresh and drop patches

most have been applied upstream
This commit is contained in:
Fabian Grünbichler 2017-11-06 09:03:30 +01:00
parent c542769d74
commit af05210837
11 changed files with 36 additions and 919 deletions

View File

@ -1,24 +1,25 @@
From 6ea6f086a714ed9157f7e880426a71f46f48c2db Mon Sep 17 00:00:00 2001
From 0337ccd47d411a1db11e09dce1a6d183c2542f29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 6 Feb 2017 11:03:10 +0100
Subject: [PATCH 1/3] remove DKMS, modules and dracut build
Subject: [PATCH 1/2] remove DKMS, modules and dracut build
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 | 34 +++---------------
debian/control.in | 36 +++---------------
debian/control | 1 -
debian/rules | 105 ++----------------------------------------------------
3 files changed, 6 insertions(+), 134 deletions(-)
debian/not-installed | 1 +
debian/rules | 105 +--------------------------------------------------
4 files changed, 8 insertions(+), 135 deletions(-)
diff --git a/debian/control.in b/debian/control.in
index 76907e45..235e74c9 100644
index 18d2417cc..79bd9b302 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
dh-systemd,
dh-systemd | debhelper (>= 10.1),
autotools-dev,
debhelper (>= 9),
- dkms (>> 2.1.1.2-5),
@ -87,20 +88,38 @@ index 76907e45..235e74c9 100644
Description: OpenZFS Event Daemon
The Z file system is a pooled filesystem designed for maximum data
integrity, supporting data snapshots, multiple copies, and data
@@ -154,7 +128,7 @@ Description: OpenZFS Event Daemon
Package: zfs-test
Section: contrib/admin
Architecture: linux-any
-Depends: ${misc:Depends}, ${shlibs:Depends}, zfs-modules | zfs-dkms, zfsutils-linux, parted, lsscsi, mdadm, bc, ksh, fio, acl, sudo, sysstat, python
+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
diff --git a/debian/control b/debian/control
index 76907e45..3bcb9a96 100644
index 18d2417cc..b426b93c0 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
dh-systemd,
dh-systemd | debhelper (>= 10.1),
autotools-dev,
debhelper (>= 9),
- dkms (>> 2.1.1.2-5),
libselinux1-dev,
libtool,
lsb-release,
diff --git a/debian/not-installed b/debian/not-installed
index f54fe7310..16b1cef6c 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -5,3 +5,4 @@ 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 9efbace6..49da7067 100755
index 800df22e0..8c5beca10 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,9 +5,6 @@ NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
@ -251,5 +270,5 @@ index 9efbace6..49da7067 100755
debian-copyright:
cme update dpkg-copyright -file debian/copyright.cme
--
2.11.0
2.14.2

View File

@ -1,7 +1,7 @@
From e64c1e7341865c7a0b060ac9aa9a988ad589b31f Mon Sep 17 00:00:00 2001
From 72fbbc64fe6f9e527e7ebce42d8e57c1fa82dd34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 24 Oct 2016 13:47:06 +0200
Subject: [PATCH 2/3] import with -d /dev/disk/by-id in scan service
Subject: [PATCH 2/2] import with -d /dev/disk/by-id in scan service
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -12,10 +12,10 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
index 0105283..665b9c8 100644
index 625f3a955..9a33d5f4a 100644
--- a/etc/systemd/system/zfs-import-scan.service.in
+++ b/etc/systemd/system/zfs-import-scan.service.in
@@ -10,7 +10,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
@@ -11,7 +11,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/sbin/modprobe zfs
@ -25,5 +25,5 @@ index 0105283..665b9c8 100644
[Install]
WantedBy=zfs-mount.service
--
2.1.4
2.14.2

View File

@ -1,102 +0,0 @@
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

View File

@ -1,75 +0,0 @@
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

View File

@ -1,92 +0,0 @@
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

View File

@ -1,70 +0,0 @@
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

View File

@ -1,42 +0,0 @@
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

View File

@ -1,45 +0,0 @@
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

View File

@ -1,203 +0,0 @@
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

View File

@ -1,265 +0,0 @@
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

View File

@ -1,10 +1,2 @@
0001-remove-DKMS-modules-and-dracut-build.patch
0002-import-with-d-dev-disk-by-id-in-scan-service.patch
0003-add-zfs-test-package.patch
0004-dracut-make-module-setup.sh-shebang-explicit.patch
0005-man-add-references-to-systemd-units.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