From: Masahiro Yamada Date: Sat, 30 Sep 2017 01:10:07 +0000 (+0900) Subject: kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled X-Git-Tag: v4.15-rc1~49^2~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0b7f12f5912de636a9c1671ee343f31f21c42b2f;p=linux.git kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled When CONFIG_MODULES is disabled, make rpm-pkg / binrpm-pkg fails with the following message: The present kernel configuration has modules disabled. Type 'make config' and enable loadable module support. Then build a kernel with module support enabled. Do not install modules in the case. Also, omit the devel package. Signed-off-by: Masahiro Yamada --- diff --git a/scripts/package/mkspec b/scripts/package/mkspec index b341d5d8e793..d352a0188770 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -16,6 +16,12 @@ else S= fi +if grep -q CONFIG_MODULES=y .config; then + M= +else + M=DEL +fi + if grep -q CONFIG_DRM=y .config; then PROVIDES=kernel-drm fi @@ -30,6 +36,7 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \ # # Labels: # $S: this line is enabled only when building source package +# $M: this line is enabled only when CONFIG_MODULES is enabled sed -e '/^DEL/d' -e 's/^\t*//' <