Skip to content

Commit

Permalink
Workaround Debian's fake System.map behavior
Browse files Browse the repository at this point in the history
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 openzfs#12862
  • Loading branch information
rincebrain authored and tonyhutter committed Feb 10, 2022
1 parent a35125e commit 2e3b3e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions module/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e3b3e3

Please sign in to comment.