As one idea, would it help your workflow if cp / install took several files that could be copied in one operation?
Yes It would help a bit, but according to mender-artifact cp --help
, it doesn’t seem to support copying multiple files in one run. Please correct me if I’m wrong.
Anyway, as I also need to add Artifact state scripts to already created mender artifacts and mender-artifact
doesn’t support this, I ended up with the following workflow as the most time efficient:
- run mender-convert and kill it as soon as it starts creating .mender file
- mount .sdimg and copy all files inside (mender.config, identity, inventiry, client state-scripts)
- mount .ext4 and perform the same copying
- create mender artifact from .ext4, adding artifact state scripts using
mender-artifact write rootfs-image .... --script <artifactScript>