Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2497544rwp; Fri, 14 Jul 2023 07:06:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlEk7GBPWY7ums0xLC81jTjkWuQ9Ouh7/lCYvvqal0Baw3c83c4Str2fzsiRIjtoouJhDTYA X-Received: by 2002:a17:903:32c8:b0:1b8:1591:9f81 with SMTP id i8-20020a17090332c800b001b815919f81mr5850489plr.4.1689343604266; Fri, 14 Jul 2023 07:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689343604; cv=none; d=google.com; s=arc-20160816; b=dUMndTGivd00GcsxCDHqhjASiD7DRrBV1zcb0ieH8294wAzTnwx847F2z76TUpGdSw P4kJ7JruVWVXs1QLf26R4Zf25yRAz9i6iPHFX2NplglHANvkAtkhCC9YN81g1ZyI7kgP FpB+zuO5rvt3KFT/IMUvLDsyWoH/kXn3NZM7iHVwVxjxnnZnu1CDt1gfcOhzZva6syY4 w13QdRtzRoqq8Se7WMdLKVtYKN2YPT7nFoq0Mx6bcIPZSkpqRhVgI0VXeAwCo8AZwcA2 dwiMhA93BVH2+HJYtzvozWlfxPfaS9bjhkaiA+fU0bVG4BmYvpzCmrstkx4SRhponiqP uOEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=uusXqPnU9BJZkdbkGQMvC+BwXcbvaRXNQ6P+pmjd4Nw=; fh=SQ4UHaTqW/lqR9OJcdZkwBVRtjrY5AxJde/r1amJF3E=; b=SelXXlZTI0PMPwmP4k0BNlNXW5YszBsWfp+cmeRnHVKkbRp6pe1Ph0jWoZCmTY0k93 bgwvJjoBIH4/dDwuESWBoZnabcuxNDlD7DazrBnJXihzBrr7zohJqMcpxPn4h2XTJniW GH7uEepLbtlEobd3TrzyTR+Y4aVtMXgJeRUQs37EOeT6hOLU/iBnNCY+xU2JYk9pDIuj 8AjlchTf/ondGc1tr0ck3IzKVI+WcWzGuBbms6lINaXKD2dYGrCLsFpD1hOdfoz6mvQn IUFXoZCB5kNpE7XJDC2E/pRECpFtd+zM7CzrOHZxMDBBwnDvIMrEGOPMHHzEwqng8M8B yrOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a1709026ac800b001b7fb1aa81dsi6886804plt.289.2023.07.14.07.06.31; Fri, 14 Jul 2023 07:06:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235524AbjGNNy6 (ORCPT + 99 others); Fri, 14 Jul 2023 09:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235510AbjGNNy5 (ORCPT ); Fri, 14 Jul 2023 09:54:57 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B19226B2; Fri, 14 Jul 2023 06:54:55 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id A5FC258750830; Fri, 14 Jul 2023 15:54:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id A3CC360C22668; Fri, 14 Jul 2023 15:54:53 +0200 (CEST) Date: Fri, 14 Jul 2023 15:54:53 +0200 (CEST) From: Jan Engelhardt To: Michal Suchanek cc: linux-modules@vger.kernel.org, Takashi Iwai , Lucas De Marchi , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Jiri Slaby , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH kmod v2 4/4] libkmod, depmod, modprobe: Search for kernel modules under ${module_prefix} In-Reply-To: <20230712140103.5468-4-msuchanek@suse.de> Message-ID: References: <20230711153126.28876-1-msuchanek@suse.de> <20230712140103.5468-4-msuchanek@suse.de> User-Agent: Alpine 2.25 (LSU 592 2021-09-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 2023-07-12 16:00, Michal Suchanek wrote: >modprobe.d is now searched under ${prefix}/lib, add ${module_prefix} to >specify the directory where to search for kernel modules. > >With this distributions that do not want to ship files in /lib can also >move kernel modules to /usr while others can keep them in /lib. >+# Ideally this would be $prefix but default to empty for compatibility with earlier versions >+AC_ARG_WITH([module_prefix], >+ AS_HELP_STRING([--with-module-prefix=DIR], [directory in which to look for /lib/modules directory with kernel modules - typically '' or ${prefix}]), >+ [], [with_module_prefix=]) >+AC_SUBST([module_prefix], [$with_module_prefix]) Why stop there, let's make it fully configurable such that ./configure --with-module-prefix=/usr/lib/modules works. Then one can specify arbitrary paths without fearing of getting a /lib/modules tacked on anywhere down the line.