On Thu, Dec 12, 2024 at 6:25 PM Nicolas Schier <nicolas@xxxxxxxxx> wrote: > > Do not request initramfs-tools to build an initrd image for > user-mode-linux. > > Building and installing a user-mode-linux Debian package with > > make bindeb-pkg ARCH=um > apt install ./user-mode-linux-*.deb > > fails reasonable due to missing kernel config in /boot > (KVER=6.13.0-rc2-00006-g8f2db654f79c): > > update-initramfs: Generating /usr/bin/initrd.img-${KVER} > grep: /boot/config-${KVER}: No such file or directory > W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using > gzip > grep: /boot/config-${KVER}: No such file or directory > E: gzip compression (CONFIG_RD_GZIP) not supported by kernel > update-initramfs: failed for /usr/bin/initrd.img-${KVER} with 1. > run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return > code 1 > ... > dpkg: error processing package user-mode-linux-${KVER} (--configure): > installed user-mode-linux-${KVER} package post-installation script > subprocess returned error exit status 1 > Errors were encountered while processing: > user-mode-linux-${KVER} > E: Sub-process /usr/bin/dpkg returned an error code (1) > > There is no need to build initrd for user-mode-linux, so stop requesting > it. > > Signed-off-by: Nicolas Schier <nicolas@xxxxxxxxx> > --- I think this change is wrong. maint scripts do not make sense for user-mode-linux. > scripts/package/builddeb | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index b497b933901013b1b8b82c2c340a88c9257c6193..d88ee487a1f2cfa3365350abe5b2203f48980d36 100755 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -46,10 +46,12 @@ install_linux_image () { > cp System.map "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}/System.map" > cp ${KCONFIG_CONFIG} "${pdir}/usr/share/doc/${pname}/config" > gzip "${pdir}/usr/share/doc/${pname}/config" > + initrd_wanted=No > else > mkdir -p "${pdir}/boot" > cp System.map "${pdir}/boot/System.map-${KERNELRELEASE}" > cp ${KCONFIG_CONFIG} "${pdir}/boot/config-${KERNELRELEASE}" > + initrd_wanted=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) > fi > > # Not all arches have the same installed path in debian > @@ -82,7 +84,7 @@ install_linux_image () { > export DEB_MAINT_PARAMS="\$*" > > # Tell initramfs builder whether it's wanted > - export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) > + export INITRD=${initrd_wanted} > > # run-parts will error out if one of its directory arguments does not > # exist, so filter the list of hook directories accordingly. > > --- > base-commit: 8f2db654f79c7fa579c64eda2b5db44553d6e513 > change-id: 20241212-kbuild-deb-pkg-no-initrd-for-um-1c7b9ab2f264 > > Best regards, > -- > Nicolas > -- Best Regards Masahiro Yamada