All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Suchanek <msuchanek@suse.de>
To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Cc: Michal Suchanek <msuchanek@suse.de>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH] Revert "kbuild: Hack for depmod not handling X.Y versions"
Date: Tue, 18 Jul 2023 18:58:43 +0200	[thread overview]
Message-ID: <20230718165848.14392-1-msuchanek@suse.de> (raw)

Remove hack for ancient version of module-init-tools that was added in
Linux 3.0.

Since then module-init-tools was replaced with kmod.

This hack adds an additional indirection, and causes confusing errors
to be printed when depmod fails.

Reverts commit 8fc62e594253 ("kbuild: Do not write to builddir in modules_install")
Reverts commit bfe5424a8b31 ("kbuild: Hack for depmod not handling X.Y versions")

Link: https://lore.kernel.org/linux-modules/CAK7LNAQMs3QBYfWcLkmOQdbbq7cj=7wWbK=AWhdTC2rAsKHXzQ@mail.gmail.com/

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 scripts/depmod.sh | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index 3643b4f896ed..fca689ba4f21 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -23,33 +23,8 @@ if [ -z $(command -v $DEPMOD) ]; then
 	exit 0
 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
-tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX)
-mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE"
-if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then
-	if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \
-		-e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then
-		depmod_hack_needed=false
-	fi
-fi
-rm -rf "$tmp_dir"
-if $depmod_hack_needed; then
-	symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE"
-	ln -s "$KERNELRELEASE" "$symlink"
-	KERNELRELEASE=99.98.$KERNELRELEASE
-fi
-
 set -- -ae -F System.map
 if test -n "$INSTALL_MOD_PATH"; then
 	set -- "$@" -b "$INSTALL_MOD_PATH"
 fi
-"$DEPMOD" "$@" "$KERNELRELEASE"
-ret=$?
-
-if $depmod_hack_needed; then
-	rm -f "$symlink"
-fi
-
-exit $ret
+exec "$DEPMOD" "$@" "$KERNELRELEASE"
-- 
2.41.0


             reply	other threads:[~2023-07-18 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 16:58 Michal Suchanek [this message]
2023-07-23 13:38 ` [PATCH] Revert "kbuild: Hack for depmod not handling X.Y versions" 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=20230718165848.14392-1-msuchanek@suse.de \
    --to=msuchanek@suse.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.