Whamcloud - gitweb
LU-17128 build: fix lnet.service missing issue on Ubuntu 22.04
authorJian Yu <yujian@whamcloud.com>
Mon, 18 Sep 2023 16:03:16 +0000 (09:03 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 22 Sep 2023 23:57:32 +0000 (23:57 +0000)
The lnet.service file was in the lustre-client-utils package
built on Ubuntu 20.04, but it was missing from the package
built on Ubuntu 22.04.

This is caused by the dpkg-buildpackage change introduced by
dpkg version 1.21.1ubuntu2.1 installed by default on Ubuntu 22.04.
To fix this issue, we need to specify build profiles explicitly
to dpkg-buildpackage via -P|--build-profiles option instead of
just setting the environment variable DEB_BUILD_PROFILES.

Lustre-change: https://review.whamcloud.com/52404
Lustre-commit: TBD (from 59eef55fe08d761be91d9bce207d43f99769cf08)

Test-Parameters: trivial clientdistro=ubuntu2004
Test-Parameters: trivial clientdistro=ubuntu2204

Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I9975ef357f0aba722c56d27eaa9b2cfbccc9c524
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52405
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
autoMakefile.am

index ecbe148..f075f72 100644 (file)
@@ -415,7 +415,8 @@ debs: undef.h debs_common
                        export IB_OPTIONS="--with-o2ib=yes"; \
                fi; \
        fi; \
-       dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
+       tmpprofiles=`tr ' ' ',' <<< $$DEB_BUILD_PROFILES`; \
+       dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp -P$$tmpprofiles || { \
                rc=$${PIPESTATUS[0]}; \
                cp $$debiantmp/control.bkp debian/control || true && \
                cp $$debiantmp/control.main.bkp debian/control.main || true && \
@@ -488,10 +489,11 @@ dkms-debs: undef.h debs_common
                export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} systemd"; \
        fi; \
        echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
+       tmpprofiles=`tr ' ' ',' <<< $$DEB_BUILD_PROFILES`; \
        echo "Kernel Source: $${KERNEL_SRC}"; \
        echo "Kernel Object: $${KERNEL_OBJ}"; \
        export BUILD_DKMS="true" && \
-       dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
+       dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp -P$$tmpprofiles || { \
                rc=$${PIPESTATUS[0]}; \
                [ $${rc} -gt 1 ] && exit $${rc}; \
                exit 0; \