nvme-cli: Support read-only systems
A message that is not in the archive (sent off-list or not yet received): 1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.ba551bc3-35c1-4b42-9494-4d015164822c@emailsignatures365.codetwo.com
PATCH 1/1 nvme-cli: Support read-only systems
Attempting to install nvme-cli on a read-only system fails because of the post-install script that creates /etc/nvme/hostnqn and hostid. These files aren't actually needed for 99% of nvme-cli functionality.
Split the postinstall into a separate package, nvme-cli-user and also move the unwanted util-linux-uuidgen dependency to that package.
This allows to install and use nvme-cli on a read-only rootfs. If someone wants to run nvme-stas it will need a dependency on nvme-cli-user to create the files.
--- meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta-oe/recipes-bsp/nvme-cli/nvme-cli_2.8.bb +4 -3
@@ -16,15 +16,16 @@ inherit bash-completion meson pkgconfig systemd EXTRA_OEMESON += "-Dsystemddir=${systemd_unitdir}/system" -pkg_postinst_ontarget:${PN}() { +pkg_postinst_ontarget:${PN}-user() { ${sbindir}/nvme gen-hostnqn > ${sysconfdir}/nvme/hostnqn ${bindir}/uuidgen > ${sysconfdir}/nvme/hostid } -PACKAGES =+ "${PN}-dracut ${PN}-zsh-completion" +PACKAGES =+ "${PN}-dracut ${PN}-zsh-completion ${PN}-user" FILES:${PN} += "${systemd_system_unitdir}" FILES:${PN}-dracut = "${nonarch_libdir}/dracut/dracut.conf.d" FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" +ALLOW_EMPTY:${PN}-user = "1" -RDEPENDS:${PN} = "util-linux-uuidgen" +RDEPENDS:${PN}-user = "util-linux-uuidgen"
Signature · 18 lines
2.34.1 Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: [email protected] W: www.topic.nl Please consider the environment before printing this e-mail