Use 3.0 (quilt) format with new dh_illumos_gate

This commit is contained in:
Igor Pashev 2015-10-19 16:28:25 +03:00
parent 7cfec1048a
commit 385c0c6b58
6 changed files with 103 additions and 97 deletions

View File

@ -1,3 +1,10 @@
zfsutils (4.3.1.git.35107df-0.1) unstable; urgency=medium
* Use 3.0 (quilt) format with new dh_illumos_gate
* Added debian/patches/libdiskmgt-scsi-options.patch
-- Igor Pashev <pashev.igor@gmail.com> Mon, 19 Oct 2015 16:28:03 +0300
zfsutils (4.3) unstable; urgency=medium
* New upstream snapshot

View File

@ -3,9 +3,8 @@ Section: libs
Priority: optional
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
dh-illumos (>= 9.5.10),
dh-illumos (>= 9.6.1),
gcc-multilib,
illumos-source-4.3,
uts-dev (>= 4.3),
dtrace-dev (>= 4.3),
libdevid1-dev , lib32devid1-dev [illumos-amd64] ,
@ -26,7 +25,6 @@ Build-Depends:
libsec1-dev,
libfdisk1-dev [illumos-amd64 illumos-i386],
lib32fdisk1-dev [illumos-amd64],
quilt,
symlinks,
Standards-Version: 3.9.3
Homepage: https://www.illumos.org

View File

@ -0,0 +1,31 @@
Index: zfsutils/usr/src/lib/libdiskmgt/common/controller.c
===================================================================
--- zfsutils.orig/usr/src/lib/libdiskmgt/common/controller.c
+++ zfsutils/usr/src/lib/libdiskmgt/common/controller.c
@@ -31,7 +31,13 @@
#include <stdlib.h>
#include <sys/sunddi.h>
#include <sys/types.h>
-#include <sys/scsi/conf/autoconf.h>
+
+/* From illumos-gate/usr/src/uts/common/sys/scsi/conf/autoconf.h */
+#define SCSI_OPTIONS_FAST 0x100 /* Global FAST scsi support */
+#define SCSI_OPTIONS_WIDE 0x200 /* Global WIDE scsi support */
+#define SCSI_OPTIONS_FAST20 0x400 /* Global FAST20 scsi support */
+#define SCSI_OPTIONS_FAST40 0x800 /* Global FAST40 scsi support */
+#define SCSI_OPTIONS_FAST80 0x1000 /* Global FAST80 scsi support */
#include "libdiskmgt.h"
#include "disks_private.h"
Index: zfsutils/usr/src/lib/libdiskmgt/common/bus.c
===================================================================
--- zfsutils.orig/usr/src/lib/libdiskmgt/common/bus.c
+++ zfsutils/usr/src/lib/libdiskmgt/common/bus.c
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <sys/sunddi.h>
#include <sys/types.h>
-#include <sys/scsi/conf/autoconf.h>
#include "libdiskmgt.h"
#include "disks_private.h"

View File

@ -30,3 +30,4 @@ uts-zfs-NULL-0.patch
uts-zfs-libsunavl.patch
zlib-multiarch.patch
libzpool-gnumake.patch
libdiskmgt-scsi-options.patch

View File

@ -2,6 +2,10 @@
include /usr/share/dpkg/architecture.mk
export DH_VERBOSE = 1
VERSION := $(shell dpkg-parsechangelog | perl -ne '/Version:\s+(.+)-[^-]+/ && print $$1')
%:
dh $@
# libdiskmgt needs libzfs for data structures and dlopen()
# zpool is linked to libdiskmgt.
@ -23,77 +27,69 @@ cmd := \
zdb \
zfs
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate --build \
$(cmd:%=usr/src/cmd/%) \
$(libs:%=usr/src/lib/%) \
usr/src/common/zfs/\* \
usr/src/lib/fm/topo/libtopo/common/libtopo.h \
usr/src/lib/libshare/common/libshare.h \
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/cmd/stat/common/timestamp.c \
usr/src/cmd/stat/common/statcommon.h \
usr/src/common/list/list.c \
usr/src/man/man1m/zpool.1m \
usr/src/man/man1m/zfs.1m \
usr/src/man/man1m/zdb.1m
# Buggy and unused:
echo > usr/src/Makefile.msg.targ
touch $@
BUILD = build-tree
ROOT = $(BUILD)/root
ILLUMOS_GATE = illumos-gate
patch: patch-stamp
patch-stamp: unpack-stamp
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
touch $@
$(ILLUMOS_GATE):
dh_illumos_gate --checkout --destdir=$(ILLUMOS_GATE)
unpatch:
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
rm -f patch-stamp
.PHONY: create-orig
create-orig: $(ILLUMOS_GATE)
dh_illumos_gate --create-orig --build \
$(ILLUMOS_GATE)/usr/src/cmd/stat/common/statcommon.h \
$(ILLUMOS_GATE)/usr/src/cmd/stat/common/timestamp.c \
$(ILLUMOS_GATE)/usr/src/common/list/list.c \
$(ILLUMOS_GATE)/usr/src/common/zfs \
$(ILLUMOS_GATE)/usr/src/lib/fm/topo/libtopo/common/libtopo.h \
$(ILLUMOS_GATE)/usr/src/lib/libadm/common/fulldevnm.c \
$(ILLUMOS_GATE)/usr/src/lib/libadm/common/rdwr_vtoc.c \
$(ILLUMOS_GATE)/usr/src/lib/libshare/common/libshare.h \
$(ILLUMOS_GATE)/usr/src/man/man1m/zdb.1m \
$(ILLUMOS_GATE)/usr/src/man/man1m/zfs.1m \
$(ILLUMOS_GATE)/usr/src/man/man1m/zpool.1m \
$(ILLUMOS_GATE)/usr/src/uts/common/Makefile.files \
$(ILLUMOS_GATE)/usr/src/uts/common/fs/zfs \
$(cmd:%=$(ILLUMOS_GATE)/usr/src/cmd/%) \
$(libs:%=$(ILLUMOS_GATE)/usr/src/lib/%) \
dirs-stamp: unpack-stamp
. usr/env.sh; mkdir -p \
debian/tmp/usr/include \
debian/tmp/usr/include/fm \
debian/tmp$$DEB_LIBDIR_32 \
debian/tmp$$DEB_LIBDIR_64 \
debian/tmp$$DEB_USRLIBDIR_32 \
debian/tmp$$DEB_USRLIBDIR_64 \
debian/tmp/usr/bin \
debian/tmp/sbin \
debian/tmp/usr/lib/fs/zfs \
debian/tmp/usr/sbin
touch $@
test-orig: create-orig
./debian/rules clean
rm -rf usr .pc
tar xf ../zfsutils_$(VERSION).orig.tar.xz --strip=1
quilt push -a
./debian/rules build
fakeroot ./debian/rules binary
mapfiles-stamp: patch-stamp
dh_illumos_make usr/src/common/mapfiles
touch $@
override_dh_auto_configure:
dh_illumos_gate --configure --destdir=$(BUILD) --root=$(ROOT)
headers-stamp: patch-stamp dirs-stamp
dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h
override_dh_auto_build:
. $(BUILD)/usr/env.sh; mkdir -p \
$$ROOT/usr/include \
$$ROOT/usr/include/fm \
$$ROOT$$DEB_LIBDIR_32 \
$$ROOT$$DEB_LIBDIR_64 \
$$ROOT$$DEB_USRLIBDIR_32 \
$$ROOT$$DEB_USRLIBDIR_64 \
$$ROOT/usr/bin \
$$ROOT/sbin \
$$ROOT/usr/lib/fs/zfs \
$$ROOT/usr/sbin
dh_illumos_make $(libs_headers:%=$(BUILD)/usr/src/lib/%) -t install_h
# Only error codes:
cp usr/src/lib/libshare/common/libshare.h debian/tmp/usr/include/
cp $(BUILD)/usr/src/lib/libshare/common/libshare.h \
$(ROOT)/usr/include/
# For dlopen(), fuck!
cp usr/src/lib/fm/topo/libtopo/common/libtopo.h \
debian/tmp/usr/include/fm/
touch $@
cp $(BUILD)/usr/src/lib/fm/topo/libtopo/common/libtopo.h \
$(ROOT)/usr/include/fm/
dh_illumos_make $(BUILD)/usr/src/common/mapfiles
dh_illumos_make $(patsubst %,$(BUILD)/usr/src/lib/%,$(libs))
dh_illumos_make --native $(patsubst %,$(BUILD)/usr/src/cmd/%,$(cmd))
cmd-stamp: lib-stamp dirs-stamp mapfiles-stamp headers-stamp patch-stamp
dh_illumos_make --native $(cmd:%=usr/src/cmd/%)
touch $@
lib-stamp: dirs-stamp mapfiles-stamp headers-stamp patch-stamp
dh_illumos_make $(libs:%=usr/src/lib/%)
touch $@
install: install-stamp
install-stamp: build-stamp
override_dh_auto_install:
rm -rf debian/tmp
cp -a $(ROOT) debian/tmp
# Move dev symlink from /lib into /usr/lib:
for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \
ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \
@ -106,37 +102,10 @@ install-stamp: build-stamp
# Make symlinks relative:
symlinks -c debian/tmp/usr/lib32
symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
touch $@
build build-arch build-indep: build-stamp
build-stamp: lib-stamp cmd-stamp
touch $@
binary binary-arch binary-indep: binary-stamp
binary-stamp: install-stamp
dh_testdir
dh_testroot
dh_installdirs
dh_install
dh_installman
dh_installdocs
dh_installexamples
dh_installchangelogs
dh_bash-completion
dh_link
dh_compress
dh_fixperms
override_dh_makeshlibs:
dh_makeshlibs -- -c4
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
touch $@
clean: unpatch
dh_testdir
dh_testroot
dh_clean
rm -rf usr .pc
override_dh_auto_clean:
rm -rf $(BUILD)

View File

@ -1 +1 @@
3.0 (native)
3.0 (quilt)