Whamcloud - gitweb
LU-10569 build: properly package lustre for Debian/Ubuntu 77/32277/4
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 6 Mar 2018 20:10:56 +0000 (15:10 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 15 May 2018 13:48:40 +0000 (13:48 +0000)
Remove the obsolete linux-patch since patched kernels for lustre
clients have been long gone. Place only the static libraries and
*.so symlinks for the dynamic libraries in lustre-dev. The normal
dynamic libraries are placed into the utilities packages. Add in
all the missing dependencies and fix how the lustre debs are
dependent on each other. Lastly add in the missing lustre-iokit
that is present for rpm packages. Only thing missing is a package
for lustre resources which can be done at a latter time.

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/31348
Lustre-commit: 020277f596168ed80d77ab50ef6a85a6e6e54d0a

Change-Id: I5fd2a23bc1ae73434cef8dcf3679b50878256ab3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Tested-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32277
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
14 files changed:
autoMakefile.am
debian/.gitignore
debian/control
debian/control.main
debian/control.modules.in
debian/linux-patch-lustre.apply [deleted file]
debian/linux-patch-lustre.dirs [deleted file]
debian/linux-patch-lustre.kpatches [deleted file]
debian/linux-patch-lustre.unpatch [deleted file]
debian/lustre-client-modules.install
debian/lustre-iokit.docs [new file with mode: 0644]
debian/lustre-iokit.install [new file with mode: 0644]
debian/lustre-tests.install
debian/rules

index 0f3ee50..9512e9a 100644 (file)
@@ -269,11 +269,12 @@ debs: undef.h
        popd && \
        VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
        mkdir -p debs && \
-       mv ../linux-patch-lustre_$${VER}_all.deb ../lustre-dev_$${VER}_*.deb \
-          ../lustre-source_$${VER}_all.deb ../lustre-tests_$${VER}_*.deb \
-          ../lustre-utils_$${VER}_*.deb ../lustre_$${VER}.dsc \
-          ../lustre_$${VER}_*.changes ../lustre_$${VER}.tar.gz \
-          ../lustre-client-modules-$${KVERS}_$${VER}_*.deb debs/
+       mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
+          ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
+          ../lustre-utils_$${VER}_*.deb \
+          ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
+          ../lustre_$${VER}.tar.gz ../lustre-client-modules-$${KVERS}_$${VER}_*.deb \
+          debs/
 
 if USES_DPKG
 EXTRA_DIST += debian/*
index 73db5ee..8717f09 100644 (file)
@@ -1,11 +1,11 @@
 /*.log
 /*.substvars
 /files
-/linux-patch-lustre
 /lustre-dev
 /lustre-source
+/lustre-iokit
 /lustre-tests
-/lustre-tests.substvars
 /lustre-utils
-/lustre-utils.substvars
+/lustre-*.substvars
+/lustre-*-utils
 /tmp
index 22e8720..1218c48 100644 (file)
@@ -4,35 +4,15 @@ Priority: optional
 Maintainer: Brian J. Murrell <brian.murrell@intel.com>
 Uploaders: Brian J. Murrell <brian.murrell@intel.com>
 Standards-Version: 3.8.3
-Build-Depends: module-assistant, libreadline-dev, debhelper (>=7.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, libsnmp-dev, bzip2, quilt, linux-headers-generic | linux-headers | linux-headers-amd64, rsync
+Build-Depends: module-assistant, libreadline-dev, debhelper (>=7.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, libtool, libyaml-dev, libselinux-dev, libsnmp-dev, bzip2, quilt, linux-headers-generic | linux-headers | linux-headers-amd64, rsync
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
-Package: linux-patch-lustre
-Section: devel
-Architecture: all
-Priority: optional
-Depends: ${kpatch:Depends}
-Recommends: kernel-package, quilt
-Description: Linux kernel patch for the Lustre Filesystem
- Lustre is a scalable, secure, robust, highly-available
- cluster file system. This release is maintained by Intel Corporation
- and available from https://wiki.hpdd.intel.com/
- .
- Lustre servers require a number of patches to the core Linux kernel,
- mostly to export new functions, add features to ext3, and add
- a new locking path to the VFS. This package provides these patches
- for kernel versions 2.6.18, 2.6.21 and 2.6.22 on i386, amd64, powerpc
- and ia64 architectures.
- .
- For Lustre clients, you will also need to build a lustre-modules
- package, using the lustre-source package and module-assistant.
-
 Package: lustre-source
 Section: admin
 Architecture: all
 Priority: optional
-Depends: module-assistant, bzip2, debhelper (>= 7.0.0), libsnmp-dev, dpatch
+Depends: module-assistant, bzip2, debhelper (>= 7.0.0), libtool, libyaml-dev, libselinux-dev, libsnmp-dev, dpatch
 Description: source for Lustre filesystem client kernel modules
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
@@ -46,7 +26,7 @@ Package: lustre-utils
 Section: utils
 Architecture: i386 powerpc ppc64el amd64 ia64 arm64
 Priority: optional
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
 Description: Userspace utilities for the Lustre filesystem
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
@@ -55,11 +35,23 @@ Description: Userspace utilities for the Lustre filesystem
  This package provides a number of userspace utilities for
  maintaining Lustre filesystems.
 
+Package: lustre-iokit
+Section: utils
+Architecture: i386 powerpc ppc64el amd64 ia64 arm64
+Priority: optional
+Depends: lustre-utils (= ${binary:Version}), python, perl, sg3-utils
+Description: Collection of benchmark tools for the Lustre filesystem
+ Lustre is a scalable, secure, robust, highly-available cluster file system.
+ This release is maintained by Intel Corporation and available from
+ https://wiki.hpdd.intel.com/
+ .
+ This package provides a collection of benchmark tools
+
 Package: lustre-tests
 Section: utils
 Architecture: i386 powerpc ppc64el amd64 ia64 arm64
 Priority: optional
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof
 Description: Test suite for the Lustre filesystem
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
index 22e8720..1218c48 100644 (file)
@@ -4,35 +4,15 @@ Priority: optional
 Maintainer: Brian J. Murrell <brian.murrell@intel.com>
 Uploaders: Brian J. Murrell <brian.murrell@intel.com>
 Standards-Version: 3.8.3
-Build-Depends: module-assistant, libreadline-dev, debhelper (>=7.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, libsnmp-dev, bzip2, quilt, linux-headers-generic | linux-headers | linux-headers-amd64, rsync
+Build-Depends: module-assistant, libreadline-dev, debhelper (>=7.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, libtool, libyaml-dev, libselinux-dev, libsnmp-dev, bzip2, quilt, linux-headers-generic | linux-headers | linux-headers-amd64, rsync
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
-Package: linux-patch-lustre
-Section: devel
-Architecture: all
-Priority: optional
-Depends: ${kpatch:Depends}
-Recommends: kernel-package, quilt
-Description: Linux kernel patch for the Lustre Filesystem
- Lustre is a scalable, secure, robust, highly-available
- cluster file system. This release is maintained by Intel Corporation
- and available from https://wiki.hpdd.intel.com/
- .
- Lustre servers require a number of patches to the core Linux kernel,
- mostly to export new functions, add features to ext3, and add
- a new locking path to the VFS. This package provides these patches
- for kernel versions 2.6.18, 2.6.21 and 2.6.22 on i386, amd64, powerpc
- and ia64 architectures.
- .
- For Lustre clients, you will also need to build a lustre-modules
- package, using the lustre-source package and module-assistant.
-
 Package: lustre-source
 Section: admin
 Architecture: all
 Priority: optional
-Depends: module-assistant, bzip2, debhelper (>= 7.0.0), libsnmp-dev, dpatch
+Depends: module-assistant, bzip2, debhelper (>= 7.0.0), libtool, libyaml-dev, libselinux-dev, libsnmp-dev, dpatch
 Description: source for Lustre filesystem client kernel modules
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
@@ -46,7 +26,7 @@ Package: lustre-utils
 Section: utils
 Architecture: i386 powerpc ppc64el amd64 ia64 arm64
 Priority: optional
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, libyaml-0-2, libselinux1, libsnmp30, zlib1g, perl
 Description: Userspace utilities for the Lustre filesystem
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
@@ -55,11 +35,23 @@ Description: Userspace utilities for the Lustre filesystem
  This package provides a number of userspace utilities for
  maintaining Lustre filesystems.
 
+Package: lustre-iokit
+Section: utils
+Architecture: i386 powerpc ppc64el amd64 ia64 arm64
+Priority: optional
+Depends: lustre-utils (= ${binary:Version}), python, perl, sg3-utils
+Description: Collection of benchmark tools for the Lustre filesystem
+ Lustre is a scalable, secure, robust, highly-available cluster file system.
+ This release is maintained by Intel Corporation and available from
+ https://wiki.hpdd.intel.com/
+ .
+ This package provides a collection of benchmark tools
+
 Package: lustre-tests
 Section: utils
 Architecture: i386 powerpc ppc64el amd64 ia64 arm64
 Priority: optional
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: lustre-iokit (= ${binary:Version}), attr, rsync, perl, lsof
 Description: Test suite for the Lustre filesystem
  Lustre is a scalable, secure, robust, highly-available cluster file system.
  This release is maintained by Intel Corporation and available from
index 84a7012..b909be5 100644 (file)
@@ -16,5 +16,3 @@ Description: Lustre Linux kernel module (kernel _KVERS_)
  .
  These modules are compiled for the _KVERS_ linux kernel.
 
-
diff --git a/debian/linux-patch-lustre.apply b/debian/linux-patch-lustre.apply
deleted file mode 100644 (file)
index 444b264..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#! /bin/bash
-set -x
-
-if ! [ -d kernel -a -d Documentation ]
-then
-    echo >&2 "Not in kernel top level directory. Exiting"
-    exit 1
-fi
-TOPPATCHDIR=/usr/src/kernel-patches/lustre
-ARCHITECTURE=`dpkg --print-installation-architecture`
-
-QUILT="quilt --quiltrc /dev/null"
-export QUILT_PATCHES="$TOPPATCHDIR/patches"
-
-[ -f debian/APPLIED_all_lustre ] && exit 0
-VERSION=$(grep ^VERSION Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-PATCHLEVEL=$( grep ^PATCHLEVEL Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-SUBLEVEL=$(grep ^SUBLEVEL Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-#EXTRAVERSION=$(grep ^EXTRAVERSION Makefile | head -1 2>/dev/null | \
-#        sed -e 's/EXTRAVERSION =[       ]*\([^  ]*\)$/\1/')
-#KERNELBRANCHLET=${VERSION}.${PATCHLEVEL}.${SUBLEVEL}
-#KERNELRELEASE=${KERNELBRANCHLET}${EXTRAVERSION}
-KERNELRELEASE=${VERSION}.${PATCHLEVEL}.${SUBLEVEL}
-
-cleanup() {
-  echo >&2 Cleaning up
-  if [ -e series ]; then
-    echo >&2 Removing series file
-    rm series
-  fi
-  if [ -e debian/APLLIED_all_lustre_tmp/series.orig ]; then
-    echo >&1 Restoring orig series file
-    mv debian/APLLIED_all_lustre_tmp/series.orig series
-  fi
-  if [ -e .pc ]; then
-    echo >&2 Removing .pc dir
-    rm -r .pc
-  fi
-  if [ -e debian/APPLIED_all_lustre_tmp/.pc.orig ]; then
-    echo >&2 Restoring orig .pc dir
-    mv debian/APPLIED_all_lustre_tmp/.pc.orig .pc
-  fi
-}
-
-mkdir -p debian/APPLIED_all_lustre_tmp
-if [ -e series ]; then
-  echo >&2 Preserving existing series file
-  mv series debian/APPLIED_all_lustre_tmp/series.orig
-fi
-if [ -e .pc ]; then
-  echo >&2 Preserving existing .pc dir
-  mv .pc debian/APPLIED_all_lustre_tmp/.pc.orig
-fi
-
-trap cleanup EXIT
-
-echo >&2 Setting up quilt
-$QUILT setup $TOPPATCHDIR/series/$KERNELRELEASE-vanilla.series 2>/dev/null
-ERR=$?
-if ! [ $ERR = 0 ]; then
-  echo >&2 Quilt failed to initialize
-  cleanup
-  exit $ERR
-fi
-
-echo >&2 Applying lustre patches
-$QUILT push -a
-ERR=$?
-if ! [ $ERR = 0 ]; then
-  echo >&2 Lustre patched failed to apply
-  echo >&2 Reverting partialy applied patch
-  $QUILT pop -a
-  cleanup
-  exit $ERR
-fi
-
-echo >&2 Finalizing lustre patch
-mv series debian/APPLIED_all_lustre_tmp/series.lustre
-mv .pc debian/APPLIED_all_lustre_tmp/.pc.lustre
-cleanup
-
-
-echo >&2 "\"Lustre Filesystem patch for the Linux kernel\" patch for $KVERSION succeeded"
-
-echo >&2 "Removing empty files:"
-# make an exception for ./debian, or else the stamp files will go too.
-find . -path ./debian -prune -o \
-       -type f -size 0 ! -name 'APPLIED*' -exec rm {} \; -print
-echo >&2 "Done."
-
-mkdir -p debian
-cat > 'debian/APPLIED_all_lustre' <<EOF
-SERIES=$KERNELRELEASE-vanilla.series
-EOF
-mkdir -p debian/image.d
-PKGNAME=`dpkg -S $TOPPATCHDIR/series/$KERNELRELEASE-vanilla.series | cut -d: -f1`
-PKGVERS=`grep-dctrl -n -P $PKGNAME -s Version -X /var/lib/dpkg/status`
-cat > 'debian/image.d/register-lustre' <<EOF
-#!/bin/sh
-
-# This scripts documents the "Lustre Filesystem patch for the Linux kernel" kernel patch into the
-# kernel-image package, as being applied to the kernel.
-
-docdir=\${IMAGE_TOP}/usr/share/doc/kernel-image-\${version}
-
-mkdir -p \${docdir}
-
-(
-    printf 'Lustre Filesystem patch for the Linux kernel (lustre)${KPATCH_lustre:+ for kernel ${KPATCH_lustre}},'
-    echo ' from package $PKGNAME, version $PKGVERS'
-) >> \${docdir}/applied-patches
-EOF
-chmod +x 'debian/image.d/register-lustre'
-
-echo >&2 "END applying lustre patch"
diff --git a/debian/linux-patch-lustre.dirs b/debian/linux-patch-lustre.dirs
deleted file mode 100644 (file)
index b9d3f39..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/src/kernel-patches/lustre/scripts
-usr/src/kernel-patches/lustre/series
-usr/src/kernel-patches/lustre/patches
diff --git a/debian/linux-patch-lustre.kpatches b/debian/linux-patch-lustre.kpatches
deleted file mode 100644 (file)
index 0bf1ef0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Patch-name: Lustre Filesystem patch for the Linux kernel
-Patch-id: lustre
-Architecture: amd64, ia64, i386, powerpc
-Path-strip-level: 1
-
-Patch-file: debian/kpatches/patch-vanilla-2.6.18
-Kernel-version: 2.6.18
-
-Patch-file: debian/kpatches/patch-vanilla-2.6.20
-Kernel-version: 2.6.20
-
-Patch-file: debian/kpatches/patch-vanilla-2.6.21
-Kernel-version: 2.6.21
diff --git a/debian/linux-patch-lustre.unpatch b/debian/linux-patch-lustre.unpatch
deleted file mode 100644 (file)
index befc542..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#! /bin/bash
-set -x
-
-if ! [ -d kernel -a -d Documentation ]
-then
-    echo >&2 "Not in kernel top level directory. Exiting"
-    exit 1
-fi
-TOPPATCHDIR=/usr/src/kernel-patches/lustre
-ARCHITECTURE=`dpkg --print-installation-architecture`
-
-QUILT="quilt --quiltrc /dev/null"
-export QUILT_PATCHES="$TOPPATCHDIR/patches"
-
-if ! [ -f debian/APPLIED_all_lustre ]; then
-  echo >&2 "Lustre patch not applied."
-  exit 0
-fi
-VERSION=$(grep ^VERSION Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-PATCHLEVEL=$( grep ^PATCHLEVEL Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-SUBLEVEL=$(grep ^SUBLEVEL Makefile 2>/dev/null | \
-        sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-#EXTRAVERSION=$(grep ^EXTRAVERSION Makefile | head -1 2>/dev/null | \
-#        sed -e 's/EXTRAVERSION =[       ]*\([^  ]*\)$/\1/')
-#KERNELBRANCHLET=${VERSION}.${PATCHLEVEL}.${SUBLEVEL}
-#KERNELRELEASE=${KERNELBRANCHLET}${EXTRAVERSION}
-KERNELRELEASE=${VERSION}.${PATCHLEVEL}.${SUBLEVEL}
-
-# Check for depends on lustre
-if grep -l "^DEPENDS=.*[' ]all/unpatch/lustre[' ]" debian/APPLIED_* >/dev/null 2>/dev/null; then
-    # There are patches depending on this one, to be removed before.
-    # the dep will be removed by the last of those other patches.
-    echo >&2 "NOT unpatching \"Lustre Filesystem patch for the Linux kernel\" since other patches still rely on it"
-    exit 0
-fi
-
-if ! [ -d debian/APPLIED_all_lustre_tmp/.pc.lustre ]; then
-  cat >&2 <<EOF
-ERROR: .pc directory missing for unpatching. I strongly suggest
-you remove this kernel tree and unpack a clean one.
-EOF
-  exit 1
-fi
-
-if ! [ -e debian/APPLIED_all_lustre_tmp/series.lustre ]; then
-  cat >&2 <<EOF
-ERROR: series file missing for unpatching. I strongly suggest
-you remove this kernel tree and unpack a clean one.
-EOF
-  exit 1
-fi
-
-cleanup() {
-  echo >&2 Cleaning up
-  if [ -e series ]; then
-    echo >&2 Removing series file
-    rm series
-  fi
-  if [ -e debian/APPLIED_all_lustre_tmp/series.orig ]; then
-    echo >&1 Restoring orig series file
-    mv debian/APPLIED_all_lustre_tmp/series.orig series
-  fi
-  if [ -e .pc ]; then
-    echo >&2 Removing .pc dir
-    rm -r .pc
-  fi
-  if [ -e debian/APPLIED_all_lustre_tmp/.pc.orig ]; then
-    echo >&2 Restoring orig .pc dir
-    mv debian/APPLIED_all_lustre_tmp/.pc.orig .pc
-  fi
-}
-
-if [ -e series ]; then
-  echo >&2 Preserving existing series file
-  mv series debian/APPLIED_all_lustre_tmp/series.orig
-fi
-if [ -e .pc ]; then
-  echo >&2 Preserving existing .pc dir
-  mv .pc debian/APPLIED_all_lustre_tmp/.pc.orig
-fi
-
-trap cleanup EXIT
-
-echo >&2 Restoring lustre quilt
-mv debian/APPLIED_all_lustre_tmp/series.lustre series
-mv debian/APPLIED_all_lustre_tmp/.pc.lustre .pc
-
-echo >&2 Unpatching lustre patches
-$QUILT pop -a
-ERR=$?
-if ! [ $ERR = 0 ]; then
-  cat >&2 <<EOF
-ERROR: Lustre patches failed to unpatch. I strongly suggest
-you remove this kernel tree and unpack a clean one.
-EOF
-  cleanup
-  exit $ERR
-fi
-
-echo >&2 Removing lustre quilt
-rm -rf .pc series
-cleanup
-rm debian/APPLIED_all_lustre debian/image.d/register-lustre
-
-echo >&2 "\"Lustre Filesystem patch for the Linux kernel\" patch for $KVERSION removed successfully"
-
-echo >&2 "Removing empty files:"
-# make an exception for ./debian, or else the stamp files will go too.
-find . -path ./debian -prune -o \
-       -type f -size 0 ! -name 'APPLIED*' -exec rm {} \; -print
-echo >&2 "Done."
-
-rmdir debian/image.d debian/APPLIED_all_lustre_tmp || true
-
-echo >&2 "END unpatching lustre patch"
index dd93d15..4e22858 100644 (file)
@@ -1 +1,3 @@
 debian/tmp/lib /
+debian/tmp/usr/include/linux/lnet/*            usr/include/linux/lnet
+debian/tmp/usr/include/linux/libcfs/*          usr/include/linux/libcfs
diff --git a/debian/lustre-iokit.docs b/debian/lustre-iokit.docs
new file mode 100644 (file)
index 0000000..2466a68
--- /dev/null
@@ -0,0 +1,2 @@
+lustre-iokit/*-survey/README*
+lustre-iokit/stats-collect/README.*
diff --git a/debian/lustre-iokit.install b/debian/lustre-iokit.install
new file mode 100644 (file)
index 0000000..ef12955
--- /dev/null
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin/iokit-*     usr/bin
+debian/tmp/usr/bin/*-survey    usr/bin
index 1c00088..882ca28 100644 (file)
@@ -1 +1,4 @@
 debian/tmp/usr/lib/lustre/tests/*      usr/lib/lustre/tests
+debian/tmp/usr/bin/mcreate             usr/bin
+debian/tmp/usr/bin/munlink             usr/bin
+debian/tmp/usr/sbin/wire*              usr/sbin
index 70cc1d8..d9f6577 100755 (executable)
@@ -29,7 +29,7 @@ endif
 #export CC
 
 # This is the debhelper compatibility version to use.
-export DH_COMPAT=7
+export DH_COMPAT=9
 
 # Module-assistant stuff
 PACKAGE=lustre-client-modules
@@ -57,12 +57,12 @@ KSRC_TREE?=$(LINUX)
 IB_OPTIONS?=""
 
 # Packages
-PATCH_PKG=linux-patch-lustre
 UTILS_PKG=lustre-utils
 TESTS_PKG=lustre-tests
 DEV_PKG=lustre-dev
 SOURCE_PKG=lustre-source
 MODS_PKG=lustre-client-modules
+IOKIT_PKG=lustre-iokit
 
 #Build dir
 #BUILDDIR=debian/build
@@ -145,50 +145,13 @@ build-stamp: patch-stamp configure-stamp
 # instead we will build the modules with m-a in the "make debs" target
 # binary-arch: binary-$(UTILS_PKG) binary-$(TESTS_PKG) binary-$(DEV_PKG) \
 # binary-$(MODS_PKG) binary-kern-mods
-binary-arch: binary-$(UTILS_PKG) binary-$(TESTS_PKG) binary-$(DEV_PKG)
+binary-arch: binary-$(UTILS_PKG) binary-$(DEV_PKG) \
+            binary-$(IOKIT_PKG) binary-$(TESTS_PKG)
 
-binary-indep: binary-$(PATCH_PKG) binary-$(SOURCE_PKG)
+binary-indep: binary-$(SOURCE_PKG)
 
 binary: binary-indep binary-arch
 
-binary-$(PATCH_PKG): patch-stamp
-       dh_testdir
-       dh_testroot
-       dh_installdirs -p $(PATCH_PKG)
-       dh_installdocs -p $(PATCH_PKG)
-#      dh_installkpatches -p $(PATCH_PKG)
-       dh_install -p $(PATCH_PKG)
-
-       # Install apply script
-       cp $(TOP_DIR)/debian/linux-patch-lustre.apply $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/scripts/apply
-       chmod a+x $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/scripts/apply
-       set -e; for KERNEL in $(SUPPORTED_KERNELS); do \
-         mkdir -p $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/all/$$KERNEL/apply/; \
-         ln -s ../../../lustre/scripts/apply $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/all/$$KERNEL/apply/lustre; \
-       done
-
-       # Install unpatch script
-       cp $(TOP_DIR)/debian/linux-patch-lustre.unpatch $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/scripts/unpatch
-       chmod a+x $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/scripts/unpatch
-       set -e; for KERNEL in $(SUPPORTED_KERNELS); do \
-         mkdir -p $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/all/$$KERNEL/unpatch/; \
-         ln -s ../../../lustre/scripts/unpatch $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/all/$$KERNEL/unpatch/lustre; \
-       done
-
-       # Install series
-       cp lustre/kernel_patches/series/*.series $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/series/
-
-       # Install patches
-       cp lustre/kernel_patches/patches/*.patch $(TOP_DIR)/debian/$(PATCH_PKG)/usr/src/kernel-patches/lustre/patches/
-
-       dh_installchangelogs -p $(PATCH_PKG) lustre/ChangeLog
-       dh_compress -p $(PATCH_PKG)
-       dh_installdeb -p $(PATCH_PKG)
-       dh_fixperms -p $(PATCH_PKG)
-       dh_gencontrol -p $(PATCH_PKG)
-       dh_md5sums -p $(PATCH_PKG)
-       dh_builddeb -p $(PATCH_PKG)
-
 binary-$(UTILS_PKG): build-stamp
        dh_testdir
        dh_testroot
@@ -196,6 +159,12 @@ binary-$(UTILS_PKG): build-stamp
        dh_installdocs -p  $(UTILS_PKG)
        dh_installman -p $(UTILS_PKG)
        dh_install -p $(UTILS_PKG)
+       rm -rf debian/$(UTILS_PKG)/usr/bin/iokit-* \
+              debian/$(UTILS_PKG)/usr/bin/*-survey \
+              debian/$(UTILS_PKG)/usr/bin/mcreate \
+              debian/$(UTILS_PKG)/usr/bin/munlink \
+              debian/$(UTILS_PKG)/usr/sbin/wirecheck \
+              debian/$(UTILS_PKG)/usr/sbin/wiretest
        dh_makeshlibs -p $(UTILS_PKG)
        dh_installexamples -p $(UTILS_PKG)
        dh_installchangelogs -p $(UTILS_PKG) lustre/ChangeLog
@@ -207,6 +176,27 @@ binary-$(UTILS_PKG): build-stamp
        dh_md5sums -p $(UTILS_PKG)
        dh_builddeb -p $(UTILS_PKG)
 
+binary-$(IOKIT_PKG): build-stamp
+       dh_testdir
+       dh_testroot
+       dh_installdirs -p $(IOKIT_PKG)
+       dh_installdocs -p  $(IOKIT_PKG)
+       dh_installman -p $(IOKIT_PKG)
+       dh_install -p $(IOKIT_PKG)
+       rm -rf debian/$(IOKIT_PKG)/usr/bin/lustre_req_history \
+              debian/$(IOKIT_PKG)/usr/bin/*ll*stat \
+              debian/$(IOKIT_PKG)/usr/bin/lfs-*
+       dh_makeshlibs -p $(IOKIT_PKG)
+       dh_installexamples -p $(IOKIT_PKG)
+       dh_installchangelogs -p $(IOKIT_PKG) lustre/ChangeLog
+       dh_compress -p $(IOKIT_PKG)
+       dh_strip -p $(IOKIT_PKG)
+       dh_installdeb -p $(IOKIT_PKG)
+       dh_fixperms -p $(IOKIT_PKG)
+       dh_gencontrol -p $(IOKIT_PKG)
+       dh_md5sums -p $(IOKIT_PKG)
+       dh_builddeb -p $(IOKIT_PKG)
+
 binary-$(TESTS_PKG): build-stamp
        dh_testdir
        dh_testroot
@@ -359,7 +349,7 @@ binary-modules: prep-deb-files
        $(MAKE) $(PMAKEARGS)
        $(MAKE) install DESTDIR=$(CURDIR)/debian/$(PKGNAME)
        # Remove stuff that doesn't belong (no module-only target)
-       cd $(CURDIR)/debian/$(PKGNAME) && rm -rf usr sbin etc
+       cd $(CURDIR)/debian/$(PKGNAME) && rm -rf usr/bin usr/sbin usr/lib usr/share usr/include/lustre sbin etc
        dh_installdocs -p$(PKGNAME)
        dh_installchangelogs -p$(PKGNAME)
        dh_installmodules -p $(PKGNAME)
@@ -376,7 +366,7 @@ clean:
        dh_testroot
        dpatch deapply-all -v
        -$(MAKE) distclean
-       rm -rf  debian/substvars debian/*.bak debian/*~ *~  *-stamp debian/$(PATCH_PKG)
+       rm -rf  debian/substvars debian/*.bak debian/*~ *~  *-stamp
        ls -d debian/lustre-client-modules-* | grep -v _KVERS_ | xargs rm -f || true
        # only remove this if the clean was not called from kdist_clean
        if [ "$$MA_SOURCE_PKG" = "" ]; then \