Whamcloud - gitweb
LU-8869 build: Fix building of DEB packages 99/23999/6
authorThomas Stibor <t.stibor@gsi.de>
Tue, 29 Nov 2016 14:13:34 +0000 (15:13 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 23 Dec 2016 05:05:27 +0000 (05:05 +0000)
Building DEB packages failed with errors:
dh_install: lustre-dev missing files (debian/tmp/usr/lib/*.so.*)
and dpkg-checkbuilddeps: Unmet build dependencies.
Moreover, signing the DEB packages failed due signing problems
of the author listed in debian/changelog.
Additionally, latest DEB based distributions ship Lustre modules
from kernel staging which can conflict with modules build from
upstream. To fix the problem, build modules with
configure --with-kmp-moddir=updates and add search order
of "search updates built-in" in /etc/depmod.d/lustre.conf

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I02c58103bfaa83b97f5cd207af823fb477e0f0d3
Reviewed-on: https://review.whamcloud.com/23999
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
autoMakefile.am
debian/control
debian/control.main
debian/lustre-dev.install
debian/postinst [new file with mode: 0755]
debian/postrm [new file with mode: 0755]
debian/rules

index 5fb234e..0054f72 100644 (file)
@@ -189,7 +189,7 @@ debs: undef.h
                echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n  * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca>  $$(date -R)\n\n.\nwq" | ed debian/changelog; \
        fi; \
        rm -rf debs
                echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n  * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca>  $$(date -R)\n\n.\nwq" | ed debian/changelog; \
        fi; \
        rm -rf debs
-       dpkg-buildpackage -I.git -I\*.out[0-9]\* -I\*.swp || { \
+       dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
                rc=$${PIPESTATUS[0]}; \
                [ $${rc} -gt 1 ] && exit $${rc}; \
                exit 0; \
                rc=$${PIPESTATUS[0]}; \
                [ $${rc} -gt 1 ] && exit $${rc}; \
                exit 0; \
index 297bd69..4a0799d 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Brian J. Murrell <brian.murrell@intel.com>
 Uploaders: Brian J. Murrell <brian.murrell@intel.com>
 Standards-Version: 3.8.3
 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, rsync
+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
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
index 297bd69..4a0799d 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Brian J. Murrell <brian.murrell@intel.com>
 Uploaders: Brian J. Murrell <brian.murrell@intel.com>
 Standards-Version: 3.8.3
 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, rsync
+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
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
 Homepage: https://wiki.hpdd.intel.com/
 Vcs-Git: git://git.hpdd.intel.com/fs/lustre-release.git
 
index 2894dfa..65ab682 100644 (file)
@@ -1,6 +1,5 @@
 lustre/contrib/README                  usr/share/doc/lustre-dev/contrib
 lustre/contrib/mpich-1.2.6-lustre.patch usr/share/doc/lustre-dev/contrib
 debian/tmp/usr/include/lustre/*                usr/include/lustre
 lustre/contrib/README                  usr/share/doc/lustre-dev/contrib
 lustre/contrib/mpich-1.2.6-lustre.patch usr/share/doc/lustre-dev/contrib
 debian/tmp/usr/include/lustre/*                usr/include/lustre
-debian/tmp/usr/lib/*.so.*              usr/lib
 debian/tmp/usr/lib/*.so                        usr/lib
 debian/tmp/usr/lib/*.a                 usr/lib
 debian/tmp/usr/lib/*.so                        usr/lib
 debian/tmp/usr/lib/*.a                 usr/lib
diff --git a/debian/postinst b/debian/postinst
new file mode 100755 (executable)
index 0000000..a05e2a5
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+DEPMOD_DIR="/etc/depmod.d"
+LUSTRE_DEPMOD_FILE="${DEPMOD_DIR}/lustre.conf"
+
+[ ! -d ${DEPMOD_DIR} ] && { mkdir -p ${DEPMOD_DIR}; }
+[ ! -e ${LUSTRE_DEPMOD_FILE} ] && { echo "search updates built-in" > ${LUSTRE_DEPMOD_FILE}; }
+
+depmod -a
diff --git a/debian/postrm b/debian/postrm
new file mode 100755 (executable)
index 0000000..2affdf0
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DEPMOD_DIR="/etc/depmod.d"
+LUSTRE_DEPMOD_FILE="${DEPMOD_DIR}/lustre.conf"
+
+[ -e ${LUSTRE_DEPMOD_FILE} ] && { rm -f ${LUSTRE_DEPMOD_FILE}; }
+# If DEPMOD_DIR is empty, we also created it, thus remove it.
+[ ! "$(ls -A ${DEPMOD_DIR} 2>/dev/null)" ] && { rm -rf ${DEPMOD_DIR}; }
+
+depmod -a
\ No newline at end of file
index 7fe36a2..21fe689 100755 (executable)
@@ -346,6 +346,7 @@ kdist_config: prep-deb-files patch-stamp
                    --disable-snmp \
                    --disable-tests \
                    --enable-quota \
                    --disable-snmp \
                    --disable-tests \
                    --enable-quota \
+                   --with-kmp-moddir=updates \
                    $(IB_OPTIONS)
 
 kdist_configure: kdist_config
                    $(IB_OPTIONS)
 
 kdist_configure: kdist_config