diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-11-12 00:34:24 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-11-12 00:34:24 +0000 |
commit | 6fdbd8603554734d89b858991943377aa199d002 (patch) | |
tree | 34c7de288db2342d0e37a8dabb8a0fd689da8751 /zfsutils | |
parent | 40ea65775b2ab7ac999119d6639d2b0b1fc16cb4 (diff) | |
download | illumos-packaging-6fdbd8603554734d89b858991943377aa199d002.tar.gz |
Build libdiskmgt with zfsutils
Diffstat (limited to 'zfsutils')
-rw-r--r-- | zfsutils/debian/control | 70 | ||||
-rw-r--r-- | zfsutils/debian/patches/libdiskmgt-NULL-0.patch | 31 | ||||
-rw-r--r-- | zfsutils/debian/patches/libdiskmgt-avoid-libadm.patch | 72 | ||||
-rw-r--r-- | zfsutils/debian/patches/libdiskmgt-avoid-meta.h.patch | 24 | ||||
-rw-r--r-- | zfsutils/debian/patches/libdiskmgt-avoid.zfs.h.patch | 30 | ||||
-rw-r--r-- | zfsutils/debian/patches/libdiskmgt-time.patch | 36 | ||||
-rw-r--r-- | zfsutils/debian/patches/libzfs-avoid-libadm.patch | 2 | ||||
-rw-r--r-- | zfsutils/debian/patches/series | 4 | ||||
-rwxr-xr-x | zfsutils/debian/rules | 7 |
9 files changed, 265 insertions, 11 deletions
diff --git a/zfsutils/debian/control b/zfsutils/debian/control index ee4b548..8593442 100644 --- a/zfsutils/debian/control +++ b/zfsutils/debian/control @@ -4,17 +4,25 @@ Priority: optional Maintainer: Igor Pashev <pashev.igor@gmail.com> Build-Depends: dh-illumos, - illumos-source-2.10, gcc-multilib, - libdevid1-dev , lib32devid1-dev , - libefi1-dev , lib32efi1-dev , - libidmap1-dev , lib32idmap1-dev , - libnvpair1-dev , lib32nvpair1-dev , - libsunavl1-dev , lib32sunavl1-dev , - libsysevent1-dev , lib32sysevent1-dev , - libtsol2-dev , lib32tsol2-dev , - libumem1-dev , lib32umem1-dev , - libuutil1-dev , lib32uutil1-dev , + illumos-source-2.10, + libdevid1-dev , lib32devid1-dev , + libdevid1-dev , lib32devid1-dev [illumos-amd64] , + libdevinfo1-dev , lib32devinfo1-dev [illumos-amd64] , + libefi1-dev , lib32efi1-dev , + libefi1-dev , lib32efi1-dev [illumos-amd64] , + libidmap1-dev , lib32idmap1-dev , + libkstat1-dev , lib32kstat1-dev [illumos-amd64] , + libnvpair1-dev , lib32nvpair1-dev , + libnvpair1-dev , lib32nvpair1-dev [illumos-amd64] , + libsunavl1-dev , lib32sunavl1-dev , + libsysevent1-dev , lib32sysevent1-dev , + libsysevent1-dev , lib32sysevent1-dev [illumos-amd64] , + libtsol2-dev , lib32tsol2-dev , + libumem1-dev , lib32umem1-dev , + libuutil1-dev , lib32uutil1-dev , + libfdisk1-dev [illumos-amd64 illumos-i386], + lib32fdisk1-dev [illumos-amd64], quilt, Standards-Version: 3.9.3 Homepage: https://www.illumos.org @@ -74,3 +82,45 @@ Description: a ZFS unit test utility one of the many regression test against the daily build. As features were added to ZFS, unit tests were also added to ztest. In addition, a separate test development team wrote and executed more functional and stress tests. + +Package: libdiskmgt1 +Section: libs +Priority: standard +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Architecture: illumos-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: disk management library + This package contains libdiskmgt shared library. + +Package: libdiskmgt1-dev +Section: libdevel +Priority: optional +Architecture: illumos-any +Provides: libdiskmgt-dev +Depends: libdiskmgt1 (= ${binary:Version}), ${misc:Depends}, libc1-dev, +Description: disk management library (development files) + This package contains the header files and symlinks needed + to compile applications that use libdiskmgt. + +Package: lib32diskmgt1 +Section: libs +Priority: standard +Architecture: illumos-amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: disk management library (32 bit) + This package contains libdiskmgt shared library. + . + This is a 32-bit version of the library. + +Package: lib32diskmgt1-dev +Section: libdevel +Priority: optional +Architecture: illumos-amd64 +Provides: lib32diskmgt-dev +Depends: lib32diskmgt1 (= ${binary:Version}), libdiskmgt1-dev (= ${binary:Version}), + ${misc:Depends} +Description: disk management library (32-bit development files) + This package contains files needed to compile + 32-bit applications that use libdiskmgt. + diff --git a/zfsutils/debian/patches/libdiskmgt-NULL-0.patch b/zfsutils/debian/patches/libdiskmgt-NULL-0.patch new file mode 100644 index 0000000..26d6298 --- /dev/null +++ b/zfsutils/debian/patches/libdiskmgt-NULL-0.patch @@ -0,0 +1,31 @@ +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/events.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/events.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/events.c 2012-11-11 21:23:56.390570714 +0000 +@@ -151,7 +151,7 @@ + /* installing a cb; we didn't have one before */ + thread_t watch_thread; + +- *errp = thr_create(NULL, NULL, ++ *errp = thr_create(NULL, 0, + (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON, + &watch_thread); + } +@@ -171,7 +171,7 @@ + + callback = cb; + +- *errp = thr_create(NULL, NULL, ++ *errp = thr_create(NULL, 0, + (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON, + &watch_thread); + } +@@ -445,7 +445,7 @@ + + switch (walker_state) { + case WALK_NONE: +- if (thr_create(NULL, NULL, (void *(*)(void *))walker, NULL, ++ if (thr_create(NULL, 0, (void *(*)(void *))walker, NULL, + THR_DAEMON, &walk_thread) == 0) { + walker_state = WALK_WAITING; + } diff --git a/zfsutils/debian/patches/libdiskmgt-avoid-libadm.patch b/zfsutils/debian/patches/libdiskmgt-avoid-libadm.patch new file mode 100644 index 0000000..14224f8 --- /dev/null +++ b/zfsutils/debian/patches/libdiskmgt-avoid-libadm.patch @@ -0,0 +1,72 @@ +Index: zfsutils/usr/src/lib/libdiskmgt/Makefile.com +=================================================================== +--- zfsutils.orig/usr/src/lib/libdiskmgt/Makefile.com 2012-10-08 00:25:38.000000000 +0000 ++++ zfsutils/usr/src/lib/libdiskmgt/Makefile.com 2012-11-12 00:06:13.670947070 +0000 +@@ -29,20 +29,28 @@ + entry.o cache.o drive.o controller.o alias.o path.o \ + media.o slice.o partition.o findevs.o events.o \ + bus.o inuse_mnt.o inuse_svm.o inuse_lu.o inuse_fs.o \ +- inuse_vxvm.o inuse_dump.o inuse_zpool.o ++ inuse_vxvm.o inuse_dump.o inuse_zpool.o \ ++ rdwr_vtoc.o fulldevnm.o + + include ../../Makefile.lib + + LIBS = $(DYNLIB) $(LINTLIB) + i386_LDLIBS = -lfdisk + sparc_LDLIBS = +-LDLIBS += -ldevinfo -ladm -ldevid -lkstat -lsysevent \ ++LDLIBS += -ldevinfo -ldevid -lkstat -lsysevent \ + -lnvpair -lefi -lc $($(MACH)_LDLIBS) +-DYNFLAGS += -R/opt/VRTSvxvm/lib + + SRCDIR = ../common + $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) + ++pics/rdwr_vtoc.o: ../../../lib/libadm/common/rdwr_vtoc.c ++ $(COMPILE.c) -o $@ $< ++ $(POST_PROCESS_O) ++ ++pics/fulldevnm.o: ../../../lib/libadm/common/fulldevnm.c ++ $(COMPILE.c) -o $@ $< ++ $(POST_PROCESS_O) ++ + CFLAGS += $(CCVERBOSE) + CERRWARN += -_gcc=-Wno-switch + CERRWARN += -_gcc=-Wno-parentheses +Index: zfsutils/usr/src/lib/libdiskmgt/common/disks_private.h +=================================================================== +--- zfsutils.orig/usr/src/lib/libdiskmgt/common/disks_private.h 2012-10-08 00:25:38.000000000 +0000 ++++ zfsutils/usr/src/lib/libdiskmgt/common/disks_private.h 2012-11-11 23:49:29.508524063 +0000 +@@ -34,6 +34,7 @@ + + #include <libdevinfo.h> + #include <sys/dkio.h> ++#include <sys/vtoc.h> + #include <devid.h> + + #define DM_DEBUG "DM_LIBDISKMGT_DEBUG" +@@ -144,6 +145,11 @@ + } dm_event_type_t; + + ++int read_vtoc(int, struct vtoc *); ++int write_vtoc(int, struct vtoc *); ++int read_extvtoc(int, struct extvtoc *); ++int write_extvtoc(int, struct extvtoc *); ++ + /* private internal functions */ + descriptor_t **alias_get_descriptors(int filter[], int *errp); + descriptor_t **alias_get_assoc_descriptors(descriptor_t *desc, +Index: zfsutils/usr/src/lib/libadm/common/fulldevnm.c +=================================================================== +--- zfsutils.orig/usr/src/lib/libadm/common/fulldevnm.c 2012-10-08 00:25:37.000000000 +0000 ++++ zfsutils/usr/src/lib/libadm/common/fulldevnm.c 2012-11-12 00:25:08.643681900 +0000 +@@ -40,7 +40,6 @@ + #include <sys/lofi.h> + #include <sys/ramdisk.h> + #include <sys/fssnap_if.h> +-#include "libadm.h" + + /* + * Globals: diff --git a/zfsutils/debian/patches/libdiskmgt-avoid-meta.h.patch b/zfsutils/debian/patches/libdiskmgt-avoid-meta.h.patch new file mode 100644 index 0000000..aea9be7 --- /dev/null +++ b/zfsutils/debian/patches/libdiskmgt-avoid-meta.h.patch @@ -0,0 +1,24 @@ +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_svm.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/inuse_svm.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_svm.c 2012-11-11 23:20:11.644213024 +0000 +@@ -29,7 +29,6 @@ + * Creates and maintains a cache of slices used by SVM. + */ + +-#include <meta.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +@@ -42,6 +41,11 @@ + #include <syslog.h> + #include <sys/types.h> + #include <sys/sysevent/eventdefs.h> ++#include <sys/lvm/md_mdiox.h> ++ ++#ifndef PRINT_FAST ++#define PRINT_FAST 0x00000080 ++#endif + + #include "libdiskmgt.h" + #include "disks_private.h" diff --git a/zfsutils/debian/patches/libdiskmgt-avoid.zfs.h.patch b/zfsutils/debian/patches/libdiskmgt-avoid.zfs.h.patch new file mode 100644 index 0000000..ec26a75 --- /dev/null +++ b/zfsutils/debian/patches/libdiskmgt-avoid.zfs.h.patch @@ -0,0 +1,30 @@ +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/findevs.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/findevs.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/findevs.c 2012-11-11 21:39:10.920512866 +0000 +@@ -37,7 +37,10 @@ + #include <libgen.h> + #include <unistd.h> + #include <devid.h> +-#include <sys/fs/zfs.h> ++ ++#ifndef ZFS_DRIVER ++#define ZFS_DRIVER "zfs" ++#endif + + #include "libdiskmgt.h" + #include "disks_private.h" +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_zpool.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/inuse_zpool.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_zpool.c 2012-11-11 23:27:36.758483035 +0000 +@@ -44,9 +44,7 @@ + #include <dlfcn.h> + #include <link.h> + #include <ctype.h> +-#include <sys/fs/zfs.h> + +-#include <libzfs.h> + #include "libdiskmgt.h" + #include "disks_private.h" + diff --git a/zfsutils/debian/patches/libdiskmgt-time.patch b/zfsutils/debian/patches/libdiskmgt-time.patch new file mode 100644 index 0000000..18eee65 --- /dev/null +++ b/zfsutils/debian/patches/libdiskmgt-time.patch @@ -0,0 +1,36 @@ +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_lu.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/inuse_lu.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_lu.c 2012-11-11 23:24:33.680655689 +0000 +@@ -33,6 +33,7 @@ + #include <dirent.h> + #include <stdlib.h> + #include <stdio.h> ++#include <time.h> + #include <string.h> + #include <synch.h> + #include <sys/errno.h> +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_fs.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/inuse_fs.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_fs.c 2012-11-11 23:25:33.727249736 +0000 +@@ -31,6 +31,7 @@ + #include <string.h> + #include <synch.h> + #include <unistd.h> ++#include <time.h> + #include <sys/errno.h> + #include <sys/types.h> + #include <sys/stat.h> +Index: libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_vxvm.c +=================================================================== +--- libdiskmgt.orig/usr/src/lib/libdiskmgt/common/inuse_vxvm.c 2012-10-08 00:25:38.000000000 +0000 ++++ libdiskmgt/usr/src/lib/libdiskmgt/common/inuse_vxvm.c 2012-11-11 23:26:14.518928300 +0000 +@@ -32,6 +32,7 @@ + #include <stdlib.h> + #include <stdio.h> + #include <strings.h> ++#include <time.h> + #include <sys/param.h> + #include <sys/errno.h> + #include <thread.h> diff --git a/zfsutils/debian/patches/libzfs-avoid-libadm.patch b/zfsutils/debian/patches/libzfs-avoid-libadm.patch index 7883bb8..85077cf 100644 --- a/zfsutils/debian/patches/libzfs-avoid-libadm.patch +++ b/zfsutils/debian/patches/libzfs-avoid-libadm.patch @@ -23,7 +23,7 @@ Index: zfsutils/usr/src/lib/libzfs/Makefile.com $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -+pics/%.o: ../../../lib/libadm/common/rdwr_vtoc.c ++pics/rdwr_vtoc.o: ../../../lib/libadm/common/rdwr_vtoc.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) + diff --git a/zfsutils/debian/patches/series b/zfsutils/debian/patches/series index 693eb54..48a8ccc 100644 --- a/zfsutils/debian/patches/series +++ b/zfsutils/debian/patches/series @@ -11,3 +11,7 @@ libzpool-no-sys-compress.h.patch libzfs-dataset.c-time.h.patch libzpool-avoid-libcmdutil.patch libzfs-avoid-libadm.patch +libdiskmgt-avoid-libadm.patch +libdiskmgt-NULL-0.patch +libdiskmgt-avoid-meta.h.patch +libdiskmgt-time.patch diff --git a/zfsutils/debian/rules b/zfsutils/debian/rules index edf2c8f..d11e294 100755 --- a/zfsutils/debian/rules +++ b/zfsutils/debian/rules @@ -2,9 +2,14 @@ export DH_VERBOSE = 1 +# libdiskmgt needs libzfs for data structures and dlopen() +# zpool is linked to libdiskmgt. +# zfsutils seems to be the only consumer of libdiskmgt +# (other is fdisk), so we build libdiskmgt here. libs_headers := \ libzfs_core \ libzfs \ + libdiskmgt \ libzpool libs := \ @@ -31,6 +36,7 @@ unpack-stamp: usr/src/uts/common/Makefile.files \ usr/src/uts/common/fs/zfs \ usr/src/lib/libadm/common/rdwr_vtoc.c \ + usr/src/lib/libadm/common/fulldevnm.c \ usr/src/common/list/list.c # Buggy and unused: echo > usr/src/Makefile.msg.targ @@ -105,6 +111,7 @@ binary-stamp: build-stamp dh_link dh_compress dh_fixperms + dh_makeshlibs -- -c4 dh_installdeb dh_shlibdeps dh_gencontrol |