mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
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. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -19,15 +19,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"
|
||||
|
||||
Reference in New Issue
Block a user