linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-kbuild <linux-kbuild@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	Michal Marek <michal.lkml@markovi.net>,
	Chih-Wei Huang <cwhuang@linux.org.tw>
Subject: [PATCH] kbuild: check for /sbin/depmod installed
Date: Sun, 1 Jul 2018 10:12:44 -0700	[thread overview]
Message-ID: <1df7f847-484c-a368-9dc2-50d191f8be9b@infradead.org> (raw)

From: Randy Dunlap <rdunlap@infradead.org>

Verify that 'depmod' ($DEPMOD) is installed.
This is a partial revert of 620c231c7a7f (from 2012):
  ("kbuild: do not check for ancient modutils tools")

Fixes kernel bugzilla #198965:
https://bugzilla.kernel.org/show_bug.cgi?id=198965

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Chih-Wei Huang <cwhuang@linux.org.tw>
Cc: stable@vger.kernel.org # any kernel since 2012
---
 scripts/depmod.sh |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- lnx-418-rc2.orig/scripts/depmod.sh
+++ lnx-418-rc2/scripts/depmod.sh
@@ -10,10 +10,16 @@ fi
 DEPMOD=$1
 KERNELRELEASE=$2
 
-if ! test -r System.map -a -x "$DEPMOD"; then
+if ! test -r System.map ; then
 	exit 0
 fi
 
+if [ -z $(command -v $DEPMOD) ]; then
+	echo "'make *install' requires $DEPMOD. Please install it." >&2
+	echo "This is probably in the module-init-tools package." >&2
+	exit 1
+fi
+
 # older versions of depmod require the version string to start with three
 # numbers, so we cheat with a symlink here
 depmod_hack_needed=true



             reply	other threads:[~2018-07-01 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 17:12 Randy Dunlap [this message]
2018-07-02  1:23 ` [PATCH] kbuild: check for /sbin/depmod installed Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1df7f847-484c-a368-9dc2-50d191f8be9b@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=cwhuang@linux.org.tw \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=michal.lkml@markovi.net \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).