diff mbox series

image: Fix base-passwd attribution on read-only rootfs

Message ID 20261120131141.7791-1-niko.mauno@vaisala.com
State New
Headers show
Series image: Fix base-passwd attribution on read-only rootfs | expand

Commit Message

Niko Mauno Nov. 20, 2026, 1:11 p.m. UTC
Since commit c3097962ac92, license.manifest is written after
_uninstall_unneeded(), so read-only rootfs images no longer attribute
base-passwd, although its preinst creates /etc/passwd and /etc/group
from its GPL-2.0-only passwd.master and group.master. The SPDX rootfs
SBOM has lacked it the same way since it was introduced. Drop
base-passwd from ROOTFS_RO_UNNEEDED: its package is empty, so removing
it never freed anything. The image manifest and buildhistory, always
written after the removal, now list it too.

Tested with core-image-minimal and read-only-rootfs on qemux86-64:
base-passwd is back in license.manifest, package.manifest and the
rootfs SBOM, and the rootfs, without package-management, is identical
to one built with the old default.

Fixes: c3097962ac92 ("rootfs: move tasks using image_list_installed_packages to postuninstall")
AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
 meta/classes-recipe/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 1e3c784ec9..1240650683 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -50,7 +50,7 @@  IMAGE_INSTALL_DEBUGFS ?= ""
 
 # These packages will be removed from a read-only rootfs after all other
 # packages have been installed
-ROOTFS_RO_UNNEEDED ??= "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
+ROOTFS_RO_UNNEEDED ??= "update-rc.d shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # packages to install from features
 FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"