From bc348af019f54bf354ea7390dc6a494fce970be4 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Thu, 23 Jun 2022 21:08:04 -0700 Subject: [PATCH] LU-15596 build: set TARBALL with m-a build helper for debs debs built using module-assistant tool by default scan for packages and may find a random lustre tarball Specify the correct tarball with the TARBALL environment variable to avoid default search picking an incorrect tarball source. Lustre-change: https://review.whamcloud.com/46639 Lustre-commit: 47b8b6880d93d54ca1d24effb69d8c84d8d0fb2f HPE-bug-id: LUS-10783 Test-Parameters: trivial Fixes: 1d97ac16d8 ("LU-14948 build: Warn about /usr/src/lustre.tar.bz2") Signed-off-by: Shaun Tancheff Change-Id: Iaa5a31aaa81e11ee97ae2ea27811c7a4399a0efa Reviewed-by: Alexey Lyashkov Reviewed-by: Petros Koutoupis Reviewed-by: James Simmons Reviewed-on: https://review.whamcloud.com/47732 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- autoMakefile.am | 1 + debian/rules | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autoMakefile.am b/autoMakefile.am index b73a74f..c6fc7d2 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -340,6 +340,7 @@ debs: undef.h debs_common KVERS=$${KVERS:-$(LINUXRELEASE)} && \ export KSRC_TREE=$(LINUX) && \ KSRC=$${KSRC:-$(LINUX_OBJ)} && \ + TARBALL=$$(realpath usr/src/lustre-$${SRC_GIT_HASH}.tar.bz2) \ m-a build $${KSRC:+-k $$KSRC} $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \ popd && \ VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \ diff --git a/debian/rules b/debian/rules index df8bcd8..dce9dc6 100755 --- a/debian/rules +++ b/debian/rules @@ -357,13 +357,14 @@ binary-$(SOURCE_PKG): build-stamp . debian/$(SOURCE_PKG)/usr/src/modules/lustre # Remove FULLCLEAN setting rm debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/rules - sed -e 's/FULLCLEAN=full-clean/FULLCLEAN=/' < debian/rules > debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/rules + cp -v debian/rules debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/rules + sed -i -e 's/FULLCLEAN=full-clean/FULLCLEAN=/' debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/rules # clean up dest rm -rf debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/patched \ debian/$(SOURCE_PKG)/usr/src/modules/lustre/debian/patches/* $(MAKE) -C debian/$(SOURCE_PKG)/usr/src/modules/lustre -f debian/rules clean # Create the module-source tarball. - cd debian/$(SOURCE_PKG)/usr/src && tar jcf lustre-$${SRC_GIT_HASH}.tar.bz2 modules + cd debian/$(SOURCE_PKG)/usr/src && tar --exclude-vcs -jcf lustre-$${SRC_GIT_HASH}.tar.bz2 modules rm -rf debian/$(SOURCE_PKG)/usr/src/modules dh_install -p$(SOURCE_PKG) dh_installchangelogs -p $(SOURCE_PKG) lustre/ChangeLog -- 1.8.3.1