Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: pacman-pkg: hardcode module installation path

'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>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>

+3 -3
+3 -3
scripts/package/PKGBUILD
··· 53 53 _package() { 54 54 pkgdesc="The ${pkgdesc} kernel and modules" 55 55 56 - local modulesdir="${pkgdir}/usr/${MODLIB}" 56 + local modulesdir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}" 57 57 58 58 _prologue 59 59 ··· 81 81 _package-headers() { 82 82 pkgdesc="Headers and scripts for building modules for the ${pkgdesc} kernel" 83 83 84 - local builddir="${pkgdir}/usr/${MODLIB}/build" 84 + local builddir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}/build" 85 85 86 86 _prologue 87 87 ··· 114 114 pkgdesc="Non-stripped vmlinux file for the ${pkgdesc} kernel" 115 115 116 116 local debugdir="${pkgdir}/usr/src/debug/${pkgbase}" 117 - local builddir="${pkgdir}/usr/${MODLIB}/build" 117 + local builddir="${pkgdir}/usr/lib/modules/${KERNELRELEASE}/build" 118 118 119 119 _prologue 120 120