Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-1741

mender-artifact can modify any file



    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Sprint:
      MEN Sprint 56
    • Story Points:
    • Backlog:


      Today we can modify these configuration items using mender-artifact modify:

         --key value, -k value               Full path to the private key that will be used to sign the artifact after modifying.
         --server-uri value, -u value        Mender server URI; the default URI will be replaced with given one.
         --server-cert value, -c value       Full path to the certificate file that will be used for validating Mender server by the client.
         --verification-key value, -v value  Full path to the public verification key that is used by the client  to verify the artifact.
         --name value, -n value              New name of the artifact.
         --tenant-token value, -t value      Full path to the tenant token that will be injected into modified file.

      For evaluation and testing purposes it is very beneficial to enable mender-artifact modify to modify any file within the disk image (.sdimg) or Mender Artifact (.mender). In particular, the tutorial for physical devices require to update the network configuration:

      • Append entries to /etc/hosts
      • Replace file /etc/systemd/network/eth.network

      It would drastically simplify this getting started guide if these two items were supported directly in mender-artifact modify.

      A simple user interface to this would be to allow the user to run any command that reads or writes to the root file system. For example:

      mender-artifact modify mender-raspberrypi3_master.sdimg --command "echo $IP_OF_MENDER_SERVER_FROM_DEVICE docker.mender.io s3.docker.mender.io |  tee -a $MENDER_ROOTFS/etc/hosts"

      Another option is to run a command that produces some output and explicitly specify a file that this output should go into; however this might be a bit more complicated (may need to support append and set to file, for example).

      Acceptance criteria

      • Any file in the rootfs can be modified
      • The referenced documentation is simplified


          Release management

            Issue Links



                oleorhagen Ole Petter Orhagen
                a10003 Eystein Maloy Stenberg
                0 Vote for this issue
                3 Start watching this issue