Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3620257rdb; Sun, 10 Dec 2023 13:18:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiVERUAanREY1X0kB0BasefJi3wShV4u3Ex4Hd+OSQsW1SUtE6OdXMbowtMdLi1mib6PLq X-Received: by 2002:a05:6a20:938e:b0:190:85d9:9d48 with SMTP id x14-20020a056a20938e00b0019085d99d48mr4217725pzh.110.1702243098586; Sun, 10 Dec 2023 13:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702243098; cv=none; d=google.com; s=arc-20160816; b=DRS7Bcm5fQwM/KzO6uop28l3x6DIjHFJr0csfuJlLy4HnImKHT/ozIpe8r3QCT35YF TLsDWKmTiQ6dEmi12Ta1BBn4p2XURJP4X0gEHHWLEddSUjllVKGrb8Co17CyWQvdGx6/ vdV5DN/ls7zzUOtQV8JfSm4OgcwcWD6oA1bQKwgG78Z1zo1/4WtgSXKjAZWEncDKoMFQ Bi/2WLY8Ejo+8Z2DPKkh8k5b6I/+4lnTPmxb8ZwiKmuozlDLLFsE580WWjcY4iDMTSAq z24JD/1vlKW6S46lcDEbTOrdgC3GyNhKWp3z54HhqiWHHBng0AOz0QXOb8WuMm3uy5vx hssg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=V4ltyg2yJt/1ZOBAunN1bErd5ePpqdQr2H7j8y7SktI=; fh=Truqr19bsBHlZipx1NMX4lNb7Kaad+Z0v/m3f4t6n04=; b=pcuQ4wbK6g6RCLFE1zLOxo44Usc3nthWgo6adGxwBbC+u4jrdpx2VEQQOKbJCeciV3 J9huEM9FCFXBTa9DwGbChElku13uLo9thr65ujICkxmV+HOL/UXHtOoq5lspgEErqAbQ XQfLlxta9CB8Syj4UFZmA2QlggpKni5eOzREoBh+3pDlew1Yq9zhaLeaiRwYRmw9mRZS dWACq3G+7hpc5E4LXoP4VHK6j33niU7K+jltHR9vctVVLw134UbjX9AhKyHuMD8b3xIl 2OV1VMokQODQNKkT0vZxbC/Fwb8k1zlPIgrXqycXbCO6qW1HwpovFLIdMwu7FEVx7LFu imkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RUhWaSqD; dkim=neutral (no key) header.i=@suse.de header.b=j+buDAjy; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=s9yiXYR2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xWBkh2TS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id n7-20020a654507000000b005c6bd30ec26si4971496pgq.449.2023.12.10.13.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 13:18:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=RUhWaSqD; dkim=neutral (no key) header.i=@suse.de header.b=j+buDAjy; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=s9yiXYR2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=xWBkh2TS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 587D48057DBA; Sun, 10 Dec 2023 13:18:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbjLJVI6 (ORCPT + 99 others); Sun, 10 Dec 2023 16:08:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231837AbjLJVI5 (ORCPT ); Sun, 10 Dec 2023 16:08:57 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0635E9; Sun, 10 Dec 2023 13:09:03 -0800 (PST) Received: from kitsune.suse.cz (unknown [10.100.12.127]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 41F661F8A4; Sun, 10 Dec 2023 21:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702242542; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V4ltyg2yJt/1ZOBAunN1bErd5ePpqdQr2H7j8y7SktI=; b=RUhWaSqDzWQWFvZeKeOUAd7GOFqlt4eKcYo1cbQuqJCBb5KM5OVsXycBjVAXsFluhUMtAt PBcsvxKF2x3YErkeFGjr3Y2pQGTV4bH6F6Jy0/jK2vPX3nvbOvQE9z41jjykvxo8240bSQ XnyvJy1/R6ke85z2BSiakBNxNk/racU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702242542; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V4ltyg2yJt/1ZOBAunN1bErd5ePpqdQr2H7j8y7SktI=; b=j+buDAjyRGVAZoSVQmj+N8q6GT0eS+/3XNX7ZmiQkctwthA7QTCz1sM+amh33VRA4YctWK L4CYx92emBQTRwBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702242540; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V4ltyg2yJt/1ZOBAunN1bErd5ePpqdQr2H7j8y7SktI=; b=s9yiXYR2m3qxQObIZf/QMsRdCclnam7Fy2jQZb5tYwTxfuOwbaBmPQ5ppJzHTmDKScBCpc z2IlET4yPCUGohPrSuvUSR42ZdGHog3MjF8vwUX1kri6FxJjTpsynb3PqCnOlBbRnAaU8h sl77qTui8PKP6Ddj9Vh1ShqGYy77JkU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702242540; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V4ltyg2yJt/1ZOBAunN1bErd5ePpqdQr2H7j8y7SktI=; b=xWBkh2TSWg65+l+NmXF/GbrOig+bC7+q1L20sKhdeTZzEzxINMMuYM6l2Gdjv715PzIHSW FoS+EpsRbX/eMrDw== Date: Sun, 10 Dec 2023 22:08:59 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Masahiro Yamada Cc: linux-modules@vger.kernel.org, Takashi Iwai , Lucas De Marchi , Michal =?iso-8859-1?Q?Koutn=FD?= , Jiri Slaby , Jan Engelhardt , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB Message-ID: <20231210210859.GN9696@kitsune.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Level: X-Spam-Score: -2.72 X-Spamd-Result: default: False [-2.72 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-0.998]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.12)[-0.587]; RCPT_COUNT_TWELVE(0.00)[12]; DBL_BLOCKED_OPENRESOLVER(0.00)[system.map:url,suse.de:email]; 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)[vger.kernel.org,suse.com,gmail.com,inai.de,kernel.org,google.com,fjasle.eu]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Level: X-Spam-Score: -2.72 Authentication-Results: smtp-out2.suse.de; none 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 pete.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 (pete.vger.email [0.0.0.0]); Sun, 10 Dec 2023 13:18:15 -0800 (PST) On Mon, Dec 11, 2023 at 03:44:35AM +0900, Masahiro Yamada wrote: > On Thu, Dec 7, 2023 at 4:48 AM Michal Suchanek wrote: > > > > 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 > > > The SRPM package created by 'make srcrpm-pkg' may not work > if rpmbuild is executed in a different machine. That's why there is an option to override KERNEL_MODULE_DIRECTORY? Thanks Michal > > > > %{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} > KERNEL_MODULE_DIRECTORY=%{KERNEL_MODULE_DIRECTORY} modules_install > > > will align with the specified install destination, > but depmod will still fail. > (same issue as 1/2) > > > > > > > > > > > --- > > 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< > %define ARCH ${ARCH} > > %define KERNELRELEASE ${KERNELRELEASE} > > +%define KERNEL_MODULE_DIRECTORY ${KERNEL_MODULE_DIRECTORY} > > %define pkg_release $("${srctree}/init/build-version") > > EOF > > > > -- > > 2.42.0 > > > > > > > -- > Best Regards > Masahiro Yamada