From patchwork Sun Jul 1 17:12:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10499639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30F0260532 for ; Sun, 1 Jul 2018 17:12:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11936287B9 for ; Sun, 1 Jul 2018 17:12:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04E1F287C2; Sun, 1 Jul 2018 17:12:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45D15287B9 for ; Sun, 1 Jul 2018 17:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964963AbeGARMv (ORCPT ); Sun, 1 Jul 2018 13:12:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45596 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965010AbeGARMt (ORCPT ); Sun, 1 Jul 2018 13:12:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x5kXwPwTXSAp5NRLmSnXsrEsbaqAPQxaKURKHvXJedo=; b=Xan1wICkXfDLY8zMeLEkPUJUt ZP3Mm4BKTLNLtaK/IFOR+3L2uWGfMfPL5uPgiLIYJMHgvHbaEhHyfl9v5jK8C35upXiK3C85b5J5e WxRqUIMapLPzHl7e8dGhIDOWjTCxp49TUIB4xCfPI/bRWMPcZ6kE+ty+fDGxra1PSFrU2DfTj6iMV Ja4rYBIuepOvrb6oUUDVyaczC5XT7ElwH9Zkn2a01kHIiWlIzbIBr+ZBtfo3Kndh/R80yPBX4kW/2 owmpmYq0/Qk2G8tnPnR5i5S+BEDZmKLz3dob6najzfbXm0miVALcz0ddwUs1WcIRWWBaE1ijrlKDm Q6yAL+2Sw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fZfu1-0001C5-Qr; Sun, 01 Jul 2018 17:12:45 +0000 To: linux-kbuild , Masahiro Yamada Cc: LKML , Lucas De Marchi , Michal Marek , Chih-Wei Huang From: Randy Dunlap Subject: [PATCH] kbuild: check for /sbin/depmod installed Message-ID: <1df7f847-484c-a368-9dc2-50d191f8be9b@infradead.org> Date: Sun, 1 Jul 2018 10:12:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap 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 Cc: Lucas De Marchi Cc: Michal Marek Cc: Chih-Wei Huang Cc: stable@vger.kernel.org # any kernel since 2012 --- scripts/depmod.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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