linux/scripts/package
Masahiro Yamada 8d1001f7bd kbuild: rpm-pkg: fix build error with CONFIG_MODULES=n
When CONFIG_MODULES is disabled, 'make (bin)rpm-pkg' fails:

  $ make allnoconfig binrpm-pkg
    [ snip ]
  error: File not found: .../linux/rpmbuild/BUILDROOT/kernel-6.10.0_rc3-1.i386/lib/modules/6.10.0-rc3/kernel
  error: File not found: .../linux/rpmbuild/BUILDROOT/kernel-6.10.0_rc3-1.i386/lib/modules/6.10.0-rc3/modules.order

To make it work irrespective of CONFIG_MODULES, this commit specifies
the directory path, /lib/modules/%{KERNELRELEASE}, instead of individual
files.

However, doing so would cause new warnings:

  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.alias
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.alias.bin
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.builtin.alias.bin
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.builtin.bin
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.dep
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.dep.bin
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.devname
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.softdep
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.symbols
  warning: File listed twice: /lib/modules/6.10.0-rc3-dirty/modules.symbols.bin

These files exist in /lib/modules/%{KERNELRELEASE} and are also explicitly
marked as %ghost.

Suppress depmod because depmod-generated files are not packaged.

Fixes: 615b3a3d2d ("kbuild: rpm-pkg: do not include depmod-generated files")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
2024-06-26 00:18:57 +09:00
..
debian kbuild: deb-pkg: call more misc debhelper commands 2024-02-19 18:20:39 +09:00
builddeb kbuild: deb-pkg: call more misc debhelper commands 2024-02-19 18:20:39 +09:00
buildtar kbuild: buildtar: install riscv compressed images as vmlinuz 2024-05-10 04:34:52 +09:00
gen-diff-patch kbuild: give up untracked files for source package builds 2023-04-11 08:58:45 +09:00
install-extmod-build kbuild: deb-pkg: do not search for 'scripts' directory under arch/ 2024-01-05 19:35:38 +09:00
kernel.spec kbuild: rpm-pkg: fix build error with CONFIG_MODULES=n 2024-06-26 00:18:57 +09:00
mkdebian kbuild: deb-pkg: use more debhelper commands in builddeb 2024-01-05 19:35:38 +09:00
mkspec kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
snapcraft.template kbuild: remove the last use of old cmd_src_tar rule in packaging 2023-11-28 11:38:32 +09:00