From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C5EBEB64DC for ; Fri, 14 Jul 2023 13:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235606AbjGNN5N (ORCPT ); Fri, 14 Jul 2023 09:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235512AbjGNN5L (ORCPT ); Fri, 14 Jul 2023 09:57:11 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B02B26B5; Fri, 14 Jul 2023 06:57:10 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 110AA220E3; Fri, 14 Jul 2023 13:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689343029; 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=vsHcxIMf2mArNErpDripO+Zo0yyfVXNRaCZe3moXKDc=; b=hNo9xdg+cL8aAxhgs69udnW0dajB4lkoV7HsCSp+xiMH8hxDeLNYEeAywBBNNZXzNHocmN FHWe5mJq/JwXObqD5m33US4dUjHXZerYAfzLW21k+LZ/MUE5wQ/DfY47xHyQZijRiRqVvd hDo88VKPAqjUSNK92gczh+kjsTDE38w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689343029; 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=vsHcxIMf2mArNErpDripO+Zo0yyfVXNRaCZe3moXKDc=; b=FvayFZ7oGoadJjLOrTNL/eMEyahi0UAu3h+CDRjwNO2mdTEh0yRjLewRvG3B6y5qyOkLmJ QSstG1VjFjbyhoDQ== 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 AA1462C142; Fri, 14 Jul 2023 13:57:08 +0000 (UTC) Date: Fri, 14 Jul 2023 15:57:07 +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 v3] depmod: Handle installing modules under a prefix Message-ID: <20230714135707.GI9196@kitsune.suse.cz> References: <30d8c675-e769-e567-a81f-c1b59c66ad67@suse.com> <20230714122111.7528-1-msuchanek@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, Jul 14, 2023 at 03:38:18PM +0200, Jan Engelhardt wrote: > > On Friday 2023-07-14 14:21, Michal Suchanek wrote: > > >Some distributions aim at not shipping any files in / outside of usr. > > > >The path under which kernel modules are installed is hardcoded to /lib > >which conflicts with this goal. > > > >+MODLIB = $(INSTALL_MOD_PATH)$(KERNEL_MODULE_PREFIX)/lib/modules/$(KERNELRELEASE) > > Ok, so if the problem statement is that hardcoded paths are bad, then why > continue to hardcode the "/lib/modules" fragment? Just make it so that > KERNEL_MODULE_PREFIX can be set to the exact string "/usr/lib/modules" and not > just "/usr". That's certainly an option. The feature is modelled after the installation prefix option that can move the whole filesystem hierarchy of installed files under /usr/local, /opt, or any other directory of choice. However, in that case the subdirectories in the hierarchy can be configured as well while in this case /lib/modules remains hardcoded. Making it possible to set the whole path is generally more flexible although there is no need to set the later part for this particular use case. Thanks Michal