linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: check for /sbin/depmod installed
@ 2018-07-01 17:12 Randy Dunlap
  2018-07-02  1:23 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-07-01 17:12 UTC (permalink / raw)
  To: linux-kbuild, Masahiro Yamada
  Cc: LKML, Lucas De Marchi, Michal Marek, Chih-Wei Huang

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: check for /sbin/depmod installed
  2018-07-01 17:12 [PATCH] kbuild: check for /sbin/depmod installed Randy Dunlap
@ 2018-07-02  1:23 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-07-02  1:23 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kbuild, LKML, Lucas De Marchi, Michal Marek, Chih-Wei Huang

2018-07-02 2:12 GMT+09:00 Randy Dunlap <rdunlap@infradead.org>:
> 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



I think depmod is required by 'make modules_install'

Is there any reason to make this ambiguous like 'make *install' ?




> +       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
>
>



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-02  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-01 17:12 [PATCH] kbuild: check for /sbin/depmod installed Randy Dunlap
2018-07-02  1:23 ` Masahiro Yamada

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).