From: Thomas Stibor Date: Tue, 29 Nov 2016 14:13:34 +0000 (+0100) Subject: LU-8869 build: Fix building of DEB packages X-Git-Tag: 2.9.51~7 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b896484e990667e428e35681552276012d4e444f LU-8869 build: Fix building of DEB packages 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 Change-Id: I02c58103bfaa83b97f5cd207af823fb477e0f0d3 Reviewed-on: https://review.whamcloud.com/23999 Tested-by: Jenkins Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/autoMakefile.am b/autoMakefile.am index 5fb234e..0054f72 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -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 $$(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; \ diff --git a/debian/control b/debian/control index 297bd69..4a0799d 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Brian J. Murrell Uploaders: Brian J. Murrell 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 diff --git a/debian/control.main b/debian/control.main index 297bd69..4a0799d 100644 --- a/debian/control.main +++ b/debian/control.main @@ -4,7 +4,7 @@ Priority: optional Maintainer: Brian J. Murrell Uploaders: Brian J. Murrell 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 diff --git a/debian/lustre-dev.install b/debian/lustre-dev.install index 2894dfa..65ab682 100644 --- a/debian/lustre-dev.install +++ b/debian/lustre-dev.install @@ -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 -debian/tmp/usr/lib/*.so.* 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 index 0000000..a05e2a5 --- /dev/null +++ b/debian/postinst @@ -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 index 0000000..2affdf0 --- /dev/null +++ b/debian/postrm @@ -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 diff --git a/debian/rules b/debian/rules index 7fe36a29..21fe689 100755 --- a/debian/rules +++ b/debian/rules @@ -346,6 +346,7 @@ kdist_config: prep-deb-files patch-stamp --disable-snmp \ --disable-tests \ --enable-quota \ + --with-kmp-moddir=updates \ $(IB_OPTIONS) kdist_configure: kdist_config