Mender-artifact cat mutates and damages artifact

For several years now our CI servers have been validating the mender artifacts produced with various rules. Amongst those rules are some that use mender-artifact ‘cat’ to inspect certain things in the root-filesystem in the artifact before being deployed.

This week I have updated our mender-artifact version in the yocto build to 3.5.0 and we seem to of stumbled on a problem/bug/unintended behaviour/change in behaviour.

Previous when using mender-artifact 3.2.1 with ‘cat’ command this was a read-only inspection, but in 3.5.0 when i do a ‘cat’ on the mender artifact it mutates and breaks it, signature is gone, compression type is changed from lzma to gzip. Its as if its now getting unpacked and repackaged.

Is this is intended behaviour now?. The same thing happens if i use the ‘cp’ command to copy a file out of the artifact. The expectation for read only functionality like these is that the artifact being inspected shouldn’t be mutated.

This exists also with the latest checked out HEAD in master branch.

I can work around it for now by changing to make a copy of the artifact to inspect and then discard it.

This is definitely sounds like a bug to me!

Ticket here :slight_smile:

1 Like

thank you :slight_smile:

1 Like

@dellgreen This should now be fixed in master :slight_smile:

awesome thankyou :slight_smile: