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

Re: ZFS v28: call for testing



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

Hello Robert,

On 29.10.2011 16:35, Robert Millan wrote:
> - kfreebsd-image-9.0-*
> - zfsutils (8.3~svn226546-1 or later)

following our recent discussion I've added a proof of concept patch
which is embedding shared libraries into the zfsutils binary package. To
make everyone else happy I am installing them into /lib/zfsutils and use
RPATH to load them at runtime. Tell me what you think.

I also set RPATH for the two remaining libraries /lib/libzfs.so.1 and
/lib/libzpool.so.1 as they use symbols of embedded libraries. Please let
me know if you achieve problems with that setup.


- -- 
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/

iQIcBAEBAgAGBQJOsfBNAAoJEMcrUe6dgPNtsiAP/1b+plzu4a3SGr5XtDzLfYSI
Y1YWefWVOoCdtGncpJA2q/uyyAs+wv4SBYv37Wi+xTezEzvJ9ElY6vzqeHyViEZQ
bsGDn7p9hpf7PBYgAMLBj6Ds/d5QiDtTsWydPqqrlfMi0Pfxfvz5OgrTkx0ltOw4
w5zIn2QhjcB0IctSvvJjZEh8iITmykE7Y0DWj2H0PwxV1A5CUSosNgO5or3RPzT6
J+kCAJwVQ/dNrwes+zd5yEuQPO0A3riE3BFze2OhB7mtmCHuIOssMguFtNphPz6h
SAloWm+cvoUKXi0kZqsDWVukgoHCiVaG40QF01nqqi8yEzi6O+H9Kdf5vr6iIxmU
IXjAjhwtJhDlZe7vrtMWZ/pywP9m28zIHNq+2Dm3ZBhscqTnmjynKgckA5vQ7XHT
VVx9ZIaaBfhtATaiPhW8wSvEJOWQO6TfnI8STTmme/sSGBLFkn3q/vPu3KZ97zGn
qq39FX7gc7wAAj8YqtxyLmqb4USTK1XLGMTGfqo/4nHTEilvZdVWQQ+9fDGYnb0W
2JBLh1lslenWUVoye5HNMaE+M3Iwkjv/w6U69Vt81fxE/1HZHF9kUneH1n9WiskX
9AG+ENAUTdbfWLnGJ4jVIX4cX0XbZX752lXZxaXvA5jjwmJPOUIxH2X5KxUZ5XLH
iGUNgZtVBlResX2pJqWG
=E0AX
-----END PGP SIGNATURE-----
Index: debian/libuutil1.install
===================================================================
--- debian/libuutil1.install	(revision 3801)
+++ debian/libuutil1.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libuutil/libuutil.so.*	lib
Index: debian/control
===================================================================
--- debian/control	(revision 3801)
+++ debian/control	(working copy)
@@ -7,62 +7,11 @@
 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
+Replaces: libnvpair0, libumem0, libuutil0
 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
 
-Package: libuutil1
-Section: libs
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris userland utility library
- This package contains the OpenSolaris userland utility library.
-
-Package: libuutil-dev
-Section: libdevel
-Architecture: kfreebsd-any
-Depends: libuutil0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
-Description: Development files for libuutil
- This package contains the header files and static library needed to
- compile applications that use libuutil.
-
-Package: libuutil1-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris userland utility library
- This package contains the OpenSolaris userland utility library.
- .
- This is a minimal package for use in debian-installer.
-
-Package: libnvpair1
-Section: libs
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
- This package contains the OpenSolaris libnvpair library, for managing
- name-value pairs.
-
-Package: libnvpair-dev
-Section: libdevel
-Architecture: kfreebsd-any
-Depends: libnvpair0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
-Description: Development files for libnvpair
- This package contains the header files and static library needed to
- compile applications that use libnvpair, a library to manage name-value pairs.
-
-Package: libnvpair1-udeb
-Package-Type: udeb
-Section: debian-installer
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library (udeb version)
- This package contains the OpenSolaris libnvpair library, for managing
- name-value pairs.
- .
- This is a minimal package for use in debian-installer.
-
 Package: libzfs1
 Section: libs
 Architecture: kfreebsd-any
@@ -109,6 +58,16 @@
  This package provides the zfs and zpool commands to create and administer
  ZFS filesystems.
 
+
+Package: zfsutils-dev
+Architecture: kfreebsd-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, zfsutils (= ${binary:Version})
+Description: command-line tools to manage ZFS filesystems (development kit)
+ The Z file system is a pooled filesystem designed for maximum data integrity,
+ supporting data snapshots, multiple copies, and data checksums.
+ .
+ This package provides header files and static libraries.
+
 Package: zfsutils-udeb
 Package-Type: udeb
 Section: debian-installer
@@ -123,33 +82,6 @@
  .
  This is a minimal package for use in debian-installer.
 
-
-Package: libumem1
-Section: libs
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
- This package contains the OpenSolaris libumem library, to detect
- memory management bugs in applications
-
-Package: libumem-dev
-Section: libdevel
-Architecture: kfreebsd-any
-Depends: libumem0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
-Description: Development files for libnvpair
- This package contains the header files and static library needed to
- compile applications that use libumem.
-
-Package: libumem1-udeb
-XC-Package-Type: udeb
-Section: debian-installer
-Architecture: kfreebsd-any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: OpenSolaris name-value pair library
- This package contains the OpenSolaris libumem library, to detect
- memory management bugs in applications
-
-
 Package: libzpool1
 Section: libs
 Architecture: kfreebsd-any
Index: debian/libumem1.install
===================================================================
--- debian/libumem1.install	(revision 3801)
+++ debian/libumem1.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libumem/libumem.so.*	lib
Index: debian/libnvpair-dev.links
===================================================================
--- debian/libnvpair-dev.links	(revision 3801)
+++ debian/libnvpair-dev.links	(working copy)
@@ -1 +0,0 @@
-lib/libnvpair.so.0                 usr/lib/libnvpair.so
Index: debian/libumem-dev.links
===================================================================
--- debian/libumem-dev.links	(revision 3801)
+++ debian/libumem-dev.links	(working copy)
@@ -1 +0,0 @@
-lib/libumem.so.0                 usr/lib/libumem.so
Index: debian/patches/makefile.diff
===================================================================
--- debian/patches/makefile.diff	(revision 3801)
+++ debian/patches/makefile.diff	(working copy)
@@ -11,7 +11,7 @@
  CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris
 --- a/cddl/lib/libzfs/Makefile
 +++ b/cddl/lib/libzfs/Makefile
-@@ -7,7 +7,12 @@
+@@ -7,7 +7,14 @@
  
  LIB=	zfs
  DPADD=	${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL}
@@ -22,12 +22,14 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libuutil
 +LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
++
  
  SRCS=	deviceid.c \
  	fsshare.c \
 --- a/cddl/lib/libzpool/Makefile
 +++ b/cddl/lib/libzpool/Makefile
-@@ -56,7 +56,11 @@
+@@ -56,7 +56,12 @@
  CFLAGS+=	-I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
  
  DPADD=		${LIBMD} ${LIBPTHREAD} ${LIBZ}
@@ -37,12 +39,13 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libnvpair
 +LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
  
  # atomic.S doesn't like profiling.
  NO_PROFILE=
 --- a/cddl/sbin/zfs/Makefile
 +++ b/cddl/sbin/zfs/Makefile
-@@ -22,6 +22,12 @@
+@@ -22,6 +22,13 @@
  
  DPADD=	${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \
  	${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
@@ -54,11 +57,12 @@
 +LDADD+=	-L${.CURDIR}/../../../cddl/lib/libuutil
 +LDADD+=	-L${.CURDIR}/../../../cddl/lib/libzfs
 +
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
  
  .include <bsd.prog.mk>
 --- a/cddl/sbin/zpool/Makefile
 +++ b/cddl/sbin/zpool/Makefile
-@@ -27,6 +27,12 @@
+@@ -27,6 +27,15 @@
  
  DPADD=	${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \
  	${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
@@ -70,11 +74,14 @@
 +LDADD+=	-L${.CURDIR}/../../../cddl/lib/libumem
 +LDADD+=	-L${.CURDIR}/../../../cddl/lib/libuutil
 +LDADD+=	${.CURDIR}/../../../cddl/lib/libavl/libavl.a
++
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
++
  
  .include <bsd.prog.mk>
 --- a/cddl/usr.bin/zinject/Makefile
 +++ b/cddl/usr.bin/zinject/Makefile
-@@ -20,6 +20,13 @@
+@@ -20,6 +20,15 @@
  
  DPADD=	${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \
  	${LIBZFS} ${LIBZPOOL} ${LIBUUTIL}
@@ -87,11 +94,13 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
 +
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
++
  
  .include <bsd.prog.mk>
 --- a/cddl/usr.bin/ztest/Makefile
 +++ b/cddl/usr.bin/ztest/Makefile
-@@ -18,7 +18,12 @@
+@@ -18,7 +18,15 @@
  
  DPADD=	${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \
  	${LIBPTHREAD} ${LIBZ} ${LIBAVL}
@@ -102,12 +111,15 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libumem
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
 +LDADD+= ${.CURDIR}/../../../cddl/lib/libavl/libavl.a
++
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
++
  
  CSTD=	c99
  
 --- a/cddl/usr.sbin/zdb/Makefile
 +++ b/cddl/usr.sbin/zdb/Makefile
-@@ -24,6 +24,12 @@
+@@ -24,6 +24,14 @@
  	${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL}
  LDADD=	-lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs -lzpool
  
@@ -117,6 +129,8 @@
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzfs
 +LDADD+= -L${.CURDIR}/../../../cddl/lib/libzpool
 +
++LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
++
  CSTD=	c99
  
  .include <bsd.prog.mk>
Index: debian/patches/libmd_static.diff
===================================================================
--- debian/patches/libmd_static.diff	(revision 3801)
+++ debian/patches/libmd_static.diff	(working copy)
@@ -5,17 +5,17 @@
  LIB=	zfs
  DPADD=	${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL}
 -LDADD=	-lmd -lpthread -lumem -lnvpair -luutil -lgeom -lm -lbsd
-+LDADD=	-lpthread -lumem -lnvpair -luutil -lgeom -lm -lbsd
++LDADD= -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
 +LDADD+= ${.CURDIR}/../../../lib/libmd/libmd.a
+ LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
  
- SRCS=	deviceid.c \
- 	fsshare.c \
-@@ -57,5 +58,6 @@
+ 
+@@ -59,5 +60,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
@@ -28,16 +28,16 @@
  CFLAGS+=	-I${.CURDIR}/../../../lib/libpthread/thread
  CFLAGS+=	-I${.CURDIR}/../../../lib/libpthread/sys
  CFLAGS+=	-I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_ARCH}/include
-+CFLAGS+=	-I${.CURDIR}/../../../lib/libmd
++CFLAGS+=        -I${.CURDIR}/../../../lib/libmd
  
  DPADD=		${LIBMD} ${LIBPTHREAD} ${LIBZ}
 -LDADD=		-lmd -lpthread -lz -lumem -lnvpair -lbsd -lrt
-+LDADD=		-lpthread -lz -lumem -lnvpair -lbsd -lrt
++LDADD=         -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
 +LDADD+= ${.CURDIR}/../../../lib/libmd/libmd.a
+ LDADD+= -Wl,-rpath,$(ZFSUTILS_LIBRARY_PATH)
  
  # atomic.S doesn't like profiling.
- NO_PROFILE=
Index: debian/zfsutils.install
===================================================================
--- debian/zfsutils.install	(revision 3801)
+++ debian/zfsutils.install	(working copy)
@@ -4,3 +4,6 @@
 cddl/usr.bin/ztest/ztest			/usr/bin
 cddl/usr.sbin/zdb/zdb				/usr/sbin
 debian/local/bash_completion.d/zfsutils		/etc/bash_completion.d
+cddl/lib/libnvpair/libnvpair.so.*		/lib/zfsutils
+cddl/lib/libumem/libumem.so.*			/lib/zfsutils
+cddl/lib/libuutil/libuutil.so.*			/lib/zfsutils
Index: debian/libnvpair1-udeb.install
===================================================================
--- debian/libnvpair1-udeb.install	(revision 3801)
+++ debian/libnvpair1-udeb.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libnvpair/libnvpair.so.*	lib
Index: debian/libumem1-udeb.install
===================================================================
--- debian/libumem1-udeb.install	(revision 3801)
+++ debian/libumem1-udeb.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libumem/libumem.so.*	lib
Index: debian/libnvpair-dev.install
===================================================================
--- debian/libnvpair-dev.install	(revision 3801)
+++ debian/libnvpair-dev.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libnvpair/libnvpair.a	usr/lib
Index: debian/libumem-dev.install
===================================================================
--- debian/libumem-dev.install	(revision 3801)
+++ debian/libumem-dev.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libumem/libumem.a	usr/lib
Index: debian/libuutil-dev.links
===================================================================
--- debian/libuutil-dev.links	(revision 3801)
+++ debian/libuutil-dev.links	(working copy)
@@ -1 +0,0 @@
-lib/libuutil.so.0                 usr/lib/libuutil.so
Index: debian/rules
===================================================================
--- debian/rules	(revision 3801)
+++ debian/rules	(working copy)
@@ -38,7 +38,8 @@
 PATH := /usr/lib/freebsd:$(PATH)
 DESTDIR = $(CURDIR)/debian/tmp
 PMAKE = COPTS="$(CFLAGS)" CFLAGS="$(CFLAGS)" NO_WERROR=1 NOGCCERROR=1 \
-        NOSHARED=NO NO_SHARED=NO DESTDIR=$(DESTDIR) make
+        NOSHARED=NO NO_SHARED=NO DESTDIR=$(DESTDIR) \
+	ZFSUTILS_LIBRARY_PATH=/lib/zfsutils make
 export SHLIB_MAJOR = 1
 export SHLIBDIR = ./
 
@@ -187,14 +188,11 @@
 #	dh_perl
 #	dh_python
 	dh_makeshlibs -a
-	dh_makeshlibs -plibnvpair$(SHLIB_MAJOR) --add-udeb=libnvpair$(SHLIB_MAJOR)-udeb
-	dh_makeshlibs -plibuutil$(SHLIB_MAJOR) --add-udeb=libuutil$(SHLIB_MAJOR)-udeb
 	dh_makeshlibs -plibzfs$(SHLIB_MAJOR) --add-udeb=libzfs$(SHLIB_MAJOR)-udeb
 	dh_makeshlibs -plibzpool$(SHLIB_MAJOR) --add-udeb=libzpool$(SHLIB_MAJOR)-udeb
-	dh_makeshlibs -plibumem$(SHLIB_MAJOR) --add-udeb=libumem$(SHLIB_MAJOR)-udeb
 	dh_makeshlibs -pzfsutils --add-udeb=zfsutils-udeb
 	dh_installdeb -a
-	dh_shlibdeps -a
+	dh_shlibdeps -l/lib/zfsutils -a
 	dh_gencontrol -a
 	dh_md5sums -a
 	dh_builddeb -a
Index: debian/libuutil1-udeb.install
===================================================================
--- debian/libuutil1-udeb.install	(revision 3801)
+++ debian/libuutil1-udeb.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libuutil/libuutil.so.*	lib
Index: debian/zfsutils-dev.install
===================================================================
--- debian/zfsutils-dev.install	(revision 0)
+++ debian/zfsutils-dev.install	(revision 0)
@@ -0,0 +1,7 @@
+cddl/lib/libnvpair/libnvpair.so			/lib/zfsutils
+cddl/lib/libnvpair/libnvpair.a                  /lib/zfsutils
+cddl/lib/libumem/libumem.so			/lib/zfsutils
+cddl/lib/libumem/libumem.a                      /lib/zfsutils
+cddl/lib/libuutil/libuutil.so			/lib/zfsutils
+cddl/lib/libuutil/libuutil.a                    /lib/zfsutils
+
Index: debian/libuutil-dev.install
===================================================================
--- debian/libuutil-dev.install	(revision 3801)
+++ debian/libuutil-dev.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libuutil/libuutil.a	usr/lib
Index: debian/libnvpair1.install
===================================================================
--- debian/libnvpair1.install	(revision 3801)
+++ debian/libnvpair1.install	(working copy)
@@ -1 +0,0 @@
-cddl/lib/libnvpair/libnvpair.so.*	lib

Reply to: