Whamcloud - gitweb
LU-13530 build: Add kernel version to depmod 73/49573/4
authorTimothy Day <timday@amazon.com>
Fri, 6 Jan 2023 20:56:13 +0000 (20:56 +0000)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Jan 2023 00:35:34 +0000 (00:35 +0000)
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 <timday@amazon.com>
Change-Id: I355420a85ea0ed301433816588758197795b5ede
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49573
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Thomas Stibor <thomas@stibor.net>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
debian/rules

index 074b59a..91db28f 100755 (executable)
@@ -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)