public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Christian Heusel" <christian@heusel.eu>,
	"Nicolas Schier" <nicolas@fjasle.eu>,
	"Thomas Weißschuh" <linux@weissschuh.net>
Subject: Re: [PATCH] kbuild: pacman-pkg: hardcode module installation path
Date: Mon, 17 Mar 2025 10:07:52 -0700	[thread overview]
Message-ID: <20250317170752.GA830988@ax162> (raw)
In-Reply-To: <20250315151522.2766939-1-masahiroy@kernel.org>

On Sun, Mar 16, 2025 at 12:15:20AM +0900, Masahiro Yamada wrote:
> 'make pacman-pkg' for architectures with device tree support (i.e., arm,
> arm64, etc.) shows logs like follows:
> 
>   Installing dtbs...
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/actions/s700-cubieboard7.dtb
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/actions/s900-bubblegum-96.dtb
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr//lib/modules/6.14.0-rc6+/dtb/airoha/en7581-evb.dtb
>       ...
> 
> The double slashes ('//') between 'usr' and 'lib' are somewhat ugly.
> 
> Let's hardcode the module installation path because the package contents
> should remain unaffected even if ${MODLIB} is overridden. Please note that
> scripts/packages/{builddeb,kernel.spec} also hardcode the module
> installation path.
> 
> With this change, the log will look better, as follows:
> 
>   Installing dtbs...
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/actions/s700-cubieboard7.dtb
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/actions/s900-bubblegum-96.dtb
>     INSTALL /home/masahiro/linux/pacman/linux-upstream/pkg/linux-upstream/usr/lib/modules/6.14.0-rc6+/dtb/airoha/en7581-evb.dtb
>       ...
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Seems reasonable to me.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  scripts/package/PKGBUILD | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> index 0cf3a55b05e1..452374d63c24 100644
> --- a/scripts/package/PKGBUILD
> +++ b/scripts/package/PKGBUILD
> @@ -53,7 +53,7 @@ build() {
>  _package() {
>  	pkgdesc="The ${pkgdesc} kernel and modules"
>  
> -	local modulesdir="${pkgdir}/usr/${MODLIB}"
> +	local modulesdir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}"
>  
>  	_prologue
>  
> @@ -81,7 +81,7 @@ _package() {
>  _package-headers() {
>  	pkgdesc="Headers and scripts for building modules for the ${pkgdesc} kernel"
>  
> -	local builddir="${pkgdir}/usr/${MODLIB}/build"
> +	local builddir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}/build"
>  
>  	_prologue
>  
> @@ -114,7 +114,7 @@ _package-debug(){
>  	pkgdesc="Non-stripped vmlinux file for the ${pkgdesc} kernel"
>  
>  	local debugdir="${pkgdir}/usr/src/debug/${pkgbase}"
> -	local builddir="${pkgdir}/usr/${MODLIB}/build"
> +	local builddir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}/build"
>  
>  	_prologue
>  
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2025-03-17 17:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15 15:15 [PATCH] kbuild: pacman-pkg: hardcode module installation path Masahiro Yamada
2025-03-15 15:20 ` Thomas Weißschuh
2025-03-17 17:07 ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250317170752.GA830988@ax162 \
    --to=nathan@kernel.org \
    --cc=christian@heusel.eu \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=masahiroy@kernel.org \
    --cc=nicolas@fjasle.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox