diff options
author | Rich Ercolani <[email protected]> | 2021-12-17 15:43:13 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-17 12:43:13 -0800 |
commit | f68b9c81c8cf362e87655509c692dd8848c83732 (patch) | |
tree | 934e35982f77f1f4e134d21bcf1ca7d405f94ace /module/Makefile.in | |
parent | eecd3f1a2184282a389440f102f756aab900da47 (diff) |
Workaround Debian's fake System.map behavior
Debian ships fake System.map files by default, leading to the
invocation of depmod with them to flood you with errors about
missing symbols.
Let's notice and not do that.
Reviewed-by: Ahelenia ZiemiaĆska <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #12862
Diffstat (limited to 'module/Makefile.in')
-rw-r--r-- | module/Makefile.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/Makefile.in b/module/Makefile.in index b15ab9109..b47ee73b8 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -90,7 +90,15 @@ modules_install-Linux: if [ -n "$(DESTDIR)" ]; then \ find $$kmoddir -name 'modules.*' | xargs $(RM); \ fi + @# Debian ships tiny fake System.map files that are + @# syntactically valid but just say + @# "if you want system.map go install this package" + @# Naturally, depmod is less than amused by this. + @# So if we find it missing or with one of these present, + @# we check for the alternate path for the System.map sysmap=$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \ + { [ -f "$$sysmap" ] && [ $$(wc -l < "$$sysmap") -ge 100 ]; } || \ + sysmap=$(INSTALL_MOD_PATH)/usr/lib/debug/boot/System.map-@LINUX_VERSION@; \ if [ -f $$sysmap ]; then \ depmod -ae -F $$sysmap @LINUX_VERSION@; \ fi |