From patchwork Fri Jan 26 14:43:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 13532779 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07E181BF53 for ; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280230; cv=none; b=NTeh0p0vsiHDHr/Ja5zxJVPr/+nsExG1bZFFL8zQtswxVKjPPG8NT9a1tCSO3OmT+/W+FpMk6YqB+J8KGzjg0KYlRDT6k8LVYeHBFvMzTdSOI18iW0uEW3lFVwTbEhgfqN3uKdyr/Ac2yi2mkYnBfvi2EQU8Ed2KsyLDa4Q56OM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280230; c=relaxed/simple; bh=5CQ82m4EJToERg+iBBjvGV5URcWOmtQDjUeQjnjX2Vo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tuKgIdzfFrqlGqADrSyX6P6rMHcSfiRGk+aVYjCeYFpbvpmXWh+WVj3blgUo7ZyVkH898wypAqNGDgDDOsvan2LZAoHgNe1AuXPP4WtIsGao8rjxsgfDQdwLP29Qgat6CO1hsCIb30g3C1GmNY+l043xPV72TzeLy67xLw+e/eo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fmXVe83j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fmXVe83j" Received: by smtp.kernel.org (Postfix) with ESMTPS id A9C87C4166A; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706280229; bh=5CQ82m4EJToERg+iBBjvGV5URcWOmtQDjUeQjnjX2Vo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fmXVe83jjtoHIJSYvlekR9cKHIMZVWpeE3rV9u90I8uTsxw2ZYTtR9HjNIRsFodUZ imMpos+PLKJFrHC1GkPRSYjQI/HzPPx/MVpvfeGq7j7V36Ab6JmvsRrA6c1gDQNYiJ ZXCCqIkc8+ShcSfqij7XZitHwBd0zN4k8xRhdVsY7G+g4WGclDuNUXxZA5RJETBJ9q T1ZnCwQl55RHpjq/ASr3kBzvzI5MwGKEjOylFUTj1jWNd15ul9hWKl68fWQ/0ssU4j UApvZOtm7/xXfniHIew63ieHRJFA3BGYas2u/USxI+kXuHeK7czVO1A5L4D075TroR 0io77Um4vuLSQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9195FC47422; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Fri, 26 Jan 2024 14:43:50 +0000 Subject: [PATCH 1/2] configure: tweak the module_directory help string Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240126-master-v1-1-6257d039a30a@gmail.com> References: <20240126-master-v1-0-6257d039a30a@gmail.com> In-Reply-To: <20240126-master-v1-0-6257d039a30a@gmail.com> To: linux-modules@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706280230; l=981; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=odADJmMZHmCPpeUZVqD+kpI2Vt0oc+W3kHqA6aS9tIY=; b=AUcT2Of6cwHxxOx17QvN93TZCuSf+he/xRj0n3Qx5IYkq00JgFeKhRlmtOLzPoUJPxcu5rohS dBY/mzpSSSzBka4yGK8799Q4nadMspw9Hz+DIByk1zSvHYeY4xLcM3x X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov Drop the somewhat misleading ${prefix}/lib/modules and explicitly mention what's the default. Signed-off-by: Emil Velikov --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index de01e08..ab0b303 100644 --- a/configure.ac +++ b/configure.ac @@ -93,7 +93,7 @@ AC_SUBST([rootlibdir], [$with_rootlibdir]) # Ideally this would be $prefix/lib/modules but default to /lib/modules for compatibility with earlier versions AC_ARG_WITH([module_directory], - AS_HELP_STRING([--with-module-directory=DIR], [directory in which to look for kernel modules - typically '/lib/modules' or '${prefix}/lib/modules']), + AS_HELP_STRING([--with-module-directory=DIR], [directory in which to look for kernel modules @<:@default=/lib/modules@:>@]), [], [with_module_directory=/lib/modules]) AC_SUBST([module_directory], [$with_module_directory]) From patchwork Fri Jan 26 14:43:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 13532781 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07DF01BDF8 for ; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280230; cv=none; b=gZ+iL0ez5Gw+j8vpTk2D1BwSl7fen2GnI5dIq6adc8lpX+HNxj7RBGa2u3YMycAFjcm9pwdFKPvqK++bfP1jKlo/iS9vUybnZOZsDCIF41OWC8/dm8J7J89ftCh1C27uj3dLnlMLTo8Zj+BqiO+8c5RXrIXTcbiXz5bbUG5Mgm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280230; c=relaxed/simple; bh=iP3YAJTUyB2rRlKlTQsMxA8BAo5WcM+lG3V0XkqEfVM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qh1m45A7B+btFdYYR/m2Jdkmshg8oscdzACl65hc1CLy2gAGD+IYDPCzzaBz+8I5A5nq/SmMKJueWP/J71cgjDE4LI4uPf2t6oVnItLyq8KoIpVWCVwojwaw7rliyEtV53AhXt+YzInNaZngjeCSWhheIvdxkrcdwBm2hpB06C4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WXgJKuKU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WXgJKuKU" Received: by smtp.kernel.org (Postfix) with ESMTPS id B3BADC43142; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706280229; bh=iP3YAJTUyB2rRlKlTQsMxA8BAo5WcM+lG3V0XkqEfVM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WXgJKuKUohWN61hUV7jSFiAbJSjNH54GxM+OfzK0IXOavLU87e/l9B2tUHgFxsXK7 BdrfulUpvsc3YstrjCl9oWppcUJ+b7OLSnJw29n+bY6sZjOWCK8qmDhgcd3Dn5rcn5 AI2Fcc1/8Q3+WALHzX4Cy8mfOGcZdeuKQpvFmhvaBXsV8Ncb9rB26wiyw/91fBs6ky St7b4V5s8otVlpfo9fToPCQNTxuKKIARfJpGqPD18PvnDFd16GZAjcJXjCxyRZV29M VZgKnM4eBkQNI0iu1bUF3gf03yj4X2EfgBeXNx17R0aSGXrx4vJV6QLsSf8dvbT7Uo mow6IJvEQc1zA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C2FEC48286; Fri, 26 Jan 2024 14:43:49 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Fri, 26 Jan 2024 14:43:51 +0000 Subject: [PATCH 2/2] make: install/uninstall tools symlinks to kmod Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240126-master-v1-2-6257d039a30a@gmail.com> References: <20240126-master-v1-0-6257d039a30a@gmail.com> In-Reply-To: <20240126-master-v1-0-6257d039a30a@gmail.com> To: linux-modules@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706280230; l=1402; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=N6QdxuIRatl9gn+qNQ/NgGZ033RgojWqbfTqQeySBZI=; b=9YYI/y3zGT94hO2jfDdxyFiWlQf//iiBC1y14zCRLRWd7eog/qpW5Y17kwKa1E9AHWtMUKkuE cCHRtFNsLCHCu2nmC0o96Dms78VVujln/I5K8fjnUxfIhd5oDcd7Wr/ X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov Currently we create symlinks like modprobe (pointing to kmod), during the normal `make` build. Although those were never installed. Add a few lines in the install-exec-hook, to ensure they're present at `make install` time. Thus one can actually use those without additional changes. As an added bonus, distributions can drop the similar hunk from their packaging. Signed-off-by: Emil Velikov --- Out of curiosity: are there any plans about releasing v32? I'm interested in the recent /usr/lib/modules (module_directory) patches. Thanks o/ --- Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am index 4062d81..a22d1b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -111,9 +111,19 @@ install-exec-hook: ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \ mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \ fi +if BUILD_TOOLS + for tool in insmod lsmod rmmod depmod modprobe modinfo; do \ + $(LN_S) $(bindir)/kmod $(DESTDIR)$(bindir)/$$tool; \ + done +endif uninstall-hook: rm -f $(DESTDIR)$(rootlibdir)/libkmod.so* +if BUILD_TOOLS + for tool in insmod lsmod rmmod depmod modprobe modinfo; do \ + rm -f $(DESTDIR)$(bindir)/$$tool; \ + done +endif if BUILD_TOOLS bin_PROGRAMS = tools/kmod