diff mbox series

kbuild: deb-pkg: Do not install maint scripts for arch 'um'

Message ID 20241212-kbuild-deb-pkg-no-maint-scripts-for-um-v1-1-45db61e3272a@fjasle.eu (mailing list archive)
State New
Headers show
Series kbuild: deb-pkg: Do not install maint scripts for arch 'um' | expand

Commit Message

Nicolas Schier Dec. 12, 2024, 1:05 p.m. UTC
Stop installing Debian maintainer scripts when building a
user-mode-linux Debian package.

Debian maintainer scripts are used for e.g. requesting rebuilds of
initrd, rebuilding DKMS modules and updating of grub configuration.  As
all of this is not relevant for UML but also may lead to failures while
processing the kernel hooks, do no more install maintainer scripts for
the UML package.

Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
---
Misleaded predecessor patch:
https://lore.kernel.org/linux-kbuild/20241212-kbuild-deb-pkg-no-initrd-for-um-v1-1-23243b5c7093@fjasle.eu/
---
 scripts/package/builddeb | 6 ++++++
 1 file changed, 6 insertions(+)


---
base-commit: 8f2db654f79c7fa579c64eda2b5db44553d6e513
change-id: 20241212-kbuild-deb-pkg-no-maint-scripts-for-um-2261ffdfb903

Best regards,
diff mbox series

Patch

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index b497b933901013b1b8b82c2c340a88c9257c6193..3627ca227e5a5db520958e6eb0128512dca083bc 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -65,6 +65,12 @@  install_linux_image () {
 	esac
 	cp "$(${MAKE} -s -f ${srctree}/Makefile image_name)" "${pdir}/${installed_image_path}"
 
+	if [ "${ARCH}" != um ]; then
+		install_maint_scripts "${pdir}"
+	fi
+}
+
+install_maint_scripts () {
 	# Install the maintainer scripts
 	# Note: hook scripts under /etc/kernel are also executed by official Debian
 	# kernel packages, as well as kernel packages built using make-kpkg.