From: Timothy Day Date: Fri, 6 Jan 2023 20:56:13 +0000 (+0000) Subject: LU-13530 build: Add kernel version to depmod X-Git-Tag: 2.15.54~48 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=98338572a671e1a9c227a8589f7a9b5972b924bf;p=fs%2Flustre-release.git LU-13530 build: Add kernel version to depmod The depmod commands in the postrm and postinst scripts should use the kernel version the package is built against. Otherwise, depmod will use the current kernel version - which might be different. This patch also adds a line indicating that the file has been modified. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I355420a85ea0ed301433816588758197795b5ede Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49573 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Aurelien Degremont Reviewed-by: Thomas Stibor Reviewed-by: Oleg Drokin --- diff --git a/debian/rules b/debian/rules index 074b59a..91db28f 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,7 @@ # # Copying and modification is unlimited, provided that the modified # version is marked as being modified. +# (This version has been modified from the original) # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 @@ -534,6 +535,9 @@ binary-modules: prep-deb-files dh_installmodules -p $(PKGNAME) dh_compress -p $(PKGNAME) dh_fixperms -p $(PKGNAME) + sed "s/depmod -a/depmod -a $(KVERS)/" $(CURDIR)/debian/postinst > $(CURDIR)/debian/$(PKGNAME).postinst + sed "s/depmod -a/depmod -a $(KVERS)/" $(CURDIR)/debian/postrm > $(CURDIR)/debian/$(PKGNAME).postrm + chmod +x $(CURDIR)/debian/$(PKGNAME).postinst $(CURDIR)/debian/$(PKGNAME).postrm dh_installdeb -p $(PKGNAME) dh_gencontrol -- -v$(VERSION) dh_md5sums -p $(PKGNAME)