Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6563952rwp; Tue, 18 Jul 2023 02:19:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlEguwrhoyotvsd/dtqxACsmWVtSVQCksMHZF22ys+Lzb1gnZ+JlEJF13nVpy7LIXrnfMoVH X-Received: by 2002:a05:6a20:3952:b0:135:9b84:cf43 with SMTP id r18-20020a056a20395200b001359b84cf43mr1417954pzg.28.1689671945685; Tue, 18 Jul 2023 02:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689671945; cv=none; d=google.com; s=arc-20160816; b=ckN0sGhXPoF9gziBDXa26k4isVbYmRqd898uJ83ZUARV6nDUUIzlVGktbpcq0aoAnH XbB8wD9qUNPG/kJaT+UijEN7melOv25dk4Zf/kmCWdVG/4s9wGkmQgjFS5F9/R1HQIZ8 O2IIPnDaXIK0cSHebqN+3IUEopi32omg3nEBsFYXpPXGGmYB+Cx8wmE2tpy43G8YFUMi 5kTHN/n0UoiaxZL6jDohB261Ubh2IbvicNyHS48q5uLLvlxeY2sn+9zD9aLp/+6ikFJP ++ixLq7Zu38vfzgm/hE5iGhzK1Vib7surdCCi4Uu7EKzsq18RmVifDL0tINClUMu7R22 ONQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=UmZNxaOE9WdI5cQjddt15xDrk872x/oU18U9Nk98KSg=; fh=osrFv9NYlMUPZNYHLxGA+QcrTwVGCoeLQZcEEEWoxUM=; b=tSGhLmIrkXk/TzkvZL7gRf4KnOBbAPVW0Vf4ZQqrhqFGEazDHEEioq9qAZ3kiw5sow +eGUrKvMmwytSIP5royb2pqscUI0QIzJZd9lcq7vPeUSKvUwQppUdg0g7yqs2L0YhB4X 4mnUR98GmPMa5qTxL2rHWZ83Z0KGadkdsprnZ1M/cPbxMwlUcL1NZ1N9q15uG0K35fGo ErHcUHoBNJqN+UyQUU+BxpQ6mxPMj22uDAhF/WOrqgI36SRSatBmVDpiPCQ34fqBw00U F+XJ/f1aZchvn8C72Y9Y7z+/UWp3uThAbbJy9jafgTO2MzbWGzxCvBw0IGK0OqwNp/ZA lCqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="f+dFVOm/"; dkim=neutral (no key) header.i=@suse.de header.b=36fhTgkk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a056a00219400b0068224c12950si1281646pfi.64.2023.07.18.02.18.52; Tue, 18 Jul 2023 02:19:05 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="f+dFVOm/"; dkim=neutral (no key) header.i=@suse.de header.b=36fhTgkk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbjGRInT (ORCPT + 99 others); Tue, 18 Jul 2023 04:43:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbjGRInE (ORCPT ); Tue, 18 Jul 2023 04:43:04 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64969FA; Tue, 18 Jul 2023 01:43:03 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1C586218BB; Tue, 18 Jul 2023 08:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689669782; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UmZNxaOE9WdI5cQjddt15xDrk872x/oU18U9Nk98KSg=; b=f+dFVOm/4QVXMzGLzXUb4eQQ1GKgTuZP0EVzy7/BdVoUrgrMqRcEPRXWAp7MNXc7UVCx60 2a0s5O4NVE5FN/BbyEq1lY0SH53IOPmqJQKiLfWCEpkSr1TKE0SWI8AyTKyAy/2aDSAGH4 jiOoPHonJLUHTkka6BvPm/7P45+jMe8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689669782; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UmZNxaOE9WdI5cQjddt15xDrk872x/oU18U9Nk98KSg=; b=36fhTgkkcWOWVytO88TXvO1ozHe2+5oc8tMrzpz8PezOjZhO8mLekp/NYSnmtAPRY7jmNJ Xhh5EFUZkYrJE5BQ== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id BA2DB2C142; Tue, 18 Jul 2023 08:43:01 +0000 (UTC) Date: Tue, 18 Jul 2023 10:43:00 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Jan Engelhardt Cc: linux-modules@vger.kernel.org, Takashi Iwai , Lucas De Marchi , Michal =?iso-8859-1?Q?Koutn=FD?= , Jiri Slaby , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH kmod v4 4/4] libkmod, depmod, modprobe: Make directory for kernel modules configurable Message-ID: <20230718084300.GU9196@kitsune.suse.cz> References: <20230711153126.28876-1-msuchanek@suse.de> <76o21q7n-8qo8-37p6-oqno-q08nqpos471@vanv.qr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76o21q7n-8qo8-37p6-oqno-q08nqpos471@vanv.qr> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hello, On Mon, Jul 17, 2023 at 09:28:30PM +0200, Jan Engelhardt wrote: > > On Monday 2023-07-17 12:39, Michal Suchanek wrote: > > >modprobe.d is now searched under ${prefix}/lib, add ${module_directory} 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. > > This patch breaks kernel builds/installation. > > * assume $distro has given me a kmod that has your submission included, > and such kmod was ./configure'd --with-module-directory=/usr/lib/modules > > With such a kmod, the module installation of current and past kernels > is not possible, in other words, ** bisecting kernels ** is broken: It might be nice to provide backwads compatibility with earlier configurations. However, if it comes at the cost of making the implementation more complex and future maintenance more difficult it might not be such a great idea. So far I have not seen a proposal how to do it nicely. You can use any of the number of workarounds that have been used for installing kernels on usrmerged distributions up until now. sed -i -e s,/lib/modules,/usr/lib/modules, Makefile scripts/depmod.sh is one. Failing depmod is not critical, you can fix it up after the fact once the modules are deployed on the test system. You can also build a differently configured kmod for the purpose and pass it with DEPMOD= to the kernel build. Thanks Michal