kbuild: rpm-pkg: mark installed files in /boot as %ghost
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 2 Feb 2024 13:35:18 +0000 (22:35 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 19 Feb 2024 09:20:40 +0000 (18:20 +0900)
Mark the files installed to /boot as %ghost to make sure they will be
removed when the package is uninstalled.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
scripts/package/kernel.spec

index aaedb6d1b26fa6833e818fdbd214d64b3ab3507d..ecedcfc11e737e18d6983014c58e6e7d5484193e 100644 (file)
@@ -77,6 +77,10 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
                echo "%ghost /lib/modules/%{KERNELRELEASE}/modules.${x}"
        done
 
+       for x in System.map config vmlinuz; do
+               echo "%ghost /boot/${x}-%{KERNELRELEASE}"
+       done
+
        echo "%exclude /lib/modules/%{KERNELRELEASE}/build"
 } > %{buildroot}/kernel.list