From baa3b27977b29a44d2442f84c6589f798af8e9a7 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Wed, 21 Sep 2022 00:41:33 -0700 Subject: [PATCH] LU-18203 build: check OS type before using dpkg Bright cluster manager by default installs dpkg on it's centos/rhel installation - presumably to allow provisioning debian nodes in the cluster, so dpkg is in the path and can't be removed. This patch fixes LB_USES_DPKG to check OS type before checking if dpkg is installed. This is a port of Lustre-change: https://review.whamcloud.com/48616 Lustre-commit: 9c913c27e765dfd3a1a1aad47126164574508a13 Ex-bug-id: EX-5975 Test-Parameters: trivial clientdistro=ubuntu2404 testlist=runtests Change-Id: Idc9f6edc91f9c89b40f259421b088287e08bfe9c Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56247 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- config/lustre-build-linux.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index 3b45956..ce8c99a 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -541,7 +541,8 @@ LC_LBUG_WITH_LOC_IN_OBJTOOL AC_DEFUN([LB_USES_DPKG], [ AC_CACHE_CHECK([if this distro uses dpkg], lb_cv_uses_dpkg, [ lb_cv_uses_dpkg="no" -AS_CASE([$(which dpkg 2>/dev/null)],[*/dpkg], [lb_cv_uses_dpkg="yes"]) +AS_CASE([$(egrep -q 'ubuntu|debian' /etc/os-release && which dpkg 2>/dev/null)], + [*/dpkg], [lb_cv_uses_dpkg="yes"]) ]) uses_dpkg=$lb_cv_uses_dpkg ]) -- 1.8.3.1