From: Timothy Day Date: Tue, 13 Feb 2024 17:40:25 +0000 (+0000) Subject: LU-12019 build: remove global depmod.d conf from debs X-Git-Tag: 2.15.62~94 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=36da06650079edf29192529457ffa0631427b84e;p=fs%2Flustre-release.git LU-12019 build: remove global depmod.d conf from debs Lustre should not be creating a global depmod.d configuration file that affects the load order of all modules installed on the system. Yet, Lustre has a depmod.d configuration file that attempts to mirror the default configuration (the man page is identical for Debian): https://manpages.ubuntu.com/manpages/xenial/en/man5/depmod.d.5.html "By default, depmod will give a higher priority to a directory with the name updates using this built-in search string: "updates built-in" but more complex arrangements are possible and are used in several popular distributions." However, when we switched from: search updates built-in to: search updates/kernel built-in Ubuntu depmod was forced to prefer build-in modules, since the modules are not in `updates/kernel` as in Debian. If a user has third party modules installed on their system, this could make Ubuntu load the wrong module by default. This patch removes the lustre.conf depmod.d file. By leaving these load-order decisions to the distribution, this patch addresses the regression on Ubuntu. Fixes: 7ea4e0c ("LU-12019 build: Recognize Debian Kernel and set KMP dir") Test-Parameters: trivial clientdistro=ubuntu2204 Signed-off-by: Timothy Day Change-Id: I96fe1c0e64c48d045d46d62a10e8c8bd6ad2cb7d Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54025 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Thomas Stibor Reviewed-by: Oleg Drokin --- diff --git a/debian/postinst b/debian/postinst index 7f81f9a..9338dbe 100755 --- a/debian/postinst +++ b/debian/postinst @@ -9,10 +9,4 @@ # Script run before Lustre module/utils are installed # -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/kernel built-in" > ${LUSTRE_DEPMOD_FILE}; } - depmod -a diff --git a/debian/postrm b/debian/postrm index eae5bbc..1f6241f 100755 --- a/debian/postrm +++ b/debian/postrm @@ -9,11 +9,4 @@ # Script run before Lustre module/utils are removed # -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