Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1216436rdb; Wed, 6 Dec 2023 11:48:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK6nf8Ht760f3DwGYVQToS5R/0D8xXO06wclj6BCwJXA6cxaMMTB3M069ciMQawi4p3Ots X-Received: by 2002:a17:902:ecc7:b0:1cf:cd35:f823 with SMTP id a7-20020a170902ecc700b001cfcd35f823mr1611260plh.65.1701892110431; Wed, 06 Dec 2023 11:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701892110; cv=none; d=google.com; s=arc-20160816; b=oHciCfFLwURx0Zoza/qJRyZ6eSMZ/FyWGxFnsQQU/jmgv37S89KMPpdJe8uRRFjkxN oaBI4Zkw9NOTKr0f/neXoq6prPL/VH7atr/11HJtLsp5xSGiPQrISo0DHdvgV2xwKP9s RfMs9YxGAPKzxEMafIZ0P1vf9SkoKA8WSjZe3lJ+diTJ37KpYU7IhBhkDCGFINohNwHh ZkR7adBtMLydoAy3DFghHZNBfVWlpoL/KbsBhi0w09T/wKEXwQQkEi6EA6+zWXJ/HBfu tSiQr25QALkdxnRSTxNQobUMRTGayjnLAqSwj/3C3zK7VPBNTlt7jXJzn7i+2iPIkRq9 pC4A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=WRWb+HJrZK0+DeQKF7G3lI1mi1x+bXsZpMkFr/DHwLo=; fh=kEv7l62vJ3XIkrK43m8eV/ZlyXa9griX1gawn6N+7MU=; b=bym+3DWn4M93YdOtotZJKQCKxqXIHPKPY0qtLr0BKd4J7PysEFWh3zgRtpG5N8yzxa mD+mSQBfa6vTbhEr2o5Av2LdV8UBWdV49/EGNg9MhZzH3QQfq/9K+BnkYnNGSOC+qpf1 6JEOfqG/eKJGAQPvJmhhoMmHqHdczw0X87Izr0MMN2hGNPzocpx3I3If9ZLAH4/AYae9 K7A8iZeQLkjsKrgmUg/11BaqZ4qXF1usNBbD3nzFDbEJep9x8rmOYQvSIfFmTF8v73vc 6c6m1SGgpfQk8uqhFgkWH7D+8BGTrEttr3rHseTcs9zf++2bm9FfREG0eVhHuKdVxK0l WhXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=x6K1kx8C; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id p2-20020a170902e74200b001d0b6d1d463si275008plf.351.2023.12.06.11.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 11:48:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=x6K1kx8C; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4252F83B0088; Wed, 6 Dec 2023 11:48:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442813AbjLFTsD (ORCPT + 99 others); Wed, 6 Dec 2023 14:48:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379438AbjLFTr7 (ORCPT ); Wed, 6 Dec 2023 14:47:59 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7720FD3; Wed, 6 Dec 2023 11:48:05 -0800 (PST) Received: from kitsune.suse.cz (unknown [10.100.12.127]) by smtp-out2.suse.de (Postfix) with ESMTP id D907D1FD38; Wed, 6 Dec 2023 19:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1701892083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WRWb+HJrZK0+DeQKF7G3lI1mi1x+bXsZpMkFr/DHwLo=; b=x6K1kx8CbsvgZuyz896cRajvdVXvkWeCINL7yDq/BxZUEe98u1JRDk1xb8PPi6uOWycEoL 90KJAuAYJ/uiPOnRnGZMeya5oQgwkMcu9HXgVUBAcwNyYHfIKnCbBUYryjaDUWAmyYknf6 kY5O9TBp88gAI+G4w++EdT8StxRCvp4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1701892083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WRWb+HJrZK0+DeQKF7G3lI1mi1x+bXsZpMkFr/DHwLo=; b=j+qDcBrV+ldOxKEIHrJohbeQHnGbUd0pXC1tKDZbmZYlmV2mQ9AHlrgMHFNSeMJojaUMfE CkypdC6TgBInaVCg== From: Michal Suchanek To: linux-modules@vger.kernel.org Cc: Michal Suchanek , Takashi Iwai , Lucas De Marchi , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Jiri Slaby , Jan Engelhardt , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB Date: Wed, 6 Dec 2023 20:47:52 +0100 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.40 Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [3.40 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLbjsaozyn1c4dqqoh4tzemsye)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[suse.de,suse.com,gmail.com,inai.de,kernel.org,google.com,fjasle.eu,vger.kernel.org]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 11:48:25 -0800 (PST) The default MODLIB value is composed of three variables MODLIB = $(INSTALL_MOD_PATH)$(KERNEL_MODULE_DIRECTORY)/$(KERNELRELEASE) However, the kernel.spec hadcodes the default value of $(KERNEL_MODULE_DIRECTORY), and changed value is not reflected when building the package. Pass KERNEL_MODULE_DIRECTORY to kernel.spec to fix this problem. Signed-off-by: Michal Suchanek --- Build on top of the previous patch adding KERNEL_MODULE_DIRECTORY --- scripts/package/kernel.spec | 8 ++++---- scripts/package/mkspec | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec index 3eee0143e0c5..12996ed365f8 100644 --- a/scripts/package/kernel.spec +++ b/scripts/package/kernel.spec @@ -67,7 +67,7 @@ cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEA %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE} cp .config %{buildroot}/boot/config-%{KERNELRELEASE} -ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/build +ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}%{KERNEL_MODULE_DIRECTORY}/%{KERNELRELEASE}/build %if %{with_devel} %{make} %{makeflags} run-command KBUILD_RUN_COMMAND='${srctree}/scripts/package/install-extmod-build %{buildroot}/usr/src/kernels/%{KERNELRELEASE}' %endif @@ -98,8 +98,8 @@ fi %files %defattr (-, root, root) -/lib/modules/%{KERNELRELEASE} -%exclude /lib/modules/%{KERNELRELEASE}/build +%{KERNEL_MODULE_DIRECTORY}/%{KERNELRELEASE} +%exclude %{KERNEL_MODULE_DIRECTORY}/%{KERNELRELEASE}/build /boot/* %files headers @@ -110,5 +110,5 @@ fi %files devel %defattr (-, root, root) /usr/src/kernels/%{KERNELRELEASE} -/lib/modules/%{KERNELRELEASE}/build +%{KERNEL_MODULE_DIRECTORY}/%{KERNELRELEASE}/build %endif diff --git a/scripts/package/mkspec b/scripts/package/mkspec index ce201bfa8377..e952fa4f2937 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -24,6 +24,7 @@ fi cat<