Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6764916rwp; Tue, 18 Jul 2023 05:44:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFC/QWWSv4hD/Dg9NNSY5kAjEkns60MWM+aeJbjEjmAyb30ACt3y4vdfpXZg8/9dFFjp29z X-Received: by 2002:aa7:c90f:0:b0:51d:8a68:ed33 with SMTP id b15-20020aa7c90f000000b0051d8a68ed33mr15239990edt.30.1689684263457; Tue, 18 Jul 2023 05:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689684263; cv=none; d=google.com; s=arc-20160816; b=0pzfOfU7XKt1+bdLJBBSqKfjWHlF2Fn+lYxoRhNBvQlGhskHFqBhrgBywS7KveBFJ9 f1wUHIELnfoePVayMBfXzC4O0MHo+q9wejJ1qDg1kPsQ7yEKPOU5VtcIQzR6KifEZ+Ly oIjZEvchcG79Blv6Gr0Pxc34hGUGGojyqUxvSUw/EAfKmNfjcWXdkRxvk+LGqFn1X4zR nbJ9rFfeJJIPuLYv4MZWnVBKEBE0hq0b+N1N/D2RzBx+2xXZ47CT+mT9vY06oTPoYj+S xdxelsYC976PJoCzaOBPkpVXoyV/jpBTgJ4yiMsBF5hiX9Kg5g20CwONRUC7t0XuFfjj Ftsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=CwaNFV9x320/u+ktK0fMJmv+jeprVYttE+NYQBLepI4=; fh=6xtZDm/98bfWZszEUpun36tJU9TJuVldntDS4QN1cVY=; b=g+dwZw7LsbcwKAFOpPB7iflv+rkqAATO7xSetNE/Pb8kI+XU1pth2tEz7tVXEBMsSK 6fkmd8Kh71u1GRt0RzyFpRfuzo6wbgQI/ob9RRcedBfLumE9DUWmVmEAywcwkfRmQtfL mWWhzvn/yr0BN+wcK/PWGfjTfhh2Fse9wrHVnAowukVtqr2cF1LkMfbhenKVniTFpnNl /SJa7HFS148IHwzBHUGqofmz4+dh2l+sCTFdrchU4EKdSZ4wIBFAaKypNIDQLUUaigEL crBDZWJ+vXAzKRCH9c+VK/IyqMxkdye0JfBAYAtTXfx7G/U6vkTQdfMYOQAjzq18v/Eu Rf9A== 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 b15-20020aa7c6cf000000b00521820ef02csi1102153eds.22.2023.07.18.05.43.58; Tue, 18 Jul 2023 05:44:23 -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 S230394AbjGRMRP (ORCPT + 99 others); Tue, 18 Jul 2023 08:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbjGRMRN (ORCPT ); Tue, 18 Jul 2023 08:17:13 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC53DE52; Tue, 18 Jul 2023 05:17:10 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id A8EAE588E7A03; Tue, 18 Jul 2023 14:17:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id A716C60E5C62D; Tue, 18 Jul 2023 14:17:08 +0200 (CEST) Date: Tue, 18 Jul 2023 14:17:08 +0200 (CEST) From: Jan Engelhardt To: =?UTF-8?Q?Michal_Such=C3=A1nek?= 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 v4 4/4] libkmod, depmod, modprobe: Make directory for kernel modules configurable In-Reply-To: <20230718102958.GW9196@kitsune.suse.cz> Message-ID: References: <20230711153126.28876-1-msuchanek@suse.de> <76o21q7n-8qo8-37p6-oqno-q08nqpos471@vanv.qr> <20230718084300.GU9196@kitsune.suse.cz> <81n281ns-s8on-rsrn-pp61-q28pn42ns531@vanv.qr> <20230718102958.GW9196@kitsune.suse.cz> User-Agent: Alpine 2.25 (LSU 592 2021-09-18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT 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 Tuesday 2023-07-18 12:29, Michal Suchánek wrote: >> -static const char *dirname_default_prefix = MODULE_DIRECTORY; >> +const char *dirname_default_prefix = MODULE_DIRECTORY; >> >> @@ -2943,6 +2944,9 @@ static int do_depmod(int argc, char *argv[]) >> free(out_root); >> out_root = path_make_absolute_cwd(optarg); >> break; >> + case 'M': >> + dirname_default_prefix = optarg; >> + break; >> case 'C': { >> size_t bytes = sizeof(char *) * (n_config_paths + 2); >> void *tmp = realloc(config_paths, bytes); > >That breaks kmod for the usrmerged distributions, though. Does it though? The *distro* has /lib -> /usr/lib, the *staging area* for installation does not. >[...] >Note: it will work either way at the times the module directory can be >accessed through the lib -> usr/lib compatibility symlink. The default >needs to be correct for the cases when the symlink is not provided. >So you could do > >make DEPMOD='depmod -M /lib/modules' That would be a workable situation.