[Glibc-bsd-commits] r3749 - in trunk/zfsutils/debian: . patches
Robert Millan
rmh at alioth.debian.org
Fri Oct 21 20:19:12 UTC 2011
Author: rmh
Date: 2011-10-21 20:19:11 +0000 (Fri, 21 Oct 2011)
New Revision: 3749
Added:
trunk/zfsutils/debian/patches/15_pthread_compat.diff
trunk/zfsutils/debian/patches/16-wrap-cdefs.diff
trunk/zfsutils/debian/patches/gratuitous_dependencies.diff
trunk/zfsutils/debian/patches/makefile.diff
Removed:
trunk/zfsutils/debian/patches/05_makefile.diff
trunk/zfsutils/debian/patches/10_zpool_import.diff
trunk/zfsutils/debian/patches/15_ztest.fix
Modified:
trunk/zfsutils/debian/changelog
trunk/zfsutils/debian/control
trunk/zfsutils/debian/patches/01_glibc_kludge.diff
trunk/zfsutils/debian/patches/02_glibc_misc.diff
trunk/zfsutils/debian/patches/03_glibc_namespace.diff
trunk/zfsutils/debian/patches/04_stdint.diff
trunk/zfsutils/debian/patches/06_mountd.diff
trunk/zfsutils/debian/patches/07_manpages.diff
trunk/zfsutils/debian/patches/08_libbsd.diff
trunk/zfsutils/debian/patches/11_endian.diff
trunk/zfsutils/debian/patches/12_freebsd.diff
trunk/zfsutils/debian/patches/13_mnttab.diff
trunk/zfsutils/debian/patches/14_bootloader_advice.diff
trunk/zfsutils/debian/patches/series
trunk/zfsutils/debian/rules
trunk/zfsutils/debian/zfsutils.zfs.init
Log:
Update zfsutils to 8-STABLE (mostly done by Arno Toell, with some adjustments of mine)
Modified: trunk/zfsutils/debian/changelog
===================================================================
--- trunk/zfsutils/debian/changelog 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/changelog 2011-10-21 20:19:11 UTC (rev 3749)
@@ -1,3 +1,24 @@
+zfsutils (8.3~svn226546-1) UNRELEASED; urgency=low
+
+ [ Arno Töll ]
+ [ Robert Millan ]
+ * New upstream snapshot, based on the FreeBSD 8-STABLE tree which supports
+ ZFS version 28 now.
+ * Refresh patches, leave hunks unchanged where possible. Additionally:
+ + 04_stdint.diff: Extend inclusion of stdint.h to several new files
+ + 05_makefile.diff: Split into gratuitous_dependencies.diff (which is
+ upstream-mergeable) and makefile.diff (which is Debian-specific)
+ + Remove 10_zpool_import.diff entirely (see kern/150207)
+ + 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.
+ * Remove the zfs volinit/volfini commands from the init script as they are
+ not available anymore; also stop on runlevel 1.
+
+ -- Robert Millan <rmh at debian.org> Fri, 21 Oct 2011 22:16:33 +0200
+
zfsutils (8.2-4) unstable; urgency=high
* Bring back mount/unmount routines in init script. See #637020 and
Modified: trunk/zfsutils/debian/control
===================================================================
--- trunk/zfsutils/debian/control 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/control 2011-10-21 20:19:11 UTC (rev 3749)
@@ -3,9 +3,9 @@
Priority: optional
Maintainer: GNU/kFreeBSD Maintainers <debian-bsd at lists.debian.org>
Uploaders: Aurelien Jarno <aurel32 at debian.org>, Robert Millan <rmh at debian.org>
-Build-Depends: debhelper (>= 7), freebsd-buildutils, libbsd-dev (>= 0.1.4),
+Build-Depends: debhelper (>= 7.0.50~), freebsd-buildutils, libbsd-dev (>= 0.1.4),
libc0.1-dev (>= 2.10), kfreebsd-kernel-headers (>= 0.51), libgeom-dev, libsbuf-dev,
- zlib1g-dev
+ zlib1g-dev, libmd-dev
Vcs-Browser: http://svn.debian.org/wsvn/glibc-bsd/trunk/zfsutils/
Vcs-Svn: svn://svn.debian.org/glibc-bsd/trunk/zfsutils/
Standards-Version: 3.9.2
Modified: trunk/zfsutils/debian/patches/01_glibc_kludge.diff
===================================================================
--- trunk/zfsutils/debian/patches/01_glibc_kludge.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/01_glibc_kludge.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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
Modified: trunk/zfsutils/debian/patches/02_glibc_misc.diff
===================================================================
--- trunk/zfsutils/debian/patches/02_glibc_misc.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/02_glibc_misc.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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
Modified: trunk/zfsutils/debian/patches/03_glibc_namespace.diff
===================================================================
--- trunk/zfsutils/debian/patches/03_glibc_namespace.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/03_glibc_namespace.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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 @@
+@@ -724,7 +724,7 @@
zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct)
{
znode_t *zp = VTOZ(vp);
Modified: trunk/zfsutils/debian/patches/04_stdint.diff
===================================================================
--- trunk/zfsutils/debian/patches/04_stdint.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/04_stdint.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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>
Deleted: trunk/zfsutils/debian/patches/05_makefile.diff
===================================================================
--- trunk/zfsutils/debian/patches/05_makefile.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/05_makefile.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -1,129 +0,0 @@
----
- cddl/lib/libuutil/Makefile | 2 ++
- cddl/lib/libzfs/Makefile | 5 ++++-
- cddl/lib/libzpool/Makefile | 5 ++++-
- cddl/sbin/zfs/Makefile | 11 +++++++----
- cddl/sbin/zpool/Makefile | 9 +++++----
- cddl/usr.bin/zinject/Makefile | 7 ++++++-
- cddl/usr.bin/ztest/Makefile | 5 ++++-
- cddl/usr.sbin/zdb/Makefile | 7 ++++++-
- 8 files changed, 38 insertions(+), 13 deletions(-)
-
---- a/cddl/lib/libzfs/Makefile
-+++ b/cddl/lib/libzfs/Makefile
-@@ -7,7 +7,10 @@
-
- LIB= zfs
- DPADD= ${LIBUTIL}
--LDADD= -lutil
-+LDADD= -lm -lbsd -lgeom -lnvpair -luutil
-+
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair \
-+ -L${.CURDIR}/../../../cddl/lib/libuutil \
-
- SRCS= deviceid.c \
- fsshare.c \
---- a/cddl/lib/libuutil/Makefile
-+++ b/cddl/lib/libuutil/Makefile
-@@ -22,4 +22,6 @@
- CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
- CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head
-
-+LDADD= -lrt -lbsd -lpthread
-+
- .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
- CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
-
--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
-+
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
-+ -L${.CURDIR}/../../../cddl/lib/libnvpair \
-+ -L${.CURDIR}/../../../cddl/lib/libuutil
-
- .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
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
-+ -L${.CURDIR}/../../../cddl/lib/libnvpair \
-+ -L${.CURDIR}/../../../cddl/lib/libuutil
-
- .include <bsd.prog.mk>
---- a/cddl/usr.sbin/zdb/Makefile
-+++ b/cddl/usr.sbin/zdb/Makefile
-@@ -21,7 +21,12 @@
-
- DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \
- ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
--LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
-+LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
-
- CSTD= c99
-
---- a/cddl/usr.bin/zinject/Makefile
-+++ b/cddl/usr.bin/zinject/Makefile
-@@ -20,6 +20,11 @@
-
- DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
- ${LIBZFS} ${LIBZPOOL} ${LIBUUTIL}
--LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
-+LDADD= -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
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
-
- .include <bsd.prog.mk>
---- a/cddl/usr.bin/ztest/Makefile
-+++ b/cddl/usr.bin/ztest/Makefile
-@@ -17,7 +17,10 @@
-
- DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
- ${LIBPTHREAD} ${LIBZ} ${LIBAVL}
--LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl
-+LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lrt -ldl -lbsd
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
-+LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
-
- CSTD= c99
-
---- 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
-
- # atomic.S doesn't like profiling.
- NO_PROFILE=
Modified: trunk/zfsutils/debian/patches/06_mountd.diff
===================================================================
--- trunk/zfsutils/debian/patches/06_mountd.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/06_mountd.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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);
Modified: trunk/zfsutils/debian/patches/07_manpages.diff
===================================================================
--- trunk/zfsutils/debian/patches/07_manpages.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/07_manpages.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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
Modified: trunk/zfsutils/debian/patches/08_libbsd.diff
===================================================================
--- trunk/zfsutils/debian/patches/08_libbsd.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/08_libbsd.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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>
Deleted: trunk/zfsutils/debian/patches/10_zpool_import.diff
===================================================================
--- trunk/zfsutils/debian/patches/10_zpool_import.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/10_zpool_import.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -1,73 +0,0 @@
----
- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c | 26 +++++--------
- 1 file changed, 10 insertions(+), 16 deletions(-)
-
---- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
-+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
-@@ -845,8 +845,6 @@
- DIR *dirp = NULL;
- struct dirent64 *dp;
- char path[MAXPATHLEN];
-- char *end;
-- size_t pathleft;
- struct stat64 statbuf;
- nvlist_t *ret = NULL, *config;
- 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]);
- 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 @@
- * This is not MT-safe, but we have no MT consumers of libzfs
- */
- while ((dp = readdir64(dirp)) != NULL) {
-+ 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;
- }
- }
Modified: trunk/zfsutils/debian/patches/11_endian.diff
===================================================================
--- trunk/zfsutils/debian/patches/11_endian.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/11_endian.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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 @@
Modified: trunk/zfsutils/debian/patches/12_freebsd.diff
===================================================================
--- trunk/zfsutils/debian/patches/12_freebsd.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/12_freebsd.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -8,74 +8,32 @@
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);
Modified: trunk/zfsutils/debian/patches/13_mnttab.diff
===================================================================
--- trunk/zfsutils/debian/patches/13_mnttab.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/13_mnttab.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -12,4 +12,4 @@
+#define MNTTAB _PATH_MNTTAB
#define MNT_LINE_MAX 1024
- #define umount2(p, f) unmount(p, f)
+ #define MS_OVERLAY 0x0
Modified: trunk/zfsutils/debian/patches/14_bootloader_advice.diff
===================================================================
--- trunk/zfsutils/debian/patches/14_bootloader_advice.diff 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/14_bootloader_advice.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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 @@
+@@ -4123,11 +4123,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 @@
+@@ -2445,11 +2445,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"
Added: trunk/zfsutils/debian/patches/15_pthread_compat.diff
===================================================================
--- trunk/zfsutils/debian/patches/15_pthread_compat.diff (rev 0)
+++ trunk/zfsutils/debian/patches/15_pthread_compat.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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
Deleted: trunk/zfsutils/debian/patches/15_ztest.fix
===================================================================
--- trunk/zfsutils/debian/patches/15_ztest.fix 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/15_ztest.fix 2011-10-21 20:19:11 UTC (rev 3749)
@@ -1,31 +0,0 @@
-From: Arno Töll <debian at 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/");
Added: trunk/zfsutils/debian/patches/16-wrap-cdefs.diff
===================================================================
--- trunk/zfsutils/debian/patches/16-wrap-cdefs.diff (rev 0)
+++ trunk/zfsutils/debian/patches/16-wrap-cdefs.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -0,0 +1,42 @@
+--- a/sys/cddl/compat/opensolaris/sys/misc.h
++++ b/sys/cddl/compat/opensolaris/sys/misc.h
+@@ -31,7 +31,11 @@
+
+ #include <sys/limits.h>
+
++#ifndef UID_MAX
++#define MAXUID UINT_MAX
++#else
+ #define MAXUID UID_MAX
++#endif
+
+ #define SPEC_MAXOFFSET_T OFF_MAX
+
+--- a/sys/cddl/compat/opensolaris/sys/vnode.h
++++ b/sys/cddl/compat/opensolaris/sys/vnode.h
+@@ -116,7 +116,11 @@
+ #define va_blksize va_blocksize
+ #define va_seq va_gen
+
++#ifndef OFF_MAX
++#define MAXOFFSET_T __OFF_MAX
++#else
+ #define MAXOFFSET_T OFF_MAX
++#endif
+ #define EXCL 0
+
+ #define ACCESSED (AT_ATIME)
+--- a/sys/cddl/compat/opensolaris/sys/stat.h
++++ b/sys/cddl/compat/opensolaris/sys/stat.h
+@@ -36,7 +36,11 @@
+ #define stat64 stat
+ #endif
+
++#ifndef OFF_MAX
++#define MAXOFFSET_T __OFF_MAX
++#else
+ #define MAXOFFSET_T OFF_MAX
++#endif
+
+ #if !defined(_KERNEL) && !defined(__GLIBC__)
+ #include <sys/disk.h>
Added: trunk/zfsutils/debian/patches/gratuitous_dependencies.diff
===================================================================
--- trunk/zfsutils/debian/patches/gratuitous_dependencies.diff (rev 0)
+++ trunk/zfsutils/debian/patches/gratuitous_dependencies.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -0,0 +1,74 @@
+--- a/cddl/lib/libzfs/Makefile
++++ b/cddl/lib/libzfs/Makefile
+@@ -7,7 +7,7 @@
+
+ LIB= zfs
+ DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL}
+-LDADD= -lmd -lpthread -lumem -lutil
++LDADD= -lmd -lpthread -lumem -lutil -lnvpair -luutil -lgeom -lm
+
+ SRCS= deviceid.c \
+ fsshare.c \
+--- a/cddl/lib/libzpool/Makefile
++++ b/cddl/lib/libzpool/Makefile
+@@ -56,7 +56,7 @@
+ CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
+
+ DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ}
+-LDADD= -lmd -lpthread -lz
++LDADD= -lmd -lpthread -lz -lumem -lnvpair -lavl
+
+ # atomic.S doesn't like profiling.
+ NO_PROFILE=
+--- a/cddl/sbin/zfs/Makefile
++++ b/cddl/sbin/zfs/Makefile
+@@ -22,6 +22,6 @@
+
+ DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \
+ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD= -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs
++LDADD= -lgeom -lnvpair -lutil -luutil -lzfs
+
+ .include <bsd.prog.mk>
+--- a/cddl/sbin/zpool/Makefile
++++ b/cddl/sbin/zpool/Makefile
+@@ -27,6 +27,6 @@
+
+ DPADD= ${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \
+ ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD= -lavl -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs
++LDADD= -lavl -lgeom -lnvpair -lutil -luutil -lzfs
+
+ .include <bsd.prog.mk>
+--- a/cddl/usr.bin/zinject/Makefile
++++ b/cddl/usr.bin/zinject/Makefile
+@@ -20,6 +20,6 @@
+
+ DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
+ ${LIBZFS} ${LIBZPOOL} ${LIBUUTIL}
+-LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
++LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
+
+ .include <bsd.prog.mk>
+--- a/cddl/usr.bin/ztest/Makefile
++++ b/cddl/usr.bin/ztest/Makefile
+@@ -18,7 +18,7 @@
+
+ DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
+ ${LIBPTHREAD} ${LIBZ} ${LIBAVL}
+-LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl
++LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lavl
+
+ CSTD= c99
+
+--- a/cddl/usr.sbin/zdb/Makefile
++++ b/cddl/usr.sbin/zdb/Makefile
+@@ -22,7 +22,7 @@
+
+ DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \
+ ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
+-LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool
++LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs -lzpool
+
+ CSTD= c99
+
Added: trunk/zfsutils/debian/patches/makefile.diff
===================================================================
--- trunk/zfsutils/debian/patches/makefile.diff (rev 0)
+++ trunk/zfsutils/debian/patches/makefile.diff 2011-10-21 20:19:11 UTC (rev 3749)
@@ -0,0 +1,119 @@
+--- a/cddl/lib/libuutil/Makefile
++++ b/cddl/lib/libuutil/Makefile
+@@ -15,6 +15,8 @@
+ uu_pname.c \
+ uu_strtoint.c
+
++LDADD= -lpthread -lrt -lbsd
++
+ CFLAGS+= -DNATIVE_BUILD
+ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common
+ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
+--- a/cddl/lib/libzfs/Makefile
++++ b/cddl/lib/libzfs/Makefile
+@@ -7,7 +7,12 @@
+
+ LIB= zfs
+ DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL}
+-LDADD= -lmd -lpthread -lumem -lutil -lnvpair -luutil -lgeom -lm
++LDADD= -lmd -lpthread -lumem -lnvpair -luutil -lgeom -lm -lbsd
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
++LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
+
+ SRCS= deviceid.c \
+ fsshare.c \
+--- a/cddl/lib/libzpool/Makefile
++++ b/cddl/lib/libzpool/Makefile
+@@ -56,7 +56,11 @@
+ CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
+
+ DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ}
+-LDADD= -lmd -lpthread -lz -lumem -lnvpair -lavl
++LDADD= -lmd -lpthread -lz -lumem -lnvpair -lbsd -lrt
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
+
+ # atomic.S doesn't like profiling.
+ NO_PROFILE=
+--- a/cddl/sbin/zfs/Makefile
++++ b/cddl/sbin/zfs/Makefile
+@@ -22,6 +22,10 @@
+
+ DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \
+ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD= -lgeom -lnvpair -lutil -luutil -lzfs
++LDADD= -lgeom -lnvpair -luutil -lzfs -lbsd
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
+
+ .include <bsd.prog.mk>
+--- a/cddl/sbin/zpool/Makefile
++++ b/cddl/sbin/zpool/Makefile
+@@ -27,6 +27,11 @@
+
+ DPADD= ${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \
+ ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
+-LDADD= -lavl -lgeom -lnvpair -lutil -luutil -lzfs
++LDADD= -lgeom -lnvpair -luutil -lzfs -lbsd
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs \
++ -L${.CURDIR}/../../../cddl/lib/libnvpair \
++ -L${.CURDIR}/../../../cddl/lib/libuutil \
++ ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
+
+ .include <bsd.prog.mk>
+--- a/cddl/usr.bin/zinject/Makefile
++++ b/cddl/usr.bin/zinject/Makefile
+@@ -20,6 +20,13 @@
+
+ DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
+ ${LIBZFS} ${LIBZPOOL} ${LIBUUTIL}
+-LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool
++LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool -lbsd
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
++
+
+ .include <bsd.prog.mk>
+--- a/cddl/usr.bin/ztest/Makefile
++++ b/cddl/usr.bin/ztest/Makefile
+@@ -18,7 +18,12 @@
+
+ DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
+ ${LIBPTHREAD} ${LIBZ} ${LIBAVL}
+-LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lavl
++LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lbsd -ldl -lrt
++
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
++LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
+
+ CSTD= c99
+
+--- a/cddl/usr.sbin/zdb/Makefile
++++ b/cddl/usr.sbin/zdb/Makefile
+@@ -24,6 +24,12 @@
+ ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
+ LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs -lzpool
+
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
++LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
++
+ CSTD= c99
+
+ .include <bsd.prog.mk>
Modified: trunk/zfsutils/debian/patches/series
===================================================================
--- trunk/zfsutils/debian/patches/series 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/patches/series 2011-10-21 20:19:11 UTC (rev 3749)
@@ -1,3 +1,7 @@
+# Mergeable material
+gratuitous_dependencies.diff
+
+# Unclassified
01_glibc_kludge.diff
02_glibc_misc.diff
03_glibc_namespace.diff
@@ -2,12 +6,14 @@
04_stdint.diff
-05_makefile.diff
06_mountd.diff
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
+
+# Debian-specific
+makefile.diff
Modified: trunk/zfsutils/debian/rules
===================================================================
--- trunk/zfsutils/debian/rules 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/rules 2011-10-21 20:19:11 UTC (rev 3749)
@@ -19,11 +19,21 @@
CFLAGS += -O2
endif
+full_version := $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
+tar_version := $(shell echo $(full_version) | sed -e 's/-.*//g')
+svn_revision := $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)-[0-9]*/\1/g')
+version := $(shell echo $(full_version) | sed -e 's/[~+-].*//g')
+major := $(shell echo $(version) | sed -e 's/\..*//g')
+revision := $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
+
+#SVN := http://svn.freebsd.org/base/release/$(version).0
+#SVN := http://svn.freebsd.org/base/releng/$(version)
+SVN := http://svn.freebsd.org/base/stable/$(major)
+#SVN := http://svn.freebsd.org/base/head
+
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
-ORIGDIR = $(SOURCE)-$(VERSION)
-TARNAME = $(SOURCE)_$(VERSION).orig.tar.gz
+ORIGDIR = $(SOURCE)-$(tar_version)
+TARNAME = $(SOURCE)_$(tar_version).orig.tar.gz
PATH := /usr/lib/freebsd:$(PATH)
DESTDIR = $(CURDIR)/debian/tmp
@@ -46,6 +56,7 @@
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 \
cddl/lib/libavl \
@@ -60,7 +71,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
@@ -87,12 +98,12 @@
build-libzpool: build-libzpool-stamp
-build-libzpool-stamp: build-libavl build-libnvpair-stamp build-libumem
+build-libzpool-stamp: build-libavl build-libnvpair-stamp build-libumem build-libuutil-stamp build-libzfs-stamp
$(PMAKE) -C $(CURDIR)/cddl/lib/libzpool
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-libumem-stamp build-libavl-stamp
$(PMAKE) -C $(CURDIR)/cddl/lib/libzfs
touch $@
Modified: trunk/zfsutils/debian/zfsutils.zfs.init
===================================================================
--- trunk/zfsutils/debian/zfsutils.zfs.init 2011-10-20 08:18:20 UTC (rev 3748)
+++ trunk/zfsutils/debian/zfsutils.zfs.init 2011-10-21 20:19:11 UTC (rev 3749)
@@ -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
More information about the Glibc-bsd-commits
mailing list