Whamcloud - gitweb
LU-15596 build: set TARBALL with m-a build helper for debs 39/46639/12
authorShaun Tancheff <shaun.tancheff@hpe.com>
Fri, 25 Mar 2022 18:31:06 +0000 (13:31 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 05:35:38 +0000 (05:35 +0000)
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.

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 <shaun.tancheff@hpe.com>
Change-Id: Iaa5a31aaa81e11ee97ae2ea27811c7a4399a0efa
Reviewed-on: https://review.whamcloud.com/46639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
autoMakefile.am
debian/rules

index b73a74f..c6fc7d2 100644 (file)
@@ -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) && \
index df8bcd8..dce9dc6 100755 (executable)
@@ -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