[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Please test zfsutils 9.0~svn226163-1



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I was testing kfreebsd-9 this weekend. While doing so I found that
kfreebsd-9 supports ZFS version 28 now. Unfortunately the full power
only applies when using more recent zfsutils as well.

Hence I tried to port the corresponding zfsutils for the kfreebsd-9
kernel. The package I produced works fine with the kfreebsd kernel
9.0~svn225873-1 which is in experimental right now. On the other hand I
didn't achieve any major problems with kfreebsd 8.2 either.

Generally speaking the utils seems to work, but you know these are
complex utilities so I am not sure I didn't introduce any regressions or
even bugs. I attached a diff outlining all changes, and you can get the
source and binary packages on [1]. If you prefer dget to get the source
package please do:

dget
http://daemonkeeper.net/wp-content/files/zfsutils/zfsutils_9.0~svn226163-1.dsc

Please note I didn't commit my changes anywhere, in particular not to
our repository. I am not maintaining zfsutils so I don't want to upset
anyone here and moreover I don't quite know how much you like my
patches. On the other hand I guess you need to port zfsutils to the 9
kernel anyway, so I decided to share my upgrade.

Some comments about the patches itself:

* We could get rid of the last delta in 01_glibc_kludge.diff and the
whole (hacky and ugly) 16-wrap-cdefs.diff if kfreebsd-kernel-headers
would export cdefs.h like it does upstream [2].

* zfsutils depend on libmd now (lib/libmd). That's a crypto library, but
I couldn't find anything which is API compatible in Debian already.
Hence, 05_makefile.diff statically links this library into the binaries
where needed.

* 10_zpool_import.diff seems not to be needed anymore, and the utils
build fine without. I tried to port it to the new utils snapshot, but
the code is pretty much a new implementation so much of the patch does
not apply anymore. Also I am not sure what the original intention of the
patch was, so I removed it.

* 15_pthread_compat.diff is a terrible hack. The upstream source uses
pthread_mutex_isowned_np now which is supported in FreeBSD's libthr, but
not in glibc pthread (apparently). The implementation of the function is
simple, unfortunately our pthread_mutex_t type is not compatible either
(seems to be a struct on FreeBSD, but (apparently) a scalar on glibc),
so I made the code to be a no-op instead. Its usage is on assert() only,
checking entry points of some functions. I guess disabling the call has
no unwanted side effects on the functionality I hope.

* All other patches just have been refreshed or somehow adapted. Some
other deltas have been extended or removed where applicable.


Note, this package is not ready to be uploaded to experimental although
it would be useful at some point. There are some things left to do for a
proper package:

* getting rid of many unneeded Lintian warnings (I fixed some bugs found
by Lintian in the current package by the way)

* make the package ready for dpkg 1.16.1, in particular don't ignore
injected CFLAGS anymore

* Update debian/copyright. The new version needs some more paths to be
checked out which hence need a license check.

* clean the build process: Some warnings like

/home/arno/zfsutils/zfsutils-9/cddl/lib/libzpool/../../contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:112:0:
warning: "RLIM64_INFINITY" redefined [enabled by default]

could possibly be omitted easily

* cleanup and document patches

* Getting rid of unneeded libraries: This is actually a critical
problem. It can also be found in the current stable version by the way.
zfsutils builds a lot of shared libraries, but many of them aren't
properly versioned (like using a proper SONAME), they aren't intended to
be shared and break happily ABIs, for example:


Preparing to replace zfsutils 8.1-4 (using
.../zfsutils_8.2-4_kfreebsd-amd64.deb) ...
Unpacking replacement zfsutils ...
Processing triggers for man-db ...
Setting up libumem0 (8.2-4) ...
Setting up libzpool0 (8.2-4) ...
Setting up zfsutils (8.2-4) ...
Installing new version of config file /etc/init.d/zfs ...
Starting ZFS subsystem... zvol swapzfs: symbol lookup error: zfs:
undefined symbol: libzfs_mnttab_cache

Same applies when upgrading from 8.2-4 to 9.0~svn226163-1. The utils
only work properly if you upgrade all binary packages (libwhatever)
along the utils itself.

Looking at the reverse dependencies we can easily get rid of many of
those libraries as they are needed within zfsutils only. Maybe we should
link them statically instead:

libnvpair0
  Reverse Depends: grub-common (1.99-12)
  Reverse Depends: grub-emu (1.99-12)
  Reverse Depends: grub-pc-bin (1.99-12)
  Reverse Depends: libnvpair-dev (= 8.2-4)
  Reverse Depends: libzfs0 (8.2-4)
  Reverse Depends: libzpool0 (8.2-4)
  Reverse Depends: zfsutils (8.2-4)


libzfs0
  Reverse Depends: grub-common (1.99-12)
  Reverse Depends: grub-emu (1.99-12)
  Reverse Depends: grub-pc-bin (1.99-12)
  Reverse Depends: libzfs-dev (= 8.2-4)
  Reverse Depends: zfsutils (8.2-4)

libuutil0
  Reverse Depends: libuutil-dev (= 8.2-4)
  Reverse Depends: libzfs0 (8.2-4)
  Reverse Depends: zfsutils (8.2-4)


libzpool0
  Reverse Depends: libzpool-dev (= 8.2-4)
  Reverse Depends: zfsutils (8.2-4)


libumem0
  Reverse Depends: libumem-dev (= 8.2-4)
  Reverse Depends: libzfs0 (9.0~svn226163-1)
  Reverse Depends: libzpool0 (8.2-4)
  Reverse Depends: zfsutils (8.2-4)

- From the output above, only libnvpair0 and libzfs0 have external
dependencies. The others should be properly versioned instead.



[1] http://daemonkeeper.net/wp-content/files/zfsutils/
[2] http://svn.freebsd.org/base/stable/9/sys/sys/cdefs.h
- -- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOki/HAAoJEMcrUe6dgPNt2DMP/2USdF92E5pqzh7IKnJadnbY
3q488+k/LksBiWmqxeYKLKC4JhC71HZc4bO70zfoKs1eDsW9bUNfTzOhWZtuIfFR
H1+rgdxmcMfBx/XSzD45vS+pWE96GO1YcSybk5eyGmD3mMTagk9dbsoit/MMEcqj
mwiOfs6W2HKrHNi0rOz8N8Onk/qxi5lOL2F7ZUqZO85wFbCh6y4yVYUXWpbE1ehu
uKIHqRXga7PRFKkKgUIPiM12pSDGAeGeAyDAno4ywGQD5jOvraoWLuy+7TWqcNjG
rx1Z3Fj1ztg9RKtcBENi1h9R3kRVw2b+DTtq5M7hXmvEu209Ovp7QFzYTwaFYukp
3Xp/va64zvxho5mTomLxYhoECNGzOXKyTZ9h1nZzT5YEy7+XiibnGT4kRi77+P0O
K3ZrocteX3VhnYB8SgoITTCbFtY+53o4LFNnNlkmjZfyll5GQucIr5pGu2P1nQqw
5bhFlUrDSlAuZFRJYfl982+K5BoI0FLG2w0It0yaDybTsQWmxAdKiT2woCocEpyt
brtH5PmUZfxiTXC7Ye5sakNwompwvXGRfqEtcg10bXGari6EaSQ9WyTxmyO69RLs
Ral31+v2bud6tHzrSFv4d0a2Zo2NZC3QcbNF4bXow6eNuUv6pUxlfj3jixaU1X3g
I7eNd2DwgLfs2d7lxucN
=cxSX
-----END PGP SIGNATURE-----
diff -ruN zfsutils_old/zfsutils-8.2/debian/changelog zfsutils/zfsutils-9/debian/changelog
--- zfsutils_old/zfsutils-8.2/debian/changelog	2011-08-08 09:40:57.000000000 -0400
+++ zfsutils/zfsutils-9/debian/changelog	2011-10-09 20:17:23.816577524 -0400
@@ -1,3 +1,25 @@
+zfsutils (9.0~svn226163-1) experimental; urgency=low
+
+  * Change the XC-Package-Type field to Package-Type. The field is supported
+    since dpkg 1.15.7
+  * Improve several package descriptions - at least they don't duplicate the
+    descriptions by other packages anymore
+  * Refresh patches, leave hunks unchanged where possible. Additionally:
+    + 04_stdint.diff: Extend inclusion of stdint.h to several new files
+    + 05_makefile.diff: Patch libm, add new linkings where needed
+    + Remove 10_zpool_import.diff entirely
+    + Add 15_pthread_compat.diff: Work around compatibility issues with eglibc
+    + Remove 15_ztest.fix entirely
+    + 16-wrap-cdefs.diff: Work around the unavailability of cdefs.h
+  * debian/rules:
+    + Rework get-orig-source target, add new origin paths where needed.
+    + Add build-libmd target. The library is statically linked into several
+      utils.
+  * Remove the zfs volinit/volfini commands from the init script as they are
+    not available anymore. 
+
+ -- Arno Töll <debian@toell.net>  Sun, 09 Oct 2011 20:17:17 -0400
+
 zfsutils (8.2-4) unstable; urgency=high
 
   * Bring back mount/unmount routines in init script. See #637020 and
diff -ruN zfsutils_old/zfsutils-8.2/debian/control zfsutils/zfsutils-9/debian/control
--- zfsutils_old/zfsutils-8.2/debian/control	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/control	2011-10-09 16:05:45.370117430 -0400
@@ -52,7 +52,7 @@
  compile applications that use libnvpair.
 
 Package: libnvpair0-udeb
-XC-Package-Type: udeb
+Package-Type: udeb
 Section: debian-installer
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -81,7 +81,7 @@
  compile applications that use libzfs.
 
 Package: libzfs0-udeb
-XC-Package-Type: udeb
+Package-Type: udeb
 Section: debian-installer
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -105,7 +105,7 @@
  ZFS filesystems.
 
 Package: zfsutils-udeb
-XC-Package-Type: udeb
+Package-Type: udeb
 Section: debian-installer
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -123,7 +123,7 @@
 Section: libs
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
+Description: OpenSolaris memory-management library
  This package contains the OpenSolaris libumem library, to detect
  memory management bugs in applications
 
@@ -131,12 +131,12 @@
 Section: libdevel
 Architecture: kfreebsd-any
 Depends: libumem0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
-Description: Development files for libnvpair
+Description: Development files for libumem0
  This package contains the header files and static library needed to
  compile applications that use libumem.
 
 Package: libumem0-udeb
-XC-Package-Type: udeb
+Package-Type: udeb
 Section: debian-installer
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -149,25 +149,23 @@
 Section: libs
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
+Description: OpenSolaris interface library to manage ZFS storage pools
  This package contains the OpenSolaris libzpool library.
- .
- This is a minimal package for use in debian-installer.
 
 Package: libzpool-dev
 Section: libdevel
 Architecture: kfreebsd-any
 Depends: libzpool0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
-Description: Development files for libnvpair
+Description: Development files for libzpool0
  This package contains the header files and static library needed to
  compile applications that use libzpool.
 
 Package: libzpool0-udeb
-XC-Package-Type: udeb
+Package-Type: udeb
 Section: debian-installer
 Architecture: kfreebsd-any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
+Description: OpenSolaris interface library to manage ZFS storage pools
  This package contains the OpenSolaris libzpool library.
  .
  This is a minimal package for use in debian-installer.
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/01_glibc_kludge.diff zfsutils/zfsutils-9/debian/patches/01_glibc_kludge.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/01_glibc_kludge.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/01_glibc_kludge.diff	2011-10-08 22:38:22.693121051 -0400
@@ -17,9 +17,9 @@
  	int i, error;
 --- a/cddl/compat/opensolaris/misc/zmount.c
 +++ b/cddl/compat/opensolaris/misc/zmount.c
-@@ -92,6 +92,9 @@
- 	iov = NULL;
- 	iovlen = 0;
+@@ -95,6 +95,9 @@
+ 	if (mflag & MS_RDONLY)
+ 		build_iovec(&iov, &iovlen, "ro", NULL, 0);
  	build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1);
 +#ifndef __DECONST
 +#define __DECONST(type, var)	((type)(uintptr_t)(const void *)(var))
@@ -29,7 +29,7 @@
  	build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1);
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
-@@ -2265,7 +2265,7 @@
+@@ -2327,7 +2327,7 @@
  }
  
  static void
@@ -38,7 +38,7 @@
  {
  	clock_t			growtime = 0;
  	arc_reclaim_strategy_t	last_reclaim = ARC_RECLAIM_CONS;
-@@ -3771,7 +3771,7 @@
+@@ -3705,7 +3705,7 @@
  static eventhandler_tag arc_event_lowmem = NULL;
  
  static void
@@ -47,7 +47,7 @@
  {
  
  	/* Serialize access via arc_lowmem_lock. */
-@@ -4828,7 +4828,7 @@
+@@ -4767,7 +4767,7 @@
   * heart of the L2ARC.
   */
  static void
@@ -56,3 +56,14 @@
  {
  	callb_cpr_t cpr;
  	l2arc_dev_t *dev;
+--- a/sys/cddl/compat/opensolaris/sys/misc.h
++++ b/sys/cddl/compat/opensolaris/sys/misc.h
+@@ -31,7 +31,7 @@
+ 
+ #include <sys/limits.h>
+ 
+-#define	MAXUID	UID_MAX
++#define	MAXUID	UINT_MAX
+ 
+ #define	SPEC_MAXOFFSET_T	OFF_MAX
+ 
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/02_glibc_misc.diff zfsutils/zfsutils-9/debian/patches/02_glibc_misc.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/02_glibc_misc.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/02_glibc_misc.diff	2011-10-08 22:38:22.695162651 -0400
@@ -17,17 +17,6 @@
  #include <assert.h>
  
  /*
---- a/sys/cddl/compat/opensolaris/sys/sysmacros.h
-+++ b/sys/cddl/compat/opensolaris/sys/sysmacros.h
-@@ -107,7 +107,7 @@
-  * High order bit is 31 (or 63 in _LP64 kernel).
-  */
- static __inline int
--highbit(ulong_t i)
-+highbit(unsigned long i)
- {
- 	register int h = 1;
- 
 --- a/sys/cddl/compat/opensolaris/sys/time.h
 +++ b/sys/cddl/compat/opensolaris/sys/time.h
 @@ -29,7 +29,12 @@
@@ -43,3 +32,31 @@
  
  #define SEC		1
  #define MILLISEC	1000
+--- a/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
++++ b/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
+@@ -380,7 +380,7 @@
+  * High order bit is 31 (or 63 in _LP64 kernel).
+  */
+ static __inline int
+-highbit(ulong_t i)
++highbit(unsigned long i)
+ {
+ 	register int h = 1;
+ 
+--- a/sys/cddl/compat/opensolaris/sys/stat.h
++++ b/sys/cddl/compat/opensolaris/sys/stat.h
+@@ -32,11 +32,13 @@
+ 
+ #include_next <sys/stat.h>
+ 
++#ifndef __GLIBC__
+ #define	stat64	stat
++#endif
+ 
+ #define	MAXOFFSET_T	OFF_MAX
+ 
+-#ifndef _KERNEL
++#if !defined(_KERNEL) && !defined(__GLIBC__)
+ #include <sys/disk.h>
+ 
+ static __inline int
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/03_glibc_namespace.diff zfsutils/zfsutils-9/debian/patches/03_glibc_namespace.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/03_glibc_namespace.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/03_glibc_namespace.diff	2011-10-08 22:53:30.356826354 -0400
@@ -9,18 +9,6 @@
  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c     |    2 +-
  8 files changed, 17 insertions(+), 10 deletions(-)
 
---- a/cddl/compat/opensolaris/include/solaris.h
-+++ b/cddl/compat/opensolaris/include/solaris.h
-@@ -5,6 +5,9 @@
- 
- #include <sys/ccompile.h>
- 
-+/* GNU libc has its own dirent64 declaration */
-+#ifndef __GLIBC__
- #define	dirent64	dirent
-+#endif
- 
- #endif	/* !_SOLARIS_H_ */
 --- a/cddl/compat/opensolaris/misc/fsshare.c
 +++ b/cddl/compat/opensolaris/misc/fsshare.c
 @@ -28,6 +28,7 @@
@@ -28,10 +16,10 @@
  
  #include <sys/param.h>
 +#include <sys/file.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <fcntl.h>
-@@ -67,7 +68,7 @@
+ 
+ #include <assert.h>
+ #include <errno.h>
+@@ -69,7 +70,7 @@
   * mountpoint specified in the 'skip' argument.
   */
  static char *
@@ -40,7 +28,7 @@
  {
  	static char line[MAXLINESIZE];
  	size_t len, skiplen;
-@@ -198,7 +199,7 @@
+@@ -200,7 +201,7 @@
  
  	/* Place big, fat warning at the begining of the file. */
  	fprintf(newfd, "%s", FILE_HEADER);
@@ -62,9 +50,9 @@
  	char *f, *opts = tmpopts;
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
-@@ -1637,11 +1637,11 @@
- 	case ZFS_PROP_NBMAND:
- 		*val = getprop_uint64(zhp, prop, source);
+@@ -1735,11 +1735,11 @@
+ 		if (received)
+ 			break;
  
 -		if (hasmntopt(&mnt, mntopt_on) && !*val) {
 +		if (solaris_hasmntopt(&mnt, mntopt_on) && !*val) {
@@ -89,7 +77,7 @@
  
 --- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
 +++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
-@@ -105,8 +105,8 @@
+@@ -107,8 +107,8 @@
  
  #define	ZFS_LOG(...)	do {  } while (0)
  
@@ -100,7 +88,7 @@
  
  #ifdef ZFS_DEBUG
  extern void dprintf_setup(int *argc, char **argv);
-@@ -445,7 +445,7 @@
+@@ -496,7 +496,7 @@
  extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp,
      int x2, int x3, vnode_t *vp, int fd);
  extern int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len,
@@ -111,20 +99,20 @@
  #define	vn_remove(path, x1, x2)		remove(path)
 --- a/sys/cddl/compat/opensolaris/sys/dirent.h
 +++ b/sys/cddl/compat/opensolaris/sys/dirent.h
-@@ -32,7 +32,10 @@
- #include_next <sys/dirent.h>
- 
+@@ -36,7 +36,10 @@
  typedef	struct dirent	dirent64_t;
+ typedef ino_t		ino64_t;
+ 
 +/* GNU libc has its own dirent64 declaration */
 +#ifndef __GLIBC__
  #define	dirent64	dirent
 +#endif
- #define	ino64_t		ino_t
  
  #define	d_ino	d_fileno
+ 
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
-@@ -710,7 +710,7 @@
+@@ -717,7 +717,7 @@
  zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
  {
  	znode_t		*zp = VTOZ(vp);
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/04_stdint.diff zfsutils/zfsutils-9/debian/patches/04_stdint.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/04_stdint.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/04_stdint.diff	2011-10-08 22:50:49.418980343 -0400
@@ -12,12 +12,12 @@
  
 -#include <sys/stdint.h>
 +#include <stdint.h>
- #include_next <sys/types.h>
  
- #define	MAXNAMELEN	256
+ #ifdef _KERNEL
+ typedef	int64_t		clock_t;
 --- a/sys/cddl/contrib/opensolaris/common/avl/avl.c
 +++ b/sys/cddl/contrib/opensolaris/common/avl/avl.c
-@@ -92,7 +92,7 @@
+@@ -89,7 +89,7 @@
  
  #include <sys/types.h>
  #include <sys/param.h>
@@ -28,7 +28,7 @@
  
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
-@@ -33,7 +33,7 @@
+@@ -31,7 +31,7 @@
  #endif
  
  #include <sys/param.h>
@@ -37,3 +37,27 @@
  #include <sys/note.h>
  #include <sys/kernel.h>
  #include <sys/debug.h>
+--- a/lib/libmd/sha512.h
++++ b/lib/libmd/sha512.h
+@@ -30,6 +30,9 @@
+ #define _SHA512_H_
+ 
+ #include <sys/types.h>
++#ifdef __GLIBC__
++#include <stdint.h>
++#endif
+ 
+ typedef struct SHA512Context {
+ 	uint64_t state[8];
+--- a/lib/libmd/sha256.h
++++ b/lib/libmd/sha256.h
+@@ -30,6 +30,9 @@
+ #define _SHA256_H_
+ 
+ #include <sys/types.h>
++#ifdef __GLIBC__
++#include <stdint.h>
++#endif
+ 
+ typedef struct SHA256Context {
+ 	uint32_t state[8];
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/05_makefile.diff zfsutils/zfsutils-9/debian/patches/05_makefile.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/05_makefile.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/05_makefile.diff	2011-10-08 23:33:33.225730922 -0400
@@ -11,21 +11,33 @@
 
 --- a/cddl/lib/libzfs/Makefile
 +++ b/cddl/lib/libzfs/Makefile
-@@ -7,7 +7,10 @@
+@@ -6,8 +6,14 @@
+ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
  
  LIB=	zfs
- DPADD=	${LIBUTIL}
--LDADD=	-lutil
-+LDADD=	-lm -lbsd -lgeom -lnvpair -luutil
+-DPADD=	${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL}
+-LDADD=	-lmd -lpthread -lumem -lutil
++DPADD=	${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBMD}
++LDADD=	-lpthread -lumem -lm -lbsd -lgeom -lnvpair -luutil
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= ${.CURDIR}/../../../lib/libmd/libmd.a
 +
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair \
-+	-L${.CURDIR}/../../../cddl/lib/libuutil \
  
  SRCS=	deviceid.c \
  	fsshare.c \
+@@ -53,5 +59,6 @@
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common
++CFLAGS+= -I${.CURDIR}/../../../lib/libmd
+ 
+ .include <bsd.lib.mk>
 --- a/cddl/lib/libuutil/Makefile
 +++ b/cddl/lib/libuutil/Makefile
-@@ -22,4 +22,6 @@
+@@ -23,4 +23,6 @@
  CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
  CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
  
@@ -34,43 +46,44 @@
  .include <bsd.lib.mk>
 --- a/cddl/sbin/zfs/Makefile
 +++ b/cddl/sbin/zfs/Makefile
-@@ -19,9 +19,12 @@
- CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+@@ -21,8 +21,13 @@
  CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
+ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
  
--DPADD=	${LIBZFS} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} \
--	${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUTIL}
--LDADD=	-lzfs -lgeom -lbsdxml -lsbuf \
--	-lm -lnvpair -luutil -lutil
-+DPADD=	${LIBZFS} ${LIBGEOM} \
-+	${LIBM} ${LIBNVPAIR} ${LIBUUTIL}
-+LDADD=	-lzfs -lgeom -lnvpair -luutil -lbsd
+-DPADD=	${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \
+-	${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD=	-lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs
++DPADD=	${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} \
++	${LIBUUTIL} ${LIBZFS}
++LDADD=	-lbsd -lgeom -lm -lnvpair -lumem -luutil -lzfs
 +
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
 +       -L${.CURDIR}/../../../cddl/lib/libnvpair \
-+       -L${.CURDIR}/../../../cddl/lib/libuutil 
++       -L${.CURDIR}/../../../cddl/lib/libuutil \
++       -L${.CURDIR}/../../../cddl/lib/libumem
  
  .include <bsd.prog.mk>
 --- a/cddl/sbin/zpool/Makefile
 +++ b/cddl/sbin/zpool/Makefile
-@@ -21,9 +21,10 @@
- CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
- CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
- 
--DPADD=	${LIBAVL} ${LIBZFS} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} \
--	${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUTIL}
--LDADD=	-lavl -lzfs -lgeom -lbsdxml -lsbuf \
--	-lm -lnvpair -luutil -lutil
-+DPADD=	${LIBZFS} ${LIBGEOM} ${LIBNVPAIR} ${LIBUUTIL}
-+LDADD=	-lzfs -lgeom -lnvpair -luutil -lbsd
+@@ -26,8 +26,12 @@
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common
+ 
+-DPADD=	${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \
+-	${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD=	-lavl -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs
++DPADD=  ${LIBZFS} ${LIBGEOM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUMEM}
++LDADD= -lzfs -lgeom -lnvpair -luutil -lbsd -lumem
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
-+	-L${.CURDIR}/../../../cddl/lib/libnvpair \
-+	-L${.CURDIR}/../../../cddl/lib/libuutil
++       -L${.CURDIR}/../../../cddl/lib/libnvpair \
++       -L${.CURDIR}/../../../cddl/lib/libuutil \
++       -L${.CURDIR}/../../../cddl/lib/libumem
++
  
  .include <bsd.prog.mk>
 --- a/cddl/usr.sbin/zdb/Makefile
 +++ b/cddl/usr.sbin/zdb/Makefile
-@@ -21,7 +21,12 @@
+@@ -25,7 +25,12 @@
  
  DPADD=	${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \
  	${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
@@ -82,16 +95,16 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
  
- CSTD=	c99
  
+ .include <bsd.prog.mk>
 --- a/cddl/usr.bin/zinject/Makefile
 +++ b/cddl/usr.bin/zinject/Makefile
-@@ -20,6 +20,11 @@
+@@ -21,6 +21,11 @@
  
  DPADD=	${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
- 	${LIBZFS} ${LIBZPOOL} ${LIBUUTIL}
+ 	${LIBZFS} ${LIBZPOOL}
 -LDADD=	-lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
-+LDADD=	-lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
++LDADD= -lbsd -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
@@ -101,7 +114,7 @@
  .include <bsd.prog.mk>
 --- a/cddl/usr.bin/ztest/Makefile
 +++ b/cddl/usr.bin/ztest/Makefile
-@@ -17,7 +17,10 @@
+@@ -19,7 +19,10 @@
  
  DPADD=	${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
  	${LIBPTHREAD} ${LIBZ} ${LIBAVL}
@@ -115,15 +128,19 @@
  
 --- a/cddl/lib/libzpool/Makefile
 +++ b/cddl/lib/libzpool/Makefile
-@@ -53,7 +53,10 @@
- CFLAGS+=	-I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
- 
- DPADD=		${LIBPTHREAD} ${LIBZ}
--LDADD=		-lpthread -lz
-+LDADD=		-lpthread -lz -lrt -lbsd -lnvpair -lumem
-+LDADD+=	-L${.CURDIR}/../../../cddl/lib/libnvpair
-+LDADD+=	-L${.CURDIR}/../../../cddl/lib/libumem
-+LDADD+=	${.CURDIR}/../../../cddl/lib/libavl/libavl.a
+@@ -55,9 +55,14 @@
+ CFLAGS+=	-I${.CURDIR}/../../../lib/libpthread/thread
+ CFLAGS+=	-I${.CURDIR}/../../../lib/libpthread/sys
+ CFLAGS+=	-I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include
++CFLAGS+=        -I${.CURDIR}/../../../lib/libmd
+ 
+ DPADD=		${LIBMD} ${LIBPTHREAD} ${LIBZ}
+-LDADD=		-lmd -lpthread -lz
++LDADD=         -lpthread -lz -lrt -lbsd -lnvpair -lumem
++LDADD+=        -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+=        -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+=        ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
++LDADD+=        ${.CURDIR}/../../../lib/libmd/libmd.a
  
  # atomic.S doesn't like profiling.
  NO_PROFILE=
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/06_mountd.diff zfsutils/zfsutils-9/debian/patches/06_mountd.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/06_mountd.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/06_mountd.diff	2011-10-08 22:38:22.694158613 -0400
@@ -4,15 +4,15 @@
 
 --- a/cddl/compat/opensolaris/misc/fsshare.c
 +++ b/cddl/compat/opensolaris/misc/fsshare.c
-@@ -36,7 +36,6 @@
- #include <errno.h>
+@@ -35,7 +35,6 @@
+ #include <fcntl.h>
+ #include <fsshare.h>
  #include <libutil.h>
- #include <assert.h>
 -#include <pathnames.h>	/* _PATH_MOUNTDPID */
- #include <fsshare.h>
- 
- #define	FILE_HEADER	"# !!! DO NOT EDIT THIS FILE MANUALLY !!!\n\n"
-@@ -46,6 +45,9 @@
+ #include <signal.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -48,6 +47,9 @@
  static void
  restart_mountd(void)
  {
@@ -22,7 +22,7 @@
  	struct pidfh *pfh;
  	pid_t mountdpid;
  
-@@ -61,6 +63,7 @@
+@@ -63,6 +65,7 @@
  	}
  	/* We have mountd(8) PID in mountdpid varible. */
  	kill(mountdpid, SIGHUP);
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/07_manpages.diff zfsutils/zfsutils-9/debian/patches/07_manpages.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/07_manpages.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/07_manpages.diff	2011-10-09 20:11:00.598514614 -0400
@@ -5,23 +5,34 @@
 
 --- a/cddl/contrib/opensolaris/cmd/zfs/zfs.8
 +++ b/cddl/contrib/opensolaris/cmd/zfs/zfs.8
-@@ -6,7 +6,7 @@
- .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
- .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
+@@ -8,7 +8,7 @@
  .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
--.TH zfs 1M "5 May 2009" "SunOS 5.11" "System Administration Commands"
-+.TH zfs 8 "5 May 2009" "SunOS 5.11" "System Administration Commands"
+ .\" Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ .\" Copyright 2011 by Delphix.  All rights reserved.
+-.TH zfs 1M "24 Sep 2009" "SunOS 5.11" "System Administration Commands"
++.TH zfs 8 "24 Sep 2009" "SunOS 5.11" "System Administration Commands"
  .SH NAME
  zfs \- configures ZFS file systems
  .SH SYNOPSIS
 --- a/cddl/contrib/opensolaris/cmd/zpool/zpool.8
 +++ b/cddl/contrib/opensolaris/cmd/zpool/zpool.8
 @@ -3,7 +3,7 @@
- .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
- .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
- .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
--.TH zpool 1M "5 Mar 2009" "SunOS 5.11" "System Administration Commands"
-+.TH zpool 8 "5 Mar 2009" "SunOS 5.11" "System Administration Commands"
+ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+ .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+ .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+-.TH zpool 1M "21 Sep 2009" "SunOS 5.11" "System Administration Commands"
++.TH zpool 8 "21 Sep 2009" "SunOS 5.11" "System Administration Commands"
  .SH NAME
  zpool \- configures ZFS storage pools
  .SH SYNOPSIS
+--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.8
++++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.8
+@@ -3,7 +3,7 @@
+ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
+ .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
+ .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+-.TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands"
++.TH zdb 8 "31 Oct 2005" "SunOS 5.11" "System Administration Commands"
+ .SH NAME
+ zdb \- ZFS debugger
+ .SH SYNOPSIS
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/08_libbsd.diff zfsutils/zfsutils-9/debian/patches/08_libbsd.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/08_libbsd.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/08_libbsd.diff	2011-10-08 22:54:19.679457582 -0400
@@ -78,11 +78,12 @@
  #include <fcntl.h>
 --- a/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
 +++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
-@@ -74,6 +74,7 @@
+@@ -74,6 +74,8 @@
  #include <sys/disk.h>
  #include <sys/mntent.h>
  #include <libgeom.h>
 +#include <bsd/string.h>
++#include <sys/limits.h>
  
  #include "zpool_util.h"
  
@@ -109,8 +110,8 @@
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
 @@ -51,6 +51,7 @@
- #include <unistd.h>
  #include <fcntl.h>
+ #include <thread_pool.h>
  #include <libgeom.h>
 +#include <bsd/string.h>
  
@@ -118,7 +119,7 @@
  
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
-@@ -76,6 +76,7 @@
+@@ -72,6 +72,7 @@
  #include <sys/mntent.h>
  #include <sys/mount.h>
  #include <sys/stat.h>
@@ -128,34 +129,24 @@
  
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
-@@ -41,6 +41,7 @@
+@@ -36,6 +36,7 @@
+ #include <unistd.h>
  #include <sys/zfs_ioctl.h>
- #include <sys/zio.h>
- #include <umem.h>
+ #include <dlfcn.h>
 +#include <bsd/string.h>
  
  #include "zfs_namecheck.h"
  #include "zfs_prop.h"
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
-@@ -40,6 +40,7 @@
- #include <sys/mnttab.h>
- #include <sys/avl.h>
- #include <stddef.h>
+@@ -37,6 +37,7 @@
+ #include <sys/mount.h>
+ #include <pthread.h>
+ #include <umem.h>
 +#include <bsd/string.h>
  
  #include <libzfs.h>
  
---- a/cddl/compat/opensolaris/misc/fsshare.c
-+++ b/cddl/compat/opensolaris/misc/fsshare.c
-@@ -37,6 +37,7 @@
- #include <libutil.h>
- #include <assert.h>
- #include <fsshare.h>
-+#include <bsd/string.h>
- 
- #define	FILE_HEADER	"# !!! DO NOT EDIT THIS FILE MANUALLY !!!\n\n"
- #define	OPTSSIZE	1024
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
 @@ -31,6 +31,7 @@
@@ -168,7 +159,7 @@
  #include <stddef.h>
 --- a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
 +++ b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
-@@ -28,6 +28,7 @@
+@@ -27,6 +27,7 @@
  #include <poll.h>
  #include <stdio.h>
  #include <stdlib.h>
@@ -178,7 +169,7 @@
  #include <sys/spa.h>
 --- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
 +++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
-@@ -36,6 +36,7 @@
+@@ -35,6 +35,7 @@
  #include <locale.h>
  #include <stdio.h>
  #include <stdlib.h>
@@ -188,7 +179,7 @@
  #include <unistd.h>
 --- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
 +++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
-@@ -50,6 +50,7 @@
+@@ -49,6 +49,7 @@
  #include <fcntl.h>
  #include <unistd.h>
  #include <errno.h>
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/10_zpool_import.diff zfsutils/zfsutils-9/debian/patches/10_zpool_import.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/10_zpool_import.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/10_zpool_import.diff	2011-10-08 22:38:22.694158613 -0400
@@ -4,70 +4,33 @@
 
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
-@@ -845,8 +845,6 @@
+@@ -1126,9 +1126,7 @@
+ 	int i, dirs = iarg->paths;
  	DIR *dirp = NULL;
  	struct dirent64 *dp;
- 	char path[MAXPATHLEN];
--	char *end;
+-	char path[MAXPATHLEN];
+-	char *end, **dir = iarg->path;
 -	size_t pathleft;
- 	struct stat64 statbuf;
- 	nvlist_t *ret = NULL, *config;
++	char **dir = iarg->path;
+ 	nvlist_t *ret = NULL;
  	static char *default_dir = "/dev/dsk";
-@@ -873,6 +871,11 @@
- 		char *rdsk;
- 		int dfd;
- 
-+		if (strcmp(argv[i], default_dir) == 0) {
-+			geom_find_import(hdl, &pools);
-+			continue;
-+		}
-+
- 		/* use realpath to normalize the path */
- 		if (realpath(argv[i], path) == 0) {
- 			(void) zfs_error_fmt(hdl, EZFS_BADPATH,
-@@ -880,15 +883,6 @@
- 			    argv[i]);
+ 	pool_list_t pools = { 0 };
+@@ -1161,10 +1159,6 @@
+ 			    dgettext(TEXT_DOMAIN, "cannot open '%s'"), dir[i]);
  			goto error;
  		}
 -		end = &path[strlen(path)];
 -		*end++ = '/';
 -		*end = 0;
 -		pathleft = &path[sizeof (path)] - end;
--
--		if (strcmp(argv[i], default_dir) == 0) {
--			geom_find_import(hdl, &pools);
--			continue;
--		}
  
  		/*
  		 * Using raw devices instead of block devices when we're
-@@ -912,15 +906,16 @@
+@@ -1224,6 +1218,7 @@
  		 * This is not MT-safe, but we have no MT consumers of libzfs
  		 */
  		while ((dp = readdir64(dirp)) != NULL) {
-+	                char devpath[MAXPATHLEN];
++			char devpath[MAXPATHLEN];
  			const char *name = dp->d_name;
  			if (name[0] == '.' &&
  			    (name[1] == 0 || (name[1] == '.' && name[2] == 0)))
- 				continue;
- 
--			(void) snprintf(path, sizeof (path), "%s/%s", rdsk,
--			    dp->d_name);
-+			(void) snprintf(devpath, sizeof (devpath), "%s/%s",
-+			    rdsk, dp->d_name);
- 
--			if ((fd = open64(path, O_RDONLY)) < 0)
-+			if ((fd = open64(devpath, O_RDONLY)) < 0)
- 				continue;
- 
- 			/*
-@@ -967,8 +962,7 @@
- 					continue;
- 				}
- 				/* use the non-raw path for the config */
--				(void) strlcpy(end, name, pathleft);
--				if (add_config(hdl, &pools, path, config) != 0)
-+				if (add_config(hdl, &pools, devpath, config) != 0)
- 					goto error;
- 			}
- 		}
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/11_endian.diff zfsutils/zfsutils-9/debian/patches/11_endian.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/11_endian.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/11_endian.diff	2011-10-08 22:38:22.696095172 -0400
@@ -23,12 +23,21 @@
   */
 -#if _BYTE_ORDER == _BIG_ENDIAN
 +#if BYTE_ORDER == BIG_ENDIAN
- #define	LE_64(x)	BSWAP_64(x)
+ #define	BE_8(x)		BMASK_8(x)
+ #define	BE_16(x)	BMASK_16(x)
+ #define	BE_32(x)	BMASK_32(x)
+@@ -78,7 +80,7 @@
+ #define	BE_64(x)	BSWAP_64(x)
+ #endif
+ 
+-#if _BYTE_ORDER == _BIG_ENDIAN
++#if BYTE_ORDER == BIG_ENDIAN
+ #define	htonll(x)	BMASK_64(x)
+ #define	ntohll(x)	BMASK_64(x)
  #else
- #define	LE_64(x)	BMASK_64(x)
 --- a/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
 +++ b/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c
-@@ -36,6 +36,7 @@
+@@ -33,6 +33,7 @@
  #include <sys/varargs.h>
  #include <sys/sunddi.h>
  #else
@@ -36,7 +45,7 @@
  #include <stdarg.h>
  #include <stdlib.h>
  #include <string.h>
-@@ -2199,11 +2200,11 @@
+@@ -2251,11 +2252,11 @@
  	int err = 0;
  	nvstream_t nvs;
  	int nvl_endian;
@@ -61,7 +70,7 @@
  #ifdef	__cplusplus
  extern "C" {
  #endif
-@@ -299,7 +301,7 @@
+@@ -329,7 +331,7 @@
   * Note: the byteorder is either 0 or -1, both of which are palindromes.
   * This simplifies the endianness handling a bit.
   */
@@ -70,35 +79,6 @@
  #define	ZFS_HOST_BYTEORDER	(0ULL)
  #else
  #define	ZFS_HOST_BYTEORDER	(-1ULL)
---- a/sys/cddl/contrib/opensolaris/uts/common/sys/byteorder.h
-+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/byteorder.h
-@@ -48,6 +48,8 @@
- #include <asm/byteorder.h>
- #endif
- 
-+#include <endian.h>
-+
- #ifdef	__cplusplus
- extern "C" {
- #endif
-@@ -56,7 +58,7 @@
-  * macros for conversion between host and (internet) network byte order
-  */
- 
--#if BYTE_ORDER == _BIG_ENDIAN && !defined(ntohl) && !defined(__lint)
-+#if BYTE_ORDER == BIG_ENDIAN && !defined(ntohl) && !defined(__lint)
- /* big-endian */
- #define	ntohl(x)	(x)
- #define	ntohs(x)	(x)
-@@ -141,7 +143,7 @@
- /*
-  * Macros to convert from a specific byte order to/from native byte order
-  */
--#if BYTE_ORDER == _BIG_ENDIAN
-+#if BYTE_ORDER == BIG_ENDIAN
- #define	BE_8(x)		BMASK_8(x)
- #define	BE_16(x)	BMASK_16(x)
- #define	BE_32(x)	BMASK_32(x)
 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
 +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
 @@ -29,6 +29,8 @@
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/12_freebsd.diff zfsutils/zfsutils-9/debian/patches/12_freebsd.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/12_freebsd.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/12_freebsd.diff	2011-10-08 22:38:22.693121051 -0400
@@ -8,73 +8,31 @@
  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c |    2 +-
  7 files changed, 10 insertions(+), 10 deletions(-)
 
---- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
-+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
-@@ -601,7 +601,7 @@
- extern int zpool_enable_datasets(zpool_handle_t *, const char *, int);
- extern int zpool_disable_datasets(zpool_handle_t *, boolean_t);
- 
--#ifdef	__FreeBSD__
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- extern int zmount(const char *, const char *, int, char *, char *, int, char *,
-     int);
- #endif
---- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
-+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
-@@ -190,7 +190,7 @@
- extern int zfs_unshare_proto(zfs_handle_t *,
-     const char *, zfs_share_proto_t *);
- 
--#ifdef	__FreeBSD__
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- 
- /*
-  * This is FreeBSD version of ioctl, because Solaris' ioctl() updates
---- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
-+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
-@@ -726,7 +726,7 @@
- 	return (err);
- }
- 
--#ifndef __FreeBSD__
-+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
- int
- dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
-     page_t *pp, dmu_tx_t *tx)
-@@ -781,7 +781,7 @@
- 	dmu_buf_rele_array(dbp, numbufs, FTAG);
- 	return (err);
- }
--#endif	/* !__FreeBSD__ */
-+#endif	/* !__FreeBSD__ && !__FreeBSD_kernel__ */
- #endif	/* _KERNEL */
- 
- /*
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h
-@@ -51,7 +51,7 @@
- extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr);
- extern int zvol_dump(dev_t dev, caddr_t addr, daddr_t offset, int nblocks);
- extern int zvol_close(dev_t dev, int flag, int otyp, cred_t *cr);
--#ifndef __FreeBSD__
-+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
- extern int zvol_strategy(buf_t *bp);
- extern int zvol_read(dev_t dev, uio_t *uiop, cred_t *cr);
- extern int zvol_write(dev_t dev, uio_t *uiop, cred_t *cr);
+@@ -71,7 +71,7 @@
+     ssize_t resid, boolean_t sync);
+ #endif	/* sun */
+ 
+-#ifdef __FreeBSD__
++#ifdef defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ extern int zvol_create_minors(const char *name);
+ extern void zvol_rename_minors(const char *oldname, const char *newname);
+ #endif
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
-@@ -1878,7 +1878,7 @@
+@@ -1681,7 +1681,7 @@
  			} else {
  				acl_ids->z_fgid = zfs_fuid_create_cred(zfsvfs,
  				    ZFS_GROUP, cr, &acl_ids->z_fuidp);
 -#ifdef __FreeBSD__
 +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- 				gid = acl_ids->z_fgid = dzp->z_phys->zp_gid;
+ 				gid = acl_ids->z_fgid = dzp->z_gid;
  #else
  				gid = crgetgid(cr);
-@@ -2562,7 +2562,7 @@
- 	is_attr = ((zp->z_phys->zp_flags & ZFS_XATTR) &&
- 	    (ZTOV(zp)->v_type == VDIR));
+@@ -2371,7 +2371,7 @@
+ 
+ 	is_attr = ((zp->z_pflags & ZFS_XATTR) && (ZTOV(zp)->v_type == VDIR));
  
 -#ifdef __FreeBSD__
 +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -83,7 +41,7 @@
  	 * Note that not checking them is not just an optimization - without
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
-@@ -833,7 +833,7 @@
+@@ -919,7 +919,7 @@
  	 * In FreeBSD, access checking for creating an EA is being done
  	 * in zfs_setextattr(),
  	 */
@@ -92,7 +50,7 @@
  	if (error = zfs_zaccess(zp, ACE_WRITE_NAMED_ATTRS, 0, B_FALSE, cr))
  		return (error);
  #endif
-@@ -916,7 +916,7 @@
+@@ -1012,7 +1012,7 @@
  
  	if (!(flags & CREATE_XATTR_DIR)) {
  		zfs_dirent_unlock(dl);
@@ -103,7 +61,7 @@
  		return (ENOENT);
 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
 +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
-@@ -1385,7 +1385,7 @@
+@@ -1804,7 +1804,7 @@
  		rrw_exit(&zfsvfs->z_teardown_lock, FTAG);
  		rw_exit(&zfsvfs->z_teardown_inactive_lock);
  
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/13_mnttab.diff zfsutils/zfsutils-9/debian/patches/13_mnttab.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/13_mnttab.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/13_mnttab.diff	2011-10-08 22:38:22.693121051 -0400
@@ -12,4 +12,4 @@
 +#define	MNTTAB		_PATH_MNTTAB
  #define	MNT_LINE_MAX	1024
  
- #define	umount2(p, f)	unmount(p, f)
+ #define	MS_OVERLAY	0x0
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/14_bootloader_advice.diff zfsutils/zfsutils-9/debian/patches/14_bootloader_advice.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/14_bootloader_advice.diff	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/14_bootloader_advice.diff	2011-10-08 23:15:33.864825555 -0400
@@ -13,7 +13,7 @@
 
 --- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
 +++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
-@@ -3609,11 +3609,11 @@
+@@ -4249,11 +4249,11 @@
  
  	if (cb.cb_poolname[0] != '\0') {
  		(void) printf(
@@ -30,7 +30,7 @@
  
 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
 +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
-@@ -1895,11 +1895,11 @@
+@@ -2473,11 +2473,11 @@
  			(void) fprintf(stderr, dgettext(TEXT_DOMAIN, "If "
  			    "you boot from pool '%s', you may need to update\n"
  			    "boot code on newly attached disk '%s'.\n\n"
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/15_pthread_compat.diff zfsutils/zfsutils-9/debian/patches/15_pthread_compat.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/15_pthread_compat.diff	1969-12-31 19:00:00.000000000 -0500
+++ zfsutils/zfsutils-9/debian/patches/15_pthread_compat.diff	2011-10-09 15:38:36.998675809 -0400
@@ -0,0 +1,32 @@
+--- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
++++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
+@@ -251,7 +251,28 @@
+ #undef	MUTEX_NOT_HELD
+ #define	MUTEX_HELD(m)	((m)->m_owner == curthread)
+ #define	MUTEX_NOT_HELD(m) (!MUTEX_HELD(m))
+-#define	_mutex_held(m)	pthread_mutex_isowned_np(m)
++/*
++ * glibc/pthread does not define pthread_mutex_isowned_np()
++ * That's a FreeBSD extension available in libthr. Its code is
++ *
++ * int
++ * _pthread_mutex_isowned_np(pthread_mutex_t *mutex)
++ * {
++ *       struct pthread_mutex    *m;
++ *
++ *       m = *mutex;
++ *       if (m <= THR_MUTEX_DESTROYED)
++ *               return (0);
++ *       return (m->m_owner == _get_curthread());
++ * }
++ * Unfortunately we do not support either, this symbol or pthread_mutex as
++ * struct.
++ * In our phtread implementation, pthread_mutex is typedefed to int, on FreeBSD
++ * it's a struct. Hence We can't simply wrap the missing code. Fortunately the code
++ * using _pthread_mutex_isowned_np currently does so in a assert() only,
++ * so we /may/ be safe if our code never "fails". For now.
++ */
++#define	_mutex_held(m)	(1)
+ 
+ /*
+  * Argh -- we have to get cheesy here because the kernel and userland
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/15_ztest.fix zfsutils/zfsutils-9/debian/patches/15_ztest.fix
--- zfsutils_old/zfsutils-8.2/debian/patches/15_ztest.fix	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/15_ztest.fix	1969-12-31 19:00:00.000000000 -0500
@@ -1,31 +0,0 @@
-From: Arno Töll <debian@toell.net>
-Subject: Fix assertion problems for ztest
-
-* cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fix path problems
-
-Origin: upstream, 
-	http://freshbsd.org/2010/11/01/10/41/05
-
-Cherry pick patch from upstream to get the `ztest' binary working in the 
- current Debian version of zfsutils. This patch may be removed, as soon
- as a more recent vesion of zfsutils is shipped with Debian
-
-Last-Update: 2011-04-22
-
----
- cddl/contrib/opensolaris/cmd/ztest/ztest.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
-+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
-@@ -3362,8 +3362,8 @@
- 	int isalen;
- 	FILE *fp;
- 
--	if (realpath(progname, zdb) == NULL)
--		assert(!"realpath() failed");
-+	
-+	strlcpy(zdb, "/usr/bin/ztest", sizeof(zdb));
- 
- 	/* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
- 	bin = strstr(zdb, "/usr/bin/");
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/16-wrap-cdefs.diff zfsutils/zfsutils-9/debian/patches/16-wrap-cdefs.diff
--- zfsutils_old/zfsutils-8.2/debian/patches/16-wrap-cdefs.diff	1969-12-31 19:00:00.000000000 -0500
+++ zfsutils/zfsutils-9/debian/patches/16-wrap-cdefs.diff	2011-10-08 23:20:43.349443572 -0400
@@ -0,0 +1,31 @@
+--- a/sys/cddl/compat/opensolaris/sys/misc.h
++++ b/sys/cddl/compat/opensolaris/sys/misc.h
+@@ -29,6 +29,13 @@
+ #ifndef _OPENSOLARIS_SYS_MISC_H_
+ #define	_OPENSOLARIS_SYS_MISC_H_
+ 
++#ifdef _POSIX_C_SOURCE
++#if _POSIX_C_SOURCE >= 200112
++#define __POSIX_VISIBLE         200112
++#define __ISO_C_VISIBLE         1999
++#endif
++#endif
++
+ #include <sys/limits.h>
+ 
+ #define	MAXUID	UINT_MAX
+--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
++++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
+@@ -75,6 +75,12 @@
+ #include <sys/mntent.h>
+ #include <libgeom.h>
+ #include <bsd/string.h>
++#ifdef _POSIX_C_SOURCE
++#if _POSIX_C_SOURCE >= 200112
++#define __POSIX_VISIBLE         200112
++#define __ISO_C_VISIBLE         1999
++#endif
++#endif
+ #include <sys/limits.h>
+ 
+ #include "zpool_util.h"
diff -ruN zfsutils_old/zfsutils-8.2/debian/patches/series zfsutils/zfsutils-9/debian/patches/series
--- zfsutils_old/zfsutils-8.2/debian/patches/series	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/patches/series	2011-10-09 14:43:20.525299444 -0400
@@ -7,9 +7,9 @@
 07_manpages.diff
 08_libbsd.diff
 09_xdr_control.diff
-10_zpool_import.diff
 11_endian.diff
 12_freebsd.diff
 13_mnttab.diff
 14_bootloader_advice.diff
-15_ztest.fix
+15_pthread_compat.diff
+16-wrap-cdefs.diff
diff -ruN zfsutils_old/zfsutils-8.2/debian/rules zfsutils/zfsutils-9/debian/rules
--- zfsutils_old/zfsutils-8.2/debian/rules	2011-08-07 14:09:45.000000000 -0400
+++ zfsutils/zfsutils-9/debian/rules	2011-10-09 16:38:46.018526376 -0400
@@ -20,10 +20,13 @@
 endif
 
 SOURCE = zfsutils
-VERSION = $(shell dpkg-parsechangelog | sed -e '/^Version:/!d' -e 's/^Version: //g' -e 's/-.*//g')
-SVN = http://svn.freebsd.org/base/release/$(VERSION).0
+VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)-[0-9]*$$,\1,p')
+SVN_REVISION := $(shell echo $(VERSION) | cut -d \~ -f2 | sed 's/svn//')
+VERSION := $(shell echo $(VERSION) | cut -d . -f1)
+SVN = http://svn.freebsd.org/base/stable/$(VERSION)/
+#SVN = http://svn.freebsd.org/base/release/$(VERSION).0
 ORIGDIR = $(SOURCE)-$(VERSION)
-TARNAME = $(SOURCE)_$(VERSION).orig.tar.gz
+TARNAME = $(SOURCE)_$(VERSION).0~svn$(SVN_REVISION).orig.tar.gz
 
 PATH := /usr/lib/freebsd:$(PATH)
 DESTDIR = $(CURDIR)/debian/tmp
@@ -33,6 +36,8 @@
 export SHLIBDIR = ./
 
 get-orig-source:
+	@echo "Version: $(VERSION)"
+	@echo "SVN Revision: $(SVN_REVISION)"
 	rm -rf $(ORIGDIR)
 	for i in \
 	         cddl/compat/opensolaris \
@@ -46,8 +51,10 @@
 	         cddl/contrib/opensolaris/lib/libuutil \
 	         cddl/contrib/opensolaris/lib/libzfs \
 	         cddl/contrib/opensolaris/lib/libzpool \
+		 cddl/contrib/opensolaris/cmd/stat/common/ \
 	         sys/cddl/compat/opensolaris \
 	         sys/cddl/contrib/opensolaris \
+                 lib/libmd \
 	         cddl/lib/libavl \
 	         cddl/lib/libnvpair \
 	         cddl/lib/libuutil \
@@ -60,7 +67,7 @@
 	         cddl/usr.bin/ztest \
 	         cddl/usr.sbin/zdb \
 	         ; do \
-	    svn export $(SVN)/$$i $(ORIGDIR)/$$i ; \
+	    svn export $(SVN)/$$i -r $(SVN_REVISION) $(ORIGDIR)/$$i ; \
 	done
 	rm -f $(ORIGDIR)/cddl/compat/opensolaris/include/alloca.h
 	rm -f $(ORIGDIR)/cddl/compat/opensolaris/include/stdlib.h
@@ -68,7 +75,7 @@
 	tar --numeric-owner --owner 0 --group 0 -czf ../$(TARNAME) $(ORIGDIR)
 	rm -rf $(ORIGDIR)
 
-build: build-libuutil build-libnvpair build-libzfs build-libumem build-libzpool build-zfsutils build-libavl
+build: build-libmd build-libuutil build-libnvpair build-libzfs build-libumem build-libzpool build-zfsutils build-libavl
 
 build-libuutil: build-libuutil-stamp
 build-libuutil-stamp:
@@ -91,8 +98,13 @@
 	$(PMAKE) -C $(CURDIR)/cddl/lib/libzpool
 	touch $@
 
+build-libmd: build-libmd-stamp
+build-libmd-stamp:
+	$(PMAKE) -C $(CURDIR)/lib/libmd
+	touch $@
+
 build-libzfs: build-libzfs-stamp
-build-libzfs-stamp: build-libnvpair-stamp build-libuutil-stamp
+build-libzfs-stamp: build-libnvpair-stamp build-libuutil-stamp build-libmd-stamp build-libumem-stamp
 	$(PMAKE) -C $(CURDIR)/cddl/lib/libzfs
 	touch $@
 
@@ -129,6 +141,7 @@
 	$(PMAKE) -C $(CURDIR)/cddl/usr.sbin/zdb clean
 	$(PMAKE) -C $(CURDIR)/cddl/usr.bin/ztest clean
 	$(PMAKE) -C $(CURDIR)/cddl/usr.bin/zinject clean
+	$(PMAKE) -C $(CURDIR)/lib/libmd clean
 
 	rm -f *stamp
 	dh_clean
diff -ruN zfsutils_old/zfsutils-8.2/debian/watch zfsutils/zfsutils-9/debian/watch
--- zfsutils_old/zfsutils-8.2/debian/watch	1969-12-31 19:00:00.000000000 -0500
+++ zfsutils/zfsutils-9/debian/watch	2011-10-09 16:14:21.916555874 -0400
@@ -0,0 +1,5 @@
+version=3
+
+# Sorry, this package is not produced by a single upstream tarball. Instead it
+# is built by several paths within upstream's SVN repository. Please use the
+# get-orig-source target in debian/rules
diff -ruN zfsutils_old/zfsutils-8.2/debian/zfsutils.zfs.init zfsutils/zfsutils-9/debian/zfsutils.zfs.init
--- zfsutils_old/zfsutils-8.2/debian/zfsutils.zfs.init	2011-08-08 09:38:12.000000000 -0400
+++ zfsutils/zfsutils-9/debian/zfsutils.zfs.init	2011-10-09 19:44:42.475981722 -0400
@@ -19,15 +19,6 @@
 do_start() {
 	log_begin_msg "Starting ZFS subsystem..."
 
-	# zvol
-	log_progress_msg "zvol"
-	zfs volinit
-	RET=$?
-	if [ $RET != 0 ] ; then
-		log_end_msg $RET
-		exit $RET
-	fi
-
 	# Enable swap on ZVOLs with property org.freebsd:swap=on.
 	log_progress_msg "swap"
 	zfs list -H -o org.freebsd:swap,name -t volume | \
@@ -75,15 +66,6 @@
 		esac
 	done
 
-	# zvol
-	log_progress_msg "zvol"
-	zfs volfini
-	RET=$?
-	if [ $RET != 0 ] ; then
-		log_end_msg $RET
-		exit $RET
-	fi
-
 	# filesystems
 	log_progress_msg "filesystems"
 	zfs unshare -a

Reply to: